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

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

311. 来说说本人这两个月用laya引擎比较坑的两点吧 [ 55%]

...缩放图片的时候会导致pivot(轴心点)也要缩放。2、使用Math的cos和sin的时候需要传入的是弧度值,并非角度。 2018-09-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 hj 赞同...

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

312. 请问 在LayaAir中怎么样实现随机数 比如两个动画,随机播放其中的一个? [ 55%]

...邀请: 与内容相关的链接 提交 2 个回复 qian 赞同来自: 用Math.random() 2018-01-04 0 1 分享 微博 QZONE 微信 qian 赞同来自: 有问题及时反馈 2018-01-04 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加...

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

313. 2D物理-复合碰撞器 [ 55%]

....anchor = [box.width / 2, box.width / 2]; revoluteJoint.motorSpeed = .05 * Math.PI; revoluteJoint.maxMotorTorque = 1e8; revoluteJoint.enableMotor = true; box.addComponentIntance(revoluteJoint); Laya.Laya.timer.frameLoop(1, this, this.addMiniBox); } addMiniBox() { let box = this.box; if (this.count >...

来源: Laya2.0_示例 发布时间: 20240930

314. 3d里面物体碰撞的API是什么? [ 55%]

...盒,然后通过laya3D内置的数学库进行计算是否碰撞laya.d3.math.Collision看下引擎的源码就可以知道!里面包含的所有你能用到的物体之间的几何关系! 3D方面更新的比较快,可能一些新功能没有加入官方的API,如果使用中有任何问题...

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

315. 对象池的使用 [ 55%]

...var nan:Image = Pool.getItemByClass("nam", Image); nan.skin = url; nan.x = Math.random() * 600 + 80; nan.y =-60; this.addChild(nan); } private function delRen():void { if(arr.length){ for (var i:uint = 0; i < arr.length; i++ ){ if (arr[i].y > 800){ Pool.recover("nan", Image); } }arr[i].visible...

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

316. 灯光-点光 [ 55%]

....d3.core.light.PointLight; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.resource.models.Mesh; import laya.d3.resource.models.SphereMesh; import laya.display.Stage; import laya.events.Event; import laya.utils.Stat; import common.CameraMo...

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

317. 移动端h5项目如何获取多点触摸的坐标 [ 55%]

... = e.touches;   if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX);   Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } 2019-09-25 0 0 分享 微博 QZONE 微信 17 赞同来自: 同上,...

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

318. new vector2报错 [ 54%]

...来自: 我知道了  我创建的是2D的项目  Vector2 是在laya.d3.math 里面。猜想可能是这个问题导致 2018-08-23 0 1 分享 微博 QZONE 微信 恋上桃子的狸 赞同来自: 你好是什么问题导致的? 2018-09-05 0 0 分享 微博 QZONE 微信 Supermang42 赞同来自: ...

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

319. 动画-旧版骨骼动画 [ 54%]

...core.light.DirectionLight; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.models.Mesh; import laya.display.Stage; import laya.events.Event; import laya.ui.Button; import laya.utils.Browser; import lay...

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

320. 图片显示异常 [ 54%]

...listData) { var data: any[] = []; listData.sort(function () { return 0.5 - Math.random(); });  listData.map((item, index) => { var hotShow: boolean = false; var newShow: boolean = false;  if (index >= 3 && index < 8) { hotShow = true; }  if (index >= 11 && index < 1...

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