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

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

611. 使用多个时间轴动画 demo.ani(0,true,'name')失效 [ 52%]

...lor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui/boos.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { // //创建一个Animation实例 // var tl = new Laya.Animation(); // //加载动画文件 // tl.loadAnimation("test.ani"); //...

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

612. 分享:Panel下动态修改子容器宽高并刷新显示! [ 51%]

...载资源,此处添加button和panel垂直滚动条的皮肤使用 Laya.loader.load(['button-4.png','ui/vscroll.png','ui/vscroll$bar.png','ui/vscroll$down.png','ui/vscroll$up.png'],Handler.create(this,start)); } private function start():void { var panel:Panel=new Panel();//添加panel,切忌要...

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

613. 加载sk文件时,报Uncaught getUint16 error - Out of bounds [ 51%]

....loadAni('res/spine/knight/effect1.sk'); SK动画已经预加载了:Laya.loader.load(['res/spine/knight/effect1.png', 'res/spine/knight/effect1.sk'], Handler.create(this, init));

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

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

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

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

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

...正确获取宽高。 1. **直接调用size设置:** ```typescript Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.hei...

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

616. Panel初始化BUG [ 50%]

...ecovery • 2021-11-15 18:42 改成这样试试看 onEnable(): void { Laya.loader.load("comp/image.png", Laya.Handler.create(this, this.onResReady)); } private onResReady() { let panel = new Laya.Panel(); Laya.stage.addChild(panel); panel.graphics.drawRect(0, 0, 300, 300, "#ffcccc&quo...

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

617. 关于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

618. UI加载完成后无法获取控件的大小——超详细版问题 [ 50%]

... import Label = laya.ui.Label; import Handler = laya.utils.Handler; import Loader = laya.net.Loader; import Stage = laya.display.Stage; class TestUI extends ui.test.testwhUI { constructor() { super(); this.mypan.vScrollBarSkin = ""; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements); this.m...

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

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

620. 无法触发浏览器文件上传框 [ 50%]

...n: string = 'images/button.png'; constructor() { Laya.init(200, 300); Laya.loader.load(this.skin, Laya.Handler.create(this, () => { this.btn = this.createBtn(this.skin); this.btn.on(Laya.Event.CLICK, this, this.onClick); })); } /** * 创建btn */ private createBtn(skin: string): Laya.Button { let...

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