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

大约有 1,013 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0055 秒)

81. 怎么获取对象的坐标 [ 83%]

...這樣:   Vector3 {elements: Float32Array[3]}   改成這樣:    console.log( camera.transform.position.x ); console.log( camera.transform.position.y ); console.log( camera.transform.position.z );   另外;你的 position 打錯,不是 postion 是 position。   2017-08-08 2 0 分享...

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

82. linearVelocity 获取的线速度不正确 [ 83%]

...        this.rigidbody.linearVelocity = vectory;         console.log("施加的线速度:");         console.log(vectory);         console.log("获取得到的线速度:");         console.log(this.rigidbody.linearVelocity);     附件 : --> 2020-03-30...

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

83. 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

84. 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

85. 发布时勾选压缩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

86. 【经验分享】如何让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

87. 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

88. 网络和格式-XML [ 82%]

...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_示例 发布时间: 20240930

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

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

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

90. 动态阴影被切割了?为啥没有显示完成的阴影 [ 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