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

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

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

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

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

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

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

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

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

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

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

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

...布后生成在layaUI.max.all.ts文件中,我们直接使用它。 创建ComponentDemo.ts并设置默认程序,编写代码如下: ```typescript // 程序入口 class ComponentDemo{ /**包含tab与viewStack组件的测试页面**/ private comp:ui.ComponentDemoUI; constructor() { Laya.init(1334...

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

5. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 93%]

...布后生成在layaUI.max.all.js文件中,我们直接使用它。 创建ComponentDemo.js并设置默认程序,编写代码如下: ```javascript Laya.init(1334, 750,Laya.WebGL); Laya.stage.scaleMode = "full"; Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 ...

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

6. ViewStack属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 91%]

...存页面,按F12发布页面,发布后在项目ui文件夹中生成了ComponentDemoUI.as类,我们直接使用它。 创建ComponentDemo.as并设置默认程序,编写代码如下: ```java package { import laya.utils.Handler; import laya.webgl.WebGL; //导入UI发布生成的类 import ui....

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

7. 显存优化:纹理压缩的使用(TypeScript-2D进阶篇(TS)-性能优化) [ 88%]

...在移动端,Android平台的主流纹理格式是ETC(Ericsson Texture Compression),iOS平台的主流纹理格式是PVRTC(PowerVR Texture Compression)。 需要特别说明的是,ETC1是不支持透明通道的,PVRTC是支持透明通道的,尽管在ETC2的时候,补全了ETC1...

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

8. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 74%]

...{ //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:Texture = Laya.loader.getRes("comp/comp.png"); var sp:Sprite = new Sprite(); sp.graphics.drawTexture(img); Laya.stage.addChild(sp); })); Laya.loader.load("res/atlas/...

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

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

... ```JavaScript var xhr = new XMLHttpRequest(); xhr.open("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 = functi...

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

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

... ```javascript var xhr = new XMLHttpRequest(); xhr.open("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 = functi...

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