@babylonjs/core 5.0.2 → 5.1.0

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.
Files changed (43) hide show
  1. package/Engines/Extensions/engine.readTexture.d.ts +2 -2
  2. package/Engines/Extensions/engine.readTexture.js +8 -4
  3. package/Engines/Extensions/engine.readTexture.js.map +1 -1
  4. package/Engines/WebGPU/Extensions/engine.readTexture.js +4 -2
  5. package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
  6. package/Engines/engine.d.ts +7 -1
  7. package/Engines/engine.js +14 -0
  8. package/Engines/engine.js.map +1 -1
  9. package/Engines/nativeEngine.d.ts +24 -0
  10. package/Engines/nativeEngine.js +39 -0
  11. package/Engines/nativeEngine.js.map +1 -1
  12. package/Engines/thinEngine.d.ts +2 -1
  13. package/Engines/thinEngine.js +16 -6
  14. package/Engines/thinEngine.js.map +1 -1
  15. package/Engines/webgpuEngine.d.ts +13 -1
  16. package/Engines/webgpuEngine.js +25 -1
  17. package/Engines/webgpuEngine.js.map +1 -1
  18. package/Materials/PBR/pbrBaseMaterial.js +3 -0
  19. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  20. package/Materials/Textures/MultiviewRenderTarget.js +1 -0
  21. package/Materials/Textures/MultiviewRenderTarget.js.map +1 -1
  22. package/Materials/Textures/baseTexture.d.ts +5 -1
  23. package/Materials/Textures/baseTexture.js +21 -11
  24. package/Materials/Textures/baseTexture.js.map +1 -1
  25. package/Materials/Textures/texture.d.ts +3 -0
  26. package/Materials/Textures/texture.js +4 -2
  27. package/Materials/Textures/texture.js.map +1 -1
  28. package/Maths/math.color.d.ts +11 -2
  29. package/Maths/math.color.js +12 -7
  30. package/Maths/math.color.js.map +1 -1
  31. package/Meshes/abstractMesh.js +1 -1
  32. package/Meshes/abstractMesh.js.map +1 -1
  33. package/Meshes/mesh.js +0 -1
  34. package/Meshes/mesh.js.map +1 -1
  35. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +6 -1
  36. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +13 -2
  37. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  38. package/XR/features/WebXRHandTracking.js +1 -1
  39. package/XR/features/WebXRHandTracking.js.map +1 -1
  40. package/assetContainer.d.ts +13 -1
  41. package/assetContainer.js +130 -17
  42. package/assetContainer.js.map +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"math.color.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Maths/math.color.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;GAEG;AACH;IACI;;;;;OAKG;IACH;IACI;;OAEG;IACI,CAAa;IACpB;;OAEG;IACI,CAAa;IACpB;;OAEG;IACI,CAAa;QARb,kBAAA,EAAA,KAAa;QAIb,kBAAA,EAAA,KAAa;QAIb,kBAAA,EAAA,KAAa;QARb,MAAC,GAAD,CAAC,CAAY;QAIb,MAAC,GAAD,CAAC,CAAY;QAIb,MAAC,GAAD,CAAC,CAAY;IACrB,CAAC;IAEJ;;;OAGG;IACI,yBAAQ,GAAf;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,6BAAY,GAAnB;QACI,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;OAGG;IACI,4BAAW,GAAlB;QACI,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,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AO,MAAM,CAAC;IAClB,CAAC;IACL,aAAC;AAAD,CAAC,AA1gBD,IA0gBC;;AAED;;GAEG;AACH;IAAA;IAGA,CAAC;IAFiB,gBAAM,GAAa,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,gBAAM,GAAa,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,cAAM,OAAA,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAtB,CAAsB,CAAC,CAAC;IAC5F,gBAAC;CAAA,AAHD,IAGC;SAHY,SAAS;AAKtB,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACxC,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import type { DeepImmutable, FloatArray } from \"../types\";\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { ToLinearSpace, ToGammaSpace } from \"./math.constants\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * Class used to hold a RGB color\r\n */\r\nexport class Color3 {\r\n /**\r\n * Creates a new Color3 object from red, green, blue values, all between 0 and 1\r\n * @param r defines the red component (between 0 and 1, default is 0)\r\n * @param g defines the green component (between 0 and 1, default is 0)\r\n * @param b defines the blue component (between 0 and 1, default is 0)\r\n */\r\n constructor(\r\n /**\r\n * Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0\r\n ) {}\r\n\r\n /**\r\n * Creates a string with the Color3 current values\r\n * @returns the string representation of the Color3 object\r\n */\r\n public toString(): string {\r\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \"}\";\r\n }\r\n\r\n /**\r\n * Returns the string \"Color3\"\r\n * @returns \"Color3\"\r\n */\r\n public getClassName(): string {\r\n return \"Color3\";\r\n }\r\n\r\n /**\r\n * Compute the Color3 hash code\r\n * @returns an unique number that can be used to hash Color3 objects\r\n */\r\n public getHashCode(): number {\r\n let hash = (this.r * 255) | 0;\r\n hash = (hash * 397) ^ ((this.g * 255) | 0);\r\n hash = (hash * 397) ^ ((this.b * 255) | 0);\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Stores in the given array from the given starting index the red, green, blue values as successive elements\r\n * @param array defines the array where to store the r,g,b components\r\n * @param index defines an optional index in the target array to define where to start storing values\r\n * @returns the current Color3 object\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Color3 {\r\n array[index] = this.r;\r\n array[index + 1] = this.g;\r\n array[index + 2] = this.b;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current color with values stored in an array from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns the current Color3 object\r\n */\r\n public fromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color3 {\r\n Color3.FromArrayToRef(array, offset, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 object from the current Color3 and the given alpha\r\n * @param alpha defines the alpha component on the new Color4 object (default is 1)\r\n * @returns a new Color4 object\r\n */\r\n public toColor4(alpha: number = 1): Color4 {\r\n return new Color4(this.r, this.g, this.b, alpha);\r\n }\r\n\r\n /**\r\n * Returns a new array populated with 3 numeric elements : red, green and blue values\r\n * @returns the new array\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns the luminance value\r\n * @returns a float value\r\n */\r\n public toLuminance(): number {\r\n return this.r * 0.3 + this.g * 0.59 + this.b * 0.11;\r\n }\r\n\r\n /**\r\n * Multiply each Color3 rgb values by the given Color3 rgb values in a new Color3 object\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3 object\r\n */\r\n public multiply(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r * otherColor.r, this.g * otherColor.g, this.b * otherColor.b);\r\n }\r\n\r\n /**\r\n * Multiply the rgb values of the Color3 and the given Color3 and stores the result in the object \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the current Color3\r\n */\r\n public multiplyToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r * otherColor.r;\r\n result.g = this.g * otherColor.g;\r\n result.b = this.b * otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Determines equality between Color3 objects\r\n * @param otherColor defines the second operand\r\n * @returns true if the rgb values are equal to the given ones\r\n */\r\n public equals(otherColor: DeepImmutable<Color3>): boolean {\r\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b;\r\n }\r\n\r\n /**\r\n * Determines equality between the current Color3 object and a set of r,b,g values\r\n * @param r defines the red component to check\r\n * @param g defines the green component to check\r\n * @param b defines the blue component to check\r\n * @returns true if the rgb values are equal to the given ones\r\n */\r\n public equalsFloats(r: number, g: number, b: number): boolean {\r\n return this.r === r && this.g === g && this.b === b;\r\n }\r\n\r\n /**\r\n * Multiplies in place each rgb value by scale\r\n * @param scale defines the scaling factor\r\n * @returns the updated Color3\r\n */\r\n public scale(scale: number): Color3 {\r\n return new Color3(this.r * scale, this.g * scale, this.b * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the rgb values by scale and stores the result into \"result\"\r\n * @param scale defines the scaling factor\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the unmodified current Color3\r\n */\r\n public scaleToRef(scale: number, result: Color3): Color3 {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Color3 values by a factor and add the result to a given Color3\r\n * @param scale defines the scale factor\r\n * @param result defines color to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public scaleAndAddToRef(scale: number, result: Color3): Color3 {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\r\n * @param min defines minimum clamping value (default is 0)\r\n * @param max defines maximum clamping value (default is 1)\r\n * @param result defines color to store the result into\r\n * @returns the original Color3\r\n */\r\n public clampToRef(min: number = 0, max: number = 1, result: Color3): Color3 {\r\n result.r = Scalar.Clamp(this.r, min, max);\r\n result.g = Scalar.Clamp(this.g, min, max);\r\n result.b = Scalar.Clamp(this.b, min, max);\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Color3 set with the added values of the current Color3 and of the given one\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3\r\n */\r\n public add(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r + otherColor.r, this.g + otherColor.g, this.b + otherColor.b);\r\n }\r\n\r\n /**\r\n * Stores the result of the addition of the current Color3 and given one rgb values into \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines Color3 object to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public addToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r + otherColor.r;\r\n result.g = this.g + otherColor.g;\r\n result.b = this.b + otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the subtracted values of the given one from the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3\r\n */\r\n public subtract(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r - otherColor.r, this.g - otherColor.g, this.b - otherColor.b);\r\n }\r\n\r\n /**\r\n * Stores the result of the subtraction of given one from the current Color3 rgb values into \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines Color3 object to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public subtractToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r - otherColor.r;\r\n result.g = this.g - otherColor.g;\r\n result.b = this.b - otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copy the current object\r\n * @returns a new Color3 copied the current one\r\n */\r\n public clone(): Color3 {\r\n return new Color3(this.r, this.g, this.b);\r\n }\r\n\r\n /**\r\n * Copies the rgb values from the source in the current Color3\r\n * @param source defines the source Color3 object\r\n * @returns the updated Color3 object\r\n */\r\n public copyFrom(source: DeepImmutable<Color3>): Color3 {\r\n this.r = source.r;\r\n this.g = source.g;\r\n this.b = source.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the given floats\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @returns the current Color3 object\r\n */\r\n public copyFromFloats(r: number, g: number, b: number): Color3 {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the given floats\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @returns the current Color3 object\r\n */\r\n public set(r: number, g: number, b: number): Color3 {\r\n return this.copyFromFloats(r, g, b);\r\n }\r\n\r\n /**\r\n * Compute the Color3 hexadecimal code as a string\r\n * @returns a string containing the hexadecimal representation of the Color3 object\r\n */\r\n public toHexString(): string {\r\n const intR = Math.round(this.r * 255);\r\n const intG = Math.round(this.g * 255);\r\n const intB = Math.round(this.b * 255);\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to linear space\r\n * @returns a new Color3 object\r\n */\r\n public toLinearSpace(): Color3 {\r\n const convertedColor = new Color3();\r\n this.toLinearSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts current color in rgb space to HSV values\r\n * @returns a new color3 representing the HSV values\r\n */\r\n public toHSV(): Color3 {\r\n const result = new Color3();\r\n\r\n this.toHSVToRef(result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts current color in rgb space to HSV values\r\n * @param result defines the Color3 where to store the HSV values\r\n */\r\n public toHSVToRef(result: Color3) {\r\n const r = this.r;\r\n const g = this.g;\r\n const b = this.b;\r\n\r\n const max = Math.max(r, g, b);\r\n const min = Math.min(r, g, b);\r\n let h = 0;\r\n let s = 0;\r\n const v = max;\r\n\r\n const dm = max - min;\r\n\r\n if (max !== 0) {\r\n s = dm / max;\r\n }\r\n\r\n if (max != min) {\r\n if (max == r) {\r\n h = (g - b) / dm;\r\n if (g < b) {\r\n h += 6;\r\n }\r\n } else if (max == g) {\r\n h = (b - r) / dm + 2;\r\n } else if (max == b) {\r\n h = (r - g) / dm + 4;\r\n }\r\n h *= 60;\r\n }\r\n\r\n result.r = h;\r\n result.g = s;\r\n result.b = v;\r\n }\r\n\r\n /**\r\n * Converts the Color3 values to linear space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color3 object where to store the linear space version\r\n * @returns the unmodified Color3\r\n */\r\n public toLinearSpaceToRef(convertedColor: Color3): Color3 {\r\n convertedColor.r = Math.pow(this.r, ToLinearSpace);\r\n convertedColor.g = Math.pow(this.g, ToLinearSpace);\r\n convertedColor.b = Math.pow(this.b, ToLinearSpace);\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to gamma space\r\n * @returns a new Color3 object\r\n */\r\n public toGammaSpace(): Color3 {\r\n const convertedColor = new Color3();\r\n this.toGammaSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color3 values to gamma space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color3 object where to store the gamma space version\r\n * @returns the unmodified Color3\r\n */\r\n public toGammaSpaceToRef(convertedColor: Color3): Color3 {\r\n convertedColor.r = Math.pow(this.r, ToGammaSpace);\r\n convertedColor.g = Math.pow(this.g, ToGammaSpace);\r\n convertedColor.b = Math.pow(this.b, ToGammaSpace);\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n private static _BlackReadOnly = Color3.Black() as DeepImmutable<Color3>;\r\n\r\n /**\r\n * Convert Hue, saturation and value to a Color3 (RGB)\r\n * @param hue defines the hue\r\n * @param saturation defines the saturation\r\n * @param value defines the value\r\n * @param result defines the Color3 where to store the RGB values\r\n */\r\n public static HSVtoRGBToRef(hue: number, saturation: number, value: number, result: Color3) {\r\n const chroma = value * saturation;\r\n const h = hue / 60;\r\n const x = chroma * (1 - Math.abs((h % 2) - 1));\r\n let r = 0;\r\n let g = 0;\r\n let b = 0;\r\n\r\n if (h >= 0 && h <= 1) {\r\n r = chroma;\r\n g = x;\r\n } else if (h >= 1 && h <= 2) {\r\n r = x;\r\n g = chroma;\r\n } else if (h >= 2 && h <= 3) {\r\n g = chroma;\r\n b = x;\r\n } else if (h >= 3 && h <= 4) {\r\n g = x;\r\n b = chroma;\r\n } else if (h >= 4 && h <= 5) {\r\n r = x;\r\n b = chroma;\r\n } else if (h >= 5 && h <= 6) {\r\n r = chroma;\r\n b = x;\r\n }\r\n\r\n const m = value - chroma;\r\n result.set(r + m, g + m, b + m);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the string containing valid hexadecimal values\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns a new Color3 object\r\n */\r\n public static FromHexString(hex: string): Color3 {\r\n if (hex.substring(0, 1) !== \"#\" || hex.length !== 7) {\r\n return new Color3(0, 0, 0);\r\n }\r\n\r\n const r = parseInt(hex.substring(1, 3), 16);\r\n const g = parseInt(hex.substring(3, 5), 16);\r\n const b = parseInt(hex.substring(5, 7), 16);\r\n\r\n return Color3.FromInts(r, g, b);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns a new Color3 object\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color3 {\r\n return new Color3(array[offset], array[offset + 1], array[offset + 2]);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @param result defines the target Color3 object\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number = 0, result: Color3) {\r\n result.r = array[offset];\r\n result.g = array[offset + 1];\r\n result.b = array[offset + 2];\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from integer values (< 256)\r\n * @param r defines the red component to read from (value between 0 and 255)\r\n * @param g defines the green component to read from (value between 0 and 255)\r\n * @param b defines the blue component to read from (value between 0 and 255)\r\n * @returns a new Color3 object\r\n */\r\n public static FromInts(r: number, g: number, b: number): Color3 {\r\n return new Color3(r / 255.0, g / 255.0, b / 255.0);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\r\n * @param start defines the start Color3 value\r\n * @param end defines the end Color3 value\r\n * @param amount defines the gradient value between start and end\r\n * @returns a new Color3 object\r\n */\r\n public static Lerp(start: DeepImmutable<Color3>, end: DeepImmutable<Color3>, amount: number): Color3 {\r\n const result = new Color3(0.0, 0.0, 0.0);\r\n Color3.LerpToRef(start, end, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @param result defines the Color3 object where to store the result\r\n */\r\n public static LerpToRef(left: DeepImmutable<Color3>, right: DeepImmutable<Color3>, amount: number, result: Color3): void {\r\n result.r = left.r + (right.r - left.r) * amount;\r\n result.g = left.g + (right.g - left.g) * amount;\r\n result.b = left.b + (right.b - left.b) * amount;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent Color3\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent Color3\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns the new Color3\r\n */\r\n public static Hermite(value1: DeepImmutable<Color3>, tangent1: DeepImmutable<Color3>, value2: DeepImmutable<Color3>, tangent2: DeepImmutable<Color3>, amount: number): Color3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\r\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\r\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\r\n return new Color3(r, g, b);\r\n }\r\n\r\n /**\r\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Color3>,\r\n tangent1: DeepImmutable<Color3>,\r\n value2: DeepImmutable<Color3>,\r\n tangent2: DeepImmutable<Color3>,\r\n time: number\r\n ): Color3 {\r\n const result = Color3.Black();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Color3>,\r\n tangent1: DeepImmutable<Color3>,\r\n value2: DeepImmutable<Color3>,\r\n tangent2: DeepImmutable<Color3>,\r\n time: number,\r\n result: Color3\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\r\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\r\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\r\n }\r\n\r\n /**\r\n * Returns a Color3 value containing a red color\r\n * @returns a new Color3 object\r\n */\r\n public static Red(): Color3 {\r\n return new Color3(1, 0, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a green color\r\n * @returns a new Color3 object\r\n */\r\n public static Green(): Color3 {\r\n return new Color3(0, 1, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a blue color\r\n * @returns a new Color3 object\r\n */\r\n public static Blue(): Color3 {\r\n return new Color3(0, 0, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a black color\r\n * @returns a new Color3 object\r\n */\r\n public static Black(): Color3 {\r\n return new Color3(0, 0, 0);\r\n }\r\n\r\n /**\r\n * Gets a Color3 value containing a black color that must not be updated\r\n */\r\n public static get BlackReadOnly(): DeepImmutable<Color3> {\r\n return Color3._BlackReadOnly;\r\n }\r\n\r\n /**\r\n * Returns a Color3 value containing a white color\r\n * @returns a new Color3 object\r\n */\r\n public static White(): Color3 {\r\n return new Color3(1, 1, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a purple color\r\n * @returns a new Color3 object\r\n */\r\n public static Purple(): Color3 {\r\n return new Color3(0.5, 0, 0.5);\r\n }\r\n /**\r\n * Returns a Color3 value containing a magenta color\r\n * @returns a new Color3 object\r\n */\r\n public static Magenta(): Color3 {\r\n return new Color3(1, 0, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a yellow color\r\n * @returns a new Color3 object\r\n */\r\n public static Yellow(): Color3 {\r\n return new Color3(1, 1, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a gray color\r\n * @returns a new Color3 object\r\n */\r\n public static Gray(): Color3 {\r\n return new Color3(0.5, 0.5, 0.5);\r\n }\r\n /**\r\n * Returns a Color3 value containing a teal color\r\n * @returns a new Color3 object\r\n */\r\n public static Teal(): Color3 {\r\n return new Color3(0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a random color\r\n * @returns a new Color3 object\r\n */\r\n public static Random(): Color3 {\r\n return new Color3(Math.random(), Math.random(), Math.random());\r\n }\r\n}\r\n\r\n/**\r\n * Class used to hold a RBGA color\r\n */\r\nexport class Color4 {\r\n /**\r\n * Creates a new Color4 object from red, green, blue values, all between 0 and 1\r\n * @param r defines the red component (between 0 and 1, default is 0)\r\n * @param g defines the green component (between 0 and 1, default is 0)\r\n * @param b defines the blue component (between 0 and 1, default is 0)\r\n * @param a defines the alpha component (between 0 and 1, default is 1)\r\n */\r\n constructor(\r\n /**\r\n * Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0,\r\n /**\r\n * Defines the alpha component (between 0 and 1, default is 1)\r\n */\r\n public a: number = 1\r\n ) {}\r\n\r\n // Operators\r\n\r\n /**\r\n * Adds in place the given Color4 values to the current Color4 object\r\n * @param right defines the second operand\r\n * @returns the current updated Color4 object\r\n */\r\n public addInPlace(right: DeepImmutable<Color4>): Color4 {\r\n this.r += right.r;\r\n this.g += right.g;\r\n this.b += right.b;\r\n this.a += right.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new array populated with 4 numeric elements : red, green, blue, alpha values\r\n * @returns the new array\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Stores from the starting index in the given array the Color4 successive values\r\n * @param array defines the array where to store the r,g,b components\r\n * @param index defines an optional index in the target array to define where to start storing values\r\n * @returns the current Color4 object\r\n */\r\n public toArray(array: number[], index: number = 0): Color4 {\r\n array[index] = this.r;\r\n array[index + 1] = this.g;\r\n array[index + 2] = this.b;\r\n array[index + 3] = this.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current color with values stored in an array from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns the current Color4 object\r\n */\r\n public fromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color4 {\r\n Color4.FromArrayToRef(array, offset, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Determines equality between Color4 objects\r\n * @param otherColor defines the second operand\r\n * @returns true if the rgba values are equal to the given ones\r\n */\r\n public equals(otherColor: DeepImmutable<Color4>): boolean {\r\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b && this.a === otherColor.a;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 set with the added values of the current Color4 and of the given one\r\n * @param right defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public add(right: DeepImmutable<Color4>): Color4 {\r\n return new Color4(this.r + right.r, this.g + right.g, this.b + right.b, this.a + right.a);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 set with the subtracted values of the given one from the current Color4\r\n * @param right defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public subtract(right: DeepImmutable<Color4>): Color4 {\r\n return new Color4(this.r - right.r, this.g - right.g, this.b - right.b, this.a - right.a);\r\n }\r\n\r\n /**\r\n * Subtracts the given ones from the current Color4 values and stores the results in \"result\"\r\n * @param right defines the second operand\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the current Color4 object\r\n */\r\n public subtractToRef(right: DeepImmutable<Color4>, result: Color4): Color4 {\r\n result.r = this.r - right.r;\r\n result.g = this.g - right.g;\r\n result.b = this.b - right.b;\r\n result.a = this.a - right.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 with the current Color4 values multiplied by scale\r\n * @param scale defines the scaling factor to apply\r\n * @returns a new Color4 object\r\n */\r\n public scale(scale: number): Color4 {\r\n return new Color4(this.r * scale, this.g * scale, this.b * scale, this.a * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the current Color4 values by scale and stores the result in \"result\"\r\n * @param scale defines the scaling factor to apply\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the current unmodified Color4\r\n */\r\n public scaleToRef(scale: number, result: Color4): Color4 {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n result.a = this.a * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Color4 values by a factor and add the result to a given Color4\r\n * @param scale defines the scale factor\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the unmodified current Color4\r\n */\r\n public scaleAndAddToRef(scale: number, result: Color4): Color4 {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n result.a += this.a * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\r\n * @param min defines minimum clamping value (default is 0)\r\n * @param max defines maximum clamping value (default is 1)\r\n * @param result defines color to store the result into.\r\n * @returns the current Color4\r\n */\r\n public clampToRef(min: number = 0, max: number = 1, result: Color4): Color4 {\r\n result.r = Scalar.Clamp(this.r, min, max);\r\n result.g = Scalar.Clamp(this.g, min, max);\r\n result.b = Scalar.Clamp(this.b, min, max);\r\n result.a = Scalar.Clamp(this.a, min, max);\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiply an Color4 value by another and return a new Color4 object\r\n * @param color defines the Color4 value to multiply by\r\n * @returns a new Color4 object\r\n */\r\n public multiply(color: Color4): Color4 {\r\n return new Color4(this.r * color.r, this.g * color.g, this.b * color.b, this.a * color.a);\r\n }\r\n\r\n /**\r\n * Multiply a Color4 value by another and push the result in a reference value\r\n * @param color defines the Color4 value to multiply by\r\n * @param result defines the Color4 to fill the result in\r\n * @returns the result Color4\r\n */\r\n public multiplyToRef(color: Color4, result: Color4): Color4 {\r\n result.r = this.r * color.r;\r\n result.g = this.g * color.g;\r\n result.b = this.b * color.b;\r\n result.a = this.a * color.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a string with the Color4 current values\r\n * @returns the string representation of the Color4 object\r\n */\r\n public toString(): string {\r\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \" A:\" + this.a + \"}\";\r\n }\r\n\r\n /**\r\n * Returns the string \"Color4\"\r\n * @returns \"Color4\"\r\n */\r\n public getClassName(): string {\r\n return \"Color4\";\r\n }\r\n\r\n /**\r\n * Compute the Color4 hash code\r\n * @returns an unique number that can be used to hash Color4 objects\r\n */\r\n public getHashCode(): number {\r\n let hash = (this.r * 255) | 0;\r\n hash = (hash * 397) ^ ((this.g * 255) | 0);\r\n hash = (hash * 397) ^ ((this.b * 255) | 0);\r\n hash = (hash * 397) ^ ((this.a * 255) | 0);\r\n return hash;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 copied from the current one\r\n * @returns a new Color4 object\r\n */\r\n public clone(): Color4 {\r\n return new Color4(this.r, this.g, this.b, this.a);\r\n }\r\n\r\n /**\r\n * Copies the given Color4 values into the current one\r\n * @param source defines the source Color4 object\r\n * @returns the current updated Color4 object\r\n */\r\n public copyFrom(source: Color4): Color4 {\r\n this.r = source.r;\r\n this.g = source.g;\r\n this.b = source.b;\r\n this.a = source.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given float values into the current one\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @param a defines the alpha component to read from\r\n * @returns the current updated Color4 object\r\n */\r\n public copyFromFloats(r: number, g: number, b: number, a: number): Color4 {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given float values into the current one\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @param a defines the alpha component to read from\r\n * @returns the current updated Color4 object\r\n */\r\n public set(r: number, g: number, b: number, a: number): Color4 {\r\n return this.copyFromFloats(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Compute the Color4 hexadecimal code as a string\r\n * @param returnAsColor3 defines if the string should only contains RGB values (off by default)\r\n * @returns a string containing the hexadecimal representation of the Color4 object\r\n */\r\n public toHexString(returnAsColor3 = false): string {\r\n const intR = Math.round(this.r * 255);\r\n const intG = Math.round(this.g * 255);\r\n const intB = Math.round(this.b * 255);\r\n\r\n if (returnAsColor3) {\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\r\n }\r\n\r\n const intA = Math.round(this.a * 255);\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB) + Scalar.ToHex(intA);\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to linear space\r\n * @returns a new Color4 object\r\n */\r\n public toLinearSpace(): Color4 {\r\n const convertedColor = new Color4();\r\n this.toLinearSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color4 values to linear space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color4 object where to store the linear space version\r\n * @returns the unmodified Color4\r\n */\r\n public toLinearSpaceToRef(convertedColor: Color4): Color4 {\r\n convertedColor.r = Math.pow(this.r, ToLinearSpace);\r\n convertedColor.g = Math.pow(this.g, ToLinearSpace);\r\n convertedColor.b = Math.pow(this.b, ToLinearSpace);\r\n convertedColor.a = this.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to gamma space\r\n * @returns a new Color4 object\r\n */\r\n public toGammaSpace(): Color4 {\r\n const convertedColor = new Color4();\r\n this.toGammaSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color4 values to gamma space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color4 object where to store the gamma space version\r\n * @returns the unmodified Color4\r\n */\r\n public toGammaSpaceToRef(convertedColor: Color4): Color4 {\r\n convertedColor.r = Math.pow(this.r, ToGammaSpace);\r\n convertedColor.g = Math.pow(this.g, ToGammaSpace);\r\n convertedColor.b = Math.pow(this.b, ToGammaSpace);\r\n convertedColor.a = this.a;\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Creates a new Color4 from the string containing valid hexadecimal values\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns a new Color4 object\r\n */\r\n public static FromHexString(hex: string): Color4 {\r\n if (hex.substring(0, 1) !== \"#\" || (hex.length !== 9 && hex.length !== 7)) {\r\n return new Color4(0.0, 0.0, 0.0, 0.0);\r\n }\r\n\r\n const r = parseInt(hex.substring(1, 3), 16);\r\n const g = parseInt(hex.substring(3, 5), 16);\r\n const b = parseInt(hex.substring(5, 7), 16);\r\n const a = hex.length === 9 ? parseInt(hex.substring(7, 9), 16) : 255;\r\n\r\n return Color4.FromInts(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 object set with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @returns a new Color4 object\r\n */\r\n public static Lerp(left: DeepImmutable<Color4>, right: DeepImmutable<Color4>, amount: number): Color4 {\r\n const result = new Color4(0.0, 0.0, 0.0, 0.0);\r\n Color4.LerpToRef(left, right, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the given \"result\" with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @param result defines the Color4 object where to store data\r\n */\r\n public static LerpToRef(left: DeepImmutable<Color4>, right: DeepImmutable<Color4>, amount: number, result: Color4): void {\r\n result.r = left.r + (right.r - left.r) * amount;\r\n result.g = left.g + (right.g - left.g) * amount;\r\n result.b = left.b + (right.b - left.b) * amount;\r\n result.a = left.a + (right.a - left.a) * amount;\r\n }\r\n\r\n /**\r\n * Interpolate between two Color4 using Hermite interpolation\r\n * @param value1 defines first Color4\r\n * @param tangent1 defines the incoming tangent\r\n * @param value2 defines second Color4\r\n * @param tangent2 defines the outgoing tangent\r\n * @param amount defines the target Color4\r\n * @returns the new interpolated Color4\r\n */\r\n public static Hermite(value1: DeepImmutable<Color4>, tangent1: DeepImmutable<Color4>, value2: DeepImmutable<Color4>, tangent2: DeepImmutable<Color4>, amount: number): Color4 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\r\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\r\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\r\n const a = value1.a * part1 + value2.a * part2 + tangent1.a * part3 + tangent2.a * part4;\r\n return new Color4(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Returns a new Color4 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Color4>,\r\n tangent1: DeepImmutable<Color4>,\r\n value2: DeepImmutable<Color4>,\r\n tangent2: DeepImmutable<Color4>,\r\n time: number\r\n ): Color4 {\r\n const result = new Color4();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Color4 with the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Color4>,\r\n tangent1: DeepImmutable<Color4>,\r\n value2: DeepImmutable<Color4>,\r\n tangent2: DeepImmutable<Color4>,\r\n time: number,\r\n result: Color4\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\r\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\r\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\r\n result.a = (t2 - time) * 6 * value1.a + (3 * t2 - 4 * time + 1) * tangent1.a + (-t2 + time) * 6 * value2.a + (3 * t2 - 2 * time) * tangent2.a;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from a Color3 and an alpha value\r\n * @param color3 defines the source Color3 to read from\r\n * @param alpha defines the alpha component (1.0 by default)\r\n * @returns a new Color4 object\r\n */\r\n public static FromColor3(color3: DeepImmutable<Color3>, alpha: number = 1.0): Color4 {\r\n return new Color4(color3.r, color3.g, color3.b, alpha);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @returns a new Color4 object\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color4 {\r\n return new Color4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @param result defines the target Color4 object\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number = 0, result: Color4) {\r\n result.r = array[offset];\r\n result.g = array[offset + 1];\r\n result.b = array[offset + 2];\r\n result.a = array[offset + 3];\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from integer values (< 256)\r\n * @param r defines the red component to read from (value between 0 and 255)\r\n * @param g defines the green component to read from (value between 0 and 255)\r\n * @param b defines the blue component to read from (value between 0 and 255)\r\n * @param a defines the alpha component to read from (value between 0 and 255)\r\n * @returns a new Color3 object\r\n */\r\n public static FromInts(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(r / 255.0, g / 255.0, b / 255.0, a / 255.0);\r\n }\r\n\r\n /**\r\n * Check the content of a given array and convert it to an array containing RGBA data\r\n * If the original array was already containing count * 4 values then it is returned directly\r\n * @param colors defines the array to check\r\n * @param count defines the number of RGBA data to expect\r\n * @returns an array containing count * 4 values (RGBA)\r\n */\r\n public static CheckColors4(colors: number[], count: number): number[] {\r\n // Check if color3 was used\r\n if (colors.length === count * 3) {\r\n const colors4 = [];\r\n for (let index = 0; index < colors.length; index += 3) {\r\n const newIndex = (index / 3) * 4;\r\n colors4[newIndex] = colors[index];\r\n colors4[newIndex + 1] = colors[index + 1];\r\n colors4[newIndex + 2] = colors[index + 2];\r\n colors4[newIndex + 3] = 1.0;\r\n }\r\n\r\n return colors4;\r\n }\r\n\r\n return colors;\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n */\r\nexport class TmpColors {\r\n public static Color3: Color3[] = ArrayTools.BuildArray(3, Color3.Black);\r\n public static Color4: Color4[] = ArrayTools.BuildArray(3, () => new Color4(0, 0, 0, 0));\r\n}\r\n\r\nRegisterClass(\"BABYLON.Color3\", Color3);\r\nRegisterClass(\"BABYLON.Color4\", Color4);\r\n"]}
