大约有 1,254 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0066 秒)
Laya_社区(850) Laya2.0_文档(116) Laya3.0_api(79) Laya2.0_api(73) laya_api(68) Laya3.0_文档(54) Laya2.0_示例(8) Laya_示例(6)
...omp():void{ var parent:ui.ParentViewUI = new ui.ParentViewUI(); Laya.stage.addChild(parent); //当注释掉设置rotaion的代码则没有问题,否则会导致显示异常,其他child消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ s...
来源: Laya_社区 发布时间: 20170829
...hics.drawCircle(0,0,100,"#00CC33"); sprite.graphics = graphics; Laya.stage.addChild(sprite); //画一条直线,添加进圆 var sprite2:Sprite = new Sprite(); var graphics2:Graphics = new Graphics(); graphics2.drawLine(500,500,500,400,"#000000",2); sprite2.graphics = graphics2; Laya.stage.addChild...
来源: Laya_社区 发布时间: 20190515
...官网例子运行报错。 //=======天空盒子 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加3D场景 var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100)));//添加照相机 camera.transform.translate(new Laya.Vector3(0, 3, 3)); camera.transform.rotate(new Laya.Vector3(-30, 0...
来源: Laya_社区 发布时间: 20181203
...参考滚动支持 一、 管理列表内容 运行时,可以直接通过addChild/removeChild等API修改列表的孩子。但在实际应用中,列表的内容通常被频繁的更新。典型的用法就是当接收到后台数据时,将列表清空,然后再重新添加所有项目。如...
来源: Laya3.0_文档 发布时间: 20251128
... var bigSprite = new sprite(); var smalla = new sprite(); bigSprite.addchild(smalla); var smallb = new sprite(); bigSprite.addchild(smallb); var smallc = new sprite(); bigSprite.addchild(smallc); 意思是一个大的sprite:bigSprite 里面包含三个小的sprite:smalla ,smallb ...
来源: Laya_社区 发布时间: 20160808
...ayabox.png"); img.x=(Laya.stage.width-256)/2; //添加到舞台 Laya.stage.addChild(img); var img2:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img2.loadImage("res/layabox.png"); img2.x=(Laya.stage.width-256)/2+100; img2.y=(Laya.stage.height-256)/2-50; //添加到舞台 Laya.stag...
来源: Laya_社区 发布时间: 20200217
...ya.Sprite = new Laya.Sprite() son.loadImage("res/me.png",0,0,30,30) father.addChild(son) Laya.stage.addChild(father) father.x = 100; father.y = 100; father.on(Laya.Event.CLICK,this,this.onTestClick) 然而点击后onTestClick()根本不响应,如果改成son.on(...)倒是...
来源: Laya_社区 发布时间: 20181011
... t.color = "#ffffff"; Laya.stage.addChild(t); // 方法1:使用loadImage var ape:Sprite = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("aaa.png", 100, 100, 256, 25...
来源: Laya_社区 发布时间: 20170406
... older.loadImage("../laya/assets/comp/image.png"); Laya.stage.addChild(older); console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height); older.scale(2,2); console.log(older.s...
来源: Laya_社区 发布时间: 20170118
...ke(): void { let sprite = new Laya.Sprite(); // 添加到舞台 Laya.stage.addChild(sprite); } 3.2 显示图片 图片的显示是游戏开发的基础,Sprite类中用于显示图片是 Sprite.loadImage 和 Sprite.texture。 3.2.1 loadImage /** * <p>加载并显示一个图片。相当于加...
来源: Laya3.0_文档 发布时间: 20251010