大约有 9 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0020 秒)
...e.png"; (function() { Laya.init(100, 100); var assets = []; assets.push( { url: ROBOT_DATA_PATH, type: Loader.BUFFER }); assets.push( { url: ROBOT_TEXTURE_PATH, type: Loader.IMAGE }); Laya.loader.load(assets, Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { var robotData = Lo...
来源: Laya2.0_示例 发布时间: 20241118
...gColor = "#232628"; // 无加载失败重试 Laya.loader.retryNum = 0; var urls = ["do not exist", "res/fighter/fighter.png", "res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, this.onAssetLoaded), Handler.create(this, this.onLoading, null, false), Loader.TEXT); // 侦听加载失败...
来源: Laya2.0_示例 发布时间: 20241118
...= "res/skeleton/" + fileName + "/" + fileName + ".sk"; Laya.loader.load([{ url: mTexturePath, type: Loader.IMAGE }, { url: mAniPath, type: Loader.BUFFER }], Handler.create(this, this.onAssetsLoaded)); } onAssetsLoaded() { const Loader = Laya.Loader, Templet = Laya.Templet, Event = Laya.Event; let tT...
来源: Laya2.0_示例 发布时间: 20241118
...= Laya.Handler; import Stat = Laya.Stat; import WebGL = Laya.WebGL; import URL = Laya.URL; export class Particle_T1 { private sp: Particle2D; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE;...
来源: Laya2.0_示例 发布时间: 20241118
...= Laya.Handler; import Stat = Laya.Stat; import WebGL = Laya.WebGL; import URL = Laya.URL; export class Particle_T2 { private sp: Particle2D; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE;...
来源: Laya2.0_示例 发布时间: 20241118
...= Laya.Handler; import Stat = Laya.Stat; import WebGL = Laya.WebGL; import URL = Laya.URL; export class Particle_T3 { private sp: Particle2D; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE;...
来源: Laya2.0_示例 发布时间: 20241118
...onclick(e:Event){ switch (e.target.name) { case this.nameArr[0]: var base64Url:string = this._canvas.toDataURL("image/png",1); this.drawImage.skin = base64Url; break; case this.nameArr[1]: var text:Texture = Laya.stage.drawToTexture(Browser.clientWidth,Browser.clientHeight,0,0) as Texture; this.draw...
来源: Laya2.0_示例 发布时间: 20241118
... "#000000"; } } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //示例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }// TestView.as package { i...
来源: Laya2.0_示例 发布时间: 20200319
...ed), null, null, 2, false); } onAssetLoaded(texture) { console.log(texture.url); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } } new Loader_Sequence();module laya { import Texture = Laya.Texture; import Handler = Laya.Handler; e...
来源: Laya2.0_示例 发布时间: 20241118