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

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

531. 鼠标 MOUSE_DOWN Event 回来的信息不符合 [ 60%]

...什么回来的是 “mouseout” 而不是 "mousedown" ? 代码如下: function createSprite() { picture = new Sprite(); picture.loadImage(picturePath); Laya.stage.addChild(picture); var texture = Laya.loader.getRes(picturePath); picturePath.pivot(texture.width / 2, texture.height / 2); picture.x...

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

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

...js:14313 Uncaught TypeError: Cannot read property 'charAt' of 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:1...

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

533. 小游戏子域程序加载到图集后,取图集内资源报错。 [ 60%]

...图集内资源报错。 MsgMgr.instance.init(); Laya.timer.once(1000,this,function():void{ beginLoad(); }); private function beginLoad():void { Laya.loader.load("res/images/rank.json", Handler.create(this, onLoaded)); } private function onLoaded():void { trace("加载成功"); var c:Image = new Ima...

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

534. 销毁资源并释放内存(JavaScript-3D基础(JS)-LayaAir3D的内存管理) [ 60%]

...ey2/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm", Laya.Handler.create(this, function(mesh) { ........ //上面省略,我们再网格加载完成3秒后对该网格进行销毁 Laya.timer.once(3000,this,function() { //销毁了使用了该网格的精灵 layaMonkey.destroy(); //对网格进行销毁...

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

535. Laya2.0版本linkSprite3DToAvatarNode无法正常使用了,因为新插件导出的动画没有avatar文件了,导致挂载不上 [ 60%]

...件了,导致挂载不上     __proto._isLinkSpriteToAnimationNode=function(sprite,nodeName,isLink){         if (this._avatar){ 这一步必须要有 avatar 文件,但是用新的2.0插件导出的角色不带avatar文件导致无法挂载,可在GameUI.ts 41行下断点调试进入...

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

536. 加载到舞台的3D模型不显示贴图 [ 60%]

...d(new Laya.Sprite3D()); staticMesh.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) { var meshSprite = sprite.getChildAt(0);//此对象不一定是MeshSprite3D类型,会导致出错 var mesh = meshSprite.meshFilter.sharedMesh; mesh.once(Laya.Event.LOADED, null, function (mesh) { for (var ...

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

537. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 60%]

...utils.Handler; var Event = laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i % 9,btn:"btn"+i}); } //给list赋值更改list的显...

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

538. 播放动画(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 60%]

...ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function(){ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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

539. Effect材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 60%]

...xture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置纹理 material.texture = texture; })); earth.meshRenderer.material = material; ``` ![](img/1.gif)(图12)

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

540. 销毁资源并释放内存(TypeScript-3D基础(TS)-LayaAir3D的内存管理) [ 60%]

...ey2/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm", Laya.Handler.create(this, function(mesh:Laya.Mesh):void { ........ //上面省略,我们再网格加载完成3秒后对该网格进行销毁 Laya.timer.once(3000,this,function ():void { //销毁了使用了该网格的精灵 layaMonkey.destroy(); //...

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