大约有 1,033 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0057 秒)
...如下: 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
...所示: 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
...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
..., 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
...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
...谢谢了。 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
...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
... 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
...档,要不然我游戏越来越多,单一html文档上已经几百个script标签了。canvas又不支持跨域加载资源,再cdn也搁不住这个资源加载速度啊 2018-07-03 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 bey...
来源: Laya_社区 发布时间: 20170607
....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