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

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

1. 学会编写d.ts声明文件(TypeScript-IDE篇(TS)-代码模式基础) [ 100%]

...声名的模块里定义类型 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

2. HttpRequest详解(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 94%]

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

3. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 93%]

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

4. AS3与JS混合编码(ActionScript-2D进阶篇(AS3)-扩展模块) [ 93%]

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

5. Byte二进制读写(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 92%]

...络连接中,我们接收和发送网络消息。 ```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

6. Byte二进制读写(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 89%]

...](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

7. Byte二进制读写(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 88%]

...](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

8. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 88%]

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

9. iOS-App内购(TypeScript-LayaNative原生服务-LayaNative进阶) [ 83%]

...);      console.log("desc:"+ pJson.desc); }); ``` ### 2. IOS系统下Objective-C中编码 (注: LayaNative中提供了一个消耗性商品示例类IAPManager类作为参考) ```javascript // MarketAppStore.mm文件中的LP_CZ方法中添加内购相关代码, 然后在JavaScript中调用con...

来源: Laya2.0_文档 发布时间: 20210715

10. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 79%]

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