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

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

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

...下: ```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 = ...

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

162. laya.ani.swf.MovieClip [ 33%]

...事件类型是否是鼠标事件。 EventDispatcher  load(url:String, atlas:Boolean = false, atlasPath:String = null):void 加载资源。 MovieClip loadImage(url:String, complete:Handler = null):Sprite 加载并显示一个图片。相当于加载图片后,设置texture属性 注意:2.0改...

来源: Laya2.0_api 发布时间: 20190513

163. laya.display.Animation [ 32%]

...是定时切换Graphics对象。 使用set source、loadImages(...)、loadAtlas(...)、loadAnimation(...)方法可以创建动画模版。使用play(...)可以播放指定动画。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties PropertyDefined By active : Boole...

来源: Laya2.0_api 发布时间: 20190513

164. 绘制图形 · LayaAir3.0文档 · LAYABOX [ 16%]

...dth, height, sizeGrid, false, color)); } 代码示例: Laya.loader.load("atlas/comp/image.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制九宫格纹理 sp.graphics.draw9Grid(res, 0, 0, 1024, 626, [0, 0, 0, 0, 1]); this.owner.addChild(sp); }); 运行效果: (图9-2...

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

165. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 12%]

...: void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图4-2所示: (图4-2) 4.1.2 3D节点的基础使用 首先,如动图4-3所示,将场景中已经添加好的3D节点Cube拖入到@property暴露的属性入口中...

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