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

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

531. SCALE_FIXED_WIDTH适配屏幕的问题 [ 57%]

...Laya.View.regComponent("ScaleButton", ScaleButton);             Laya.loader.load("res/atlas/com/loading.atlas", Laya.Handler.create(this, this.loadGame));         }         private loadGame(): void {             var resArray = [                 { url: "res/atlas/lobby/cre...

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

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

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

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

533. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 57%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); } private function setup(e:*=null):void { normalizeApe(); makeRedApe(); grayingApe(); } private function normalizeApe():void { var originalApe:Sprite = createApe(); apeTextur...

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

534. 请问2.0中js怎么加天空盒子或穹顶,官网例子运行报错。 [ 57%]

...undefined at Function.Laya3D.formatRelativePath (libs/laya.d3.js:14313) at Loader.Laya3D._onTextureCubeLtcLoaded (libs/laya.d3.js:14656) at EventHandler.__proto.runWith (libs/laya.core.js:1400) at Loader.__proto.event (libs/laya.core.js:1156) at Loader.__proto.complete (libs/laya.core.js:16348) at L...

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

535. 图集动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 57%]

...板,urls接收的是图片地址集合,所以我们需要先使用Laya.loader.load()将图集文件先加载进来。下面我们直接看示例代码及注释。 ```typescript // 程序入口 class AtlasAniDemo{ private roleAni:Laya.Animation; constructor() { //初始化舞台 Laya.init(1334,75...

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

536. laya3.0中jszip使用异常 [ 57%]

...代码为: let zipUrl = "resources/files/config.zip";         Laya.loader.load([{ url: zipUrl, type: Laya.Loader.BUFFER }], null, Laya.Handler.create(this, this.onLoadCfg, null, false)).then(             (value) => {                 JSZip.loadAsync(value).then(           ...

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

537. 支付宝小游戏 · LayaAir3.0文档 · LAYABOX [ 57%]

...毕,此方法只执行一次 onAwake(): void { //支付宝小游戏 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) La...

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

538. 分享:如何用代码创建自定义Tab组件 [ 57%]

...bgColor="#EEFFCC"; //预加载button的资源,用于tab的项皮肤 Laya.loader.load("button-4.png",Handler.create(this,onLoaded)); } private function onLoaded():void { //添加tab容器 var tab:Tab=new Tab(); Laya.stage.addChild(tab); for(var i:int=0;i<6;i++)//为tab容器添加button { var bt...

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

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

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

540. getItemByClass(sign:String, cls:Class):*,怎么给Class的构造函数传参? [ 57%]

...行域 的详解 如何定义动画播放过某帧后的回调函数 Laya.loader.create 进度回调函数执行两次 Warning!,this class[MiniAdpter] already exist: Object {init: } js调as函数 undifine 怎么停止正在运行Laya.timer.frameLoop的回调函数 load 加载完图集 回调函数...

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