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

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

131. Laya IDE横竖屏切换时,不断刷新 [ 60%]

...a.stage.scaleMode = 'exactfit'; Laya.stage.screenMode = 'horizontal'; Laya.loader.load(['res/atlas/view.atlas'], Handler.create(this, initGame)); Laya.timer.frameOnce(1, this, function () { Laya.stage.on(Event.RESIZE, this, function () { window.location.reload(); }) }) 2018-04-16 添加评论 免费...

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

132. 限制区域拖动效果,为什么会无法限制呢? [ 59%]

...ad), Laya.ResourceVersion.FILENAME_VERSION);  function beginLoad() { Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); }  function onLoaded() { Laya.stage.addChild(new GolfMainUI()); }   附件 : --> 2018-06-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

133. sprite添加texture后,sprite无法触发点击事件? [ 59%]

...,sprite无法触发点击事件? this.item.graphics.drawTexture(Laya.loader.getRes(IMG_RES[this.name])); Laya.stage.addChild(this.item);  this.item.on(Laya.Event.CLICK, this, () => { this.item.destroy(); }); 2017-08-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

134. GlowFilter和TimeLine/Tween一起用的问题 [ 59%]

... Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628";   Laya.loader.load(apePath, Handler.create(this, setup)); })();   function setup() { createApe(); applayFilter(); }   function createApe() { ape = new Sprite(); ape.loadImage(apePath);   var texture = Laya.loader.getRes(apePath);...

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

135. 精灵 · LayaAir3.0文档 · LAYABOX [ 59%]

... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....

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

136. 动画-旧版骨骼动画 [ 58%]

...SkinAnimation(spirit3D._childs[i], index); } private loadUI(): void { Laya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler.create(this, function (): void { this.changeActionButton = Laya.stage.addChild(new Laya.Button("../../res/threeDimen/ui/button.png", "切换动作")) as Laya.Bu...

来源: Laya_示例 发布时间: 20240930

137. 两个小问题 [ 58%]

...则销毁子节点,否则不销毁子节点。 资源需要自己用Laya.loader.clearRes清理。 建议:如果只是关闭界面的话直接用removeSelf()从显示列表中移除即可。这个界面彻底不用的话再用destroy销毁。(销毁之后想再次使用的话需要重新实例...

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

138. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 57%]

...Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.loader.load("res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(...

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

139. 模型的功能介绍(JavaScript-3D基础(JS)-LayaAir3D之模型和网格) [ 57%]

...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...

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

140. 模型的功能介绍(TypeScript-3D基础(TS)-LayaAir3D之模型和网格) [ 57%]

...。 ```typescript //初始化3D场景 var scene = Laya.stage.addChild(Laya.Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")); //获取球型精灵 var sphere = scene.getChildByName("Sphere"); //获取精灵的mesh var sphereMesh = sphere.meshFilter.sharedMesh; //此时...

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