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

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

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

...prite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,showImg,[url]),null,Laya.Loader.IMAGE); } function errorHandler(url){ var t = new Laya.loader.getRes(url); var ape = new Laya.Sprite(); ape.graphics.drawTexture...

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

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

...a.Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url,Laya.Handler.create(this,this.showImg,[url]),null,Laya.Loader.IMAGE); } private showImg(url:string):void{ var t:Laya.Texture = Laya.loader.getRes(url); var ape:Laya.Sprite = new Laya.Sp...

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

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

...= Browser.window.URL.createObjectURL(blob);//创建一个url对象; //用loader来加载url Laya.loader.load(url, Handler.create(this,showImg,[url]),null,Loader.IMAGE); } private function showImg(url:String):void { var t:Texture = Laya.loader.getRes(url); var ape:Sprite = new Sprite(); ape.graphic...

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

4. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 93%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.sta...

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

5. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 93%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.Res,Laya.Handler.create(this,this.graphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),1...

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

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

...est() { //初始化引擎 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,"#ffc...

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

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

...or() { //初始化引擎 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,...

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

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

...script //初始化引擎 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")...

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

9. 动效模板(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 85%]

...认应用程序。编写代码如下: ```java package { import laya.net.Loader; import laya.utils.Handler; import ui.EffectAnimationDemoUI; public class Main { public function Main() { //初始化舞台 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //加载图集资...

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

10. Clip属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 79%]

...tage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; //预加载资源 Laya.loader.load([this.buttonSkin, this.clipSkin, this.bgSkin], Laya.Handler.create(this, this.onSkinLoaded)); } private onSkinLoaded(): void { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createContro...

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