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

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

11. 3D网格添加刚体后设置欧拉角出现位置错误 [ 87%]

...         //设置旋转角度         this.tmpVector.setValue(Math.random() * 360, Math.random() * 360, Math.random() * 360);         box.transform.rotationEuler = this.tmpVector;         //设置掉落位置         this.tmpVector.setValue(-2, 2, -2);         box.transform.p...

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

12. 输入设备-贪吃蛇(重力感应) [ 87%]

...food.graphics.drawRect(0, 0, foodSize, foodSize, "#00BFFF"); food.x = Math.random() * Laya.stage.width; food.y = Math.random() * Laya.stage.height; } })()module laya { import Sprite = Laya.Sprite; import AccelerationInfo = Laya.AccelerationInfo; import Accelerator = Laya.Accelerator; import Point = ...

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

13. 简单的震屏效果 [ 86%]

...        //随机获取震动方向           dir = Math.random() > .5 ? 1 : -1;         //随机获取X轴移动量           offX = Math.random() * 5 * dir + vibrateObj.x;         //随机获取Y轴移动量           offY = Math....

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

14. 输入设备-贪吃蛇(重力感应) [ 86%]

...food.graphics.drawRect(0, 0, foodSize, foodSize, "#00BFFF"); food.x = Math.random() * Laya.stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Laya.Sprite { constructor(width, height) { super(); this.size(width, height); this.init(); } init() { this.graphics.drawRect(-...

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

15. 3D灯光与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...ntLight.addComponent(Laya.PointLightCom); pointLightCom.range = 2.0 + Math.random() * 8.0; pointLightCom.color.setValue(Math.random(), Math.random(), Math.random(), 1); pointLightCom.intensity = 6.0 + Math.random() * 8; moverLights[i] = pointLight; offsets[i] = new Vector3((Math.random() - 0.5) * 10...

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

16. laya.d3.math.RandX [ 86%]

...MethodDefined By  RandX(seed:Array) 创建一个 Rand 实例。 RandX  random():Number 返回[0,1)之间的随机数。 RandX  randomint():Array 通过2x32位的数组,返回64位的随机数。 RandXProperty DetaildefaultRandpropertypublic static var defaultRand:RandX基于时间种子的...

来源: laya_api 发布时间: 20170929

17. laya.d3.math.RandX [ 86%]

...MethodDefined By  RandX(seed:Array) 创建一个 Rand 实例。 RandX  random():Number 返回[0,1)之间的随机数。 RandX  randomint():Array 通过2x32位的数组,返回64位的随机数。 RandXProperty DetaildefaultRandpropertypublic static var defaultRand:RandX基于时间种子的...

来源: Laya2.0_api 发布时间: 20190513

18. 给模型动态添加脚本报错 [ 86%]

...form.localPosition = new Laya.Vector3(this.startPos.x + (4.5 - Math.random() * 9), this.startPos.y, this.startPos.z + (2.5 - Math.random() * 5));                 console.log('----------------goldnode', goldNode);                 this.playerGoldArr.pu...

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

19. 在LayaAir1.7.3beta中使用WebGL渲染下粒子系统像素颜色丢失的问题 [ 84%]

...tartColor=MathUtil.lerp(settings.minStartColor,settings.maxStartColor,Math.random()); particleData.endColor=MathUtil.lerp(settings.minEndColor,settings.maxEndColor,Math.random()); } 改为 if (settings.disableColor){ for (i=0;i < 3;i++){ particleData.startColor=1; particleData.endColor=1; } parti...

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

20. timer无法执行 [ 83%]

...hootBall); }   public shootBall(): void{ //生成空中降落的球 //var random: number = Math.random()*24-7; let ball: Laya.MeshSprite3D = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(1)); this.scene1.addChild(ball);   ball.transform.position = new Laya.Vector3((Math.random() - 0.5) * 2...

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