大约有 7 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0031 秒)
...下: var nPercent=0; var image1 = document.createElement('img'); image1.onload=function() { if(window.loadingView){ nPercent+=33; window.loadingView.loading(nPercent); } } image1.src = "a.png"; var image2 = document.createElement('img'); image2.onload=function() { if(window.loadingView){ nPercent+...
来源: Laya3.0_文档 发布时间: 20251010
...("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
...andler(this, this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效...
来源: Laya3.0_文档 发布时间: 20251010
...le.files.length){ fileReader.readAsDataURL(file.files[0]); } }; fileReader.onload = function(evt):void { if(Laya.Browser.window.FileReader.DONE == fileReader.readyState) { var sp:Laya.Sprite = new Laya.Sprite(); sp.loadImage(fileReader.result,0,0,300,300); Laya.stage.addChild(sp); } } } } new Main; ...
来源: Laya3.0_文档 发布时间: 20251010
...2D,3D资源 Laya.loader.load(resArr, null, Laya.Handler.create(this, this.onLoading, null, false)).then(() => { // 加载完成后,处理逻辑 this.progress.value = 0.98; console.log("加载结束", this.progress.value); //预加载的东西太少,为了本地看效果延迟一秒,真实...
来源: Laya3.0_文档 发布时间: 20241014
...2D,3D资源 Laya.loader.load(resArr, null, Laya.Handler.create(this, this.onLoading, null, false)).then(() => { // 加载完成后,处理逻辑 this.progress.value = 0.98; console.log("加载结束", this.progress.value); //预加载的东西太少,为了本地看效果延迟一秒,真实...
来源: Laya3.0_文档 发布时间: 20251105
...rcent.toFixed(2) + '%'); } }); // 设置请求完成后的处理函数 xhr.onload = function () { if (xhr.status === 200) { console.log("文件下载完成!"); } else { console.error("请求失败: " + xhr.status); } }; // 设置请求失败的处理函数 xhr.onerror = function () { console.error...
来源: Laya3.0_文档 发布时间: 20251010