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

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

441. 打包了一个图集,怎么使用此图集中的某一张图片 [ 59%]

...用此图集中的某一张图片 打包好一个图集 使用    Laya.loader.load("res/atlas/yaosai.atlas", Handler.create(this, onLoaded));  加载后,怎么使用此图集里面的 其中一张图片呢 求大佬解答 2018-07-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

442. VBOX动态增加的元素没有自动布局 [ 59%]

... import Label = laya.ui.Label; import Handler = laya.utils.Handler; import Loader = laya.net.Loader; class TestUI extends ui.test.TestPageUI { constructor() { super(); var btn1=new ui.test.view_btnUI(); var btn1_btn:laya.ui.Button=btn1.getChildByName("btn") as laya.ui.Button; //问题一: 这里...

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

443. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 59%]

...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...

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

444. 预加载结束之后还是报lose skin [ 59%]

预加载结束之后还是报lose skin private loadRes():void{ Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this, this.onAssetLoaded),Laya.Handler.create(this, this.onLoading, null, false)); } private onLoading(progress: number): void { console.log("加载进度: " + progress); } ...

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

445. 滤镜的集中实现 [ 59%]

...; //设置舞台背景色 Laya.stage.bgColor="#fffff"; //加载资源 Laya.loader.load("res/atlas/comp.json",Handler.create(this,completeLoad),null,Loader.ATLAS); } public function completeLoad():void { //原始位图 createImg(200,50); //红色滤镜 createRedFilter(); //创建发光滤镜位图**/...

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

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

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

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

447. ui.TestPUI() 找不到 [ 59%]

...I() 找不到   Laya.init(1334,750); Laya.stage.bgColor = "#ffffff"; Laya.loader.load("./res/atlas/blackMagic.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ var efc =new ui.TestPUI(); Laya.stage.addChild(efc); } //new ui.TestPUI(); 这个东西找不到。我是按照官方文档...

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

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

...正确获取宽高。 1. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png",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.height);...

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

449. 图集制作与使用详解(JavaScript-IDE篇(JS)-使用IDE创作) [ 59%]

...的示例代码为: ```javascript //atlas方式图集使用示例 Laya.loader.load("./res/test/c1.atlas", Laya.Handler.create(this, onLoaded)); ```   `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图...

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

450. 图集制作与使用详解(TypeScript-IDE篇(TS)-使用IDE创作) [ 58%]

...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Laya.Handler.create(this, this.onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为...

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