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

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

21. 分包发布,static方法拿取不到。报错:类名.静态方法名 is not a function [ 78%]

... a function OPPO分包发布时遇到一个问题,当在index.js中最后require("./libs/laya.d3.js");时会报错Shader3D.propertyNameToID is not a function。将require该库的语句提前,则不会报错。但是后导入的类的静态方法会报同样的错误。例如:Laya.QGMiniAdapte...

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

22. 全局安装layaair2-cmd报错怎么办啊 [ 78%]

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

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

23. 微信小游戏的若干问题 [ 78%]

...eferenceError: laya is not defined     at main.min.js? [sm]:1     at require (WAGame.js:11)     at WAGame.js:11     at game.js? [sm]:2     at require (WAGame.js:11)     at gamePage.html:118 window.onerror WAGame.js:11 Uncaught ReferenceError: laya is not defined     at main.min....

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

24. 微信小游戏 [ 78%]

...737/game/code.js:28297:7 at http://127.0.0.1:49737/game/code.js:28300:3 at require (http://127.0.0.1:49737/game/__ ... :13675) at http://127.0.0.1:49737/game/__ ... 13424 at http://127.0.0.1:49737/game/game.js:4:1 at require (http://127.0.0.1:49737/game/__ ... :13675) 2018-05-10 添加评论 免费...

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

25. 官网的微信小游戏2D例子,发布以后无法运行 [ 76%]

...is not defined     at http://127.0.0.1:16026/game/code.js:29:15     at require (http://127.0.0.1:16026/game/__ ... :96033)     at http://127.0.0.1:16026/game/__ ... 95643     at http://127.0.0.1:16026/game/game.js:3:30     at require (http://127.0.0.1:16026/game/__ ... :96033)     at &lt...

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

26. ts中调用js报错 [ 76%]

ts中调用js报错 如图所示,我调用require方法,它就报错了。 附件 : --> 2018-10-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: LayaIDE1.x版本,还不支持require...

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

27. laya的ide如何import js并调用里面的类和方法?VS Code正常。 [ 76%]

...差异,下面这行<script type="text/javascript" src="node_modules/requirejs/require.js"></script>  ,而vscode里可以注释掉,还是正常。   用VS Code测试: 运行后一切正常: 而layaAir IDE,如果注释掉这一行,就一片空白,不会输出任何东西...

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

28. 发布的微信小游戏代码运行出错 [ 76%]

...: Window is not defined at http://127.0.0.1:11874/game/code.js:1:773096 at require (http://127.0.0.1:11874/game/__ ... :13718) at http://127.0.0.1:11874/game/__ ... 13432 at http://127.0.0.1:11874/game/game.js:4:1 at require (http://127.0.0.1:11874/game/__ ... :13718) at http://127.0.0.1:11874/game/...

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

29. 用的2.0.0beta2,为什么发布为小游戏不会生成code.js? [ 76%]

...不会生成code.js?   1.勾选了红框的话,生成的game.js会是 require("weapp-adapter.js"); require("./code.js"); 不勾选的话,生成的game.js会是 require("weapp-adapter.js"); require("libs/laya.wxmini.js"); window.loadLib = require; require("index.js") 引用了code.js,不生...

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

30. 真机环境找不到window---cant find variable: window stack [ 75%]

...of swan !== 'undefined') && (typeof swanGlobal !== 'undefined')) { require("swan-game-adapter.js"); require("libs/laya.bdmini.js"); } else if (typeof wx !== 'undefined') { require("weapp-adapter.js"); require("libs/laya.wxmini.js"); } window.loadLib = require; require("index.js"); 2019-01-08...

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