大约有 1,254 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0069 秒)
Laya_社区(850) Laya2.0_文档(116) Laya3.0_api(79) Laya2.0_api(73) laya_api(68) Laya3.0_文档(54) Laya2.0_示例(8) Laya_示例(6)
...所指的js模块是一个个单独的界面的话,你可以通过new 和addChild对这些模块进行添加(添加到舞台或者同一个js下的容器里),这些全是开发者自己来操控的!场景的切换就是新界面的添加和旧界面的移除。添加使用new 和 addChil...
来源: Laya_社区 发布时间: 20170424
... tree 的宽度。 tree.height = 100;//设置 tree 的高度。 Laya.stage.addChild(tree);//将 tree 添加到显示列表。 } } } import laya.ui.Box; import laya.ui.Clip; import laya.ui.Label; class Item extends Box { public function Item() { this.name = "render"; this.right = 0; this.left = 0; va...
来源: Laya3.0_api 发布时间: 20231115
... let a :Laya.Sprite3D = new Laya.Sprite3D(); a.addChild(guns_test.getChildAt(0).clone()); a.transform.translate(new Laya.Vector3(0,1.38,-60))//transform.localPositionX-=2; a.transform.scale = new Laya.Vector3(10,10,10) a...
来源: Laya_社区 发布时间: 20200107
...structor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 th...
来源: Laya_社区 发布时间: 20190428
...e(this, function(){ this.scene = Laya.loader.getRes(模型url); Laya.stage.addChild(this.scene); }),null, null, 1, true, "scene1"); 执行后,浏览器报 : laya.core.js:13290 Uncaught TypeError: node._setParent is not a function at Stage.__proto.addChild (laya.core.js:13290) at Main.<anonymo...
来源: Laya_社区 发布时间: 20181208
...e(){ //创建场景 let scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机 let camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); //设置相机的名称 camera.name = "camera"; ...
来源: Laya_社区 发布时间: 20190531
...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); ```  在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式。 如果文本内容超过了...
来源: Laya2.0_文档 发布时间: 20210715
...化思路请教 现在不同场景都是继承的Sprite,原来是通过addChild和removeChild直接管控不同场景的显示和隐藏的,但是发现发布到手机后FPS会瞬间掉到个位数,然后再恢复到原来一样。今天想到能否使用visible直接控制显示隐藏,发现...
来源: Laya_社区 发布时间: 20170307
....interval = 150; this.animation.play(0, true, ActionType.MOVE_RIGHT); this.addChild(this.animation); 由于动画不能设置锚点,我想设置动画图片宽度/2为轴心点pivotX坐标让图片居中,有什么方法可以自动获得到动画图片宽度吗? 我是想设置动画完全...
来源: Laya_社区 发布时间: 20170119
...bg.width >> 1, Laya.stage.height - bg.height >> 1); this.owner.addChild(bg); } private createTimerAnimation(): void { this.counter = new Laya.Clip(this.clipSkin, 10, 1); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya.stage.width - this.counter.width) /...
来源: Laya3.0_文档 发布时间: 20251010