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

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

1. 多线程worker(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 100%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worker("m...

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

2. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 99%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worker("m...

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

3. 多线程worker(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 98%]

...e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` ​ 这个例子是在worker中进行加载文件,加载完毕传给主进程,运行这个例子可以在浏览器控制台看到数据输出来。 `var myWorker = new Worke...

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

4. Panel使用文档(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 96%]

...引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置...

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

5. Panel使用文档(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 95%]

...引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { //实例化Panel组件 var panel: Laya.Panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ff...

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

6. Panel使用文档(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 94%]

...引擎 Laya.init(800,600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffcccc"); //给panel...

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

7. 批量销毁释放内存(JavaScript-3D基础(JS)-LayaAir3D的内存管理) [ 92%]

...bitmap属性上锁。 ```js init() { //加载场景 Laya.loader.load('res/atlas/comp.atlas',Laya.Handler.create(this,this.onComplete)); } onComplete(){ //获取图集中的一个单图 var a = Laya.loader.getRes('comp/button.png'); //通过单图的bitmap对图集加锁 a.bitmap.lock = true; } ```

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

8. 批量销毁释放内存(ActionScript-3D基础(AS3)-LayaAir3D的内存管理) [ 91%]

...script private function init():void { //加载场景 Laya.loader.load('res/atlas/comp.atlas',Handler.create(this,onComplete)); } private function onComplete():void{ //获取图集中的一个单图 var a:Texture = Laya.loader.getRes('comp/button.png'); //通过单图的bitmap对图集加锁 a.bitmap...

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

9. ViewStack属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 91%]

...//加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个UI实例 this.comp = new ui.ComponentDemoUI(); //添加到舞台上显示 Laya.stage.addChild(this.comp); //点击Tab选择...

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

10. 批量销毁释放内存(TypeScript-3D基础(TS)-LayaAir3D的内存管理) [ 91%]

... ```typescript private init():void { //加载场景 Laya.loader.load('res/atlas/comp.atlas',Laya.Handler.create(this,this.onComplete)); } private onComplete():void{ //获取图集中的一个单图 var a = Laya.loader.getRes('comp/button.png') as Laya.Texture; //通过单图的bitmap对图集加锁 ...

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