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

大约有 914 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0057 秒)

781. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...内容并返回。如果不需要支持热重载,则忽略。 @Laya.regLoader(["abc"], null, true) export class DemoAssetLoader implements Laya.IResourceLoader { async load(task: Laya.ILoadTask): Promise<any> { let json = await task.loader.fetch(task.url, "json"); let res = task.obsoluteInst...

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

782. HttpRequest 回调方法都没执行 LayaAir 1.7.17 beta JS版本 [ 50%]

...var resourceArray = [ { url:"res/atlas/comp.atlas" , type : Laya.Loader.ATLAS} ]; Laya.loader.load(resourceArray,Laya.Handler.create(null,loadResourceComplete)); } function loadResourceComplete() { Laya.stage.addChild(new LoginView()); } })(); feiguangfu • 2018-03-16 09:55 这个是主...

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

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

...认应用程序。编写代码如下: ```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

784. 关于Panel的双指响应问题 [ 50%]

...ge.bgColor = "#232628"; setup(); })(); function setup() {         Laya.loader.load("../../res/ui/dialog (3).png", Laya.Handler.create(this, function(){     var dialog = new Image("../../res/ui/dialog (3).png");     dialog.scaleX = 2;     dialog.scaleY = 2;     var panel = new Panel();  ...

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

785. 弹窗视图组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...nMouseClick(): void { //使用Prefab,需要转换根节点为Dialog Laya.loader.load("resources/Prefab2D.lh").then(res => { let dlg: Laya.Dialog = res.create(); dlg.open(); }); } } 运行效果如下: (动图) 二、通过代码创建Dialog 在进行书写代码的时候,免不了通过...

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

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

...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

787. ProgressBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 50%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(["res/ui/progressBar.png", "res/ui/progressBar$bar.png"], Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { progressBar = new ProgressBar("res/ui/progressBar.png"); progressBar.width = 400; ...

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

788. laya2.3图集含空白裁切后,锚点旋转bug,demo重现 [ 50%]

... 提交 3 个回复 18857358473 赞同来自: var tx3:Laya.Texture = Laya.loader.getRes("test2.png");         var sp3:Laya.Sprite = new Laya.Sprite();         sp3.texture = Laya.Texture.create(tx3,0,0,315,315,134,134,582,582);          sp3.pivot(315/2,315/2);//锚点使用实...

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

789. 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现方案 [ 50%]

...; } private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private function onLoaded():void { //实例UI界面 //var testView:TestView = n...

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

790. Laya.MiniAdpter.downLoadFile缓存的文件无法读取的问题 [ 50%]

...e { this.DoLoadData(url); } } protected DoLoadData(url:string):void { Laya.loader.load(url, Laya.Handler.create(this, this.OnLoadDataCb)); } protected OnDownloadFileInWxOk(args:any, result:any, data:any):void { console.log("OnDownloadFileInWxOk"); console.log("" + result + ", data: " + data); if (re...

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