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

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

1231. 按照范例写的碰撞一直检测不到 this.outHitInfo.distance [ 50%]

...Physics.rayCast(this.ray,this.outHitInfo,5); //如果未有碰撞则返回 if(this.outHitInfo.distance < 0)speedX = speedZ = 0; console.log('hit'+ Laya.Physics.rayCast(this.ray,this.outHitInfo,5)); //更新角色位置 this.owner.transform.translate(new Laya.Vector3(speedX,0,speedZ),false); //播...

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

1232. 2.1.1版加了3D物理引擎库后创建3个scene3D就报错 [ 50%]

... set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 "). Build with -s ASSERTIONS=1 for more info.   我的项目中用到了3D物理库,因为UI上也需要显示3D模型,所...

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

1233. Tween循环动画 [ 50%]

...10 度之间来回摆动 tweenCircle = function (self) { var rotation = 0; if (self.rotation > 0) { rotation = -10; } else { rotation = 10; } Tween.to(self, { rotation: rotation, complete: Handler.create(this, this.tweenCircle, [self]), }, 2000, Ease.quadInOut); }

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

1234. 如何通过CSS设置编译好的 _layaflash.max.js 文件中的某个对象(元素)的样式 [ 50%]

....getElementById("myBtn"); // myBtn 为 AS3中 SimpleButton对象 if(plus){ btn.style.cursor = "pointer" } 通过 layaflash 编译时报没有 style 属性。请问:有其它方式可让按钮显示出手型光标吗?请指教!!!

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

1235. 用iframe内嵌网页及适配 [ 50%]

iframe内嵌网页及适配 Laya.init(720, 1280); String.prototype.format = function() { if (arguments.length == 0) { return this; } for (var str = this, index = 0; index < arguments.length; ++index) { str = str.replace("{" + index + "}", arguments[index]); } return str; }; var iframe = laya....

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

1236. 我竟然被射线检测这个小功能给难了一天了 [ 50%]

...PointToRay(new Laya.Vector2(Laya.stage.mouseX,Laya.stage.mouseY),this.ray) if(this.physics.rayCast(this.ray,this.hitInfo)){ console.log("检测到了") }     } 2019-06-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个...

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

1237. ProgressBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 50%]

...码设定ProgressBar相关的属性。 **运行示例效果:** ​ ![5](gif/1.gif) ​ (图5)通过代码创建ProgressBar ​ ProgressBar的其他属性也可以通过代码来设置,上述示例演示了如何通过代码创建不同皮肤(样式)的ProgressBar,有兴趣的读者可以自...

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

1238. 我看到这段话后,我 [ 50%]

...       for (var prop in this._dataSource){             if (this.hasOwnProperty(prop)&& !((typeof (this[prop])=='function'))){                 this[prop]=this._dataSource[prop];             }         }     }); 在UIComponent中 附件...

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

1239. list中加的button不能接收点击事件 求一个list中加button的demo [ 50%]

... number):void{         console.log("3333333333333");         if (cell.useBtn.clickHandler == undefined) {             cell.useBtn.on("click", this, this.onItemUse, [index]);         }     }     onItemUse(index):void{         console.log("11111111111111111...

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

1240. LayaNative端使用.ttf字体 [ 50%]

...nction onLoaded():void { var arr:ArrayBuffer=Laya.loader.getRes("hu.ttf"); if(Browser.window.conch) { Browser.window.conch.setFontFaceFromBuffer("hu",arr); } var text:Text=new Text(); text.font="hu"; text.fontSize=50; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈...

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