大约有 9 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0065 秒)
...; i < this._colorNums; i++) { let offset = i * 4; colorBuffer[offset] = Math.random(); colorBuffer[offset + 1] = Math.random(); colorBuffer[offset + 2] = Math.random(); colorBuffer[offset + 3] = 1; } //设置uniformbuffer this.batchMat.setBuffer("colormap", colorBuffer); } //随机生成_spriteNu...
来源: Laya3.0_文档 发布时间: 20251010
...; var cellZ = this.terrainSprite.depth / this.aStarMap.height; var gridX = Math.floor((x - minX) / cellX); var gridZ = Math.floor((z - minZ) / cellZ); var boundWidth = this.aStarMap.width - 1; var boundHeight = this.aStarMap.height - 1; (gridX > boundWidth) && (gridX = boundWidth); (gridZ...
来源: Laya3.0_文档 发布时间: 20230303
... Vector3; if (isRadian) { rot = rotation; } else { Vector3.scale(rotation, Math.PI / 180.0, Transform3D._tempVector30); rot = Transform3D._tempVector30; } Quaternion.createFromYawPitchRoll(rot.y, rot.x, rot.z, Transform3D._tempQuaternion0); if (isLocal) { Quaternion.multiply(this._localRotation, Tra...
来源: Laya3.0_文档 发布时间: 20251010
...) { super(); } //组件被启用后执行 onEnable(): void { this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya....
来源: Laya3.0_文档 发布时间: 20251010
...会被保存到场景文件中 get degree() { return this._radian * (180 / Math.PI);//由于自己没有序列化保存,需要把_radian存下来的弧度反算回角度,用于IDE属性面板显示 } set degree(value: number) { this._radian = value * (Math.PI / 180);//把输入的角度值,转...
来源: Laya3.0_文档 发布时间: 20251010
... Mask可以指定单层,也可以多层混合,例如: xx.cullingMask=Math.pow(2,0)|Math.pow(2,1); //该代码表示为第0层和第1层渲染显示。 六、Output (图6-1) 6.1 视图矩形 视图矩形是通过X\Y\W\H四个数值来控制摄像机的视图在屏幕中的位置和大小的...
来源: Laya3.0_文档 发布时间: 20251010
...r() { super(); } /** * @private */ protected _updateRotation(): void { if (Math.abs(this.yawPitchRoll.y) < 1.50) { Laya.Quaternion.createFromYawPitchRoll(this.yawPitchRoll.x, this.yawPitchRoll.y, this.yawPitchRoll.z, this.tempRotationZ); this.tempRotationZ.cloneTo(this.camera.transform.localRotat...
来源: Laya3.0_文档 发布时间: 20251010
... */ private addCone(): void { //生成随机值半径和高 let raidius = Math.random() * 0.2 + 0.2; let height = Math.random() * 0.5 + 0.8; //创建圆锥形3D模型节点对象 let cone = new Laya.Sprite3D; let coneMesh = cone.addComponent(Laya.MeshFilter); let coneRender = cone.addComponent(Laya....
来源: Laya3.0_文档 发布时间: 20251010
...关节等物理对象的计算数据。 在代码实现中,系统通过 Math.max(16, Config3D.defaultPhysicsMemory) * 16 的计算方式来确定最终的内存分配量,其中确保最小内存不低于 16MB,然后将 MB 单位转换为物理引擎内部使用的页单位(通常每页 64KB...
来源: Laya3.0_文档 发布时间: 20251231