大约有 169 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0077 秒)
...aya.Vector3(outs[i].point.x, outs[i].point.y, outs[i].point.z); this.scene.addChild(box); } } } (动图7-1) 7.2 可视遮罩层Layer 前面5.4节中也提到过Culling Mask的用处,在我们制作游戏时,我们也可用通过代码来达到‘ 隐身 ’的效果。 还是用3D-RPG项目...
来源: Laya3.0_文档 发布时间: 20251010
...(); let pointCom = pointLight.addComponent(Laya.PointLightCom); this.scene.addChild(pointLight); //点光源的颜色 pointCom.color = new Laya.Color(1.0, 0.5, 0.0, 1); //设置点光源的范围 pointCom.range = 3.0; pointLight.transform.position = new Laya.Vector3(0.0, 1, 0.0); 三、DirectionLigh...
来源: Laya3.0_文档 发布时间: 20251010
...e; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = new Laya.Vector2(evt.stageX, evt.stageY); console.log("click", pos); this._temp.graphics.cle...
来源: Laya3.0_文档 发布时间: 20251010
...('scene/Game.ls', Laya.Handler.create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let s...
来源: Laya3.0_文档 发布时间: 20251010
...,把加载回调中返回的完整场景scene添加到舞台 Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); /** ** 省略其它代码若干,可前往Layabox官网示例或相关文档中查看 */ })); ``` ##### 5.2.2 预设的加载与使用(.lh) ...
来源: Laya2.0_文档 发布时间: 20210714
...m url viewport visible width x y zOrder Methods _initialize _processActive addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer contains customRender destroy destroyChildren drawToCanvas drawToTexture drawToTexture3D event frameLoop frameOnce freshLayout...
来源: Laya3.0_api 发布时间: 20231115
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20251010
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20250104
...e width x y zOrder Methods _initialize _processActive _setHeight _setWidth addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer contains customRender destroy destroyChildren drawToCanvas drawToTexture drawToTexture3D event frameLoop frameOnce freshLayout...
来源: Laya3.0_api 发布时间: 20231115
...m url viewport visible width x y zOrder Methods _initialize _processActive addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer contains customRender destroy destroyChildren drawToCanvas drawToTexture drawToTexture3D event frameLoop frameOnce freshLayout...
来源: Laya3.0_api 发布时间: 20231115