大约有 1,246 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0075 秒)
Laya_社区(924) Laya3.0_api(80) Laya2.0_文档(78) Laya_示例(64) Laya2.0_示例(51) Laya3.0_文档(45) laya_api(2) Laya2.0_api(2)
...>= this._count) { if (loop) this._index = 0; else { _index--; stop(); } event(Event.COMPLETE); } } } 这里刚开始渲染最后一帧时,就会发出complete。也就是收到这个事件时,最后一帧刚刚显示出来。如果在complete回调里去移除特效或者切换动作,最...
来源: Laya_社区 发布时间: 20160714
...a设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElementInArea, [videoElement, reference, 0, 0, reference.width, reference.height]); } } new DOM_Video();class DOM_Video { constructor() { Laya.init(800, 600); Laya.stage.bgColor = "#FFFFFF...
来源: Laya2.0_示例 发布时间: 20260303
..."../../res/threeDimen/scene/TerrainScene/XunLongShi.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Scenes").getChildByName("Main Camera"); camera.addComponent(CameraMoveScript); var skyBox = new Laya.SkyBox(); skyBox.textureCube = Laya.TextureCu...
来源: Laya_示例 发布时间: 20260303
...获取了,可以通过加一个延迟函数进行处理抑或添加一个Event.COMPLETE函数。 参考如下: 第二个问题:this.body和this.hero的区别 this.body是Role类下的animation实例:是个Animation this.hero是Role类的实例:是个Sprite(因为Role继承自Sprite) ...
来源: Laya_社区 发布时间: 20160729
...buttons", inspector: "Buttons", options: { buttons: [ { caption: "取消", event: "click_cancel_gen" }, { caption: "生成", event: "click_start_gen" } ] } } ] } ]); Editor.extensionManager.createSettings("SplitAtlasSetting", "project"); } } class SplitAtlasMenu { @IEditor.menu("App/私人/图集分...
来源: Laya_社区 发布时间: 20250731
...ale(0,0); //将原地图放大3倍 this.tMap.scale = 3; Laya.stage.on(Laya.Event.RESIZE,this,this.resize); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); this.resize(); } /** * 移动地图视口 */ private mouseMove():void{ var mo...
来源: Laya2.0_文档 发布时间: 20210715
...线检测, 直接使用全局触控即可 var _self = this; document.addEventListener("mousedown",function(event){_self.onActDown(event);},false); document.addEventListener("mouseup",function(event){_self.onActUp(event);},false); document.addEventListener( 'touchstart', function(event){ _self.onA...
来源: Laya_社区 发布时间: 20180114
...效,单点的情况下会获得三个触摸点信息Laya.stage.on(Laya.Event.MOUSE_DOWN, this, (data: Laya.Event) => { let str = ""; if (data.touches) { for (let i = 0; i < data.touches.length; i++) { str += ` {${i} : ${data.touches[i].pos.toString()}}`; } } console.log("drag mouse down", st...
来源: Laya_社区 发布时间: 20230823
...毕,此方法只执行一次 */ onAwake(): void { this.sprite2.on(Laya.Event.MOUSE_DOWN, this, this.test2);//设置监听,sprite1或sprite2均可 console.log(this.sprite1.mouseEnabled);//打印父节点sprite1的MouseEnabled的值:true console.log(this.sprite2.mouseEnabled);//打印子节点sp...
来源: Laya3.0_文档 发布时间: 20251010
...3倍 this.tMap.scale = 3; this.MapX = 0; this.MapY = 0; Laya.stage.on(Laya.Event.RESIZE,this,resize); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP,this,mouseUp); resize(); } /** * 移动地图视口 */ function mouseMove(){ var moveX = this.MapX - (Laya.stag...
来源: Laya2.0_文档 发布时间: 20210715