大约有 37 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0026 秒)
...口让你去旋转,你只能通过逻辑自己计算出轨迹,譬如用Math.sin、cos计算! babby_bei • 2017-07-19 18:23 @cuixueying:研究了一个下午,搞得一头雾水,感觉有点难啊,能否说下如何最简单的实现圆点围绕圆角矩形转动? yunzhongjushi • 2020...
来源: Laya_社区 发布时间: 20170719
... Laya.Stage.SCREEN_NONE; private animate(): void { this._position.x = Math.sin(this.scaleDelta += 0.01); this.layaMonkey3D.transform.position = this._position; this.camera.viewport.project(this.layaMonkey3D.transform.position, this.camera.projectionViewMatrix, this._outPos); this...
来源: Laya_社区 发布时间: 20180425
...=> 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
...行代码就可以复现这个bug。 function animate() { // _position.x = Math.sin(scaleDelta += 0.01); //删除这行代码 _position.z = scaleDelta += 0.01; //加上这行代码:Z轴平移直到移到视野之外 layaMonkey3D.transform.position = _position; camera.viewport.project(layaMonkey3D....
来源: Laya_社区 发布时间: 20170810
...弧度和速度计算角色在x,z轴上移动的量 var speedX:number = Math.sin(this.rocker.radians) * this.speed; var speedZ:number = Math.cos(this.rocker.radians) * this.speed; //记录角色本帧的角度 this.lastAngle = this.rocker.angle; //行走区域碰撞检测,如未与行走区域...
来源: Laya_社区 发布时间: 20171113
...V(radius: number, numSegments: number): Laya.Mesh2D { // 2π const twoPi = Math.PI * 2; // 顶点数组 let vertexs = new Float32Array((numSegments + 1) * 5); // 索引数组 let index = new Uint16Array((numSegments + 1) * 3); var pos = 0; // 生成圆周上的顶点 for (let i = 0; i < numSegmen...
来源: Laya3.0_文档 发布时间: 20250214
....scaleTime += Laya.timer.delta / 1000 * this.scaleSpeed; const scale = 1 + Math.sin(this.scaleTime) * 0.5; // 增加缩放变化幅度 this.lightComp.lightScale.setValue(scale, scale); } } 运行的效果如动图3-1所示, (动图3-1) Copyright ©Layabox 2025 all right reserved,powered by L...
来源: Laya3.0_文档 发布时间: 20250214