大约有 473 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0038 秒)
Laya_社区(250) Laya_示例(61) Laya3.0_api(39) Laya2.0_文档(33) Laya2.0_api(28) Laya2.0_示例(25) laya_api(21) Laya3.0_文档(16)
...lean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); ``` ## 2、加速计 `Accelerator`类定期发送设备的...
来源: Laya2.0_文档 发布时间: 20210715
...transform.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.playerGoldA...
来源: Laya_社区 发布时间: 20200326
...点} b 示例:{x:1,y:100} */ function calcDistance(a,b){ return Math.sqrt(Math.pow(a.x-b.x,2)+Math.pow(a.y-b.y,2)); } 2018-08-27 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 G 相关问题 请问在layaIDE里,怎么调用...
来源: Laya_社区 发布时间: 20180827
...=> x + start); } to_binary(code: number, bit: number = 8, max: number = Math.pow(2, bit) - 1) { if (code < 0) throw new Error("code should be greater than: 0"); if (code > max) throw new Error("code should be less than: " + max); return this.padding(code.toString(2), bit, "0", false); } to_...
来源: Laya_社区 发布时间: 20190321
...ationPlayer.as 222行 , 二二二。。。。。 _currentKeyframeIndex = Math.max(Math.floor(currentPlayTime / cacheFrameInterval), 0);//TODO:矫正 修正后的正确值: _currentKeyframeIndex = Math.round(currentPlayTime / cacheFrameInterval);//TODO:矫正 不修正的话,此条件...
来源: Laya_社区 发布时间: 20190309
...= tRec.y - CacheStyle.CANVAS_EXTEND_EDGE; tRec.x = Math.floor(tRec.x + x) - x; tRec.y = Math.floor(tRec.y + y) - y; tRec.width = Math.floor(tRec.width); tRec.height = Math.floor(tRec.height); ...
来源: Laya_社区 发布时间: 20210615
...eData.startColor=255; particleData.endColor=255; } particleData.startColor=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;...
来源: Laya_社区 发布时间: 20170416
...new Laya.Vector3(); var scaleDelta = 0; function animate() { _position.x = Math.sin(scaleDelta += 0.01); layaMonkey3D.transform.position = _position; camera.viewport.project(layaMonkey3D.transform.position, camera.projectionViewMatrix, _outPos); //获取的2d坐标必须做兼容屏幕适配操作 l...
来源: Laya_示例 发布时间: 20240930
...结果 let rays = []; for (let i = 0; i < 8; i++) { let radis = i * 2 * Math.PI / 8; rays[i] = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(Math.cos(radis), 0, Math.sin(radis))); let hitResult = new Array(); this.mainScene.physicsSimulation.rayCastAll(rays[i], hitResult); console.log(...
来源: Laya_社区 发布时间: 20190403
...未过的关数 = [1,2,3,4,5,6,7]; if(第一关过关了){ var 随机数 = Math.floor(Math.random() * 未过的关数.length; var 新的未过的关数 = []; var 剩下关数 = 未过的关数.length - 1; for(var i =0;i<剩下关数;i++){ if(i != 随机数){ 新的未过的关数.push(未过的...
来源: Laya_社区 发布时间: 20180615