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

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

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

...如下: 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_文档 发布时间: 20240910

282. 组件属性的代码使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 63%]

...所示: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如...

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

283. 救命啊,遇到苹果爸爸 Guideline 2.5.2 [ 62%]

...r:, performSelector:, method_exchangeImplementations(), and running remote scripts in order to change app behavior and/or call SPI, based on the contents of the downloaded script. Even if the remote resource is not intentionally malicious, it could easily be hijacked via a Man In The Middle (MiTM) a...

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

284. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

..., property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方...

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

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

...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_文档 发布时间: 20240910

286. 分享: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

287. 无法触发浏览器文件上传框 [ 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

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

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

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

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

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