大约有 563 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0058 秒)
Laya_社区(159) Laya3.0_api(151) Laya2.0_api(106) laya_api(97) Laya2.0_文档(22) Laya3.0_文档(22) Laya2.0_示例(3) Laya_示例(3)
...lic class MsgMgr { /**共享画布类型**/ public static var SHAREDRESIZE:String = "sharedresize"; private static var _i:MsgMgr = null; public function MsgMgr() { super(); } public static function get instance():MsgMgr { return _i ||= new MsgMgr(); } /**初始化消息监听**/ public function init...
来源: Laya_社区 发布时间: 20180525
...Error函数: ```java private function onError(e:*):void { var errType:String; if (err.code = Geolocation.PERMISSION_DENIED) errType = "Permission Denied"; else if (err.code == Geolocation.POSITION_UNAVAILABLE) errType = "Position Unavailable"; else if (err.code == Geolocation.T...
来源: Laya2.0_文档 发布时间: 20210715
...; var len = bytes.byteLength; for (var i = 0; i < len; i++) { binary += String.fromCharCode( bytes[ i ] ); } return window.btoa( binary ); } mainvar picdata=message.slice(8); //从Byte流切出来的图块 this.VideoImg.skin="data:image/png;base64,"+_arrayBufferToBase64(picdata); error 附件 : -...
来源: Laya_社区 发布时间: 20170803
...false */ public static function clearRes(url:String, forceDispose:Boolean = false):void { Loader.clearRes清理你把里面的第二个参数设置成false试试 如果还是不行的话你就把资源清理方法改用一下这个方法!还有如果你的图片小于5...
来源: Laya_社区 发布时间: 20180424
... 2.5 onError函数: ```java private onError(e: any): void { var errType: string; if (e.code = Laya.Geolocation.PERMISSION_DENIED) errType = "Permission Denied"; else if (e.code == Laya.Geolocation.POSITION_UNAVAILABLE) errType = "Position Unavailable"; else if (e.code == Laya.Geolocation.TIMEOUT...
来源: Laya2.0_文档 发布时间: 20210714
...中。 2.5 onError函数: private onError(e: any): void { var errType: string; if (e.code = Laya.Geolocation.PERMISSION_DENIED) errType = "Permission Denied"; else if (e.code == Laya.Geolocation.POSITION_UNAVAILABLE) errType = "Position Unavailable"; else if (e.code == Laya.Geolocation.TIMEOUT) er...
来源: Laya3.0_文档 发布时间: 20251010
...也可以省略这个声明 static test(this: IEditorEnv.IGameScene, msg: string) { console.log(msg); //hello return "ok"; } } //下面是UI进程的代码 let ret = await Editor.scene.runScript("TestSceneScript.test", "hello"); console.log(ret); //ok 特别的用法,可以通过window对象调用...
来源: Laya3.0_文档 发布时间: 20251010
...据很简单,只需要调用Socket的send函数即可,参数可以是string或者是ArrayBuffer。 发送字符串格式: ```typescript this.socket.send("hello world");//这是发送字符串的形式。 ``` 发送二进制格式的数据: ```typescript this.byte.writeByte(1);//写入一个...
来源: Laya2.0_文档 发布时间: 20210714
...||data.url == "test/3.png"){ mark ++; console.log("------data.url:" + JSON.stringify(data.url)); if(mark == 4)//确认数据全部接收后 Laya.loader.load(["res/atlas/test.atlas", "test/1.png", "test/2.png", "test/3.png"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); }else { Laya.lo...
来源: Laya_社区 发布时间: 20190307
...aya,遇见个问题。api上对loadimage的描述是: loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Handler = null) 官方文档也是这么用的:http://ldc.layabox.com/doc/?nav=zh-ts-1-3-2 我把文档的代码完整复制到vscode里,vs...
来源: Laya_社区 发布时间: 20200522