大约有 54 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0031 秒)
... this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画三角形 this.sp.graphics.drawPoly(30, 28, [0, 100, 50, 0, 100, 100], "#ffff00"); } } } new laya.Sprite_DrawShapes(...
来源: Laya2.0_文档 发布时间: 20210714
... sp = new Sprite(); Laya.stage.addChild(sp); //画三角形 sp.graphics.drawPoly(30, 28, [0, 100, 50, 0, 100, 100], "#ffff00"); } } } ``` 代码运...
来源: Laya2.0_文档 发布时间: 20210714
... { sp = new Sprite(); Laya.stage.addChild(sp); //画直线 sp.graphics.drawLine(10, 58, 167, 58, "#ff0000", 5); } })(); ``` 发布后如下图所示,我们画了一条红色的直线。 ![blob.png](img/2.png...
来源: Laya2.0_文档 发布时间: 20210715
...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
..."#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
..."#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....
来源: Laya2.0_文档 发布时间: 20210715
... { sp = new Sprite(); Laya.stage.addChild(sp); //画三角形 sp.graphics.drawPoly(30, 28, [0, 100, 50, 0, 100, 100], "#ffff00"); } })(); ``` 代码运行效果如下图所示: ![blob.png](img/2.png) ...
来源: Laya2.0_文档 发布时间: 20210715
...100,50 img.loadImage("res/img/monkey1.png"); //添加到舞台 Laya.stage.addChild(img); } } } ``` 在示例代码里,“`100,50`”是图片的显示坐标信息。示例代码运行效果如图2-1所示: ![图2-1](img/2-1.png) (图2-1) ### 1.3 用loadImage切换图片的示例 切换图片是...
来源: Laya2.0_文档 发布时间: 20210715