大约有 445 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0046 秒)
Laya_社区(186) Laya3.0_api(64) Laya2.0_api(60) laya_api(55) Laya2.0_文档(54) Laya3.0_文档(13) Laya_示例(8) Laya2.0_示例(5)
...离,代码如下: ```typescript //创建场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机1 var camera1 = scene.addChild(new Laya.Camera(0, 0.1, 100)); //设置相机1清除颜色 camera1.clearColor = new Laya.Vector4(0.3, 0.3, 0.3, 1.0); camera1.transform.translate(new L...
来源: Laya2.0_文档 发布时间: 20210715
...击事件 Laya.stage.once(Event.MOUSE_DOWN,this,function ():void { scene.addChild(layaMonkey); _layaMonkey = layaMonkey; //设置缩放 var tmpLocalScale:Vector3 = layaMonkey.transform.localScale; tmpLocalScale.setValue(0.3, 0.3, 0.3); layaMonkey.transform.localScale = tmpLocalScale; /*添加部分*...
来源: Laya2.0_文档 发布时间: 20210715
...nFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask2、动态遮罩 var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00...
来源: Laya_社区 发布时间: 20170207
...tch(dir){ case "up": hero_p1.roleAni.play(0,true,"p1_walk_up"); Laya.stage.addChild(hero_p1.roleAni); break ; case "down": hero_p1.roleAni.play(0,true,"p1_walk_down"); Laya.stage.addChild(hero_p1.roleAni); break ; case "left": hero_p1.roleAni.play(0,true,"p1_walk_left"); Laya.stage.addChild(hero_p1....
来源: Laya_社区 发布时间: 20180331
...prite的对象 比如 XSprite extends Sprite 3 new出这个对象 将对象addChild到TestUI里 this.addChild(xSprite); 4 然后设置xSprite.x = 100; xSprite.y = 200; 5 然后再XSprite这个类里将XY复写比如 public set x(val: number) { this._x = val; } public get x(): number { return this._x...
来源: Laya_社区 发布时间: 20180226
... sp = new Sprite(); Laya.stage.addChild(sp); //画圆 sp.graphics.drawCircle(80,80,50,"#ff0000"); } } } ``` 代码运行效果如下图所示: ![blob...
来源: Laya2.0_文档 发布时间: 20210715
... this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画矩形 this.sp.graphics.drawRect(20, 20, 100, 50, "#ffff00"); } } } new laya.Sprite_DrawShapes(); ``` 代码运行效果: ...
来源: Laya2.0_文档 发布时间: 20210715
... this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画圆 this.sp.graphics.drawCircle(80,80,50,"#ff0000"); } } } new laya.Sprite_DrawShapes(); ``` 代码运行效果如下图所...
来源: Laya2.0_文档 发布时间: 20210715
...的链接 提交 2 个回复 wudi199553 赞同来自: var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(5, -10, 500)); 2017-12-18 0 1 分享 微博 QZONE 微信 wudi199553 赞同来自: https://ask.layabox.com/question/7565 2017-12-19 0 0 分享 ...
来源: Laya_社区 发布时间: 20171218
...码如下: ```typescript //创建场景 var scene:Scene3D = Laya.stage.addChild(new Scene3D()) as Scene3D; //创建相机1 var camera1:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; //设置相机1清除颜色 camera1.clearColor = new Vector4(0.3, 0.3, 0.3, 1.0); camera1.transform.tra...
来源: Laya2.0_文档 发布时间: 20210715