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

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

91. 项目启动入口说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 83%]

...建一个Entry.ts,示例代码如下: export async function main() { console.log("Hello LayaAir!"); //加载场景并打开场景 Laya.Scene.open('Scene.ls'); } 然后,我们在项目设置的脚本编译栏中,找到脚本编译选项分类下的启动脚本设置项, 通过输入框右...

来源: Laya3.0_文档 发布时间: 20251216

92. LayaAirIDE 2.0 laya.wxmini.js 第3行报错! 创建3D项目(TypeScript),导出微信小游戏,选择了JS混淆,崩溃在 laya.wxmini.js 第3行,错误如下 [ 83%]

...libs = )).push({ f: i, i: e }); }), window.layalib(function (i, e, t) {   console 窗口报错如下: ------------------------------------------ WAGame.js:3 gameThirdScriptErrorCannot assign to read only property 'window' of object '#<Window>' TypeError: Cannot assign to read only property ...

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

93. HttpRequest在网页上和APP上表现不一致 [ 83%]

...uest();     hr.http.timeout = 3000;     hr.http.ontimeout = function(){console.log("http timeout test: timeout")};     hr.once(Laya.Event.COMPLETE, this, ()=>{console.log("http timeout test: success");});     hr.once(Laya.Event.ERROR, this, (e: any)=>{console.log("http timeout test: er...

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

94. 发布时勾选压缩js后,gulp uglify生成的sourcemap在哪里 [ 83%]

...cemaps.write(releaseDir + '/../sourcemaps')) .on('error', function (err) { console.warn(err.toString()); }) .pipe(gulp.dest(releaseDir)); } }); 可以看到laya是用uglify工具压缩的js 2、生成js对应的 .js.map文件 .js.map :map文件是js文件压缩后,文件的变量名替换对应...

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

95. 【经验分享】如何让ts项目支持装饰器语法,以及自动化发布相关的一些东西 [ 83%]

...d, { silent: true, shell: true, }); _gulp.stdout.on('data', (data) => { console.log(`${data}`); }); _gulp.stderr.on('data', (data) => { console.log(`${data}`); }); _gulp.on('close', (code) => { console.log(`exit:${code}`); });   b)、创建并编写脚本 tools-publish.js#!/usr/bin/env n...

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

96. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 83%]

...s.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya.stage.mouseX, Laya.stage.mouseY); // console.log("移动的点集合" + this.path); thi...

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

97. 网络和格式-XML [ 83%]

...alue = "item aitem bsomethings..."; this.proessXML(xmlValueContainsError); console.log("\n"); this.proessXML(xmlValue); } // 使用xml proessXML(source) { const Utils = Laya.Utils; let xml; try { xml = Utils.parseXMLFromString(source); } catch (e) { console.log(e.massage); return; } this.printDirect...

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

98. socket通讯返回数据 [ 82%]

...# } private openHandler(event: any = null): void { //正确建立连接; console.log("建立连接");//***************************************************************************不写出 console.log(event); } private receiveHandler(msg: any = null): void { ///接收到数据触发函数 console.l...

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

99. 动态阴影被切割了?为啥没有显示完成的阴影 [ 82%]

...{ var box = scene.addChild(new myCube(0.1, 0.1, 11.5, colorCalc(), 0, 1)); console.log(box); } function addTestBox() { var box = scene.addChild(new myCube(0.1, 0.1, 11.5, colorCalc(), 0, 1)); console.log(box); } function addFirstBox() { var box = scene.addChild(new myCube(1, 1, 0.5, colorCalc(), 0))...

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

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

...tr = new String("大家好,这是websocket通信!");             console.log("str.length*2:" + str.length*2);             var b = new ArrayBuffer(20 + str.length*2);             var dv = new DataView(b, 0);             dv.setUint16(0, str.length*2, false);           ...

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