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

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

61. 淘宝创意互动发布指南(TypeScript-小游戏适配文档-淘宝创意互动) [ 60%]

...用2个方法,在 H5 上是可以正常输出内容的。 ```javascript require("a.js") require("b.js") a(); //a b(); //b ``` 但是在淘宝创意互动项目中是不支持这种写法的,需要把这 2 个方法挂载到全局变量 `$global.window` 上,修改如下: ```javascript //a.js ...

来源: Laya2.0_文档 发布时间: 20210714

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

...饰器语法 }, } 但修改完配置编译的时候会报错:This syntax requires an imported helper but module 'tslib' cannot be found 开发群里有大神提供了一种解决办法: 右键 LayaAirIDE.app->显示包内容,定位到 Contents->Resources->app->node_modules->rol...

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

63. layaair2-cmd compile 一直报错loader.js:638 throw err; [ 60%]

...ction.Module._load (internal/modules/cjs/loader.js:562:25)     at Module.require (internal/modules/cjs/loader.js:692:17)     at require (internal/modules/cjs/helpers.js:25:18)     at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\layaair2-cmd\node_modules\vin...

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

64. 新建开放域项目,发布后的文件放入微信项目内开放域项目目录就会报错 [ 58%]

...缺少代码,添加下面的代码可以解决问题。 window.loadLib = require; loadLib("weapp-adapter.js");   另外,发布目录的index.html没有意义,可以删除。 2019-06-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

65. 发布到微信小游戏提示Cannot read property 'Common' of undefined [ 58%]

...把matter.js加入了libs中。并且在game.js中加入了 let matter = require("libs/matter.js"); window.Matter = matter; 但是依然没有解决问题 2018-05-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 ...

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

66. 为什么小游戏的发布非要把所有js打包到一个js里? [ 56%]

...到的js都打包在一起, 分开的js文件,在微信的game.js里写require("xxx.js")就可以了 2018-05-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 w1114367261 赞同来自: 发布后的js是有一...

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

67. layaair2-cmd compile 有bug [ 55%]

...layaair2-cmd/node_modules/natives/index.js:143:24)     at Object.req [as require] (/usr/local/lib/node_modules/layaair2-cmd/node_modules/natives/index.js:55:10)     at Object.<anonymous> (/usr/local/lib/node_modules/layaair2-cmd/node_modules/graceful-fs/fs.js:1:37)     at Module._compile...

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

68. laya2.0引入第三方库失败 [ 53%]

... 1 个回复 rabbit 赞同来自: karin666 、李家智 import YQBCommon = require("../../libs/pb2");引用这个没必要,而且路径也是错的。删除这行,pb2.d.ts没问题后,即可正常使用。。   pb2.d.ts和protobufjs.d.ts也有问题,别用export as namespace 用 declare mo...

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

69. LayaAir 2.0 微信排行榜 离屏画布不能直接附加到组件纹理上 [ 53%]

...的报错Uncaught ReferenceError: loadLib is not defined at index.js:11 at require (WAGameSubContext.js:3) at subcontext.html:11 开放域代码到底怎么发布到主域呢 Max.魚魚魚鱼魚魚 • 2019-02-16 10:11 楼主问题解决了吗?方便的话,能分享一下2.0制作排行榜的dem...

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

70. 示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function [ 52%]

...t;>after I/LayaBox: found the file in the package:app.json I/LayaBox:  require(/sdcard/layabox/scripts/scripts/index.js) I/LayaBox:  require(/sdcard/layabox/scripts/index.js) I/LayaBox: found the file in the package:scripts/index.js I/LayaBox:  =================================================...

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