大约有 3,979 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0074 秒)
Laya_社区(2827) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(53)
Laya.stage.getChildAt(i) as Role 在js下的写法是什么? var role: Role = Laya.stage.getChildAt(i) as Role; 怎么用js 实现,在js中没有 as 写法,在js中 var role =Laya.stage.getChildAt(i); 得到的role 是Laya.Sprite类 不是我定义的Role 2016-08-28 添加评论 免费帖 -->...
来源: Laya_社区 发布时间: 20160828
...发布后就有了,临时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERRO...
来源: Laya_社区 发布时间: 20180908
...unction () { this.height = this.width = 77; var cMask = new Laya.Sprite();//创建遮罩对象 var r = 38.5; //遮罩圆形半径 cMask.graphics.drawCircle(0, 0, r, "#ff0000");//画一个圆形的遮罩区域 cMask.pos...
来源: Laya_社区 发布时间: 20181119
...的链接 提交 5 个回复 Chaplin 赞同来自: 在game.js开头加入 var window = window || global; var document = document || (window.document = {}); 然后报这个错了,index.js都无法载入。 2019-01-05 0 0 分享 微博 QZONE 微信 Chaplin 赞同来自: demo见附件 wxgy.rar 2019-0...
来源: Laya_社区 发布时间: 20190104
...发布后就有了,临时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERRO...
来源: Laya_社区 发布时间: 20180908
...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精...
来源: laya_api 发布时间: 20170929
...de = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5));...
来源: Laya_社区 发布时间: 20161201
...a.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya....
来源: Laya2.0_示例 发布时间: 20250225
...a.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya...
来源: Laya2.0_示例 发布时间: 20250225
...le { public function LayaSample() { //初始化引擎 Laya.init(1136,640); var txt:Text = new Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "cen...
来源: Laya2.0_文档 发布时间: 20210715