@minecraft/math 2.2.6 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,8 +162,8 @@ var Vector3Utils = class _Vector3Utils {
162
162
  * @param a - Angle in radians
163
163
  */
164
164
  static rotateX(v, a) {
165
- let cos = Math.cos(a);
166
- let sin = Math.sin(a);
165
+ const cos = Math.cos(a);
166
+ const sin = Math.sin(a);
167
167
  return { x: v.x, y: v.y * cos - v.z * sin, z: v.z * cos + v.y * sin };
168
168
  }
169
169
  /**
@@ -173,8 +173,8 @@ var Vector3Utils = class _Vector3Utils {
173
173
  * @param a - Angle in radians
174
174
  */
175
175
  static rotateY(v, a) {
176
- let cos = Math.cos(a);
177
- let sin = Math.sin(a);
176
+ const cos = Math.cos(a);
177
+ const sin = Math.sin(a);
178
178
  return { x: v.x * cos + v.z * sin, y: v.y, z: v.z * cos - v.x * sin };
179
179
  }
180
180
  /**
@@ -184,8 +184,8 @@ var Vector3Utils = class _Vector3Utils {
184
184
  * @param a - Angle in radians
185
185
  */
186
186
  static rotateZ(v, a) {
187
- let cos = Math.cos(a);
188
- let sin = Math.sin(a);
187
+ const cos = Math.cos(a);
188
+ const sin = Math.sin(a);
189
189
  return { x: v.x * cos - v.y * sin, y: v.y * cos + v.x * sin, z: v.z };
190
190
  }
191
191
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/general/clamp.ts", "../src/vector3/coreHelpers.ts", "../src/vector3/vectorWrapper.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Clamps the passed in number to the passed in min and max values.\n *\n * @public\n */\nexport function clampNumber(val: number, min: number, max: number): number {\n return Math.min(Math.max(val, min), max);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Vector2, Vector3 } from '@minecraft/server';\nimport { clampNumber } from '../general/clamp.js';\n\n/**\n * Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.\n *\n * @public\n */\nexport class Vector3Utils {\n /**\n * equals\n *\n * Check the equality of two vectors\n */\n static equals(v1: Vector3, v2: Vector3): boolean {\n return v1.x === v2.x && v1.y === v2.y && v1.z === v2.z;\n }\n\n /**\n * add\n *\n * Add two vectors to produce a new vector\n */\n static add(v1: Vector3, v2: Partial<Vector3>): Vector3 {\n return { x: v1.x + (v2.x ?? 0), y: v1.y + (v2.y ?? 0), z: v1.z + (v2.z ?? 0) };\n }\n\n /**\n * subtract\n *\n * Subtract two vectors to produce a new vector (v1-v2)\n */\n static subtract(v1: Vector3, v2: Partial<Vector3>): Vector3 {\n return { x: v1.x - (v2.x ?? 0), y: v1.y - (v2.y ?? 0), z: v1.z - (v2.z ?? 0) };\n }\n\n /** scale\n *\n * Multiple all entries in a vector by a single scalar value producing a new vector\n */\n static scale(v1: Vector3, scale: number): Vector3 {\n return { x: v1.x * scale, y: v1.y * scale, z: v1.z * scale };\n }\n\n /**\n * dot\n *\n * Calculate the dot product of two vectors\n */\n static dot(a: Vector3, b: Vector3): number {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n }\n\n /**\n * cross\n *\n * Calculate the cross product of two vectors. Returns a new vector.\n */\n static cross(a: Vector3, b: Vector3): Vector3 {\n return { x: a.y * b.z - a.z * b.y, y: a.z * b.x - a.x * b.z, z: a.x * b.y - a.y * b.x };\n }\n\n /**\n * magnitude\n *\n * The magnitude of a vector\n */\n static magnitude(v: Vector3): number {\n return Math.sqrt(v.x ** 2 + v.y ** 2 + v.z ** 2);\n }\n\n /**\n * distance\n *\n * Calculate the distance between two vectors\n */\n static distance(a: Vector3, b: Vector3): number {\n return Vector3Utils.magnitude(Vector3Utils.subtract(a, b));\n }\n\n /**\n * normalize\n *\n * Takes a vector 3 and normalizes it to a unit vector\n */\n static normalize(v: Vector3): Vector3 {\n const mag = Vector3Utils.magnitude(v);\n return { x: v.x / mag, y: v.y / mag, z: v.z / mag };\n }\n\n /**\n * floor\n *\n * Floor the components of a vector to produce a new vector\n */\n static floor(v: Vector3): Vector3 {\n return { x: Math.floor(v.x), y: Math.floor(v.y), z: Math.floor(v.z) };\n }\n\n /**\n * toString\n *\n * Create a string representation of a vector3\n */\n static toString(v: Vector3, options?: { decimals?: number; delimiter?: string }): string {\n const decimals = options?.decimals ?? 2;\n const str: string[] = [v.x.toFixed(decimals), v.y.toFixed(decimals), v.z.toFixed(decimals)];\n return str.join(options?.delimiter ?? ', ');\n }\n\n /**\n * fromString\n *\n * Gets a Vector3 from the string representation produced by {@link Vector3Utils.toString}. If any numeric value is not a number\n * or the format is invalid, undefined is returned.\n * @param str - The string to parse\n * @param delimiter - The delimiter used to separate the components. Defaults to the same as the default for {@link Vector3Utils.toString}\n */\n static fromString(str: string, delimiter: string = ','): Vector3 | undefined {\n const parts = str.split(delimiter);\n if (parts.length !== 3) {\n return undefined;\n }\n\n const output = parts.map(part => parseFloat(part));\n if (output.some(part => isNaN(part))) {\n return undefined;\n }\n return { x: output[0], y: output[1], z: output[2] };\n }\n\n /**\n * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n static clamp(v: Vector3, limits?: { min?: Partial<Vector3>; max?: Partial<Vector3> }): Vector3 {\n return {\n x: clampNumber(v.x, limits?.min?.x ?? Number.MIN_SAFE_INTEGER, limits?.max?.x ?? Number.MAX_SAFE_INTEGER),\n y: clampNumber(v.y, limits?.min?.y ?? Number.MIN_SAFE_INTEGER, limits?.max?.y ?? Number.MAX_SAFE_INTEGER),\n z: clampNumber(v.z, limits?.min?.z ?? Number.MIN_SAFE_INTEGER, limits?.max?.z ?? Number.MAX_SAFE_INTEGER),\n };\n }\n\n /**\n * lerp\n *\n * Constructs a new vector using linear interpolation on each component from two vectors.\n */\n static lerp(a: Vector3, b: Vector3, t: number): Vector3 {\n return { x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t, z: a.z + (b.z - a.z) * t };\n }\n\n /**\n * slerp\n *\n * Constructs a new vector using spherical linear interpolation on each component from two vectors.\n */\n static slerp(a: Vector3, b: Vector3, t: number): Vector3 {\n const theta = Math.acos(Vector3Utils.dot(a, b));\n const sinTheta = Math.sin(theta);\n const ta = Math.sin((1.0 - t) * theta) / sinTheta;\n const tb = Math.sin(t * theta) / sinTheta;\n return Vector3Utils.add(Vector3Utils.scale(a, ta), Vector3Utils.scale(b, tb));\n }\n\n /**\n * multiply\n *\n * Element-wise multiplication of two vectors together.\n * Not to be confused with {@link Vector3Utils.dot} product or {@link Vector3Utils.cross} product\n */\n static multiply(a: Vector3, b: Vector3): Vector3 {\n return { x: a.x * b.x, y: a.y * b.y, z: a.z * b.z };\n }\n\n /**\n * rotateX\n *\n * Rotates the vector around the x axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateX(v: Vector3, a: number): Vector3 {\n let cos = Math.cos(a);\n let sin = Math.sin(a);\n return { x: v.x, y: v.y * cos - v.z * sin, z: v.z * cos + v.y * sin };\n }\n\n /**\n * rotateY\n *\n * Rotates the vector around the y axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateY(v: Vector3, a: number): Vector3 {\n let cos = Math.cos(a);\n let sin = Math.sin(a);\n return { x: v.x * cos + v.z * sin, y: v.y, z: v.z * cos - v.x * sin };\n }\n\n /**\n * rotateZ\n *\n * Rotates the vector around the z axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateZ(v: Vector3, a: number): Vector3 {\n let cos = Math.cos(a);\n let sin = Math.sin(a);\n return { x: v.x * cos - v.y * sin, y: v.y * cos + v.x * sin, z: v.z };\n }\n}\n\n/**\n * Utilities operating on Vector2 objects. All methods are static and do not modify the input objects.\n *\n * @public\n */\nexport class Vector2Utils {\n /**\n * toString\n *\n * Create a string representation of a vector2\n */\n static toString(v: Vector2, options?: { decimals?: number; delimiter?: string }): string {\n const decimals = options?.decimals ?? 2;\n const str: string[] = [v.x.toFixed(decimals), v.y.toFixed(decimals)];\n return str.join(options?.delimiter ?? ', ');\n }\n\n /**\n * fromString\n *\n * Gets a Vector2 from the string representation produced by {@link Vector3Utils.toString}. If any numeric value is not a number\n * or the format is invalid, undefined is returned.\n * @param str - The string to parse\n * @param delimiter - The delimiter used to separate the components. Defaults to the same as the default for {@link Vector3Utils.toString}\n */\n static fromString(str: string, delimiter: string = ','): Vector2 | undefined {\n const parts = str.split(delimiter);\n if (parts.length !== 2) {\n return undefined;\n }\n\n const output = parts.map(part => parseFloat(part));\n if (output.some(part => isNaN(part))) {\n return undefined;\n }\n return { x: output[0], y: output[1] };\n }\n}\n\n/**\n * up\n *\n * A unit vector representing the world UP direction (0,1,0)\n *\n * @public\n */\nexport const VECTOR3_UP: Vector3 = { x: 0, y: 1, z: 0 };\n/**\n * down\n *\n * A unit vector representing the world DOWN direction (0,-1,0)\n *\n * @public\n */\nexport const VECTOR3_DOWN: Vector3 = { x: 0, y: -1, z: 0 };\n/**\n * left\n *\n * A unit vector representing the world LEFT direction (-1,0,0)\n *\n * @public\n */\nexport const VECTOR3_LEFT: Vector3 = { x: -1, y: 0, z: 0 };\n/**\n * right\n *\n * A unit vector representing the world RIGHT direction (1,0,0)\n *\n * @public\n */\nexport const VECTOR3_RIGHT: Vector3 = { x: 1, y: 0, z: 0 };\n/**\n * forward\n *\n * A unit vector representing the world FORWARD direction (0,0,1)\n *\n * @public\n */\nexport const VECTOR3_FORWARD: Vector3 = { x: 0, y: 0, z: 1 };\n/**\n * back\n *\n * A unit vector representing the world BACK direction (0,0,-1)\n *\n * @public\n */\nexport const VECTOR3_BACK: Vector3 = { x: 0, y: 0, z: -1 };\n/**\n * one\n *\n * A unit vector representing the value of 1 in all directions (1,1,1)\n *\n * @public\n */\nexport const VECTOR3_ONE: Vector3 = { x: 1, y: 1, z: 1 };\n/**\n * zero\n *\n * A unit vector representing the value of 0 in all directions (0,0,0)\n *\n * @public\n */\nexport const VECTOR3_ZERO: Vector3 = { x: 0, y: 0, z: 0 };\n/**\n * west\n *\n * A unit vector representing the world WEST direction (-1,0,0)\n * (same as LEFT)\n *\n * @public\n */\nexport const VECTOR3_WEST: Vector3 = { x: -1, y: 0, z: 0 };\n/**\n * east\n *\n * A unit vector representing the world EAST direction (-1,0,0)\n * (same as RIGHT)\n *\n * @public\n */\nexport const VECTOR3_EAST: Vector3 = { x: 1, y: 0, z: 0 };\n/**\n * north\n *\n * A unit vector representing the world NORTH direction (-1,0,0)\n * (same as FORWARD)\n *\n * @public\n */\nexport const VECTOR3_NORTH: Vector3 = { x: 0, y: 0, z: 1 };\n/**\n * south\n *\n * A unit vector representing the world SOUTH direction (-1,0,0)\n * (same as BACK)\n *\n * @public\n */\nexport const VECTOR3_SOUTH: Vector3 = { x: 0, y: 0, z: -1 };\n/**\n * half\n *\n * A unit vector representing the value of 0.5 in all directions (0.5,0.5,0.5)\n *\n * @public\n */\nexport const VECTOR3_HALF: Vector3 = { x: 0.5, y: 0.5, z: 0.5 };\n/**\n * negative\n *\n * A unit vector representing the value of -1 in all directions (-1,-1,-1)\n *\n * @public\n */\nexport const VECTOR3_NEGATIVE_ONE: Vector3 = { x: -1, y: -1, z: -1 };\n/**\n * zero\n *\n * A vector representing the value of 0 in all directions (0,0)\n *\n * @public\n */\nexport const VECTOR2_ZERO: Vector2 = { x: 0, y: 0 };\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Vector2, Vector3 } from '@minecraft/server';\nimport { Vector2Utils, Vector3Utils } from './coreHelpers.js';\n\n/**\n * Vector3 wrapper class which can be used as a Vector3 for APIs on \\@minecraft/server which require a Vector,\n * but also contain additional helper methods. This is an alternative to using the core Vector 3 utility\n * methods directly, for those who prefer a more object-oriented approach. This version of the class is mutable\n * and changes state inline.\n *\n * For an immutable version of the build, use ImmutableVector3Builder.\n *\n * @public\n */\nexport class Vector3Builder implements Vector3 {\n x: number;\n y: number;\n z: number;\n\n constructor(vecStr: string, delim?: string, arg2?: never);\n constructor(vec: Vector3, arg?: never, arg2?: never);\n constructor(x: number, y: number, z: number);\n constructor(first: number | Vector3 | string, second?: number | string, z?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n this.z = first.z;\n } else if (typeof first === 'string') {\n const parsed = Vector3Utils.fromString(first, (second as string | undefined) ?? ',');\n if (!parsed) {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return;\n }\n this.x = parsed.x;\n this.y = parsed.y;\n this.z = parsed.z;\n } else {\n this.x = first;\n this.y = (second as number) ?? 0;\n this.z = z ?? 0;\n }\n }\n\n /**\n * Assigns the values of the passed in vector to this vector. Returns itself.\n */\n assign(vec: Vector3): this {\n this.x = vec.x;\n this.y = vec.y;\n this.z = vec.z;\n return this;\n }\n\n /**\n * equals\n *\n * Check the equality of two vectors\n */\n equals(v: Vector3): boolean {\n return Vector3Utils.equals(this, v);\n }\n\n /**\n * add\n *\n * Adds the vector v to this, returning itself.\n */\n add(v: Partial<Vector3>): this {\n return this.assign(Vector3Utils.add(this, v));\n }\n\n /**\n * subtract\n *\n * Subtracts the vector v from this, returning itself.\n */\n subtract(v: Partial<Vector3>): this {\n return this.assign(Vector3Utils.subtract(this, v));\n }\n\n /** scale\n *\n * Scales this by the passed in value, returning itself.\n */\n scale(val: number): this {\n return this.assign(Vector3Utils.scale(this, val));\n }\n\n /**\n * dot\n *\n * Computes the dot product of this and the passed in vector.\n */\n dot(vec: Vector3): number {\n return Vector3Utils.dot(this, vec);\n }\n\n /**\n * cross\n *\n * Computes the cross product of this and the passed in vector, returning itself.\n */\n cross(vec: Vector3): this {\n return this.assign(Vector3Utils.cross(this, vec));\n }\n\n /**\n * magnitude\n *\n * The magnitude of the vector\n */\n magnitude(): number {\n return Vector3Utils.magnitude(this);\n }\n\n /**\n * distance\n *\n * Calculate the distance between two vectors\n */\n distance(vec: Vector3): number {\n return Vector3Utils.distance(this, vec);\n }\n\n /**\n * normalize\n *\n * Normalizes this vector, returning itself.\n */\n normalize(): this {\n return this.assign(Vector3Utils.normalize(this));\n }\n\n /**\n * floor\n *\n * Floor the components of a vector to produce a new vector\n */\n floor(): this {\n return this.assign(Vector3Utils.floor(this));\n }\n\n /**\n * toString\n *\n * Create a string representation of a vector\n */\n toString(options?: { decimals?: number; delimiter?: string }): string {\n return Vector3Utils.toString(this, options);\n }\n\n /**\n * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n clamp(limits: { min?: Partial<Vector3>; max?: Partial<Vector3> }): this {\n return this.assign(Vector3Utils.clamp(this, limits));\n }\n\n /**\n * lerp\n *\n * Constructs a new vector using linear interpolation on each component from two vectors.\n */\n lerp(vec: Vector3, t: number): this {\n return this.assign(Vector3Utils.lerp(this, vec, t));\n }\n\n /**\n * slerp\n *\n * Constructs a new vector using spherical linear interpolation on each component from two vectors.\n */\n slerp(vec: Vector3, t: number): this {\n return this.assign(Vector3Utils.slerp(this, vec, t));\n }\n\n /**\n * multiply\n *\n * Element-wise multiplication of two vectors together.\n * Not to be confused with {@link Vector3Builder.dot} product or {@link Vector3Builder.cross} product\n */\n multiply(vec: Vector3): this {\n return this.assign(Vector3Utils.multiply(this, vec));\n }\n\n /**\n * rotateX\n *\n * Rotates the vector around the x axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateX(a: number): this {\n return this.assign(Vector3Utils.rotateX(this, a));\n }\n\n /**\n * rotateY\n *\n * Rotates the vector around the y axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateY(a: number): this {\n return this.assign(Vector3Utils.rotateY(this, a));\n }\n\n /**\n * rotateZ\n *\n * Rotates the vector around the z axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateZ(a: number): this {\n return this.assign(Vector3Utils.rotateZ(this, a));\n }\n}\n\n/**\n * Vector2 wrapper class which can be used as a Vector2 for APIs on \\@minecraft/server which require a Vector2.\n * @public\n */\nexport class Vector2Builder implements Vector2 {\n x: number;\n y: number;\n\n constructor(vecStr: string, delim?: string);\n constructor(vec: Vector2, arg?: never);\n constructor(x: number, y: number);\n constructor(first: number | Vector2 | string, second?: number | string) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n } else if (typeof first === 'string') {\n const parsed = Vector2Utils.fromString(first, (second as string | undefined) ?? ',');\n if (!parsed) {\n this.x = 0;\n this.y = 0;\n\n return;\n }\n\n this.x = parsed.x;\n this.y = parsed.y;\n } else {\n this.x = first;\n this.y = (second as number) ?? 0;\n }\n }\n\n toString(options?: { decimals?: number; delimiter?: string }): string {\n return Vector2Utils.toString(this, options);\n }\n}\n"],
5
- "mappings": ";AAQM,SAAU,YAAY,KAAa,KAAa,KAAW;AAC7D,SAAO,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,GAAG,GAAG;AAC3C;;;ACCM,IAAO,eAAP,MAAO,cAAY;;;;;;EAMrB,OAAO,OAAO,IAAa,IAAW;AAClC,WAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG;EACzD;;;;;;EAOA,OAAO,IAAI,IAAa,IAAoB;AACxC,WAAO,EAAE,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,GAAE;EAChF;;;;;;EAOA,OAAO,SAAS,IAAa,IAAoB;AAC7C,WAAO,EAAE,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,GAAE;EAChF;;;;;EAMA,OAAO,MAAM,IAAa,OAAa;AACnC,WAAO,EAAE,GAAG,GAAG,IAAI,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,GAAG,IAAI,MAAK;EAC9D;;;;;;EAOA,OAAO,IAAI,GAAY,GAAU;AAC7B,WAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;EAC3C;;;;;;EAOA,OAAO,MAAM,GAAY,GAAU;AAC/B,WAAO,EAAE,GAAG,EA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M,KAAc,GAAS;AACzB,WAAO,KAAK,OAAO,aAAa,MAAM,MAAM,KAAK,CAAC,CAAC;EACvD;;;;;;;EAQA,SAAS,KAAY;AACjB,WAAO,KAAK,OAAO,aAAa,SAAS,MAAM,GAAG,CAAC;EACvD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;AAOE,IAAO,iBAAP,MAAqB;EACvB;EACA;EAKA,YAAY,OAAkC,QAAwB;AAClE,QAAI,OAAO,UAAU,UAAU;AAC3B,WAAK,IAAI,MAAM;AACf,WAAK,IAAI,MAAM;IACnB,WAAW,OAAO,UAAU,UAAU;AAClC,YAAM,SAAS,aAAa,WAAW,OAAQ,UAAiC,GAAG;AACnF,UAAI,CAAC,QAAQ;AACT,aAAK,IAAI;AACT,aAAK,IAAI;AAET;MACJ;AAEA,WAAK,IAAI,OAAO;AAChB,WAAK,IAAI,OAAO;IACpB,OAAO;AACH,WAAK,IAAI;AACT,WAAK,IAAK,UAAqB;IACnC;EACJ;EAEA,SAAS,SAAmD;AACxD,WAAO,aAAa,SAAS,MAAM,OAAO;EAC9C;;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Clamps the passed in number to the passed in min and max values.\n *\n * @public\n */\nexport function clampNumber(val: number, min: number, max: number): number {\n return Math.min(Math.max(val, min), max);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Vector2, Vector3 } from '@minecraft/server';\nimport { clampNumber } from '../general/clamp.js';\n\n/**\n * Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.\n *\n * @public\n */\nexport class Vector3Utils {\n /**\n * equals\n *\n * Check the equality of two vectors\n */\n static equals(v1: Vector3, v2: Vector3): boolean {\n return v1.x === v2.x && v1.y === v2.y && v1.z === v2.z;\n }\n\n /**\n * add\n *\n * Add two vectors to produce a new vector\n */\n static add(v1: Vector3, v2: Partial<Vector3>): Vector3 {\n return { x: v1.x + (v2.x ?? 0), y: v1.y + (v2.y ?? 0), z: v1.z + (v2.z ?? 0) };\n }\n\n /**\n * subtract\n *\n * Subtract two vectors to produce a new vector (v1-v2)\n */\n static subtract(v1: Vector3, v2: Partial<Vector3>): Vector3 {\n return { x: v1.x - (v2.x ?? 0), y: v1.y - (v2.y ?? 0), z: v1.z - (v2.z ?? 0) };\n }\n\n /** scale\n *\n * Multiple all entries in a vector by a single scalar value producing a new vector\n */\n static scale(v1: Vector3, scale: number): Vector3 {\n return { x: v1.x * scale, y: v1.y * scale, z: v1.z * scale };\n }\n\n /**\n * dot\n *\n * Calculate the dot product of two vectors\n */\n static dot(a: Vector3, b: Vector3): number {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n }\n\n /**\n * cross\n *\n * Calculate the cross product of two vectors. Returns a new vector.\n */\n static cross(a: Vector3, b: Vector3): Vector3 {\n return { x: a.y * b.z - a.z * b.y, y: a.z * b.x - a.x * b.z, z: a.x * b.y - a.y * b.x };\n }\n\n /**\n * magnitude\n *\n * The magnitude of a vector\n */\n static magnitude(v: Vector3): number {\n return Math.sqrt(v.x ** 2 + v.y ** 2 + v.z ** 2);\n }\n\n /**\n * distance\n *\n * Calculate the distance between two vectors\n */\n static distance(a: Vector3, b: Vector3): number {\n return Vector3Utils.magnitude(Vector3Utils.subtract(a, b));\n }\n\n /**\n * normalize\n *\n * Takes a vector 3 and normalizes it to a unit vector\n */\n static normalize(v: Vector3): Vector3 {\n const mag = Vector3Utils.magnitude(v);\n return { x: v.x / mag, y: v.y / mag, z: v.z / mag };\n }\n\n /**\n * floor\n *\n * Floor the components of a vector to produce a new vector\n */\n static floor(v: Vector3): Vector3 {\n return { x: Math.floor(v.x), y: Math.floor(v.y), z: Math.floor(v.z) };\n }\n\n /**\n * toString\n *\n * Create a string representation of a vector3\n */\n static toString(v: Vector3, options?: { decimals?: number; delimiter?: string }): string {\n const decimals = options?.decimals ?? 2;\n const str: string[] = [v.x.toFixed(decimals), v.y.toFixed(decimals), v.z.toFixed(decimals)];\n return str.join(options?.delimiter ?? ', ');\n }\n\n /**\n * fromString\n *\n * Gets a Vector3 from the string representation produced by {@link Vector3Utils.toString}. If any numeric value is not a number\n * or the format is invalid, undefined is returned.\n * @param str - The string to parse\n * @param delimiter - The delimiter used to separate the components. Defaults to the same as the default for {@link Vector3Utils.toString}\n */\n static fromString(str: string, delimiter: string = ','): Vector3 | undefined {\n const parts = str.split(delimiter);\n if (parts.length !== 3) {\n return undefined;\n }\n\n const output = parts.map(part => parseFloat(part));\n if (output.some(part => isNaN(part))) {\n return undefined;\n }\n return { x: output[0], y: output[1], z: output[2] };\n }\n\n /**\n * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n static clamp(v: Vector3, limits?: { min?: Partial<Vector3>; max?: Partial<Vector3> }): Vector3 {\n return {\n x: clampNumber(v.x, limits?.min?.x ?? Number.MIN_SAFE_INTEGER, limits?.max?.x ?? Number.MAX_SAFE_INTEGER),\n y: clampNumber(v.y, limits?.min?.y ?? Number.MIN_SAFE_INTEGER, limits?.max?.y ?? Number.MAX_SAFE_INTEGER),\n z: clampNumber(v.z, limits?.min?.z ?? Number.MIN_SAFE_INTEGER, limits?.max?.z ?? Number.MAX_SAFE_INTEGER),\n };\n }\n\n /**\n * lerp\n *\n * Constructs a new vector using linear interpolation on each component from two vectors.\n */\n static lerp(a: Vector3, b: Vector3, t: number): Vector3 {\n return { x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t, z: a.z + (b.z - a.z) * t };\n }\n\n /**\n * slerp\n *\n * Constructs a new vector using spherical linear interpolation on each component from two vectors.\n */\n static slerp(a: Vector3, b: Vector3, t: number): Vector3 {\n const theta = Math.acos(Vector3Utils.dot(a, b));\n const sinTheta = Math.sin(theta);\n const ta = Math.sin((1.0 - t) * theta) / sinTheta;\n const tb = Math.sin(t * theta) / sinTheta;\n return Vector3Utils.add(Vector3Utils.scale(a, ta), Vector3Utils.scale(b, tb));\n }\n\n /**\n * multiply\n *\n * Element-wise multiplication of two vectors together.\n * Not to be confused with {@link Vector3Utils.dot} product or {@link Vector3Utils.cross} product\n */\n static multiply(a: Vector3, b: Vector3): Vector3 {\n return { x: a.x * b.x, y: a.y * b.y, z: a.z * b.z };\n }\n\n /**\n * rotateX\n *\n * Rotates the vector around the x axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateX(v: Vector3, a: number): Vector3 {\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n return { x: v.x, y: v.y * cos - v.z * sin, z: v.z * cos + v.y * sin };\n }\n\n /**\n * rotateY\n *\n * Rotates the vector around the y axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateY(v: Vector3, a: number): Vector3 {\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n return { x: v.x * cos + v.z * sin, y: v.y, z: v.z * cos - v.x * sin };\n }\n\n /**\n * rotateZ\n *\n * Rotates the vector around the z axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n static rotateZ(v: Vector3, a: number): Vector3 {\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n return { x: v.x * cos - v.y * sin, y: v.y * cos + v.x * sin, z: v.z };\n }\n}\n\n/**\n * Utilities operating on Vector2 objects. All methods are static and do not modify the input objects.\n *\n * @public\n */\nexport class Vector2Utils {\n /**\n * toString\n *\n * Create a string representation of a vector2\n */\n static toString(v: Vector2, options?: { decimals?: number; delimiter?: string }): string {\n const decimals = options?.decimals ?? 2;\n const str: string[] = [v.x.toFixed(decimals), v.y.toFixed(decimals)];\n return str.join(options?.delimiter ?? ', ');\n }\n\n /**\n * fromString\n *\n * Gets a Vector2 from the string representation produced by {@link Vector3Utils.toString}. If any numeric value is not a number\n * or the format is invalid, undefined is returned.\n * @param str - The string to parse\n * @param delimiter - The delimiter used to separate the components. Defaults to the same as the default for {@link Vector3Utils.toString}\n */\n static fromString(str: string, delimiter: string = ','): Vector2 | undefined {\n const parts = str.split(delimiter);\n if (parts.length !== 2) {\n return undefined;\n }\n\n const output = parts.map(part => parseFloat(part));\n if (output.some(part => isNaN(part))) {\n return undefined;\n }\n return { x: output[0], y: output[1] };\n }\n}\n\n/**\n * up\n *\n * A unit vector representing the world UP direction (0,1,0)\n *\n * @public\n */\nexport const VECTOR3_UP: Vector3 = { x: 0, y: 1, z: 0 };\n/**\n * down\n *\n * A unit vector representing the world DOWN direction (0,-1,0)\n *\n * @public\n */\nexport const VECTOR3_DOWN: Vector3 = { x: 0, y: -1, z: 0 };\n/**\n * left\n *\n * A unit vector representing the world LEFT direction (-1,0,0)\n *\n * @public\n */\nexport const VECTOR3_LEFT: Vector3 = { x: -1, y: 0, z: 0 };\n/**\n * right\n *\n * A unit vector representing the world RIGHT direction (1,0,0)\n *\n * @public\n */\nexport const VECTOR3_RIGHT: Vector3 = { x: 1, y: 0, z: 0 };\n/**\n * forward\n *\n * A unit vector representing the world FORWARD direction (0,0,1)\n *\n * @public\n */\nexport const VECTOR3_FORWARD: Vector3 = { x: 0, y: 0, z: 1 };\n/**\n * back\n *\n * A unit vector representing the world BACK direction (0,0,-1)\n *\n * @public\n */\nexport const VECTOR3_BACK: Vector3 = { x: 0, y: 0, z: -1 };\n/**\n * one\n *\n * A unit vector representing the value of 1 in all directions (1,1,1)\n *\n * @public\n */\nexport const VECTOR3_ONE: Vector3 = { x: 1, y: 1, z: 1 };\n/**\n * zero\n *\n * A unit vector representing the value of 0 in all directions (0,0,0)\n *\n * @public\n */\nexport const VECTOR3_ZERO: Vector3 = { x: 0, y: 0, z: 0 };\n/**\n * west\n *\n * A unit vector representing the world WEST direction (-1,0,0)\n * (same as LEFT)\n *\n * @public\n */\nexport const VECTOR3_WEST: Vector3 = { x: -1, y: 0, z: 0 };\n/**\n * east\n *\n * A unit vector representing the world EAST direction (-1,0,0)\n * (same as RIGHT)\n *\n * @public\n */\nexport const VECTOR3_EAST: Vector3 = { x: 1, y: 0, z: 0 };\n/**\n * north\n *\n * A unit vector representing the world NORTH direction (-1,0,0)\n * (same as FORWARD)\n *\n * @public\n */\nexport const VECTOR3_NORTH: Vector3 = { x: 0, y: 0, z: 1 };\n/**\n * south\n *\n * A unit vector representing the world SOUTH direction (-1,0,0)\n * (same as BACK)\n *\n * @public\n */\nexport const VECTOR3_SOUTH: Vector3 = { x: 0, y: 0, z: -1 };\n/**\n * half\n *\n * A unit vector representing the value of 0.5 in all directions (0.5,0.5,0.5)\n *\n * @public\n */\nexport const VECTOR3_HALF: Vector3 = { x: 0.5, y: 0.5, z: 0.5 };\n/**\n * negative\n *\n * A unit vector representing the value of -1 in all directions (-1,-1,-1)\n *\n * @public\n */\nexport const VECTOR3_NEGATIVE_ONE: Vector3 = { x: -1, y: -1, z: -1 };\n/**\n * zero\n *\n * A vector representing the value of 0 in all directions (0,0)\n *\n * @public\n */\nexport const VECTOR2_ZERO: Vector2 = { x: 0, y: 0 };\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Vector2, Vector3 } from '@minecraft/server';\nimport { Vector2Utils, Vector3Utils } from './coreHelpers.js';\n\n/**\n * Vector3 wrapper class which can be used as a Vector3 for APIs on \\@minecraft/server which require a Vector,\n * but also contain additional helper methods. This is an alternative to using the core Vector 3 utility\n * methods directly, for those who prefer a more object-oriented approach. This version of the class is mutable\n * and changes state inline.\n *\n * For an immutable version of the build, use ImmutableVector3Builder.\n *\n * @public\n */\nexport class Vector3Builder implements Vector3 {\n x: number;\n y: number;\n z: number;\n\n constructor(vecStr: string, delim?: string, arg2?: never);\n constructor(vec: Vector3, arg?: never, arg2?: never);\n constructor(x: number, y: number, z: number);\n constructor(first: number | Vector3 | string, second?: number | string, z?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n this.z = first.z;\n } else if (typeof first === 'string') {\n const parsed = Vector3Utils.fromString(first, (second as string | undefined) ?? ',');\n if (!parsed) {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return;\n }\n this.x = parsed.x;\n this.y = parsed.y;\n this.z = parsed.z;\n } else {\n this.x = first;\n this.y = (second as number) ?? 0;\n this.z = z ?? 0;\n }\n }\n\n /**\n * Assigns the values of the passed in vector to this vector. Returns itself.\n */\n assign(vec: Vector3): this {\n this.x = vec.x;\n this.y = vec.y;\n this.z = vec.z;\n return this;\n }\n\n /**\n * equals\n *\n * Check the equality of two vectors\n */\n equals(v: Vector3): boolean {\n return Vector3Utils.equals(this, v);\n }\n\n /**\n * add\n *\n * Adds the vector v to this, returning itself.\n */\n add(v: Partial<Vector3>): this {\n return this.assign(Vector3Utils.add(this, v));\n }\n\n /**\n * subtract\n *\n * Subtracts the vector v from this, returning itself.\n */\n subtract(v: Partial<Vector3>): this {\n return this.assign(Vector3Utils.subtract(this, v));\n }\n\n /** scale\n *\n * Scales this by the passed in value, returning itself.\n */\n scale(val: number): this {\n return this.assign(Vector3Utils.scale(this, val));\n }\n\n /**\n * dot\n *\n * Computes the dot product of this and the passed in vector.\n */\n dot(vec: Vector3): number {\n return Vector3Utils.dot(this, vec);\n }\n\n /**\n * cross\n *\n * Computes the cross product of this and the passed in vector, returning itself.\n */\n cross(vec: Vector3): this {\n return this.assign(Vector3Utils.cross(this, vec));\n }\n\n /**\n * magnitude\n *\n * The magnitude of the vector\n */\n magnitude(): number {\n return Vector3Utils.magnitude(this);\n }\n\n /**\n * distance\n *\n * Calculate the distance between two vectors\n */\n distance(vec: Vector3): number {\n return Vector3Utils.distance(this, vec);\n }\n\n /**\n * normalize\n *\n * Normalizes this vector, returning itself.\n */\n normalize(): this {\n return this.assign(Vector3Utils.normalize(this));\n }\n\n /**\n * floor\n *\n * Floor the components of a vector to produce a new vector\n */\n floor(): this {\n return this.assign(Vector3Utils.floor(this));\n }\n\n /**\n * toString\n *\n * Create a string representation of a vector\n */\n toString(options?: { decimals?: number; delimiter?: string }): string {\n return Vector3Utils.toString(this, options);\n }\n\n /**\n * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n clamp(limits: { min?: Partial<Vector3>; max?: Partial<Vector3> }): this {\n return this.assign(Vector3Utils.clamp(this, limits));\n }\n\n /**\n * lerp\n *\n * Constructs a new vector using linear interpolation on each component from two vectors.\n */\n lerp(vec: Vector3, t: number): this {\n return this.assign(Vector3Utils.lerp(this, vec, t));\n }\n\n /**\n * slerp\n *\n * Constructs a new vector using spherical linear interpolation on each component from two vectors.\n */\n slerp(vec: Vector3, t: number): this {\n return this.assign(Vector3Utils.slerp(this, vec, t));\n }\n\n /**\n * multiply\n *\n * Element-wise multiplication of two vectors together.\n * Not to be confused with {@link Vector3Builder.dot} product or {@link Vector3Builder.cross} product\n */\n multiply(vec: Vector3): this {\n return this.assign(Vector3Utils.multiply(this, vec));\n }\n\n /**\n * rotateX\n *\n * Rotates the vector around the x axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateX(a: number): this {\n return this.assign(Vector3Utils.rotateX(this, a));\n }\n\n /**\n * rotateY\n *\n * Rotates the vector around the y axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateY(a: number): this {\n return this.assign(Vector3Utils.rotateY(this, a));\n }\n\n /**\n * rotateZ\n *\n * Rotates the vector around the z axis counterclockwise (left hand rule)\n * @param a - Angle in radians\n */\n rotateZ(a: number): this {\n return this.assign(Vector3Utils.rotateZ(this, a));\n }\n}\n\n/**\n * Vector2 wrapper class which can be used as a Vector2 for APIs on \\@minecraft/server which require a Vector2.\n * @public\n */\nexport class Vector2Builder implements Vector2 {\n x: number;\n y: number;\n\n constructor(vecStr: string, delim?: string);\n constructor(vec: Vector2, arg?: never);\n constructor(x: number, y: number);\n constructor(first: number | Vector2 | string, second?: number | string) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n } else if (typeof first === 'string') {\n const parsed = Vector2Utils.fromString(first, (second as string | undefined) ?? ',');\n if (!parsed) {\n this.x = 0;\n this.y = 0;\n\n return;\n }\n\n this.x = parsed.x;\n this.y = parsed.y;\n } else {\n this.x = first;\n this.y = (second as number) ?? 0;\n }\n }\n\n toString(options?: { decimals?: number; delimiter?: string }): string {\n return Vector2Utils.toString(this, options);\n }\n}\n"],
5
+ "mappings": ";AAQM,SAAU,YAAY,KAAa,KAAa,KAAW;AAC7D,SAAO,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,GAAG,GAAG;AAC3C;;;ACCM,IAAO,eAAP,MAAO,cAAY;;;;;;EAMrB,OAAO,OAAO,IAAa,IAAW;AAClC,WAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG;EACzD;;;;;;EAOA,OAAO,IAAI,IAAa,IAAoB;AACxC,WAAO,EAAE,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,GAAE;EAChF;;;;;;EAOA,OAAO,SAAS,IAAa,IAAoB;AAC7C,WAAO,EAAE,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,GAAE;EAChF;;;;;EAMA,OAAO,MAAM,IAAa,OAAa;AACnC,WAAO,EAAE,GAAG,GAAG,IAAI,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,GAAG,IAAI,MAAK;EAC9D;;;;;;EAOA,OAAO,IAAI,GAAY,GAAU;AAC7B,WAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;EAC3C;;;;;;EAOA,OAAO,MAAM,GAAY,GAAU;AAC/B,WAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,EAAE,IAA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,CAAC,CAAC;EACvD;;;;;;;EAQA,SAAS,KAAY;AACjB,WAAO,KAAK,OAAO,aAAa,SAAS,MAAM,GAAG,CAAC;EACvD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;;;;;;EAQA,QAAQ,GAAS;AACb,WAAO,KAAK,OAAO,aAAa,QAAQ,MAAM,CAAC,CAAC;EACpD;;AAOE,IAAO,iBAAP,MAAqB;EACvB;EACA;EAKA,YAAY,OAAkC,QAAwB;AAClE,QAAI,OAAO,UAAU,UAAU;AAC3B,WAAK,IAAI,MAAM;AACf,WAAK,IAAI,MAAM;IACnB,WAAW,OAAO,UAAU,UAAU;AAClC,YAAM,SAAS,aAAa,WAAW,OAAQ,UAAiC,GAAG;AACnF,UAAI,CAAC,QAAQ;AACT,aAAK,IAAI;AACT,aAAK,IAAI;AAET;MACJ;AAEA,WAAK,IAAI,OAAO;AAChB,WAAK,IAAI,OAAO;IACpB,OAAO;AACH,WAAK,IAAI;AACT,WAAK,IAAK,UAAqB;IACnC;EACJ;EAEA,SAAS,SAAmD;AACxD,WAAO,aAAa,SAAS,MAAM,OAAO;EAC9C;;",
6
6
  "names": []
