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

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

1. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 100%]

...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...

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

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

...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...

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

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

...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...

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

4. Native 如何使用ttf? [ 95%]

...onseType = 'arraybuffer'; xhr.open('GET', "res/font/Arial.ttf", true); xhr.onload = function () { Laya.Browser.window.conch.setFontFaceFromBuffer("Arial", xhr.response); setInterval(onDrawFrame, 15); }; xhr.onerror = function (e) { alert('>>>download ttf error :' + e); }; xhr.send(null); //...

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

5. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 94%]

...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...

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

6. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 93%]

...打开了一个url. ### 事件 基本的事件大致有如下几种: - `onloadstart` - `onprogress` - `onabort` - `ontimeout` - `onerror` - `onload` - `onloadend` 我们常用的基本就是进度事件,完成事件,错误事件等 每一个`XMLHttpRequest`里面都有一个`upload`属性,...

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

7. HttpRequest详解(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 93%]

...打开了一个url. ### 事件 基本的事件大致有如下几种: - `onloadstart` - `onprogress` - `onabort` - `ontimeout` - `onerror` - `onload` - `onloadend` 我们常用的基本就是进度事件,完成事件,错误事件等 每一个`XMLHttpRequest`里面都有一个`upload`属性,...

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

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

...开了一个url. ### 事件 ​ 基本的事件大致有如下几种: - `onloadstart` - `onprogress` - `onabort` - `ontimeout` - `onerror` - `onload` - `onloadend` 我们常用的基本就是进度事件,完成事件,错误事件等 每一个`XMLHttpRequest`里面都有一个`upload`属性,...

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

9. ios读取文件 [ 89%]

...HttpRequest(); xhr.open('GET','http://10.10.20.19:7766/version',true); xhr.onload=(e)=>{     var f = window.appcache.getCachePath()+'/version';     fs_writeFileSync(f,xhr.responseText);//把结果写到f文件中     url='';//自己决定url     loadUrl(url); } xhr.onerror=()=>{     ...

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

10. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 79%]

...rcent.toFixed(2) + '%'); } }); // 设置请求完成后的处理函数 xhr.onload = function () { if (xhr.status === 200) { console.log("文件下载完成!"); } else { console.error("请求失败: " + xhr.status); } }; // 设置请求失败的处理函数 xhr.onerror = function () { console.error...

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