大约有 157 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0066 秒)
...operty( { type : Laya.Scene3D } ) private scene: Laya.Scene3D; onStart() { console.log("Game start"); //加载预制体文件 Laya.loader.load("resources/Prefab.lh").then( (res)=>{ //创建预制体 let monkey: Laya.Sprite3D = res.create(); //添加预制体到场景中 this.scene.addChild( monke...
来源: Laya3.0_文档 发布时间: 20241014
...不对啊,怎么用啊 let view = Laya.ClassUtils.getInstance('MainPage'); console.log(view); // var view = new MainPage(); // Laya.stage.addChild(view); 我打印出来是null,找不class MainPage liwenhua • 2018-01-22 16:55 为啥不管用啊?????? qian • 2018-01-22 16:59 在调用这个方法...
来源: Laya_社区 发布时间: 20180122
...operty( { type : Laya.Scene3D } ) private scene: Laya.Scene3D; onStart() { console.log("Game start"); //加载预制体文件 Laya.loader.load("resources/Prefab.lh").then( (res)=>{ //创建预制体 let monkey: Laya.Sprite3D = res.create(); //添加预制体到场景中 this.scene.addChild( monke...
来源: Laya3.0_文档 发布时间: 20251105
...orker = new Worker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下: ```typescript self.addEventListener('message', function (e) { var xmlreq =...
来源: Laya2.0_文档 发布时间: 20210715
... var returnarr=[];layaZombie.meshRender.boundingBox.getCorners(returnarr); console.log(returnarr); 打印出来的数据为0.。。。另外在进行批量预加载 Laya.loader.load 的时候,应当使用哪种类型加载3D文件?我试了所有的似乎都不成功。
来源: Laya_社区 发布时间: 20171117
...orker = new Worker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下 ```javascript self.addEventListener('message', function (e) { var xmlreq ...
来源: Laya2.0_文档 发布时间: 20210715
... asset:string = assets[i]; //查看log,清理前资源一直在内存中 console.log(Laya.loader.getRes(asset)); //调用清理方法 Laya.loader.clearRes(asset); //查看log,清理后,资源被卸载 console.log(Laya.loader.getRes(asset)); } }); 1.4 关于滤镜、遮罩 尝试尽量减少使...
来源: Laya3.0_文档 发布时间: 20251010
...der.getRes(this._skin); if (!img){ console.log("lose skin",this._skin); return; }; var width=img.sourceWidth; var height=img.sourceHeight / this._stateNum; img.$_GID || (im...
来源: Laya_社区 发布时间: 20191122
...e.runNodeScript(node.id, node.getComponent("MyScript").id, "test", "abc"); console.log(ret); 3、自定义一个函数,并执行。例如: //下面是场景进程的代码 //注意:IEditorEnv.regClass是必须的 @IEditorEnv.regClass() export class TestSceneScript { //注意:this是当前的...
来源: Laya3.0_文档 发布时间: 20251010
...in.scene"); } onEnable() { console.log('init'); } } /**This class is automatically generated by LayaAirIDE, please do not make any modifications. */ class GameConfig { static init() { //...
来源: Laya_社区 发布时间: 20201110