大约有 17 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0031 秒)
...声名的模块里定义类型 export class Demo { constructor( options: Object ); addScene( title: string, initfunc: Function ): void; restartCurrentScene(): void; } } //多级模块 declare module laya.ani.bone { class EventData { name:string; intValue:number; floatValue:number; stringValue:string...
来源: Laya2.0_文档 发布时间: 20210715
...d("res/data.data","","get","text"); } private function processHandler(data:Object):void { trace(data); } private function completeHandler(data:Object):void { } private function errorHandler(e:Object):void { } } } ``` 上面这个示例我们发送了一个简单的请求,方式是get方式。...
来源: Laya2.0_文档 发布时间: 20210715
...ocument.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window.URL.createObjectURL(blob); document.body.appendChild(img); } } xhr.send(); ``` 上面这个方法是用了浏览器自身提供的方法来把二进制转换成图...
来源: Laya2.0_文档 发布时间: 20210714
...ass window { public function window() { } public static function alert(msg:Object):void { } } } ``` `/*[IF-FLASH]*/`是LayaCompiler的编译宏,其后的类不会被编译为JS,对此不了解的,请先去了解[宏编译教程文档](https://github.com/layabox/layaair-doc/blob/master/Chinese/...
来源: Laya2.0_文档 发布时间: 20210715
...络连接中,我们接收和发送网络消息。 ```typescript var msg:Object ={name:"xxx",age:18,weight:65.5,height:175}; var byte:Byte = new Byte();//实例化byte数组 byte.endian = Byte.LITTLE_ENDIAN;//设置大小端 byte.writeUTFString(msg.name);//写入数据 byte.writeByte(msg.age); byte...
来源: Laya2.0_文档 发布时间: 20210715
...](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DataView)视图提供了一个与平台中字节在内存中的排列顺序(字节序)无关的从[`ArrayBuffer`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)读写多...
来源: Laya2.0_文档 发布时间: 20210714
...](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DataView)视图提供了一个与平台中字节在内存中的排列顺序(字节序)无关的从[`ArrayBuffer`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)读写多...
来源: Laya2.0_文档 发布时间: 20210715
...et.on(Event.ERROR,this,errorHandler); } private function openHandler(event:Object = null):void { //正确建立连接; } private function receiveHandler(msg:Object = null):void { ///接收到数据触发函数 } private function closeHandler(e:Object= null):void { //关闭事件 } private function...
来源: Laya2.0_文档 发布时间: 20210715
...); console.log("desc:"+ pJson.desc); }); ``` ### 2. IOS系统下Objective-C中编码 (注: LayaNative中提供了一个消耗性商品示例类IAPManager类作为参考) ```javascript // MarketAppStore.mm文件中的LP_CZ方法中添加内购相关代码, 然后在JavaScript中调用con...
来源: Laya2.0_文档 发布时间: 20210715
...ocument.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window.URL.createObjectURL(blob); document.body.appendChild(img); } } xhr.send(); ``` 上面这个方法是用了浏览器自身提供的方法来把二进制转换成图片...
来源: Laya2.0_文档 发布时间: 20210714