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

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

291. 分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 [ 62%]

...谢谢了。   1.首先在 index.html 文件中放置如下代码: <script type="text/javascript"> function convertCanvasToImage(canvas,callback,thisObj) { var image = new Image(); image.onload = function() { console.log("图片已经加载"); callback(image,thisObj) }; console.log("图片...

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

292. 无法触发浏览器文件上传框 [ 62%]

...t;input type="file" id="file" style="display: none;"></input> <script type="text/javascript"> var btn = document.getElementById('btn'); btn.addEventListener('click', function(){ document.getElementById("file").click(); }); </script> </body> </html>我想你理解错...

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

293. Maximum call stack size exceeded [ 62%]

... class GameConfig {         static init() {             //注册Script或者Runtime引用             let reg = Laya.ClassUtils.regClass;     reg("script/GameMain.js",GameMain);         }     }     GameConfig.width = 640;     GameConfig.height = 1136;     GameConfig.sca...

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

294. 关于LAYADCC关于热更新问题。真心希望解决!! [ 62%]

...档,要不然我游戏越来越多,单一html文档上已经几百个script标签了。canvas又不支持跨域加载资源,再cdn也搁不住这个资源加载速度啊 2018-07-03 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 bey...

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

295. native 1.0.2 连不上wss [ 61%]

....0.2 连不上wss <html> <head> </head> <body> <script> var ws = new WebSocket("wss://login.huanxi.twbuyu.com:27777"); ws.onopen = function() { alert("connect success~"); ws.send('tom'); alert("send to server msg: tom"); }; ws.onmessage = function(e) { alert("accpet msg...

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

296. 面板容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...Panel: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Panel }) public panel: Laya.Panel; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.panel.pos(100,...

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

297. layaAir TS项目如何引用protoBuf库? [ 61%]

...件添加到这里-->     <!--jsfile--Custom-->     <script type="text/javascript" src="libs/protobuf.js"></script>     <!--jsfile--Custom--> 3、测试代码参考了上面那个连接,但稍微做了修改: // 程序入口 class GameMain{     constructo...

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

298. 垂直布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.VBox }) public vbox: Laya.VBox; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vbox.pos(100, 10...

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

299. [LayaAir3]LAYA3IDE中勾选了弹窗显示全局错误,有些错误无法弹弹窗提示 [ 61%]

...无法弹弹窗提示 比如鼠标事件触发回调函数中有报错,Script脚本类onStart函数有报错等... 在这些函数执行中如果触发错误都只会在控制台打印错误,而不会弹出提示,因为底层代码中这些逻辑被try了catch中只打印了打印错误日志...

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

300. 水平布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.HBox }) public hbox: Laya.HBox; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hbox.pos(100, 10...

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