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

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

101. laya.resource.Texture_API3.0 [ 54%]

... Parameters url: string Returns boolean load load(url: string, complete?: Handler): Promise<void> Defined in laya/resource/Texture.ts:277 加载指定地址的图片。 Parameters url: string 图片地址。 Optional complete: Handler 加载完成回调 Returns Promise<void> off off(type...

来源: Laya3.0_api 发布时间: 20231115

102. laya.ui.CheckBox_API3.0 [ 54%]

... CheckBox 实例。 package { import laya.ui.CheckBox; import laya.utils.Handler; public class CheckBox_Example { public function CheckBox_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load("resource/ui/check...

来源: Laya3.0_api 发布时间: 20231115

103. 微信小游戏利用开放域好友关系链做排行榜 [ 53%]

...yOpenDataContext 5.主域这边代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader;  class GameBootstrap{      public constructor(){         this.init();     }      private init():void{         //初始化微信小游戏   ...

来源: Laya_社区 发布时间: 20180529

104. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 53%]

...e = new Sprite(); sp.loadImage("res/apes/monkey2.png", 0, 0, 0, 0, Handler.create(this, function() {     console.log(sp.width, sp.height); })); Laya.stage.addChild(sp); ``` ​ loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 3. **直接调用size设置...

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

105. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 53%]

...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```javascr...

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

106. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 52%]

...           {                 Laya.loader.load(picAy[i],Handler.create(this, onAssetLoaded))             }         }         private function onAssetLoaded(texture:Texture):void         {             var ape:Sprite = new Sprite;          ...

来源: Laya_社区 发布时间: 20161023

107. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 51%]

...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescr...

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

108. 时间轴动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 51%]

...功后,执行onLoad回调方法 Laya.loader.load("res/atlas/ui.atlas", Handler.create(this, onLoaded)); ``` 第二步:创建Animation实例,加载动画文件 ```java //创建一个Animation实例 var tl:Animation = new Animation(); //加载动画文件 tl.loadAnimation("TimeLine.ani"); ``` ...

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

109. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 51%]

...aya.loader.load(["res/background.png", "res/m_background.png"], laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); //加载进度 function onLoading(progress){ console.log("onLoading: " + progress); } //加载完毕 function onLoaded(){ console.log("...

来源: Laya_社区 发布时间: 20160722

110. Texture如何转换成Texture2D有人搞过吗 [ 50%]

...所以加载时要写上类型 Laya.loader.load([{url:url,type:"image"}], Handler.create(this,function(){ //接下来 }));5.接下来回调,卸载之前的资源 Laya.loader.clearRes(oldUrl);6.加载Texture2D   这样就原图片地址是个Texture2D,生成的URL地址是个Texture 2019-02-19 0...

来源: Laya_社区 发布时间: 20181221