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

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

291. [LayaAir3]Laya3.3废弃了filters,如何设置sprite滤镜,添加PostProcess2D,再给Process添加ColorEffect2D也不生效 [ 64%]

...自: private testFilter(){     let spirit = new Laya.Sprite();     this.displayObject.addChild(spirit);     spirit.x = 360;     spirit.y = 640;     const url = "lang/zh-cn/spine/hero/zhujue_attack/zhujue_attack.skel"     Laya.loader.load(url).then(()=>{         let spine = sp...

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

292. 摄像机的viewportPointToRay报错 [ 64%]

...射线初始化(必须初始化) //获取鼠标在屏幕空间位置  this.pointRay.x = Laya.MouseManager.instance.mouseX; this.pointRay.y = Laya.MouseManager.instance.mouseY; //详设计产生射线方法,通过2D坐标获取与屏幕垂直的一条射线 console.log( PanelMgr.mainCamera); P...

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

293. Animation 先clear当前的动画, 然后从浏览器缓存 加载下一个动画会闪一下,这个怎么解决? [ 64%]

...! 别抢小虎 • 2018-05-08 10:51 /// 加载的时候是这样写的 this.anim.loadAtlas(source , null, cacheName); this.anim.scaleX = 1; this.anim.scaleY = 1; this.anim.pivotX = 0; this.anim.pivotY = 0; this.anim.interval = 30; this.anim.play(); 在加载这个动作以前我会先清理上一...

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

294. 加载的时候动画会卡 [ 64%]

...时候动画会卡 上代码: _pro.startLoad = function() {         this.loadLayer = new Lload();         this.big.addChild(this.loadLayer);         var imgArr = ;         imgArr.push({url:"cont/cpf1.jpg",type:Loader.IMAGE});         imgArr.push({url:"cont/cpr1.jpg",type:Loade...

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

295. 在写屏蔽词库的程序时,字符串中没有屏蔽字库中的词,会出现返回0的情况 [ 64%]

...***233 • 2017-08-28 11:51 private get IndexOfShieldName(): Boolean { if (this.shieldArray.indexOf(this.roleName) != -1) { var index:number=this.shieldArray.indexOf(this.roleName); console.log("找到了,位置在"+index); return true; } console.log("没找到"); return false } ...

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

296. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 64%]

...合我们调试代码 我们打开Floor.js 找到 Laya.timer.frameLoop(1, this, this.onLoop); 把这一行代码先给注释了 接着 我们先理一理自己的思路 我们要做玩家踩在地板上 那就要用到碰撞检测 上图中紫色的小点点是 两个物体的 坐标起始点 假设...

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

297. [LayaAir2]在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 64%]

...{ htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmet...

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

298. MovieClip卸载不掉,有内存泄漏 [ 64%]

... destroyItemsMovie() { let n: number = 25; while (--n > 0) { let mov0 = this["item" + n] as MovieClip; if (mov0) { mov0.visible && (mov0.visible = false); mov0.playing && mov0.stop(); mov0.parent && mov0.parent.removeChild(mov0); mov0.destroy(true); delete this["item" + n]...

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

299. 3D粒子特效初始化卡顿 [ 64%]

...有解决方案,以下为示例代码: var sprite= Laya.loader.getRes(this._stlurl) as Laya.Sprite3D; this.skill = Laya.Sprite3D.instantiate(sprite); target.addChild(this.skill); this.Play();   这种卡顿在PC谷歌浏览器上不明显,但手机上就很明显了,另外在IDE的layaair...

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

300. 微信小游戏加载资源问题 [ 64%]

...annel extends Laya.SoundChannel { constructor(audio, miniSound) { super(); this._audio = audio; this._miniSound = miniSound; this._onEnd = MiniSoundChannel.bindToThis(this.__onEnd, this); audio.onEnded(this._onEnd); } static bindToThis(fun, scope) { var rst = fun; rst = fun.bind(scope); return rst; ...

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