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

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

281. 在LayaAir2中,编辑模式创建的粒子特效,导致编辑模式异常 [ 61%]

...使用前加一个判断用来规避此问题,代码示例如下:if(!this._particleTemplate)return; var sv: any = ((<ParticleTemplate2D>this._particleTemplate)).sv; 2021-10-11 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 王...

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

282. Tween动画中的Sprite点击事件失效 [ 61%]

... Tween动画中的Sprite点击事件失效: 简单代码: var self = this; self.loserPrize.on(Laya.Event.MOUSE_DOWN,self,function(){     self.clickHanlder(); }) Laya.Tween.to(self.loserPrize, {      y: Laya.Browser.clientHeight }, Math.random() * 1500); self.gameZone.addChild(self.loserPriz...

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

283. 1.6.2打包的图集不能使用 [ 61%]

...oad([{url: "res/atlas/longCard.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); 在onLoaded var textrue = Laya.loader.getRes(longcard/xxx.png)总是undedined。。。求解。。。 相关链接 : http://ask.layabox.com/question/486 图集打包出来没有prefix。。。get了   2...

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

284. 快速移动的物体,不能发生碰撞检测,ccd开启也检测不到 [ 61%]

...物体,不能发生碰撞检测,ccd开启也检测不到 let rigfoot=this.foot.addComponent(laya.d3.physics.Rigidbody3D) as laya.d3.physics.Rigidbody3D rigfoot.isKinematic=true rigfoot.ccdMotionThreshold=0.001 rigfoot.ccdSweptSphereRadius=100   不能检测碰撞,还是会穿过物体。物...

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

285. 骨骼动画如何响应点击事件? [ 61%]

...事件,求助   //响应点击事件 humanSkeleton.on(Laya.Event.CLICK,this,onclickHuman);   function onclickHuman(){ console.log("onclickHuman"); } https://www.cnblogs.com/Jackie-Snow/p/8487607.html 网上的这个方式试了,没用,按照网上说是没有设置width与height 但是这个...

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

286. 透明区域点击问题 [ 61%]

...e0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像素的地方才能接受到事件; hitArea,目前只支持圆形,矩形,多边形,而sp绘制的是一个不规则图形,请问这个怎么解决啊 201...

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

287. [LayaAir3]射线点击到碰撞器没有反应 [ 61%]

...通过射线点击到物体返回名称,但是射线点击到碰撞器,this._outHitResult.succeeded就一直返回fasel, 附件 : --> LayaProject3.zip 2024-02-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...

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

288. Panel使用文档(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 60%]

...所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置宽高 panel.size(100, 100); //给panel...

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

289. 关于as版的Animation.createFrames()不能工作? [ 60%]

...ya.Stat.show(); Laya.loader.load("res/atlas/war.json", Laya.Handler.create(this, this.onLoaded), null, Laya.Loader.ATLAS); Laya.loader.on(Event.ERROR, this, onError); } protected function onError(error:String):void { trace(error); } protected function onLoaded():void { Animation.createFrames(["war/h...

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

290. 资源加载 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

...regClass() export class LoaderDemo extends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /**加载并显示图片 */ loadTexture(u...

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