3173fe1994cc8da1f7bac7d54f2c54742a8e9e177990ed3771275682593cd40e.json 51 KB

1
  1. {"ast":null,"code":"import { Vector2, Vector3 } from \"./math.vector.js\";\n/**\n * Class used to store (r, theta) vector representation\n */\nexport class Polar {\n /**\n * Creates a new Polar object\n * @param radius the radius of the vector\n * @param theta the angle of the vector\n */\n constructor(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n this.radius = radius;\n this.theta = theta;\n }\n /**\n * Gets the class name\n * @returns the string \"Polar\"\n */\n getClassName() {\n return \"Polar\";\n }\n /**\n * Converts the current polar to a string\n * @returns the current polar as a string\n */\n toString() {\n return JSON.stringify(this);\n }\n /**\n * Converts the current polar to an array\n * @returns the current polar as an array\n */\n asArray() {\n return [this.radius, this.theta];\n }\n /**\n * Adds the current Polar and the given Polar and stores the result\n * @param polar the polar to add\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n addToRef(polar, ref) {\n ref.radius = this.radius + polar.radius;\n ref.theta = this.theta + polar.theta;\n return ref;\n }\n /**\n * Adds the current Polar and the given Polar\n * @param polar the polar to add\n * @returns the sum polar\n */\n add(polar) {\n const ref = new Polar(0, 0);\n this.addToRef(polar, ref);\n return ref;\n }\n /**\n * Adds the given polar to the current polar\n * @param polar the polar to add\n * @returns the current polar\n */\n addInPlace(polar) {\n this.addToRef(polar, this);\n return this;\n }\n /**\n * Adds the provided values to the current polar\n * @param radius the amount to add to the radius\n * @param theta the amount to add to the theta\n * @returns the current polar\n */\n addInPlaceFromFloats(radius, theta) {\n this.radius += radius;\n this.theta += theta;\n return this;\n }\n /**\n * Subtracts the given Polar from the current Polar and stores the result\n * @param polar the polar to subtract\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n subtractToRef(polar, ref) {\n ref.radius = this.radius - polar.radius;\n ref.theta = this.theta - polar.theta;\n return ref;\n }\n /**\n * Subtracts the given Polar from the current Polar\n * @param polar the polar to subtract\n * @returns the difference polar\n */\n subtract(polar) {\n const ref = new Polar(0, 0);\n this.subtractToRef(polar, ref);\n return ref;\n }\n /**\n * Subtracts the given Polar from the current Polar\n * @param polar the polar to subtract\n * @returns the current polar\n */\n subtractInPlace(polar) {\n this.subtractToRef(polar, this);\n return this;\n }\n /**\n * Subtracts the given floats from the current polar\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n subtractFromFloatsToRef(radius, theta, ref) {\n ref.radius = this.radius - radius;\n ref.theta = this.theta - theta;\n return ref;\n }\n /**\n * Subtracts the given floats from the current polar\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @returns the difference polar\n */\n subtractFromFloats(radius, theta) {\n const ref = new Polar(0, 0);\n this.subtractFromFloatsToRef(radius, theta, ref);\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar and stores the result\n * @param polar the polar to multiply\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n multiplyToRef(polar, ref) {\n ref.radius = this.radius * polar.radius;\n ref.theta = this.theta * polar.theta;\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar\n * @param polar the polar to multiply\n * @returns the product polar\n */\n multiply(polar) {\n const ref = new Polar(0, 0);\n this.multiplyToRef(polar, ref);\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar\n * @param polar the polar to multiply\n * @returns the current polar\n */\n multiplyInPlace(polar) {\n this.multiplyToRef(polar, this);\n return this;\n }\n /**\n * Divides the current Polar by the given Polar and stores the result\n * @param polar the polar to divide\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n divideToRef(polar, ref) {\n ref.radius = this.radius / polar.radius;\n ref.theta = this.theta / polar.theta;\n return ref;\n }\n /**\n * Divides the current Polar by the given Polar\n * @param polar the polar to divide\n * @returns the quotient polar\n */\n divide(polar) {\n const ref = new Polar(0, 0);\n this.divideToRef(polar, ref);\n return ref;\n }\n /**\n * Divides the current Polar by the given Polar\n * @param polar the polar to divide\n * @returns the current polar\n */\n divideInPlace(polar) {\n this.divideToRef(polar, this);\n return this;\n }\n /**\n * Clones the current polar\n * @returns a clone of the current polar\n */\n clone() {\n return new Polar(this.radius, this.theta);\n }\n /**\n * Copies the source polar into the current polar\n * @param source the polar to copy from\n * @returns the current polar\n */\n copyFrom(source) {\n this.radius = source.radius;\n this.theta = source.theta;\n return this;\n }\n /**\n * Copies the given values into the current polar\n * @param radius the radius to use\n * @param theta the theta to use\n * @returns the current polar\n */\n copyFromFloats(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n return this;\n }\n /**\n * Scales the current polar and stores the result\n * @param scale defines the multiplication factor\n * @param ref where to store the result\n * @returns the updated ref\n */\n scaleToRef(scale, ref) {\n ref.radius = this.radius * scale;\n ref.theta = this.theta * scale;\n return ref;\n }\n /**\n * Scales the current polar and returns a new polar with the scaled coordinates\n * @param scale defines the multiplication factor\n * @returns the scaled polar\n */\n scale(scale) {\n const ref = new Polar(0, 0);\n this.scaleToRef(scale, ref);\n return ref;\n }\n /**\n * Scales the current polar\n * @param scale defines the multiplication factor\n * @returns the current polar\n */\n scaleInPlace(scale) {\n this.scaleToRef(scale, this);\n return this;\n }\n /**\n * Sets the values of the current polar\n * @param radius the new radius\n * @param theta the new theta\n * @returns the current polar\n */\n set(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n return this;\n }\n /**\n * Sets the values of the current polar\n * @param value the new values\n * @returns the current polar\n */\n setAll(value) {\n this.set(value, value);\n return this;\n }\n /**\n * Gets the rectangular coordinates of the current Polar\n * @param ref the reference to assign the result\n * @returns the updated reference\n */\n toVector2ToRef(ref) {\n const x = this.radius * Math.cos(this.theta);\n const y = this.radius * Math.sin(this.theta);\n ref.set(x, y);\n return ref;\n }\n /**\n * Gets the rectangular coordinates of the current Polar\n * @returns the rectangular coordinates\n */\n toVector2() {\n const ref = new Vector2(0, 0);\n return this.toVector2ToRef(ref);\n }\n /**\n * Converts a given Vector2 to its polar coordinates\n * @param v the Vector2 to convert\n * @param ref the reference to assign the result\n * @returns the updated reference\n */\n static FromVector2ToRef(v, ref) {\n const theta = Math.sign(v.y) * Math.acos(v.x / v.length());\n ref.radius = v.length();\n ref.theta = theta;\n return ref;\n }\n /**\n * Converts a given Vector2 to its polar coordinates\n * @param v the Vector2 to convert\n * @returns a Polar\n */\n static FromVector2(v) {\n const polar = new Polar(0, 0);\n Polar.FromVector2ToRef(v, polar);\n return polar;\n }\n /**\n * Converts an array of floats to a polar\n * @param array the array to convert\n * @returns the converted polar\n */\n static FromArray(array) {\n return new Polar(array[0], array[1]);\n }\n}\n/**\n * Class used for (radius, theta, phi) vector representation.\n */\nexport class Spherical {\n /**\n * Creates a new Spherical object from the given spherical coordinates\n * @param radius spherical radius\n * @param theta angle from positive y axis to radial line from 0 to PI (vertical)\n * @param phi angle from positive x axis measured anticlockwise from -PI to PI (horizontal)\n */\n constructor(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n }\n /**\n * Gets the class name\n * @returns the string \"Spherical\"\n */\n getClassName() {\n return \"Spherical\";\n }\n /**\n * Converts the current spherical to a string\n * @returns the current spherical as a string\n */\n toString() {\n return JSON.stringify(this);\n }\n /**\n * Converts the current spherical to an array\n * @returns the current spherical as an array\n */\n asArray() {\n return [this.radius, this.theta, this.phi];\n }\n /**\n * Adds the current Spherical and the given Spherical and stores the result\n * @param spherical the spherical to add\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n addToRef(spherical, ref) {\n ref.radius = this.radius + spherical.radius;\n ref.theta = this.theta + spherical.theta;\n ref.phi = this.phi + spherical.phi;\n return ref;\n }\n /**\n * Adds the current Spherical and the given Spherical\n * @param spherical the spherical to add\n * @returns the sum spherical\n */\n add(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.addToRef(spherical, ref);\n return ref;\n }\n /**\n * Adds the given spherical to the current spherical\n * @param spherical the spherical to add\n * @returns the current spherical\n */\n addInPlace(spherical) {\n this.addToRef(spherical, this);\n return this;\n }\n /**\n * Adds the provided values to the current spherical\n * @param radius the amount to add to the radius\n * @param theta the amount to add to the theta\n * @param phi the amount to add to the phi\n * @returns the current spherical\n */\n addInPlaceFromFloats(radius, theta, phi) {\n this.radius += radius;\n this.theta += theta;\n this.phi += phi;\n return this;\n }\n /**\n * Subtracts the given Spherical from the current Spherical and stores the result\n * @param spherical the spherical to subtract\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n subtractToRef(spherical, ref) {\n ref.radius = this.radius - spherical.radius;\n ref.theta = this.theta - spherical.theta;\n ref.phi = this.phi - spherical.phi;\n return ref;\n }\n /**\n * Subtracts the given Spherical from the current Spherical\n * @param spherical the spherical to subtract\n * @returns the difference spherical\n */\n subtract(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.subtractToRef(spherical, ref);\n return ref;\n }\n /**\n * Subtracts the given Spherical from the current Spherical\n * @param spherical the spherical to subtract\n * @returns the current spherical\n */\n subtractInPlace(spherical) {\n this.subtractToRef(spherical, this);\n return this;\n }\n /**\n * Subtracts the given floats from the current spherical\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param phi the amount to subtract from the phi\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n subtractFromFloatsToRef(radius, theta, phi, ref) {\n ref.radius = this.radius - radius;\n ref.theta = this.theta - theta;\n ref.phi = this.phi - phi;\n return ref;\n }\n /**\n * Subtracts the given floats from the current spherical\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param phi the amount to subtract from the phi\n * @returns the difference spherical\n */\n subtractFromFloats(radius, theta, phi) {\n const ref = new Spherical(0, 0, 0);\n this.subtractFromFloatsToRef(radius, theta, phi, ref);\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical and stores the result\n * @param spherical the spherical to multiply\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n multiplyToRef(spherical, ref) {\n ref.radius = this.radius * spherical.radius;\n ref.theta = this.theta * spherical.theta;\n ref.phi = this.phi * spherical.phi;\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical\n * @param spherical the spherical to multiply\n * @returns the product spherical\n */\n multiply(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.multiplyToRef(spherical, ref);\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical\n * @param spherical the spherical to multiply\n * @returns the current spherical\n */\n multiplyInPlace(spherical) {\n this.multiplyToRef(spherical, this);\n return this;\n }\n /**\n * Divides the current Spherical by the given Spherical and stores the result\n * @param spherical the spherical to divide\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n divideToRef(spherical, ref) {\n ref.radius = this.radius / spherical.radius;\n ref.theta = this.theta / spherical.theta;\n ref.phi = this.phi / spherical.phi;\n return ref;\n }\n /**\n * Divides the current Spherical by the given Spherical\n * @param spherical the spherical to divide\n * @returns the quotient spherical\n */\n divide(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.divideToRef(spherical, ref);\n return ref;\n }\n /**\n * Divides the current Spherical by the given Spherical\n * @param spherical the spherical to divide\n * @returns the current spherical\n */\n divideInPlace(spherical) {\n this.divideToRef(spherical, this);\n return this;\n }\n /**\n * Clones the current spherical\n * @returns a clone of the current spherical\n */\n clone() {\n return new Spherical(this.radius, this.theta, this.phi);\n }\n /**\n * Copies the source spherical into the current spherical\n * @param source the spherical to copy from\n * @returns the current spherical\n */\n copyFrom(source) {\n this.radius = source.radius;\n this.theta = source.theta;\n this.phi = source.phi;\n return this;\n }\n /**\n * Copies the given values into the current spherical\n * @param radius the radius to use\n * @param theta the theta to use\n * @param phi the phi to use\n * @returns the current spherical\n */\n copyFromFloats(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n return this;\n }\n /**\n * Scales the current spherical and stores the result\n * @param scale defines the multiplication factor\n * @param ref where to store the result\n * @returns the updated ref\n */\n scaleToRef(scale, ref) {\n ref.radius = this.radius * scale;\n ref.theta = this.theta * scale;\n ref.phi = this.phi * scale;\n return ref;\n }\n /**\n * Scales the current spherical and returns a new spherical with the scaled coordinates\n * @param scale defines the multiplication factor\n * @returns the scaled spherical\n */\n scale(scale) {\n const ref = new Spherical(0, 0, 0);\n this.scaleToRef(scale, ref);\n return ref;\n }\n /**\n * Scales the current spherical\n * @param scale defines the multiplication factor\n * @returns the current spherical\n */\n scaleInPlace(scale) {\n this.scaleToRef(scale, this);\n return this;\n }\n /**\n * Sets the values of the current spherical\n * @param radius the new radius\n * @param theta the new theta\n * @param phi the new phi\n * @returns the current spherical\n */\n set(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n return this;\n }\n /**\n * Sets the values of the current spherical\n * @param value the new values\n * @returns the current spherical\n */\n setAll(value) {\n this.set(value, value, value);\n return this;\n }\n /**\n * Assigns the rectangular coordinates of the current Spherical to a Vector3\n * @param ref the Vector3 to update\n * @returns the updated Vector3\n */\n toVector3ToRef(ref) {\n const x = this.radius * Math.sin(this.theta) * Math.cos(this.phi);\n const y = this.radius * Math.cos(this.theta);\n const z = this.radius * Math.sin(this.theta) * Math.sin(this.phi);\n ref.set(x, y, z);\n return ref;\n }\n /**\n * Gets a Vector3 from the current spherical coordinates\n * @returns the (x, y,z) form of the current Spherical\n */\n toVector3() {\n const ref = new Vector3(0, 0, 0);\n return this.toVector3ToRef(ref);\n }\n /**\n * Assigns the spherical coordinates from a Vector3\n * @param vector the vector to convert\n * @param ref the Spherical to update\n * @returns the updated ref\n */\n static FromVector3ToRef(vector, ref) {\n ref.radius = vector.length();\n ref.theta = Math.acos(vector.y / ref.radius);\n ref.phi = Math.atan2(vector.z, vector.x);\n return ref;\n }\n /**\n * Gets a Spherical from a Vector3\n * @param vector defines the vector in (x, y, z) coordinate space\n * @returns a new Spherical\n */\n static FromVector3(vector) {\n const spherical = new Spherical(0, 0, 0);\n Spherical.FromVector3ToRef(vector, spherical);\n return spherical;\n }\n /**\n * Converts an array of floats to a spherical\n * @param array the array to convert\n * @returns the converted spherical\n */\n static FromArray(array) {\n return new Spherical(array[0], array[1], array[2]);\n }\n}","map":{"version":3,"names":["Vector2","Vector3","Polar","constructor","radius","theta","getClassName","toString","JSON","stringify","asArray","addToRef","polar","ref","add","addInPlace","addInPlaceFromFloats","subtractToRef","subtract","subtractInPlace","subtractFromFloatsToRef","subtractFromFloats","multiplyToRef","multiply","multiplyInPlace","divideToRef","divide","divideInPlace","clone","copyFrom","source","copyFromFloats","scaleToRef","scale","scaleInPlace","set","setAll","value","toVector2ToRef","x","Math","cos","y","sin","toVector2","FromVector2ToRef","v","sign","acos","length","FromVector2","FromArray","array","Spherical","phi","spherical","toVector3ToRef","z","toVector3","FromVector3ToRef","vector","atan2","FromVector3"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Maths/math.polar.js"],"sourcesContent":["import { Vector2, Vector3 } from \"./math.vector.js\";\n/**\n * Class used to store (r, theta) vector representation\n */\nexport class Polar {\n /**\n * Creates a new Polar object\n * @param radius the radius of the vector\n * @param theta the angle of the vector\n */\n constructor(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n this.radius = radius;\n this.theta = theta;\n }\n /**\n * Gets the class name\n * @returns the string \"Polar\"\n */\n getClassName() {\n return \"Polar\";\n }\n /**\n * Converts the current polar to a string\n * @returns the current polar as a string\n */\n toString() {\n return JSON.stringify(this);\n }\n /**\n * Converts the current polar to an array\n * @returns the current polar as an array\n */\n asArray() {\n return [this.radius, this.theta];\n }\n /**\n * Adds the current Polar and the given Polar and stores the result\n * @param polar the polar to add\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n addToRef(polar, ref) {\n ref.radius = this.radius + polar.radius;\n ref.theta = this.theta + polar.theta;\n return ref;\n }\n /**\n * Adds the current Polar and the given Polar\n * @param polar the polar to add\n * @returns the sum polar\n */\n add(polar) {\n const ref = new Polar(0, 0);\n this.addToRef(polar, ref);\n return ref;\n }\n /**\n * Adds the given polar to the current polar\n * @param polar the polar to add\n * @returns the current polar\n */\n addInPlace(polar) {\n this.addToRef(polar, this);\n return this;\n }\n /**\n * Adds the provided values to the current polar\n * @param radius the amount to add to the radius\n * @param theta the amount to add to the theta\n * @returns the current polar\n */\n addInPlaceFromFloats(radius, theta) {\n this.radius += radius;\n this.theta += theta;\n return this;\n }\n /**\n * Subtracts the given Polar from the current Polar and stores the result\n * @param polar the polar to subtract\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n subtractToRef(polar, ref) {\n ref.radius = this.radius - polar.radius;\n ref.theta = this.theta - polar.theta;\n return ref;\n }\n /**\n * Subtracts the given Polar from the current Polar\n * @param polar the polar to subtract\n * @returns the difference polar\n */\n subtract(polar) {\n const ref = new Polar(0, 0);\n this.subtractToRef(polar, ref);\n return ref;\n }\n /**\n * Subtracts the given Polar from the current Polar\n * @param polar the polar to subtract\n * @returns the current polar\n */\n subtractInPlace(polar) {\n this.subtractToRef(polar, this);\n return this;\n }\n /**\n * Subtracts the given floats from the current polar\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n subtractFromFloatsToRef(radius, theta, ref) {\n ref.radius = this.radius - radius;\n ref.theta = this.theta - theta;\n return ref;\n }\n /**\n * Subtracts the given floats from the current polar\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @returns the difference polar\n */\n subtractFromFloats(radius, theta) {\n const ref = new Polar(0, 0);\n this.subtractFromFloatsToRef(radius, theta, ref);\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar and stores the result\n * @param polar the polar to multiply\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n multiplyToRef(polar, ref) {\n ref.radius = this.radius * polar.radius;\n ref.theta = this.theta * polar.theta;\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar\n * @param polar the polar to multiply\n * @returns the product polar\n */\n multiply(polar) {\n const ref = new Polar(0, 0);\n this.multiplyToRef(polar, ref);\n return ref;\n }\n /**\n * Multiplies the given Polar with the current Polar\n * @param polar the polar to multiply\n * @returns the current polar\n */\n multiplyInPlace(polar) {\n this.multiplyToRef(polar, this);\n return this;\n }\n /**\n * Divides the current Polar by the given Polar and stores the result\n * @param polar the polar to divide\n * @param ref the polar to store the result in\n * @returns the updated ref\n */\n divideToRef(polar, ref) {\n ref.radius = this.radius / polar.radius;\n ref.theta = this.theta / polar.theta;\n return ref;\n }\n /**\n * Divides the current Polar by the given Polar\n * @param polar the polar to divide\n * @returns the quotient polar\n */\n divide(polar) {\n const ref = new Polar(0, 0);\n this.divideToRef(polar, ref);\n return ref;\n }\n /**\n * Divides the current Polar by the given Polar\n * @param polar the polar to divide\n * @returns the current polar\n */\n divideInPlace(polar) {\n this.divideToRef(polar, this);\n return this;\n }\n /**\n * Clones the current polar\n * @returns a clone of the current polar\n */\n clone() {\n return new Polar(this.radius, this.theta);\n }\n /**\n * Copies the source polar into the current polar\n * @param source the polar to copy from\n * @returns the current polar\n */\n copyFrom(source) {\n this.radius = source.radius;\n this.theta = source.theta;\n return this;\n }\n /**\n * Copies the given values into the current polar\n * @param radius the radius to use\n * @param theta the theta to use\n * @returns the current polar\n */\n copyFromFloats(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n return this;\n }\n /**\n * Scales the current polar and stores the result\n * @param scale defines the multiplication factor\n * @param ref where to store the result\n * @returns the updated ref\n */\n scaleToRef(scale, ref) {\n ref.radius = this.radius * scale;\n ref.theta = this.theta * scale;\n return ref;\n }\n /**\n * Scales the current polar and returns a new polar with the scaled coordinates\n * @param scale defines the multiplication factor\n * @returns the scaled polar\n */\n scale(scale) {\n const ref = new Polar(0, 0);\n this.scaleToRef(scale, ref);\n return ref;\n }\n /**\n * Scales the current polar\n * @param scale defines the multiplication factor\n * @returns the current polar\n */\n scaleInPlace(scale) {\n this.scaleToRef(scale, this);\n return this;\n }\n /**\n * Sets the values of the current polar\n * @param radius the new radius\n * @param theta the new theta\n * @returns the current polar\n */\n set(radius, theta) {\n this.radius = radius;\n this.theta = theta;\n return this;\n }\n /**\n * Sets the values of the current polar\n * @param value the new values\n * @returns the current polar\n */\n setAll(value) {\n this.set(value, value);\n return this;\n }\n /**\n * Gets the rectangular coordinates of the current Polar\n * @param ref the reference to assign the result\n * @returns the updated reference\n */\n toVector2ToRef(ref) {\n const x = this.radius * Math.cos(this.theta);\n const y = this.radius * Math.sin(this.theta);\n ref.set(x, y);\n return ref;\n }\n /**\n * Gets the rectangular coordinates of the current Polar\n * @returns the rectangular coordinates\n */\n toVector2() {\n const ref = new Vector2(0, 0);\n return this.toVector2ToRef(ref);\n }\n /**\n * Converts a given Vector2 to its polar coordinates\n * @param v the Vector2 to convert\n * @param ref the reference to assign the result\n * @returns the updated reference\n */\n static FromVector2ToRef(v, ref) {\n const theta = Math.sign(v.y) * Math.acos(v.x / v.length());\n ref.radius = v.length();\n ref.theta = theta;\n return ref;\n }\n /**\n * Converts a given Vector2 to its polar coordinates\n * @param v the Vector2 to convert\n * @returns a Polar\n */\n static FromVector2(v) {\n const polar = new Polar(0, 0);\n Polar.FromVector2ToRef(v, polar);\n return polar;\n }\n /**\n * Converts an array of floats to a polar\n * @param array the array to convert\n * @returns the converted polar\n */\n static FromArray(array) {\n return new Polar(array[0], array[1]);\n }\n}\n/**\n * Class used for (radius, theta, phi) vector representation.\n */\nexport class Spherical {\n /**\n * Creates a new Spherical object from the given spherical coordinates\n * @param radius spherical radius\n * @param theta angle from positive y axis to radial line from 0 to PI (vertical)\n * @param phi angle from positive x axis measured anticlockwise from -PI to PI (horizontal)\n */\n constructor(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n }\n /**\n * Gets the class name\n * @returns the string \"Spherical\"\n */\n getClassName() {\n return \"Spherical\";\n }\n /**\n * Converts the current spherical to a string\n * @returns the current spherical as a string\n */\n toString() {\n return JSON.stringify(this);\n }\n /**\n * Converts the current spherical to an array\n * @returns the current spherical as an array\n */\n asArray() {\n return [this.radius, this.theta, this.phi];\n }\n /**\n * Adds the current Spherical and the given Spherical and stores the result\n * @param spherical the spherical to add\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n addToRef(spherical, ref) {\n ref.radius = this.radius + spherical.radius;\n ref.theta = this.theta + spherical.theta;\n ref.phi = this.phi + spherical.phi;\n return ref;\n }\n /**\n * Adds the current Spherical and the given Spherical\n * @param spherical the spherical to add\n * @returns the sum spherical\n */\n add(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.addToRef(spherical, ref);\n return ref;\n }\n /**\n * Adds the given spherical to the current spherical\n * @param spherical the spherical to add\n * @returns the current spherical\n */\n addInPlace(spherical) {\n this.addToRef(spherical, this);\n return this;\n }\n /**\n * Adds the provided values to the current spherical\n * @param radius the amount to add to the radius\n * @param theta the amount to add to the theta\n * @param phi the amount to add to the phi\n * @returns the current spherical\n */\n addInPlaceFromFloats(radius, theta, phi) {\n this.radius += radius;\n this.theta += theta;\n this.phi += phi;\n return this;\n }\n /**\n * Subtracts the given Spherical from the current Spherical and stores the result\n * @param spherical the spherical to subtract\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n subtractToRef(spherical, ref) {\n ref.radius = this.radius - spherical.radius;\n ref.theta = this.theta - spherical.theta;\n ref.phi = this.phi - spherical.phi;\n return ref;\n }\n /**\n * Subtracts the given Spherical from the current Spherical\n * @param spherical the spherical to subtract\n * @returns the difference spherical\n */\n subtract(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.subtractToRef(spherical, ref);\n return ref;\n }\n /**\n * Subtracts the given Spherical from the current Spherical\n * @param spherical the spherical to subtract\n * @returns the current spherical\n */\n subtractInPlace(spherical) {\n this.subtractToRef(spherical, this);\n return this;\n }\n /**\n * Subtracts the given floats from the current spherical\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param phi the amount to subtract from the phi\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n subtractFromFloatsToRef(radius, theta, phi, ref) {\n ref.radius = this.radius - radius;\n ref.theta = this.theta - theta;\n ref.phi = this.phi - phi;\n return ref;\n }\n /**\n * Subtracts the given floats from the current spherical\n * @param radius the amount to subtract from the radius\n * @param theta the amount to subtract from the theta\n * @param phi the amount to subtract from the phi\n * @returns the difference spherical\n */\n subtractFromFloats(radius, theta, phi) {\n const ref = new Spherical(0, 0, 0);\n this.subtractFromFloatsToRef(radius, theta, phi, ref);\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical and stores the result\n * @param spherical the spherical to multiply\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n multiplyToRef(spherical, ref) {\n ref.radius = this.radius * spherical.radius;\n ref.theta = this.theta * spherical.theta;\n ref.phi = this.phi * spherical.phi;\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical\n * @param spherical the spherical to multiply\n * @returns the product spherical\n */\n multiply(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.multiplyToRef(spherical, ref);\n return ref;\n }\n /**\n * Multiplies the given Spherical with the current Spherical\n * @param spherical the spherical to multiply\n * @returns the current spherical\n */\n multiplyInPlace(spherical) {\n this.multiplyToRef(spherical, this);\n return this;\n }\n /**\n * Divides the current Spherical by the given Spherical and stores the result\n * @param spherical the spherical to divide\n * @param ref the spherical to store the result in\n * @returns the updated ref\n */\n divideToRef(spherical, ref) {\n ref.radius = this.radius / spherical.radius;\n ref.theta = this.theta / spherical.theta;\n ref.phi = this.phi / spherical.phi;\n return ref;\n }\n /**\n * Divides the current Spherical by the given Spherical\n * @param spherical the spherical to divide\n * @returns the quotient spherical\n */\n divide(spherical) {\n const ref = new Spherical(0, 0, 0);\n this.divideToRef(spherical, ref);\n return ref;\n }\n /**\n * Divides the current Spherical by the given Spherical\n * @param spherical the spherical to divide\n * @returns the current spherical\n */\n divideInPlace(spherical) {\n this.divideToRef(spherical, this);\n return this;\n }\n /**\n * Clones the current spherical\n * @returns a clone of the current spherical\n */\n clone() {\n return new Spherical(this.radius, this.theta, this.phi);\n }\n /**\n * Copies the source spherical into the current spherical\n * @param source the spherical to copy from\n * @returns the current spherical\n */\n copyFrom(source) {\n this.radius = source.radius;\n this.theta = source.theta;\n this.phi = source.phi;\n return this;\n }\n /**\n * Copies the given values into the current spherical\n * @param radius the radius to use\n * @param theta the theta to use\n * @param phi the phi to use\n * @returns the current spherical\n */\n copyFromFloats(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n return this;\n }\n /**\n * Scales the current spherical and stores the result\n * @param scale defines the multiplication factor\n * @param ref where to store the result\n * @returns the updated ref\n */\n scaleToRef(scale, ref) {\n ref.radius = this.radius * scale;\n ref.theta = this.theta * scale;\n ref.phi = this.phi * scale;\n return ref;\n }\n /**\n * Scales the current spherical and returns a new spherical with the scaled coordinates\n * @param scale defines the multiplication factor\n * @returns the scaled spherical\n */\n scale(scale) {\n const ref = new Spherical(0, 0, 0);\n this.scaleToRef(scale, ref);\n return ref;\n }\n /**\n * Scales the current spherical\n * @param scale defines the multiplication factor\n * @returns the current spherical\n */\n scaleInPlace(scale) {\n this.scaleToRef(scale, this);\n return this;\n }\n /**\n * Sets the values of the current spherical\n * @param radius the new radius\n * @param theta the new theta\n * @param phi the new phi\n * @returns the current spherical\n */\n set(radius, theta, phi) {\n this.radius = radius;\n this.theta = theta;\n this.phi = phi;\n return this;\n }\n /**\n * Sets the values of the current spherical\n * @param value the new values\n * @returns the current spherical\n */\n setAll(value) {\n this.set(value, value, value);\n return this;\n }\n /**\n * Assigns the rectangular coordinates of the current Spherical to a Vector3\n * @param ref the Vector3 to update\n * @returns the updated Vector3\n */\n toVector3ToRef(ref) {\n const x = this.radius * Math.sin(this.theta) * Math.cos(this.phi);\n const y = this.radius * Math.cos(this.theta);\n const z = this.radius * Math.sin(this.theta) * Math.sin(this.phi);\n ref.set(x, y, z);\n return ref;\n }\n /**\n * Gets a Vector3 from the current spherical coordinates\n * @returns the (x, y,z) form of the current Spherical\n */\n toVector3() {\n const ref = new Vector3(0, 0, 0);\n return this.toVector3ToRef(ref);\n }\n /**\n * Assigns the spherical coordinates from a Vector3\n * @param vector the vector to convert\n * @param ref the Spherical to update\n * @returns the updated ref\n */\n static FromVector3ToRef(vector, ref) {\n ref.radius = vector.length();\n ref.theta = Math.acos(vector.y / ref.radius);\n ref.phi = Math.atan2(vector.z, vector.x);\n return ref;\n }\n /**\n * Gets a Spherical from a Vector3\n * @param vector defines the vector in (x, y, z) coordinate space\n * @returns a new Spherical\n */\n static FromVector3(vector) {\n const spherical = new Spherical(0, 0, 0);\n Spherical.FromVector3ToRef(vector, spherical);\n return spherical;\n }\n /**\n * Converts an array of floats to a spherical\n * @param array the array to convert\n * @returns the converted spherical\n */\n static FromArray(array) {\n return new Spherical(array[0], array[1], array[2]);\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,QAAQ,kBAAkB;AACnD;AACA;AACA;AACA,OAAO,MAAMC,KAAK,CAAC;EACf;AACJ;AACA;AACA;AACA;EACIC,WAAWA,CAACC,MAAM,EAAEC,KAAK,EAAE;IACvB,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,KAAK,GAAGA,KAAK;EACtB;EACA;AACJ;AACA;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAO,OAAO;EAClB;EACA;AACJ;AACA;AACA;EACIC,QAAQA,CAAA,EAAG;IACP,OAAOC,IAAI,CAACC,SAAS,CAAC,IAAI,CAAC;EAC/B;EACA;AACJ;AACA;AACA;EACIC,OAAOA,CAAA,EAAG;IACN,OAAO,CAAC,IAAI,CAACN,MAAM,EAAE,IAAI,CAACC,KAAK,CAAC;EACpC;EACA;AACJ;AACA;AACA;AACA;AACA;EACIM,QAAQA,CAACC,KAAK,EAAEC,GAAG,EAAE;IACjBA,GAAG,CAACT,MAAM,GAAG,IAAI,CAACA,MAAM,GAAGQ,KAAK,CAACR,MAAM;IACvCS,GAAG,CAACR,KAAK,GAAG,IAAI,CAACA,KAAK,GAAGO,KAAK,CAACP,KAAK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A;AACA;AACA;AACA;EACI,OAAO8C,gBAAgBA,CAACC,MAAM,EAAE/C,GAAG,EAAE;IACjCA,GAAG,CAACT,MAAM,GAAGwD,MAAM,CAACX,MAAM,CAAC,CAAC;IAC5BpC,GAAG,CAACR,KAAK,GAAGmC,IAAI,CAACQ,IAAI,CAACY,MAAM,CAAClB,CAAC,GAAG7B,GAAG,CAACT,MAAM,CAAC;IAC5CS,GAAG,CAACyC,GAAG,GAAGd,IAAI,CAACqB,KAAK,CAACD,MAAM,CAACH,CAAC,EAAEG,MAAM,CAACrB,CAAC,CAAC;IACxC,OAAO1B,GAAG;EACd;EACA;AACJ;AACA;AACA;AACA;EACI,OAAOiD,WAAWA,CAACF,MAAM,EAAE;IACvB,MAAML,SAAS,GAAG,IAAIF,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACxCA,SAAS,CAACM,gBAAgB,CAACC,MAAM,EAAEL,SAAS,CAAC;IAC7C,OAAOA,SAAS;EACpB;EACA;AACJ;AACA;AACA;AACA;EACI,OAAOJ,SAASA,CAACC,KAAK,EAAE;IACpB,OAAO,IAAIC,SAAS,CAACD,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;EACtD;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}