@minecraft/math 1.5.0 → 1.5.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.js +501 -410
- package/dist/minecraft-math.js.map +3 -3
- package/lib/general/clamp.js +5 -1
- package/lib/general/clamp.js.map +1 -1
- package/lib/general/index.js +17 -1
- package/lib/general/index.js.map +1 -1
- package/lib/index.js +18 -2
- package/lib/index.js.map +1 -1
- package/lib/index.test.js +6 -4
- package/lib/index.test.js.map +1 -1
- package/lib/vector3/coreHelpers.js +23 -18
- package/lib/vector3/coreHelpers.js.map +1 -1
- package/lib/vector3/coreHelpers.test.js +134 -132
- package/lib/vector3/coreHelpers.test.js.map +1 -1
- package/lib/vector3/index.js +18 -2
- package/lib/vector3/index.js.map +1 -1
- package/lib/vector3/vectorWrapper.js +27 -22
- package/lib/vector3/vectorWrapper.js.map +1 -1
- package/lib/vector3/vectorWrapper.test.js +127 -125
- package/lib/vector3/vectorWrapper.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -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"],
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../src/general/clamp.ts", "../src/vector3/coreHelpers.ts", "../src/vector3/vectorWrapper.ts", "../src/vector3/index.ts", "../src/general/index.ts", "../src/index.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": ";;;;;;;;;;;AAQA,aAAgB,YAAY,KAAa,KAAa,KAAW;AAC7D,aAAO,KAAK,IAAI,KAAK,IAAI,KAAK,GAAG,GAAG,GAAG;IAC3C;AAFA,YAAA,cAAA;;;;;;;;;;ACJA,QAAA,UAAA;AAOA,QAAa,eAAb,MAAa,cAAY;;;;;;MAMrB,OAAO,OAAO,IAAa,IAAW;AAClC,eAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG;MACzD;;;;;;MAOA,OAAO,IAAI,IAAa,IAAW;AAC/B,eAAO,EAAE,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,EAAC;M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b,MAA2B;MAMvB,YAAY,OAAyB,GAAU;AAC3C,YAAI,OAAO,UAAU,UAAU;AAC3B,eAAK,IAAI,MAAM;AACf,eAAK,IAAI,MAAM;QACnB,OAAO;AACH,eAAK,IAAI;AACT,eAAK,IAAI,KAAK;QAClB;MACJ;MAEA,SAAS,SAAmD;AACxD,eAAO,cAAA,aAAa,SAAS,MAAM,OAAO;MAC9C;;AAlBJ,YAAA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;ACpNA,iBAAA,uBAAA,OAAA;AACA,iBAAA,yBAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;ACDA,iBAAA,iBAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;ACAA,iBAAA,mBAAA,OAAA;AACA,iBAAA,mBAAA,OAAA;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/general/clamp.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright (c) Microsoft Corporation.
|
|
2
3
|
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.clampNumber = void 0;
|
|
3
6
|
/**
|
|
4
7
|
* Clamps the passed in number to the passed in min and max values.
|
|
5
8
|
*
|
|
6
9
|
* @public
|
|
7
10
|
*/
|
|
8
|
-
|
|
11
|
+
function clampNumber(val, min, max) {
|
|
9
12
|
return Math.min(Math.max(val, min), max);
|
|
10
13
|
}
|
|
14
|
+
exports.clampNumber = clampNumber;
|
|
11
15
|
//# 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":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../src/general/clamp.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;GAIG;AACH,SAAgB,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;AAFD,kCAEC"}
|
package/lib/general/index.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright (c) Microsoft Corporation.
|
|
2
3
|
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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);
|
|
4
20
|
//# 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":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/general/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;AAElC,0CAAwB"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright (c) Microsoft Corporation.
|
|
2
3
|
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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("./vector3"), exports);
|
|
20
|
+
__exportStar(require("./general"), exports);
|
|
5
21
|
//# 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":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;AAElC,4CAA0B;AAC1B,4CAA0B"}
|
package/lib/index.test.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright (c) Microsoft Corporation.
|
|
2
3
|
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const vitest_1 = require("vitest");
|
|
6
|
+
(0, vitest_1.describe)('Test', () => {
|
|
7
|
+
(0, vitest_1.it)('should pass', () => {
|
|
8
|
+
(0, vitest_1.expect)(true).toBe(true);
|
|
7
9
|
});
|
|
8
10
|
});
|
|
9
11
|
//# 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":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,mCAA8C;AAE9C,IAAA,iBAAQ,EAAC,MAAM,EAAE,GAAG,EAAE;IAClB,IAAA,WAAE,EAAC,aAAa,EAAE,GAAG,EAAE;QACnB,IAAA,eAAM,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright (c) Microsoft Corporation.
|
|
2
3
|
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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");
|
|
4
7
|
/**
|
|
5
8
|
* Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.
|
|
6
9
|
*
|
|
7
10
|
* @public
|
|
8
11
|
*/
|
|
9
|
-
|
|
12
|
+
class Vector3Utils {
|
|
10
13
|
/**
|
|
11
14
|
* equals
|
|
12
15
|
*
|
|
@@ -108,9 +111,9 @@ export class Vector3Utils {
|
|
|
108
111
|
*/
|
|
109
112
|
static clamp(v, limits) {
|
|
110
113
|
return {
|
|
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),
|
|
114
|
+
x: (0, clamp_1.clampNumber)(v.x, limits?.min?.x ?? Number.MIN_SAFE_INTEGER, limits?.max?.x ?? Number.MAX_SAFE_INTEGER),
|
|
115
|
+
y: (0, clamp_1.clampNumber)(v.y, limits?.min?.y ?? Number.MIN_SAFE_INTEGER, limits?.max?.y ?? Number.MAX_SAFE_INTEGER),
|
|
116
|
+
z: (0, clamp_1.clampNumber)(v.z, limits?.min?.z ?? Number.MIN_SAFE_INTEGER, limits?.max?.z ?? Number.MAX_SAFE_INTEGER),
|
|
114
117
|
};
|
|
115
118
|
}
|
|
116
119
|
/**
|
|
@@ -196,12 +199,13 @@ export class Vector3Utils {
|
|
|
196
199
|
};
|
|
197
200
|
}
|
|
198
201
|
}
|
|
202
|
+
exports.Vector3Utils = Vector3Utils;
|
|
199
203
|
/**
|
|
200
204
|
* Utilities operating on Vector2 objects. All methods are static and do not modify the input objects.
|
|
201
205
|
*
|
|
202
206
|
* @public
|
|
203
207
|
*/
|
|
204
|
-
|
|
208
|
+
class Vector2Utils {
|
|
205
209
|
/**
|
|
206
210
|
* toString
|
|
207
211
|
*
|
|
@@ -213,6 +217,7 @@ export class Vector2Utils {
|
|
|
213
217
|
return str.join(options?.delimiter ?? ', ');
|
|
214
218
|
}
|
|
215
219
|
}
|
|
220
|
+
exports.Vector2Utils = Vector2Utils;
|
|
216
221
|
/**
|
|
217
222
|
* up
|
|
218
223
|
*
|
|
@@ -220,7 +225,7 @@ export class Vector2Utils {
|
|
|
220
225
|
*
|
|
221
226
|
* @public
|
|
222
227
|
*/
|
|
223
|
-
|
|
228
|
+
exports.VECTOR3_UP = { x: 0, y: 1, z: 0 };
|
|
224
229
|
/**
|
|
225
230
|
* down
|
|
226
231
|
*
|
|
@@ -228,7 +233,7 @@ export const VECTOR3_UP = { x: 0, y: 1, z: 0 };
|
|
|
228
233
|
*
|
|
229
234
|
* @public
|
|
230
235
|
*/
|
|
231
|
-
|
|
236
|
+
exports.VECTOR3_DOWN = { x: 0, y: -1, z: 0 };
|
|
232
237
|
/**
|
|
233
238
|
* left
|
|
234
239
|
*
|
|
@@ -236,7 +241,7 @@ export const VECTOR3_DOWN = { x: 0, y: -1, z: 0 };
|
|
|
236
241
|
*
|
|
237
242
|
* @public
|
|
238
243
|
*/
|
|
239
|
-
|
|
244
|
+
exports.VECTOR3_LEFT = { x: -1, y: 0, z: 0 };
|
|
240
245
|
/**
|
|
241
246
|
* right
|
|
242
247
|
*
|
|
@@ -244,7 +249,7 @@ export const VECTOR3_LEFT = { x: -1, y: 0, z: 0 };
|
|
|
244
249
|
*
|
|
245
250
|
* @public
|
|
246
251
|
*/
|
|
247
|
-
|
|
252
|
+
exports.VECTOR3_RIGHT = { x: 1, y: 0, z: 0 };
|
|
248
253
|
/**
|
|
249
254
|
* forward
|
|
250
255
|
*
|
|
@@ -252,7 +257,7 @@ export const VECTOR3_RIGHT = { x: 1, y: 0, z: 0 };
|
|
|
252
257
|
*
|
|
253
258
|
* @public
|
|
254
259
|
*/
|
|
255
|
-
|
|
260
|
+
exports.VECTOR3_FORWARD = { x: 0, y: 0, z: 1 };
|
|
256
261
|
/**
|
|
257
262
|
* back
|
|
258
263
|
*
|
|
@@ -260,7 +265,7 @@ export const VECTOR3_FORWARD = { x: 0, y: 0, z: 1 };
|
|
|
260
265
|
*
|
|
261
266
|
* @public
|
|
262
267
|
*/
|
|
263
|
-
|
|
268
|
+
exports.VECTOR3_BACK = { x: 0, y: 0, z: -1 };
|
|
264
269
|
/**
|
|
265
270
|
* one
|
|
266
271
|
*
|
|
@@ -268,7 +273,7 @@ export const VECTOR3_BACK = { x: 0, y: 0, z: -1 };
|
|
|
268
273
|
*
|
|
269
274
|
* @public
|
|
270
275
|
*/
|
|
271
|
-
|
|
276
|
+
exports.VECTOR3_ONE = { x: 1, y: 1, z: 1 };
|
|
272
277
|
/**
|
|
273
278
|
* zero
|
|
274
279
|
*
|
|
@@ -276,7 +281,7 @@ export const VECTOR3_ONE = { x: 1, y: 1, z: 1 };
|
|
|
276
281
|
*
|
|
277
282
|
* @public
|
|
278
283
|
*/
|
|
279
|
-
|
|
284
|
+
exports.VECTOR3_ZERO = { x: 0, y: 0, z: 0 };
|
|
280
285
|
/**
|
|
281
286
|
* west
|
|
282
287
|
*
|
|
@@ -285,7 +290,7 @@ export const VECTOR3_ZERO = { x: 0, y: 0, z: 0 };
|
|
|
285
290
|
*
|
|
286
291
|
* @public
|
|
287
292
|
*/
|
|
288
|
-
|
|
293
|
+
exports.VECTOR3_WEST = { x: -1, y: 0, z: 0 };
|
|
289
294
|
/**
|
|
290
295
|
* east
|
|
291
296
|
*
|
|
@@ -294,7 +299,7 @@ export const VECTOR3_WEST = { x: -1, y: 0, z: 0 };
|
|
|
294
299
|
*
|
|
295
300
|
* @public
|
|
296
301
|
*/
|
|
297
|
-
|
|
302
|
+
exports.VECTOR3_EAST = { x: 1, y: 0, z: 0 };
|
|
298
303
|
/**
|
|
299
304
|
* north
|
|
300
305
|
*
|
|
@@ -303,7 +308,7 @@ export const VECTOR3_EAST = { x: 1, y: 0, z: 0 };
|
|
|
303
308
|
*
|
|
304
309
|
* @public
|
|
305
310
|
*/
|
|
306
|
-
|
|
311
|
+
exports.VECTOR3_NORTH = { x: 0, y: 0, z: 1 };
|
|
307
312
|
/**
|
|
308
313
|
* south
|
|
309
314
|
*
|
|
@@ -312,5 +317,5 @@ export const VECTOR3_NORTH = { x: 0, y: 0, z: 1 };
|
|
|
312
317
|
*
|
|
313
318
|
* @public
|
|
314
319
|
*/
|
|
315
|
-
|
|
320
|
+
exports.VECTOR3_SOUTH = { x: 0, y: 0, z: -1 };
|
|
316
321
|
//# sourceMappingURL=coreHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreHelpers.js","sourceRoot":"","sources":["../../src/vector3/coreHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"coreHelpers.js","sourceRoot":"","sources":["../../src/vector3/coreHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,4CAA+C;AAE/C;;;;GAIG;AACH,MAAa,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,EAAW;QAC/B,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CA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