• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)

451. UI-Tree [ 60%]

... "res/ui/tree/clip_tree_arrow.png" ]; Laya.loader.load(res, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { const Utils = Laya.Utils, Tree = Laya.Tree; // 组装tree的数据 let treeData = ""; for (let i = 0; i "; for (let j = 0; j "; } treeData += ""; } treeData += ""; // 解析tr...

来源: Laya2.0_示例 发布时间: 20251130

452. 我用laya.websocket通信 二进制数据, 服务器对二进制数据进行解析,解析出来不是预期,请问我哪里写错了? 代码如下 [ 59%]

...        }             console.log("copy end");             this.socket.send(b);             console.log("send end");             this.socket.flush(); 2017-06-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

来源: Laya_社区 发布时间: 20170628

453. 缓动-逐字缓动 [ 59%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Text = Laya.Text, Tween = Laya.Tween, Ease = Laya.Ease; let w = 400; let offset = Laya.stage.width - w >> 1; let endY = Laya.stage.height / 2 - 50; let demoString = "LayaBox"; for (let i = 0, l...

来源: Laya2.0_示例 发布时间: 20251130

454. Sprite-缓存为静态图像 [ 59%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.cacheText(); } cacheText() { const Sprite = Laya.Sprite, Text = Laya.Text; let textBox = new Sprite(); Laya.stage.addChild(textBox); // 随机摆放文本 let text; for (let i = 0; i < 1000; i++) { text = new Text(); tex...

来源: Laya2.0_示例 发布时间: 20251130

455. 使用js压缩工具报错 [ 59%]

...ZONE 微信 kylin 赞同来自: 第813行 Config.FunRestart=Handler.create(this,this.on重启); 定义的变量、函数名等,不要出现中文等非ASCII字符,变量的命名最好要符合规范。   LayaAirIDE里的压缩工具会分析代码,类似的中文命名的变量,通不过...

来源: Laya_社区 发布时间: 20180806

456. 引擎这一句是不是疏忽了? [ 59%]

... */     __proto.clearForces=function(){         var rigidBody=this._nativeColliderObject;         if (rigidBody==null)             throw "Attempted to call a Physics function that is avaliable only when the Entity has been already added to the Scene.";        ...

来源: Laya_社区 发布时间: 20190614

457. 【Laya2.1BUG】 给view设置runtime后,类型是any [ 59%]

...:if(ProjectSetting.codeType==0){ imports+=" import "+lib+";\n"; }else if(this.projectSetting.codeType==1&amp;&amp;lib.lastIndexOf(".ts")==lib.length-3){ libName=lib.substring(lib.lastIndexOf("/")+1,lib.length); if(libName.lastIndexOf(".")&gt;=0){ libName=libName.substring(0,libName.lastIndexOf("."...

来源: Laya_社区 发布时间: 20190531

458. 如何主动抛出Event.RESIZE事件 [ 59%]

...NE 微信 ohkei - as3、as2、h5 赞同来自: Laya.stage.on(Event.RESIZE, this, resizeFn); resizeFn();   你在监听Event.RESIZE的同时,调用一下你的方法resizeFn();不就行了嘛 2017-08-02 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先...

来源: Laya_社区 发布时间: 20170717

459. can not read property "elements" of underfined [ 59%]

...eScript脚本写控制摄像机移动的功能, var yPRElem:Float32Array=this.yawPitchRoll.elements;   附件 : --> 2019-02-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Laya_Aaron 赞同来自: 可能是...

来源: Laya_社区 发布时间: 20190226

460. VR场景-VR地球 [ 59%]

...r scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this.rotation = new Laya.Vector3(0, 0.002, 0); //与3d场景的不同是添加了vr相机 var vrCamera: Laya.VRCamera = scene.addChild(new Laya.VRCamera(0.03, 0, 0, 0.1, 100)) as Laya.VRCamera; vrCamera.transform.translate(ne...

来源: Laya_示例 发布时间: 20251130