@minecraft/math 1.5.2 → 2.0.1
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.
- package/dist/minecraft-math.d.ts +419 -0
- package/dist/minecraft-math.js +415 -501
- package/dist/minecraft-math.js.map +3 -3
- package/lib/general/clamp.js +1 -5
- package/lib/general/clamp.js.map +1 -1
- package/lib/general/index.js +1 -17
- package/lib/general/index.js.map +1 -1
- package/lib/index.js +2 -18
- package/lib/index.js.map +1 -1
- package/lib/index.test.js +4 -6
- package/lib/index.test.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/vector3/coreHelpers.js +18 -23
- package/lib/vector3/coreHelpers.js.map +1 -1
- package/lib/vector3/coreHelpers.test.js +132 -134
- package/lib/vector3/coreHelpers.test.js.map +1 -1
- package/lib/vector3/index.js +2 -18
- package/lib/vector3/index.js.map +1 -1
- package/lib/vector3/vectorWrapper.js +27 -27
- package/lib/vector3/vectorWrapper.js.map +1 -1
- package/lib/vector3/vectorWrapper.test.js +125 -127
- package/lib/vector3/vectorWrapper.test.js.map +1 -1
- package/package.json +9 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 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';\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: Vector3): Vector3 {\n return { x: v1.x + v2.x, y: v1.y + v2.y, z: v1.z + v2.z };\n }\n\n /**\n * subtract\n *\n * Subtract two vectors to produce a new vector (v1-v2)\n */\n static subtract(v1: Vector3, v2: Vector3): Vector3 {\n return { x: v1.x - v2.x, y: v1.y - v2.y, z: v1.z - v2.z };\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 {\n x: a.y * b.z - a.z * b.y,\n y: a.z * b.x - a.x * b.z,\n z: a.x * b.y - a.y * b.x,\n };\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 * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n static clamp(\n v: Vector3,\n limits?: {\n min?: Partial<Vector3>;\n max?: Partial<Vector3>;\n }\n ): 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 {\n x: a.x + (b.x - a.x) * t,\n y: a.y + (b.y - a.y) * t,\n z: a.z + (b.z - a.z) * t,\n };\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 {\n x: a.x * b.x,\n y: a.y * b.y,\n z: a.z * b.z,\n };\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 {\n x: v.x,\n y: v.y * cos - v.z * sin,\n z: v.z * cos + v.y * sin,\n };\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 {\n x: v.x * cos + v.z * sin,\n y: v.y,\n z: v.z * cos - v.x * sin,\n };\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 {\n x: v.x * cos - v.y * sin,\n y: v.y * cos + v.x * sin,\n z: v.z,\n };\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/**\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", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Vector2, Vector3 } from '@minecraft/server';\nimport { Vector2Utils, Vector3Utils } from './coreHelpers';\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(vec: Vector3, arg?: never, arg2?: never);\n constructor(x: number, y: number, z: number);\n constructor(first: number | Vector3, y?: number, z?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n this.z = first.z;\n } else {\n this.x = first;\n this.y = y ?? 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: 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: 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(vec: Vector2, arg?: never);\n constructor(x: number, y: number);\n constructor(first: number | Vector2, y?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n } else {\n this.x = first;\n this.y = y ?? 0;\n }\n }\n\n toString(options?: { decimals?: number; delimiter?: string }): string {\n return Vector2Utils.toString(this, options);\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from './coreHelpers';\nexport * from './vectorWrapper';\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from './clamp';\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from './vector3';\nexport * from './general';\n"],
|
|
5
|
-
"mappings": "
|
|
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: Vector3): Vector3 {\n return { x: v1.x + v2.x, y: v1.y + v2.y, z: v1.z + v2.z };\n }\n\n /**\n * subtract\n *\n * Subtract two vectors to produce a new vector (v1-v2)\n */\n static subtract(v1: Vector3, v2: Vector3): Vector3 {\n return { x: v1.x - v2.x, y: v1.y - v2.y, z: v1.z - v2.z };\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 {\n x: a.y * b.z - a.z * b.y,\n y: a.z * b.x - a.x * b.z,\n z: a.x * b.y - a.y * b.x,\n };\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 * clamp\n *\n * Clamps the components of a vector to limits to produce a new vector\n */\n static clamp(\n v: Vector3,\n limits?: {\n min?: Partial<Vector3>;\n max?: Partial<Vector3>;\n }\n ): 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 {\n x: a.x + (b.x - a.x) * t,\n y: a.y + (b.y - a.y) * t,\n z: a.z + (b.z - a.z) * t,\n };\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 {\n x: a.x * b.x,\n y: a.y * b.y,\n z: a.z * b.z,\n };\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 {\n x: v.x,\n y: v.y * cos - v.z * sin,\n z: v.z * cos + v.y * sin,\n };\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 {\n x: v.x * cos + v.z * sin,\n y: v.y,\n z: v.z * cos - v.x * sin,\n };\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 {\n x: v.x * cos - v.y * sin,\n y: v.y * cos + v.x * sin,\n z: v.z,\n };\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/**\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", "// 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(vec: Vector3, arg?: never, arg2?: never);\n constructor(x: number, y: number, z: number);\n constructor(first: number | Vector3, y?: number, z?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n this.z = first.z;\n } else {\n this.x = first;\n this.y = y ?? 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: 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: 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(vec: Vector2, arg?: never);\n constructor(x: number, y: number);\n constructor(first: number | Vector2, y?: number) {\n if (typeof first === 'object') {\n this.x = first.x;\n this.y = first.y;\n } else {\n this.x = first;\n this.y = y ?? 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,IAAW;AAC/B,WAAO,EAAE,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,EAAC;EAC3D;;;;;;EAOA,OAAO,SAAS,IAAa,IA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names": []
|
|
7
7
|
}
|
package/lib/general/clamp.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright (c) Microsoft Corporation.
|
|
3
2
|
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.clampNumber = void 0;
|
|
6
3
|
/**
|
|
7
4
|
* Clamps the passed in number to the passed in min and max values.
|
|
8
5
|
*
|
|
9
6
|
* @public
|
|
10
7
|
*/
|
|
11
|
-
function clampNumber(val, min, max) {
|
|
8
|
+
export function clampNumber(val, min, max) {
|
|
12
9
|
return Math.min(Math.max(val, min), max);
|
|
13
10
|
}
|
|
14
|
-
exports.clampNumber = clampNumber;
|
|
15
11
|
//# sourceMappingURL=clamp.js.map
|
package/lib/general/clamp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../src/general/clamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../src/general/clamp.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW;IAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|
package/lib/general/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright (c) Microsoft Corporation.
|
|
3
2
|
// Licensed under the MIT License.
|
|
4
|
-
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
__exportStar(require("./clamp"), exports);
|
|
3
|
+
export * from './clamp.js';
|
|
20
4
|
//# sourceMappingURL=index.js.map
|
package/lib/general/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/general/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/general/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,YAAY,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright (c) Microsoft Corporation.
|
|
3
2
|
// Licensed under the MIT License.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
__exportStar(require("./vector3"), exports);
|
|
20
|
-
__exportStar(require("./general"), exports);
|
|
3
|
+
export * from './vector3/index.js';
|
|
4
|
+
export * from './general/index.js';
|
|
21
5
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/lib/index.test.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright (c) Microsoft Corporation.
|
|
3
2
|
// Licensed under the MIT License.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
(0, vitest_1.expect)(true).toBe(true);
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
describe('Test', () => {
|
|
5
|
+
it('should pass', () => {
|
|
6
|
+
expect(true).toBe(true);
|
|
9
7
|
});
|
|
10
8
|
});
|
|
11
9
|
//# sourceMappingURL=index.test.js.map
|
package/lib/index.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IAClB,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;QACnB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/lib/tsdoc-metadata.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright (c) Microsoft Corporation.
|
|
3
2
|
// Licensed under the MIT License.
|
|
4
|
-
|
|
5
|
-
exports.VECTOR3_SOUTH = exports.VECTOR3_NORTH = exports.VECTOR3_EAST = exports.VECTOR3_WEST = exports.VECTOR3_ZERO = exports.VECTOR3_ONE = exports.VECTOR3_BACK = exports.VECTOR3_FORWARD = exports.VECTOR3_RIGHT = exports.VECTOR3_LEFT = exports.VECTOR3_DOWN = exports.VECTOR3_UP = exports.Vector2Utils = exports.Vector3Utils = void 0;
|
|
6
|
-
const clamp_1 = require("../general/clamp");
|
|
3
|
+
import { clampNumber } from '../general/clamp.js';
|
|
7
4
|
/**
|
|
8
5
|
* Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.
|
|
9
6
|
*
|
|
10
7
|
* @public
|
|
11
8
|
*/
|
|
12
|
-
class Vector3Utils {
|
|
9
|
+
export class Vector3Utils {
|
|
13
10
|
/**
|
|
14
11
|
* equals
|
|
15
12
|
*
|
|
@@ -111,9 +108,9 @@ class Vector3Utils {
|
|
|
111
108
|
*/
|
|
112
109
|
static clamp(v, limits) {
|
|
113
110
|
return {
|
|
114
|
-
x:
|
|
115
|
-
y:
|
|
116
|
-
z:
|
|
111
|
+
x: clampNumber(v.x, limits?.min?.x ?? Number.MIN_SAFE_INTEGER, limits?.max?.x ?? Number.MAX_SAFE_INTEGER),
|
|
112
|
+
y: clampNumber(v.y, limits?.min?.y ?? Number.MIN_SAFE_INTEGER, limits?.max?.y ?? Number.MAX_SAFE_INTEGER),
|
|
113
|
+
z: clampNumber(v.z, limits?.min?.z ?? Number.MIN_SAFE_INTEGER, limits?.max?.z ?? Number.MAX_SAFE_INTEGER),
|
|
117
114
|
};
|
|
118
115
|
}
|
|
119
116
|
/**
|
|
@@ -199,13 +196,12 @@ class Vector3Utils {
|
|
|
199
196
|
};
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
|
-
exports.Vector3Utils = Vector3Utils;
|
|
203
199
|
/**
|
|
204
200
|
* Utilities operating on Vector2 objects. All methods are static and do not modify the input objects.
|
|
205
201
|
*
|
|
206
202
|
* @public
|
|
207
203
|
*/
|
|
208
|
-
class Vector2Utils {
|
|
204
|
+
export class Vector2Utils {
|
|
209
205
|
/**
|
|
210
206
|
* toString
|
|
211
207
|
*
|
|
@@ -217,7 +213,6 @@ class Vector2Utils {
|
|
|
217
213
|
return str.join(options?.delimiter ?? ', ');
|
|
218
214
|
}
|
|
219
215
|
}
|
|
220
|
-
exports.Vector2Utils = Vector2Utils;
|
|
221
216
|
/**
|
|
222
217
|
* up
|
|
223
218
|
*
|
|
@@ -225,7 +220,7 @@ exports.Vector2Utils = Vector2Utils;
|
|
|
225
220
|
*
|
|
226
221
|
* @public
|
|
227
222
|
*/
|
|
228
|
-
|
|
223
|
+
export const VECTOR3_UP = { x: 0, y: 1, z: 0 };
|
|
229
224
|
/**
|
|
230
225
|
* down
|
|
231
226
|
*
|
|
@@ -233,7 +228,7 @@ exports.VECTOR3_UP = { x: 0, y: 1, z: 0 };
|
|
|
233
228
|
*
|
|
234
229
|
* @public
|
|
235
230
|
*/
|
|
236
|
-
|
|
231
|
+
export const VECTOR3_DOWN = { x: 0, y: -1, z: 0 };
|
|
237
232
|
/**
|
|
238
233
|
* left
|
|
239
234
|
*
|
|
@@ -241,7 +236,7 @@ exports.VECTOR3_DOWN = { x: 0, y: -1, z: 0 };
|
|
|
241
236
|
*
|
|
242
237
|
* @public
|
|
243
238
|
*/
|
|
244
|
-
|
|
239
|
+
export const VECTOR3_LEFT = { x: -1, y: 0, z: 0 };
|
|
245
240
|
/**
|
|
246
241
|
* right
|
|
247
242
|
*
|
|
@@ -249,7 +244,7 @@ exports.VECTOR3_LEFT = { x: -1, y: 0, z: 0 };
|
|
|
249
244
|
*
|
|
250
245
|
* @public
|
|
251
246
|
*/
|
|
252
|
-
|
|
247
|
+
export const VECTOR3_RIGHT = { x: 1, y: 0, z: 0 };
|
|
253
248
|
/**
|
|
254
249
|
* forward
|
|
255
250
|
*
|
|
@@ -257,7 +252,7 @@ exports.VECTOR3_RIGHT = { x: 1, y: 0, z: 0 };
|
|
|
257
252
|
*
|
|
258
253
|
* @public
|
|
259
254
|
*/
|
|
260
|
-
|
|
255
|
+
export const VECTOR3_FORWARD = { x: 0, y: 0, z: 1 };
|
|
261
256
|
/**
|
|
262
257
|
* back
|
|
263
258
|
*
|
|
@@ -265,7 +260,7 @@ exports.VECTOR3_FORWARD = { x: 0, y: 0, z: 1 };
|
|
|
265
260
|
*
|
|
266
261
|
* @public
|
|
267
262
|
*/
|
|
268
|
-
|
|
263
|
+
export const VECTOR3_BACK = { x: 0, y: 0, z: -1 };
|
|
269
264
|
/**
|
|
270
265
|
* one
|
|
271
266
|
*
|
|
@@ -273,7 +268,7 @@ exports.VECTOR3_BACK = { x: 0, y: 0, z: -1 };
|
|
|
273
268
|
*
|
|
274
269
|
* @public
|
|
275
270
|
*/
|
|
276
|
-
|
|
271
|
+
export const VECTOR3_ONE = { x: 1, y: 1, z: 1 };
|
|
277
272
|
/**
|
|
278
273
|
* zero
|
|
279
274
|
*
|
|
@@ -281,7 +276,7 @@ exports.VECTOR3_ONE = { x: 1, y: 1, z: 1 };
|
|
|
281
276
|
*
|
|
282
277
|
* @public
|
|
283
278
|
*/
|
|
284
|
-
|
|
279
|
+
export const VECTOR3_ZERO = { x: 0, y: 0, z: 0 };
|
|
285
280
|
/**
|
|
286
281
|
* west
|
|
287
282
|
*
|
|
@@ -290,7 +285,7 @@ exports.VECTOR3_ZERO = { x: 0, y: 0, z: 0 };
|
|
|
290
285
|
*
|
|
291
286
|
* @public
|
|
292
287
|
*/
|
|
293
|
-
|
|
288
|
+
export const VECTOR3_WEST = { x: -1, y: 0, z: 0 };
|
|
294
289
|
/**
|
|
295
290
|
* east
|
|
296
291
|
*
|
|
@@ -299,7 +294,7 @@ exports.VECTOR3_WEST = { x: -1, y: 0, z: 0 };
|
|
|
299
294
|
*
|
|
300
295
|
* @public
|
|
301
296
|
*/
|
|
302
|
-
|
|
297
|
+
export const VECTOR3_EAST = { x: 1, y: 0, z: 0 };
|
|
303
298
|
/**
|
|
304
299
|
* north
|
|
305
300
|
*
|
|
@@ -308,7 +303,7 @@ exports.VECTOR3_EAST = { x: 1, y: 0, z: 0 };
|
|
|
308
303
|
*
|
|
309
304
|
* @public
|
|
310
305
|
*/
|
|
311
|
-
|
|
306
|
+
export const VECTOR3_NORTH = { x: 0, y: 0, z: 1 };
|
|
312
307
|
/**
|
|
313
308
|
* south
|
|
314
309
|
*
|
|
@@ -317,5 +312,5 @@ exports.VECTOR3_NORTH = { x: 0, y: 0, z: 1 };
|
|
|
317
312
|
*
|
|
318
313
|
* @public
|
|
319
314
|
*/
|
|
320
|
-
|
|
315
|
+
export const VECTOR3_SOUTH = { x: 0, y: 0, z: -1 };
|
|
321
316
|
//# sourceMappingURL=coreHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreHelpers.js","sourceRoot":"","sources":["../../src/vector3/coreHelpers.ts"],"names":[],"mappings":"
|
|
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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