大约有 7 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0044 秒)
...整数的网格索引 */ private getGridIndex(x: number, z: number, out: Vector2) { var minX = this.terrainSprite.minX; var minZ = this.terrainSprite.minZ; var cellX = this.terrainSprite.width / this.aStarMap.width; var cellZ = this.terrainSprite.depth / this.aStarMap.height; var gridX = Math.floor(...
来源: Laya3.0_文档 发布时间: 20230303
...()用法。 缓动属性的类型支持不仅限于number,还新增了对Vector2、Vector3、Vector4、Color、Point以及字符串形式颜色值的支持。新的Tween对象设计得非常轻量,因此默认不重用,以避免因对象重用而引发的问题。此外,新系统不再使用...
来源: Laya3.0_文档 发布时间: 20250214
...flectionProbe:true, shaderType:2, uniformMap:{ u_gradientDirection: {type: Vector2, default:[1,1]}, // 渐变方向 u_gradientStartColor: {type:Vector4, default:[1,1,1,1]}, // 渐变起始颜色 u_gradientEndColor: {type:Vector4, default:[1,1,1,1]} // 渐变结束颜色 }, attributeMap: { a_position...
来源: Laya3.0_文档 发布时间: 20250214
...位置位置。 * @param out 输出射线。 */ viewportPointToRay(point: Vector2, out: Ray): void { this._rayViewport.x = this.viewport.x; this._rayViewport.y = this.viewport.y; this._rayViewport.width = ILaya.stage._width; this._rayViewport.height = ILaya.stage._height; Picker.calculateCursorRay(p...
来源: Laya3.0_文档 发布时间: 20240910
...* ……省略若干代码 */ //创建一个屏幕点 let point = new Laya.Vector2(); //创建一个射线 Laya.Ray(射线的起点,射线的方向) let ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); //以鼠标点击的点作为原点 point.x = Laya.stage.mouseX; point....
来源: Laya3.0_文档 发布时间: 20250103
...e, Nav2DAgent); } onMouseClick(evt: Laya.Event): void { let pos = new Laya.Vector2(evt.stageX, evt.stageY); console.log("click", pos); this._temp.graphics.clear(); this._allAgent.forEach((agent) => { agent.destination = pos; let paths = agent.getCurrentPath(); if (paths.length >= 2) { let poin...
来源: Laya3.0_文档 发布时间: 20250214
...可以在代码中设置,示例代码如下: Physics2D.I.gravity= new Vector2(0,9.8) 2.3.3 重力缩放系数 gravity Scale 除了全局的重力加速度参数设置外,刚体的重力缩放系数属性,是用于独立影响单个动态刚体重力效果的参数。 该值乘以重力值,...
来源: Laya3.0_文档 发布时间: 20250103