大约有 445 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0044 秒)
Laya_社区(186) Laya3.0_api(64) Laya2.0_api(60) laya_api(55) Laya2.0_文档(54) Laya3.0_文档(13) Laya_示例(8) Laya2.0_示例(5)
...FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta...
来源: Laya2.0_文档 发布时间: 20210714
...super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 private bg:Laya.Sprite; constructor(){ super(); this.init(); } init():void{ this.bg = new Laya.Sprite() this.bg.loadImage("res/bac...
来源: Laya_社区 发布时间: 20160804
... 0, 180, 21); this.bar.graphics.drawTexture(texture2, 0, 0, 155, 12); this.addChild(this.bg); this.addChild(this.bar); } /** * 修改当前状态 */ _proto.changeValue = function(value){ this.value += value; if(this.value < this.MIN_VALUE){ this.value = this.MIN_VALUE; }else if(this.value > th...
来源: Laya_社区 发布时间: 20160803
...NE 微信 aplsong 赞同来自: //axis 坐标辅助 var lineXYZ = scene.addChild(new Laya.PixelLineSprite3D(3)); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(50, 0, 0), Laya.Color.RED, Laya.Color.RED); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 50, 0), Laya.Colo...
来源: Laya_社区 发布时间: 20190923
..."#FFFFFF"; info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(info); Gyroscope.instance.on(Event.CHANGE, this, onDeviceorientation); } private function onDeviceorientation(absolute:Boolean, rotationInfo:RotationInfo):void { info.text = "alpha:" + Math....
来源: Laya2.0_文档 发布时间: 20210714
... this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画直线 this.sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); } } } new laya.Sprite_DrawShapes(); ``` 发布后如下...
来源: Laya2.0_文档 发布时间: 20210714
... sp = new Sprite(); Laya.stage.addChild(sp); //画直线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); } } } ``` 发布后如下图所示,我...
来源: Laya2.0_文档 发布时间: 20210714
VR摄像机怎么设置坐标跟拍摄角度? var camera = scene.addChild(new Laya.VRCamera( 0.03, 0, 0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(93, 64, -33)); camera.transform.rotate(new Laya.Vector3(0.05, 155, 0), true, false); camera.clearColor = null; camera.addComponent(VRCam...
来源: Laya_社区 发布时间: 20170707
sprite的宽高获取为0 bgS = new Sprite(); addChild(bgS); bgI = new Image(bgNameS); bgS.addChild(bgI); trace(bgS.width,bgS.height);//此时打印的宽高都为0 这直接会影响到vbox和hbox的排列,如下 var vbox:VBox = new VBox(); vbox.space = 30; addChild(vbox...
来源: Laya_社区 发布时间: 20170828
..."#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.fl...
来源: Laya3.0_文档 发布时间: 20230303