1
+ {"version":3,"file":"math.color.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Maths/math.color.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;GAEG;AACH;IACI;;;;;OAKG;IACH;IACI;;OAEG;IACI,CAAa;IACpB;;OAEG;IACI,CAAa;IACpB;;OAEG;IACI,CAAa;QARb,kBAAA,EAAA,KAAa;QAIb,kBAAA,EAAA,KAAa;QAIb,kBAAA,EAAA,KAAa;QARb,MAAC,GAAD,CAAC,CAAY;QAIb,MAAC,GAAD,CAAC,CAAY;QAIb,MAAC,GAAD,CAAC,CAAY;IACrB,CAAC;IAEJ;;;OAGG;IACI,yBAAQ,GAAf;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,6BAAY,GAAnB;QACI,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;OAGG;IACI,4BAAW,GAAlB;QACI,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3C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;IAC1D,gBAAM,GAAa,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,cAAM,OAAA,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAtB,CAAsB,CAAC,CAAC;IAC5F,gBAAC;CAAA,AAHD,IAGC;SAHY,SAAS;AAKtB,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACxC,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import type { DeepImmutable, FloatArray } from \"../types\";\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { ToLinearSpace, ToGammaSpace } from \"./math.constants\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * Class used to hold a RGB color\r\n */\r\nexport class Color3 {\r\n /**\r\n * Creates a new Color3 object from red, green, blue values, all between 0 and 1\r\n * @param r defines the red component (between 0 and 1, default is 0)\r\n * @param g defines the green component (between 0 and 1, default is 0)\r\n * @param b defines the blue component (between 0 and 1, default is 0)\r\n */\r\n constructor(\r\n /**\r\n * Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0\r\n ) {}\r\n\r\n /**\r\n * Creates a string with the Color3 current values\r\n * @returns the string representation of the Color3 object\r\n */\r\n public toString(): string {\r\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \"}\";\r\n }\r\n\r\n /**\r\n * Returns the string \"Color3\"\r\n * @returns \"Color3\"\r\n */\r\n public getClassName(): string {\r\n return \"Color3\";\r\n }\r\n\r\n /**\r\n * Compute the Color3 hash code\r\n * @returns an unique number that can be used to hash Color3 objects\r\n */\r\n public getHashCode(): number {\r\n let hash = (this.r * 255) | 0;\r\n hash = (hash * 397) ^ ((this.g * 255) | 0);\r\n hash = (hash * 397) ^ ((this.b * 255) | 0);\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Stores in the given array from the given starting index the red, green, blue values as successive elements\r\n * @param array defines the array where to store the r,g,b components\r\n * @param index defines an optional index in the target array to define where to start storing values\r\n * @returns the current Color3 object\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Color3 {\r\n array[index] = this.r;\r\n array[index + 1] = this.g;\r\n array[index + 2] = this.b;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current color with values stored in an array from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns the current Color3 object\r\n */\r\n public fromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color3 {\r\n Color3.FromArrayToRef(array, offset, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 object from the current Color3 and the given alpha\r\n * @param alpha defines the alpha component on the new Color4 object (default is 1)\r\n * @returns a new Color4 object\r\n */\r\n public toColor4(alpha: number = 1): Color4 {\r\n return new Color4(this.r, this.g, this.b, alpha);\r\n }\r\n\r\n /**\r\n * Returns a new array populated with 3 numeric elements : red, green and blue values\r\n * @returns the new array\r\n */\r\n public asArray(): number[] {\r\n return [this.r, this.g, this.b];\r\n }\r\n\r\n /**\r\n * Returns the luminance value\r\n * @returns a float value\r\n */\r\n public toLuminance(): number {\r\n return this.r * 0.3 + this.g * 0.59 + this.b * 0.11;\r\n }\r\n\r\n /**\r\n * Multiply each Color3 rgb values by the given Color3 rgb values in a new Color3 object\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3 object\r\n */\r\n public multiply(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r * otherColor.r, this.g * otherColor.g, this.b * otherColor.b);\r\n }\r\n\r\n /**\r\n * Multiply the rgb values of the Color3 and the given Color3 and stores the result in the object \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the current Color3\r\n */\r\n public multiplyToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r * otherColor.r;\r\n result.g = this.g * otherColor.g;\r\n result.b = this.b * otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Determines equality between Color3 objects\r\n * @param otherColor defines the second operand\r\n * @returns true if the rgb values are equal to the given ones\r\n */\r\n public equals(otherColor: DeepImmutable<Color3>): boolean {\r\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b;\r\n }\r\n\r\n /**\r\n * Determines equality between the current Color3 object and a set of r,b,g values\r\n * @param r defines the red component to check\r\n * @param g defines the green component to check\r\n * @param b defines the blue component to check\r\n * @returns true if the rgb values are equal to the given ones\r\n */\r\n public equalsFloats(r: number, g: number, b: number): boolean {\r\n return this.r === r && this.g === g && this.b === b;\r\n }\r\n\r\n /**\r\n * Multiplies in place each rgb value by scale\r\n * @param scale defines the scaling factor\r\n * @returns the updated Color3\r\n */\r\n public scale(scale: number): Color3 {\r\n return new Color3(this.r * scale, this.g * scale, this.b * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the rgb values by scale and stores the result into \"result\"\r\n * @param scale defines the scaling factor\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the unmodified current Color3\r\n */\r\n public scaleToRef(scale: number, result: Color3): Color3 {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Color3 values by a factor and add the result to a given Color3\r\n * @param scale defines the scale factor\r\n * @param result defines color to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public scaleAndAddToRef(scale: number, result: Color3): Color3 {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\r\n * @param min defines minimum clamping value (default is 0)\r\n * @param max defines maximum clamping value (default is 1)\r\n * @param result defines color to store the result into\r\n * @returns the original Color3\r\n */\r\n public clampToRef(min: number = 0, max: number = 1, result: Color3): Color3 {\r\n result.r = Scalar.Clamp(this.r, min, max);\r\n result.g = Scalar.Clamp(this.g, min, max);\r\n result.b = Scalar.Clamp(this.b, min, max);\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Color3 set with the added values of the current Color3 and of the given one\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3\r\n */\r\n public add(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r + otherColor.r, this.g + otherColor.g, this.b + otherColor.b);\r\n }\r\n\r\n /**\r\n * Stores the result of the addition of the current Color3 and given one rgb values into \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines Color3 object to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public addToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r + otherColor.r;\r\n result.g = this.g + otherColor.g;\r\n result.b = this.b + otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the subtracted values of the given one from the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the new Color3\r\n */\r\n public subtract(otherColor: DeepImmutable<Color3>): Color3 {\r\n return new Color3(this.r - otherColor.r, this.g - otherColor.g, this.b - otherColor.b);\r\n }\r\n\r\n /**\r\n * Stores the result of the subtraction of given one from the current Color3 rgb values into \"result\"\r\n * @param otherColor defines the second operand\r\n * @param result defines Color3 object to store the result into\r\n * @returns the unmodified current Color3\r\n */\r\n public subtractToRef(otherColor: DeepImmutable<Color3>, result: Color3): Color3 {\r\n result.r = this.r - otherColor.r;\r\n result.g = this.g - otherColor.g;\r\n result.b = this.b - otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copy the current object\r\n * @returns a new Color3 copied the current one\r\n */\r\n public clone(): Color3 {\r\n return new Color3(this.r, this.g, this.b);\r\n }\r\n\r\n /**\r\n * Copies the rgb values from the source in the current Color3\r\n * @param source defines the source Color3 object\r\n * @returns the updated Color3 object\r\n */\r\n public copyFrom(source: DeepImmutable<Color3>): Color3 {\r\n this.r = source.r;\r\n this.g = source.g;\r\n this.b = source.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the given floats\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @returns the current Color3 object\r\n */\r\n public copyFromFloats(r: number, g: number, b: number): Color3 {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the given floats\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @returns the current Color3 object\r\n */\r\n public set(r: number, g: number, b: number): Color3 {\r\n return this.copyFromFloats(r, g, b);\r\n }\r\n\r\n /**\r\n * Compute the Color3 hexadecimal code as a string\r\n * @returns a string containing the hexadecimal representation of the Color3 object\r\n */\r\n public toHexString(): string {\r\n const intR = Math.round(this.r * 255);\r\n const intG = Math.round(this.g * 255);\r\n const intB = Math.round(this.b * 255);\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to linear space\r\n * @returns a new Color3 object\r\n */\r\n public toLinearSpace(): Color3 {\r\n const convertedColor = new Color3();\r\n this.toLinearSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts current color in rgb space to HSV values\r\n * @returns a new color3 representing the HSV values\r\n */\r\n public toHSV(): Color3 {\r\n const result = new Color3();\r\n\r\n this.toHSVToRef(result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts current color in rgb space to HSV values\r\n * @param result defines the Color3 where to store the HSV values\r\n */\r\n public toHSVToRef(result: Color3) {\r\n const r = this.r;\r\n const g = this.g;\r\n const b = this.b;\r\n\r\n const max = Math.max(r, g, b);\r\n const min = Math.min(r, g, b);\r\n let h = 0;\r\n let s = 0;\r\n const v = max;\r\n\r\n const dm = max - min;\r\n\r\n if (max !== 0) {\r\n s = dm / max;\r\n }\r\n\r\n if (max != min) {\r\n if (max == r) {\r\n h = (g - b) / dm;\r\n if (g < b) {\r\n h += 6;\r\n }\r\n } else if (max == g) {\r\n h = (b - r) / dm + 2;\r\n } else if (max == b) {\r\n h = (r - g) / dm + 4;\r\n }\r\n h *= 60;\r\n }\r\n\r\n result.r = h;\r\n result.g = s;\r\n result.b = v;\r\n }\r\n\r\n /**\r\n * Converts the Color3 values to linear space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color3 object where to store the linear space version\r\n * @returns the unmodified Color3\r\n */\r\n public toLinearSpaceToRef(convertedColor: Color3): Color3 {\r\n convertedColor.r = Math.pow(this.r, ToLinearSpace);\r\n convertedColor.g = Math.pow(this.g, ToLinearSpace);\r\n convertedColor.b = Math.pow(this.b, ToLinearSpace);\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to gamma space\r\n * @returns a new Color3 object\r\n */\r\n public toGammaSpace(): Color3 {\r\n const convertedColor = new Color3();\r\n this.toGammaSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color3 values to gamma space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color3 object where to store the gamma space version\r\n * @returns the unmodified Color3\r\n */\r\n public toGammaSpaceToRef(convertedColor: Color3): Color3 {\r\n convertedColor.r = Math.pow(this.r, ToGammaSpace);\r\n convertedColor.g = Math.pow(this.g, ToGammaSpace);\r\n convertedColor.b = Math.pow(this.b, ToGammaSpace);\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n private static _BlackReadOnly = Color3.Black() as DeepImmutable<Color3>;\r\n\r\n /**\r\n * Convert Hue, saturation and value to a Color3 (RGB)\r\n * @param hue defines the hue\r\n * @param saturation defines the saturation\r\n * @param value defines the value\r\n * @param result defines the Color3 where to store the RGB values\r\n */\r\n public static HSVtoRGBToRef(hue: number, saturation: number, value: number, result: Color3) {\r\n const chroma = value * saturation;\r\n const h = hue / 60;\r\n const x = chroma * (1 - Math.abs((h % 2) - 1));\r\n let r = 0;\r\n let g = 0;\r\n let b = 0;\r\n\r\n if (h >= 0 && h <= 1) {\r\n r = chroma;\r\n g = x;\r\n } else if (h >= 1 && h <= 2) {\r\n r = x;\r\n g = chroma;\r\n } else if (h >= 2 && h <= 3) {\r\n g = chroma;\r\n b = x;\r\n } else if (h >= 3 && h <= 4) {\r\n g = x;\r\n b = chroma;\r\n } else if (h >= 4 && h <= 5) {\r\n r = x;\r\n b = chroma;\r\n } else if (h >= 5 && h <= 6) {\r\n r = chroma;\r\n b = x;\r\n }\r\n\r\n const m = value - chroma;\r\n result.set(r + m, g + m, b + m);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the string containing valid hexadecimal values\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns a new Color3 object\r\n */\r\n public static FromHexString(hex: string): Color3 {\r\n if (hex.substring(0, 1) !== \"#\" || hex.length !== 7) {\r\n return new Color3(0, 0, 0);\r\n }\r\n\r\n const r = parseInt(hex.substring(1, 3), 16);\r\n const g = parseInt(hex.substring(3, 5), 16);\r\n const b = parseInt(hex.substring(5, 7), 16);\r\n\r\n return Color3.FromInts(r, g, b);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns a new Color3 object\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color3 {\r\n return new Color3(array[offset], array[offset + 1], array[offset + 2]);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @param result defines the target Color3 object\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number = 0, result: Color3) {\r\n result.r = array[offset];\r\n result.g = array[offset + 1];\r\n result.b = array[offset + 2];\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from integer values (< 256)\r\n * @param r defines the red component to read from (value between 0 and 255)\r\n * @param g defines the green component to read from (value between 0 and 255)\r\n * @param b defines the blue component to read from (value between 0 and 255)\r\n * @returns a new Color3 object\r\n */\r\n public static FromInts(r: number, g: number, b: number): Color3 {\r\n return new Color3(r / 255.0, g / 255.0, b / 255.0);\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\r\n * @param start defines the start Color3 value\r\n * @param end defines the end Color3 value\r\n * @param amount defines the gradient value between start and end\r\n * @returns a new Color3 object\r\n */\r\n public static Lerp(start: DeepImmutable<Color3>, end: DeepImmutable<Color3>, amount: number): Color3 {\r\n const result = new Color3(0.0, 0.0, 0.0);\r\n Color3.LerpToRef(start, end, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @param result defines the Color3 object where to store the result\r\n */\r\n public static LerpToRef(left: DeepImmutable<Color3>, right: DeepImmutable<Color3>, amount: number, result: Color3): void {\r\n result.r = left.r + (right.r - left.r) * amount;\r\n result.g = left.g + (right.g - left.g) * amount;\r\n result.b = left.b + (right.b - left.b) * amount;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent Color3\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent Color3\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns the new Color3\r\n */\r\n public static Hermite(value1: DeepImmutable<Color3>, tangent1: DeepImmutable<Color3>, value2: DeepImmutable<Color3>, tangent2: DeepImmutable<Color3>, amount: number): Color3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\r\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\r\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\r\n return new Color3(r, g, b);\r\n }\r\n\r\n /**\r\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Color3>,\r\n tangent1: DeepImmutable<Color3>,\r\n value2: DeepImmutable<Color3>,\r\n tangent2: DeepImmutable<Color3>,\r\n time: number\r\n ): Color3 {\r\n const result = Color3.Black();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Color3>,\r\n tangent1: DeepImmutable<Color3>,\r\n value2: DeepImmutable<Color3>,\r\n tangent2: DeepImmutable<Color3>,\r\n time: number,\r\n result: Color3\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\r\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\r\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\r\n }\r\n\r\n /**\r\n * Returns a Color3 value containing a red color\r\n * @returns a new Color3 object\r\n */\r\n public static Red(): Color3 {\r\n return new Color3(1, 0, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a green color\r\n * @returns a new Color3 object\r\n */\r\n public static Green(): Color3 {\r\n return new Color3(0, 1, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a blue color\r\n * @returns a new Color3 object\r\n */\r\n public static Blue(): Color3 {\r\n return new Color3(0, 0, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a black color\r\n * @returns a new Color3 object\r\n */\r\n public static Black(): Color3 {\r\n return new Color3(0, 0, 0);\r\n }\r\n\r\n /**\r\n * Gets a Color3 value containing a black color that must not be updated\r\n */\r\n public static get BlackReadOnly(): DeepImmutable<Color3> {\r\n return Color3._BlackReadOnly;\r\n }\r\n\r\n /**\r\n * Returns a Color3 value containing a white color\r\n * @returns a new Color3 object\r\n */\r\n public static White(): Color3 {\r\n return new Color3(1, 1, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a purple color\r\n * @returns a new Color3 object\r\n */\r\n public static Purple(): Color3 {\r\n return new Color3(0.5, 0, 0.5);\r\n }\r\n /**\r\n * Returns a Color3 value containing a magenta color\r\n * @returns a new Color3 object\r\n */\r\n public static Magenta(): Color3 {\r\n return new Color3(1, 0, 1);\r\n }\r\n /**\r\n * Returns a Color3 value containing a yellow color\r\n * @returns a new Color3 object\r\n */\r\n public static Yellow(): Color3 {\r\n return new Color3(1, 1, 0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a gray color\r\n * @returns a new Color3 object\r\n */\r\n public static Gray(): Color3 {\r\n return new Color3(0.5, 0.5, 0.5);\r\n }\r\n /**\r\n * Returns a Color3 value containing a teal color\r\n * @returns a new Color3 object\r\n */\r\n public static Teal(): Color3 {\r\n return new Color3(0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a Color3 value containing a random color\r\n * @returns a new Color3 object\r\n */\r\n public static Random(): Color3 {\r\n return new Color3(Math.random(), Math.random(), Math.random());\r\n }\r\n}\r\n\r\n/**\r\n * Class used to hold a RBGA color\r\n */\r\nexport class Color4 {\r\n /**\r\n * Creates a new Color4 object from red, green, blue values, all between 0 and 1\r\n * @param r defines the red component (between 0 and 1, default is 0)\r\n * @param g defines the green component (between 0 and 1, default is 0)\r\n * @param b defines the blue component (between 0 and 1, default is 0)\r\n * @param a defines the alpha component (between 0 and 1, default is 1)\r\n */\r\n constructor(\r\n /**\r\n * Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0,\r\n /**\r\n * Defines the alpha component (between 0 and 1, default is 1)\r\n */\r\n public a: number = 1\r\n ) {}\r\n\r\n // Operators\r\n\r\n /**\r\n * Adds in place the given Color4 values to the current Color4 object\r\n * @param right defines the second operand\r\n * @returns the current updated Color4 object\r\n */\r\n public addInPlace(right: DeepImmutable<Color4>): Color4 {\r\n this.r += right.r;\r\n this.g += right.g;\r\n this.b += right.b;\r\n this.a += right.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new array populated with 4 numeric elements : red, green, blue, alpha values\r\n * @returns the new array\r\n */\r\n public asArray(): number[] {\r\n return [this.r, this.g, this.b, this.a];\r\n }\r\n\r\n /**\r\n * Stores from the starting index in the given array the Color4 successive values\r\n * @param array defines the array where to store the r,g,b components\r\n * @param index defines an optional index in the target array to define where to start storing values\r\n * @returns the current Color4 object\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Color4 {\r\n array[index] = this.r;\r\n array[index + 1] = this.g;\r\n array[index + 2] = this.b;\r\n array[index + 3] = this.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current color with values stored in an array from the starting index of the given array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns the current Color4 object\r\n */\r\n public fromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color4 {\r\n Color4.FromArrayToRef(array, offset, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Determines equality between Color4 objects\r\n * @param otherColor defines the second operand\r\n * @returns true if the rgba values are equal to the given ones\r\n */\r\n public equals(otherColor: DeepImmutable<Color4>): boolean {\r\n return otherColor && this.r === otherColor.r && this.g === otherColor.g && this.b === otherColor.b && this.a === otherColor.a;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 set with the added values of the current Color4 and of the given one\r\n * @param right defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public add(right: DeepImmutable<Color4>): Color4 {\r\n return new Color4(this.r + right.r, this.g + right.g, this.b + right.b, this.a + right.a);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 set with the subtracted values of the given one from the current Color4\r\n * @param right defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public subtract(right: DeepImmutable<Color4>): Color4 {\r\n return new Color4(this.r - right.r, this.g - right.g, this.b - right.b, this.a - right.a);\r\n }\r\n\r\n /**\r\n * Subtracts the given ones from the current Color4 values and stores the results in \"result\"\r\n * @param right defines the second operand\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the current Color4 object\r\n */\r\n public subtractToRef(right: DeepImmutable<Color4>, result: Color4): Color4 {\r\n result.r = this.r - right.r;\r\n result.g = this.g - right.g;\r\n result.b = this.b - right.b;\r\n result.a = this.a - right.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 with the current Color4 values multiplied by scale\r\n * @param scale defines the scaling factor to apply\r\n * @returns a new Color4 object\r\n */\r\n public scale(scale: number): Color4 {\r\n return new Color4(this.r * scale, this.g * scale, this.b * scale, this.a * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the current Color4 values by scale and stores the result in \"result\"\r\n * @param scale defines the scaling factor to apply\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the current unmodified Color4\r\n */\r\n public scaleToRef(scale: number, result: Color4): Color4 {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n result.a = this.a * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Color4 values by a factor and add the result to a given Color4\r\n * @param scale defines the scale factor\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the unmodified current Color4\r\n */\r\n public scaleAndAddToRef(scale: number, result: Color4): Color4 {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n result.a += this.a * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\r\n * @param min defines minimum clamping value (default is 0)\r\n * @param max defines maximum clamping value (default is 1)\r\n * @param result defines color to store the result into.\r\n * @returns the current Color4\r\n */\r\n public clampToRef(min: number = 0, max: number = 1, result: Color4): Color4 {\r\n result.r = Scalar.Clamp(this.r, min, max);\r\n result.g = Scalar.Clamp(this.g, min, max);\r\n result.b = Scalar.Clamp(this.b, min, max);\r\n result.a = Scalar.Clamp(this.a, min, max);\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiply an Color4 value by another and return a new Color4 object\r\n * @param color defines the Color4 value to multiply by\r\n * @returns a new Color4 object\r\n */\r\n public multiply(color: Color4): Color4 {\r\n return new Color4(this.r * color.r, this.g * color.g, this.b * color.b, this.a * color.a);\r\n }\r\n\r\n /**\r\n * Multiply a Color4 value by another and push the result in a reference value\r\n * @param color defines the Color4 value to multiply by\r\n * @param result defines the Color4 to fill the result in\r\n * @returns the result Color4\r\n */\r\n public multiplyToRef(color: Color4, result: Color4): Color4 {\r\n result.r = this.r * color.r;\r\n result.g = this.g * color.g;\r\n result.b = this.b * color.b;\r\n result.a = this.a * color.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a string with the Color4 current values\r\n * @returns the string representation of the Color4 object\r\n */\r\n public toString(): string {\r\n return \"{R: \" + this.r + \" G:\" + this.g + \" B:\" + this.b + \" A:\" + this.a + \"}\";\r\n }\r\n\r\n /**\r\n * Returns the string \"Color4\"\r\n * @returns \"Color4\"\r\n */\r\n public getClassName(): string {\r\n return \"Color4\";\r\n }\r\n\r\n /**\r\n * Compute the Color4 hash code\r\n * @returns an unique number that can be used to hash Color4 objects\r\n */\r\n public getHashCode(): number {\r\n let hash = (this.r * 255) | 0;\r\n hash = (hash * 397) ^ ((this.g * 255) | 0);\r\n hash = (hash * 397) ^ ((this.b * 255) | 0);\r\n hash = (hash * 397) ^ ((this.a * 255) | 0);\r\n return hash;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 copied from the current one\r\n * @returns a new Color4 object\r\n */\r\n public clone(): Color4 {\r\n return new Color4(this.r, this.g, this.b, this.a);\r\n }\r\n\r\n /**\r\n * Copies the given Color4 values into the current one\r\n * @param source defines the source Color4 object\r\n * @returns the current updated Color4 object\r\n */\r\n public copyFrom(source: Color4): Color4 {\r\n this.r = source.r;\r\n this.g = source.g;\r\n this.b = source.b;\r\n this.a = source.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given float values into the current one\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @param a defines the alpha component to read from\r\n * @returns the current updated Color4 object\r\n */\r\n public copyFromFloats(r: number, g: number, b: number, a: number): Color4 {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given float values into the current one\r\n * @param r defines the red component to read from\r\n * @param g defines the green component to read from\r\n * @param b defines the blue component to read from\r\n * @param a defines the alpha component to read from\r\n * @returns the current updated Color4 object\r\n */\r\n public set(r: number, g: number, b: number, a: number): Color4 {\r\n return this.copyFromFloats(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Compute the Color4 hexadecimal code as a string\r\n * @param returnAsColor3 defines if the string should only contains RGB values (off by default)\r\n * @returns a string containing the hexadecimal representation of the Color4 object\r\n */\r\n public toHexString(returnAsColor3 = false): string {\r\n const intR = Math.round(this.r * 255);\r\n const intG = Math.round(this.g * 255);\r\n const intB = Math.round(this.b * 255);\r\n\r\n if (returnAsColor3) {\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB);\r\n }\r\n\r\n const intA = Math.round(this.a * 255);\r\n return \"#\" + Scalar.ToHex(intR) + Scalar.ToHex(intG) + Scalar.ToHex(intB) + Scalar.ToHex(intA);\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to linear space\r\n * @returns a new Color4 object\r\n */\r\n public toLinearSpace(): Color4 {\r\n const convertedColor = new Color4();\r\n this.toLinearSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color4 values to linear space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color4 object where to store the linear space version\r\n * @returns the unmodified Color4\r\n */\r\n public toLinearSpaceToRef(convertedColor: Color4): Color4 {\r\n convertedColor.r = Math.pow(this.r, ToLinearSpace);\r\n convertedColor.g = Math.pow(this.g, ToLinearSpace);\r\n convertedColor.b = Math.pow(this.b, ToLinearSpace);\r\n convertedColor.a = this.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to gamma space\r\n * @returns a new Color4 object\r\n */\r\n public toGammaSpace(): Color4 {\r\n const convertedColor = new Color4();\r\n this.toGammaSpaceToRef(convertedColor);\r\n return convertedColor;\r\n }\r\n\r\n /**\r\n * Converts the Color4 values to gamma space and stores the result in \"convertedColor\"\r\n * @param convertedColor defines the Color4 object where to store the gamma space version\r\n * @returns the unmodified Color4\r\n */\r\n public toGammaSpaceToRef(convertedColor: Color4): Color4 {\r\n convertedColor.r = Math.pow(this.r, ToGammaSpace);\r\n convertedColor.g = Math.pow(this.g, ToGammaSpace);\r\n convertedColor.b = Math.pow(this.b, ToGammaSpace);\r\n convertedColor.a = this.a;\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Creates a new Color4 from the string containing valid hexadecimal values.\r\n *\r\n * A valid hex string is either in the format #RRGGBB or #RRGGBBAA.\r\n *\r\n * When a hex string without alpha is passed, the resulting Color4 has\r\n * its alpha value set to 1.0.\r\n *\r\n * An invalid string results in a Color with all its channels set to 0.0,\r\n * i.e. \"transparent black\".\r\n *\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns a new Color4 object\r\n */\r\n public static FromHexString(hex: string): Color4 {\r\n if (hex.substring(0, 1) !== \"#\" || (hex.length !== 9 && hex.length !== 7)) {\r\n return new Color4(0.0, 0.0, 0.0, 0.0);\r\n }\r\n\r\n const r = parseInt(hex.substring(1, 3), 16);\r\n const g = parseInt(hex.substring(3, 5), 16);\r\n const b = parseInt(hex.substring(5, 7), 16);\r\n const a = hex.length === 9 ? parseInt(hex.substring(7, 9), 16) : 255;\r\n\r\n return Color4.FromInts(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 object set with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @returns a new Color4 object\r\n */\r\n public static Lerp(left: DeepImmutable<Color4>, right: DeepImmutable<Color4>, amount: number): Color4 {\r\n const result = new Color4(0.0, 0.0, 0.0, 0.0);\r\n Color4.LerpToRef(left, right, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the given \"result\" with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\r\n * @param left defines the start value\r\n * @param right defines the end value\r\n * @param amount defines the gradient factor\r\n * @param result defines the Color4 object where to store data\r\n */\r\n public static LerpToRef(left: DeepImmutable<Color4>, right: DeepImmutable<Color4>, amount: number, result: Color4): void {\r\n result.r = left.r + (right.r - left.r) * amount;\r\n result.g = left.g + (right.g - left.g) * amount;\r\n result.b = left.b + (right.b - left.b) * amount;\r\n result.a = left.a + (right.a - left.a) * amount;\r\n }\r\n\r\n /**\r\n * Interpolate between two Color4 using Hermite interpolation\r\n * @param value1 defines first Color4\r\n * @param tangent1 defines the incoming tangent\r\n * @param value2 defines second Color4\r\n * @param tangent2 defines the outgoing tangent\r\n * @param amount defines the target Color4\r\n * @returns the new interpolated Color4\r\n */\r\n public static Hermite(value1: DeepImmutable<Color4>, tangent1: DeepImmutable<Color4>, value2: DeepImmutable<Color4>, tangent2: DeepImmutable<Color4>, amount: number): Color4 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const r = value1.r * part1 + value2.r * part2 + tangent1.r * part3 + tangent2.r * part4;\r\n const g = value1.g * part1 + value2.g * part2 + tangent1.g * part3 + tangent2.g * part4;\r\n const b = value1.b * part1 + value2.b * part2 + tangent1.b * part3 + tangent2.b * part4;\r\n const a = value1.a * part1 + value2.a * part2 + tangent1.a * part3 + tangent2.a * part4;\r\n return new Color4(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Returns a new Color4 which is the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Color4>,\r\n tangent1: DeepImmutable<Color4>,\r\n value2: DeepImmutable<Color4>,\r\n tangent2: DeepImmutable<Color4>,\r\n time: number\r\n ): Color4 {\r\n const result = new Color4();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Color4 with the 1st derivative of the Hermite spline defined by the colors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Color4>,\r\n tangent1: DeepImmutable<Color4>,\r\n value2: DeepImmutable<Color4>,\r\n tangent2: DeepImmutable<Color4>,\r\n time: number,\r\n result: Color4\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.r = (t2 - time) * 6 * value1.r + (3 * t2 - 4 * time + 1) * tangent1.r + (-t2 + time) * 6 * value2.r + (3 * t2 - 2 * time) * tangent2.r;\r\n result.g = (t2 - time) * 6 * value1.g + (3 * t2 - 4 * time + 1) * tangent1.g + (-t2 + time) * 6 * value2.g + (3 * t2 - 2 * time) * tangent2.g;\r\n result.b = (t2 - time) * 6 * value1.b + (3 * t2 - 4 * time + 1) * tangent1.b + (-t2 + time) * 6 * value2.b + (3 * t2 - 2 * time) * tangent2.b;\r\n result.a = (t2 - time) * 6 * value1.a + (3 * t2 - 4 * time + 1) * tangent1.a + (-t2 + time) * 6 * value2.a + (3 * t2 - 2 * time) * tangent2.a;\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from a Color3 and an alpha value\r\n * @param color3 defines the source Color3 to read from\r\n * @param alpha defines the alpha component (1.0 by default)\r\n * @returns a new Color4 object\r\n */\r\n public static FromColor3(color3: DeepImmutable<Color3>, alpha: number = 1.0): Color4 {\r\n return new Color4(color3.r, color3.g, color3.b, alpha);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @returns a new Color4 object\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Color4 {\r\n return new Color4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n\r\n /**\r\n * Creates a new Color4 from the starting index element of the given array\r\n * @param array defines the source array to read from\r\n * @param offset defines the offset in the source array\r\n * @param result defines the target Color4 object\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number = 0, result: Color4) {\r\n result.r = array[offset];\r\n result.g = array[offset + 1];\r\n result.b = array[offset + 2];\r\n result.a = array[offset + 3];\r\n }\r\n\r\n /**\r\n * Creates a new Color3 from integer values (< 256)\r\n * @param r defines the red component to read from (value between 0 and 255)\r\n * @param g defines the green component to read from (value between 0 and 255)\r\n * @param b defines the blue component to read from (value between 0 and 255)\r\n * @param a defines the alpha component to read from (value between 0 and 255)\r\n * @returns a new Color3 object\r\n */\r\n public static FromInts(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(r / 255.0, g / 255.0, b / 255.0, a / 255.0);\r\n }\r\n\r\n /**\r\n * Check the content of a given array and convert it to an array containing RGBA data\r\n * If the original array was already containing count * 4 values then it is returned directly\r\n * @param colors defines the array to check\r\n * @param count defines the number of RGBA data to expect\r\n * @returns an array containing count * 4 values (RGBA)\r\n */\r\n public static CheckColors4(colors: number[], count: number): number[] {\r\n // Check if color3 was used\r\n if (colors.length === count * 3) {\r\n const colors4 = [];\r\n for (let index = 0; index < colors.length; index += 3) {\r\n const newIndex = (index / 3) * 4;\r\n colors4[newIndex] = colors[index];\r\n colors4[newIndex + 1] = colors[index + 1];\r\n colors4[newIndex + 2] = colors[index + 2];\r\n colors4[newIndex + 3] = 1.0;\r\n }\r\n\r\n return colors4;\r\n }\r\n\r\n return colors;\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n */\r\nexport class TmpColors {\r\n public static Color3: Color3[] = ArrayTools.BuildArray(3, Color3.Black);\r\n public static Color4: Color4[] = ArrayTools.BuildArray(3, () => new Color4(0, 0, 0, 0));\r\n}\r\n\r\nRegisterClass(\"BABYLON.Color3\", Color3);\r\nRegisterClass(\"BABYLON.Color4\", Color4);\r\n"]}
@@ -1475,7 +1475,7 @@ var AbstractMesh = /** @class */ (function (_super) {
1475
1475
  this._boundingInfo.update(this.worldMatrixFromCache);
1476
1476
  }
1477
1477
  else {
1478
- this._boundingInfo = new BoundingInfo(this.position, this.position, this.worldMatrixFromCache);
1478
+ this._boundingInfo = new BoundingInfo(Vector3.Zero(), Vector3.Zero(), this.worldMatrixFromCache);
1479
1479
  }
1480
1480
  this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache);
1481
1481
  return this;