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

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

311. HTMLElement能否提供偏移量的接口 [ 55%]

...没有加上xy设置的值 curLine.elements.push(oneLayout); curLine.h = Math.max(curLine.h, h); oneLayout.x = x; oneLayout.y = y;有些图文混排,图片的位置和文字靠太近,而且跟文字行不居中,比如, 我想通过设置一个图片xy来达到效果。 <img src='a.png' ...

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

312. List组件 repeat(x/y)设置问题 [ 55%]

...问题,如下代码不起作用: ......         var repeatY = Math.ceil(GameManager.instance.serverList.length / 3); // 此处算出来实际为1         this.serverList.repeatY = repeatY; ...... 但是直接设,是可以的:   // this.serverList.repeatY = 1; 2016-09-02 添加...

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

313. ide跑没问题,安卓包跑报错 [ 55%]

...um && this.bodyArr.length < this.bodyMaxNum) { let addBodyNum = Math.floor(this.eatBean / this.bodyBeanNum) let x = this.bodyArr[this.bodyArr.length - 1].x 。。。。。。 } let x = this.bodyArr[this.bodyArr.length - 1].x 这一句报错   附件 : --> 2018-06-01 添加评论 免费...

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

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

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

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

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

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

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

316. 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_示例 发布时间: 20250221

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

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

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

318. 对象池的使用 [ 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

319. 灯光-点光 [ 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_示例 发布时间: 20250221

320. 移动端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