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

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

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

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

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

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

603. OPPO主包无法从分包中拿资源 [ 60%]

...从分包中拿资源         Laya.loader.load(分包路径, Laya.Handler.create(null, function (obj: any)         {完全走不进来         })); 2020-08-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

604. dialog的lock属性没出现 [ 60%]

....ui.Button; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class DialogCenterClose { private const DIALOG_WIDTH:int = 220; private const DIALOG_HEIGHT:int = 275; private const CLOSE_BTN_WIDTH:int = 43; private const CLOSE_BTN_PADDING:int = 5; ...

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

605. 引用的类库问题 [ 60%]

...s=null; this._selectedIndex=0; ViewStack.__super.call(this); this._setIndexHandler=Handler.create(this,this.setIndex,null,false); } __class(ViewStack,'laya.ui.ViewStack',_super); 1. ViewStack.__super.call(this); 2. __class(ViewStack,'laya.ui.ViewStack',_super); 这两句代码是什么意思 2018-03...

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

606. 图集动画必须要有这一段代码吗 [ 60%]

...必须要有这一段代码吗 Laya.loader.load("res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); 2017-09-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞同来自: 这行...

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

607. 其他引擎的Demo-Example_23 [ 60%]

...ructor() { const WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(viewWidth, viewHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHO...

来源: Laya2.0_示例 发布时间: 20251219

608. 材质的加载(JavaScript-3D基础(JS)-LayaAir3D之Material材质) [ 59%]

...ript //材质加载 Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

609. 材质的加载(TypeScript-3D基础(TS)-LayaAir3D之Material材质) [ 59%]

...ript //材质加载 Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

610. localRotationEulerY旋转位置错误 [ 59%]

...hongMaterial();         Laya.Texture2D.load("res/grass.png", Laya.Handler.create(this, function (tex: Laya.Texture2D): void {             planeMat.albedoTexture = tex;         }));         //设置纹理平铺和偏移         var tilingOffset =...

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