7
7
  }
@@ -164,8 +164,8 @@ export class Vector3Utils {
164
164
  * @param a - Angle in radians
165
165
  */
166
166
  static rotateX(v, a) {
167
- let cos = Math.cos(a);
168
- let sin = Math.sin(a);
167
+ const cos = Math.cos(a);
168
+ const sin = Math.sin(a);
169
169
  return { x: v.x, y: v.y * cos - v.z * sin, z: v.z * cos + v.y * sin };
170
170
  }
171
171
  /**
@@ -175,8 +175,8 @@ export class Vector3Utils {
175
175
  * @param a - Angle in radians
176
176
  */
177
177
  static rotateY(v, a) {
178
- let cos = Math.cos(a);
179
- let sin = Math.sin(a);
178
+ const cos = Math.cos(a);
179
+ const sin = Math.sin(a);
180
180
  return { x: v.x * cos + v.z * sin, y: v.y, z: v.z * cos - v.x * sin };
181
181
  }
182
182
  /**
@@ -186,8 +186,8 @@ export class Vector3Utils {
186
186
  * @param a - Angle in radians
187
187
  */
188
188
  static rotateZ(v, a) {
189
- let cos = Math.cos(a);
190
- let sin = Math.sin(a);
189
+ const cos = Math.cos(a);
190
+ const sin = Math.sin(a);
191
191
  return { x: v.x * cos - v.y * sin, y: v.y * cos + v.x * sin, z: v.z };
192
192
  }
193
193
  }
@@ -1 +1 @@
1
- {"version":3,"file":"coreHelpers.js","sourceRoot":"","sources":["../../src/vector3/coreHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACrB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,EAAW,EAAE,EAAW;QAClC,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,EAAW,EAAE,EAAoB;QACxC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IACnF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAW,EAAE,EAAoB;QAC7C,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,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EAAE,GAAG,EAAE,CAAC;AAChE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAY,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACrE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAY,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/math",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "author": "Raphael Landaverde (rlanda@microsoft.com)",
5
5
  "contributors": [
6
6
  {
@@ -34,11 +34,11 @@
34
34
  "api-report"
35
35
  ],
36
36
  "peerDependencies": {
37
- "@minecraft/server": "^1.15.0"
37
+ "@minecraft/server": "^1.15.0 || ^2.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@minecraft/core-build-tasks": "*",
41
- "@minecraft/server": "^1.15.0",
41
+ "@minecraft/server": "^2.0.0",
42
42
  "@minecraft/tsconfig": "*",
43
43
  "just-scripts": "^2.3.3",
44
44
  "prettier": "^3.5.3",