@babylonjs/core 7.39.0 → 7.39.2

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 (167) hide show
  1. package/Cameras/arcRotateCamera.d.ts +1 -1
  2. package/Cameras/arcRotateCamera.js.map +1 -1
  3. package/Cameras/targetCamera.js +6 -0
  4. package/Cameras/targetCamera.js.map +1 -1
  5. package/Debug/directionalLightFrustumViewer.d.ts +2 -1
  6. package/Debug/directionalLightFrustumViewer.js +4 -3
  7. package/Debug/directionalLightFrustumViewer.js.map +1 -1
  8. package/Engines/Extensions/engine.multiRender.js +1 -0
  9. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  10. package/Engines/abstractEngine.js +2 -2
  11. package/Engines/abstractEngine.js.map +1 -1
  12. package/Engines/constants.d.ts +8 -0
  13. package/Engines/constants.js +8 -0
  14. package/Engines/constants.js.map +1 -1
  15. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +3 -9
  16. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -1
  17. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +3 -9
  18. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
  19. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +3 -9
  20. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -1
  21. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +5 -17
  22. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -1
  23. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +5 -17
  24. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -1
  25. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +3 -9
  26. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -1
  27. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +6 -1
  28. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +40 -20
  29. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  30. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.d.ts +77 -0
  31. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +250 -0
  32. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -0
  33. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.d.ts +57 -0
  34. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +169 -0
  35. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js.map +1 -0
  36. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js +3 -9
  37. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js.map +1 -1
  38. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +4 -13
  39. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  40. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +6 -0
  41. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +27 -0
  42. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -1
  43. package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.d.ts +19 -0
  44. package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js +28 -0
  45. package/FrameGraph/Node/Blocks/Rendering/shadowGeneratorBlock.js.map +1 -0
  46. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +3 -9
  47. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
  48. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +3 -9
  49. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -1
  50. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +2 -5
  51. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -1
  52. package/FrameGraph/Node/Blocks/executeBlock.d.ts +29 -0
  53. package/FrameGraph/Node/Blocks/executeBlock.js +43 -0
  54. package/FrameGraph/Node/Blocks/executeBlock.js.map +1 -0
  55. package/FrameGraph/Node/Blocks/index.d.ts +4 -0
  56. package/FrameGraph/Node/Blocks/index.js +4 -0
  57. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  58. package/FrameGraph/Node/Blocks/inputBlock.d.ts +7 -2
  59. package/FrameGraph/Node/Blocks/inputBlock.js +13 -0
  60. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
  61. package/FrameGraph/Node/Blocks/resourceContainerBlock.d.ts +55 -0
  62. package/FrameGraph/Node/Blocks/resourceContainerBlock.js +97 -0
  63. package/FrameGraph/Node/Blocks/resourceContainerBlock.js.map +1 -0
  64. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +13 -10
  65. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +11 -4
  66. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
  67. package/FrameGraph/Node/nodeRenderGraph.js +32 -4
  68. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  69. package/FrameGraph/Node/nodeRenderGraphBlock.d.ts +1 -0
  70. package/FrameGraph/Node/nodeRenderGraphBlock.js +11 -0
  71. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
  72. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +18 -0
  73. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +24 -0
  74. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -1
  75. package/FrameGraph/Passes/cullPass.d.ts +1 -1
  76. package/FrameGraph/Passes/cullPass.js.map +1 -1
  77. package/FrameGraph/Tasks/Misc/executeTask.d.ts +22 -0
  78. package/FrameGraph/Tasks/Misc/executeTask.js +28 -0
  79. package/FrameGraph/Tasks/Misc/executeTask.js.map +1 -0
  80. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.d.ts +72 -0
  81. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js +183 -0
  82. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js.map +1 -0
  83. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +16 -5
  84. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +46 -0
  85. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  86. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.d.ts +107 -0
  87. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js +264 -0
  88. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js.map +1 -0
  89. package/FrameGraph/Tasks/Texture/clearTextureTask.js +7 -0
  90. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  91. package/FrameGraph/frameGraph.d.ts +9 -0
  92. package/FrameGraph/frameGraph.js +12 -3
  93. package/FrameGraph/frameGraph.js.map +1 -1
  94. package/FrameGraph/frameGraphTextureManager.js +4 -1
  95. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  96. package/FrameGraph/index.d.ts +5 -0
  97. package/FrameGraph/index.js +5 -0
  98. package/FrameGraph/index.js.map +1 -1
  99. package/Inputs/scene.inputManager.d.ts +1 -1
  100. package/Inputs/scene.inputManager.js +8 -1
  101. package/Inputs/scene.inputManager.js.map +1 -1
  102. package/Lights/Shadows/shadowGenerator.d.ts +1 -1
  103. package/Lights/Shadows/shadowGenerator.js +2 -7
  104. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  105. package/Lights/directionalLight.d.ts +5 -4
  106. package/Lights/directionalLight.js +7 -9
  107. package/Lights/directionalLight.js.map +1 -1
  108. package/Lights/shadowLight.d.ts +4 -4
  109. package/Lights/shadowLight.js +3 -2
  110. package/Lights/shadowLight.js.map +1 -1
  111. package/Lights/spotLight.d.ts +2 -2
  112. package/Lights/spotLight.js +3 -2
  113. package/Lights/spotLight.js.map +1 -1
  114. package/Loading/sceneLoader.d.ts +1 -1
  115. package/Loading/sceneLoader.js.map +1 -1
  116. package/Materials/GreasedLine/greasedLinePluginMaterial.js +1 -1
  117. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  118. package/Materials/PBR/pbrMetallicRoughnessMaterial.js +18 -6
  119. package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
  120. package/Materials/PBR/pbrSpecularGlossinessMaterial.js +18 -6
  121. package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
  122. package/Materials/Textures/renderTargetTexture.d.ts +2 -0
  123. package/Materials/Textures/renderTargetTexture.js +18 -8
  124. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  125. package/Materials/material.d.ts +1 -4
  126. package/Materials/material.js +29 -24
  127. package/Materials/material.js.map +1 -1
  128. package/Materials/materialPluginBase.d.ts +4 -0
  129. package/Materials/materialPluginBase.js +4 -0
  130. package/Materials/materialPluginBase.js.map +1 -1
  131. package/Maths/math.color.js.map +1 -1
  132. package/Maths/math.vector.js.map +1 -1
  133. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +5 -3
  134. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +14 -15
  135. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  136. package/Meshes/abstractMesh.js +7 -0
  137. package/Meshes/abstractMesh.js.map +1 -1
  138. package/Meshes/lattice.material.d.ts +3 -8
  139. package/Meshes/lattice.material.js.map +1 -1
  140. package/Misc/copyTextureToTexture.js +1 -1
  141. package/Misc/copyTextureToTexture.js.map +1 -1
  142. package/Misc/filesInput.d.ts +3 -1
  143. package/Misc/filesInput.js +8 -4
  144. package/Misc/filesInput.js.map +1 -1
  145. package/PostProcesses/postProcess.d.ts +2 -2
  146. package/PostProcesses/postProcess.js +4 -4
  147. package/PostProcesses/postProcess.js.map +1 -1
  148. package/PostProcesses/postProcessManager.js +1 -1
  149. package/PostProcesses/postProcessManager.js.map +1 -1
  150. package/Rendering/objectRenderer.js +8 -0
  151. package/Rendering/objectRenderer.js.map +1 -1
  152. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +1 -1
  153. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  154. package/Shaders/default.fragment.js +2 -1
  155. package/Shaders/default.fragment.js.map +1 -1
  156. package/Shaders/default.vertex.js +2 -1
  157. package/Shaders/default.vertex.js.map +1 -1
  158. package/Shaders/pbr.fragment.js +2 -1
  159. package/Shaders/pbr.fragment.js.map +1 -1
  160. package/Shaders/pbr.vertex.js +2 -1
  161. package/Shaders/pbr.vertex.js.map +1 -1
  162. package/XR/webXRCamera.js +3 -0
  163. package/XR/webXRCamera.js.map +1 -1
  164. package/package.json +1 -1
  165. package/scene.d.ts +7 -0
  166. package/scene.js +10 -1
  167. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"math.color.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGtE,SAAS,yBAAyB,CAAC,KAAa;IAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,8BAA8B,CAAC,KAAa;IACjD,IAAI,KAAK,IAAI,OAAO,EAAE,CAAC;QACnB,OAAO,YAAY,GAAG,KAAK,CAA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I,yBAAkB,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAA0B,CAAC;AAy2BxF,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE;IACtC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;IACzB,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,OAAO,SAAS;;AACJ,gBAAM,GAAa,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/C,gBAAM,GAAa,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAGjF,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACxC,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import { BuildArray } from \"../Misc/arrayTools\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { DeepImmutable, FloatArray, Tuple } from \"../types\";\r\nimport { Epsilon, ToGammaSpace, ToLinearSpace } from \"./math.constants\";\r\nimport type { IColor3Like, IColor4Like } from \"./math.like\";\r\nimport { Clamp, ToHex, WithinEpsilon } from \"./math.scalar.functions\";\r\nimport type { Tensor } from \"./tensor\";\r\n\r\nfunction colorChannelToLinearSpace(color: number): number {\r\n return Math.pow(color, ToLinearSpace);\r\n}\r\n\r\nfunction colorChannelToLinearSpaceExact(color: number): number {\r\n if (color <= 0.04045) {\r\n return 0.0773993808 * color;\r\n }\r\n return Math.pow(0.947867299 * (color + 0.055), 2.4);\r\n}\r\n\r\nfunction colorChannelToGammaSpace(color: number): number {\r\n return Math.pow(color, ToGammaSpace);\r\n}\r\n\r\nfunction colorChannelToGammaSpaceExact(color: number): number {\r\n if (color <= 0.0031308) {\r\n return 12.92 * color;\r\n }\r\n return 1.055 * Math.pow(color, 0.41666) - 0.055;\r\n}\r\n\r\n/**\r\n * Class used to hold a RGB color\r\n */\r\nexport class Color3 implements Tensor<Tuple<number, 3>, IColor3Like>, IColor3Like {\r\n /**\r\n * If the first color is flagged with integers (as everything is 0,0,0), V8 stores all of the properties as integers internally because it doesn't know any better yet.\r\n * If subsequent colors are created with non-integer values, V8 determines that it would be best to represent these properties as doubles instead of integers,\r\n * and henceforth it will use floating-point representation for all color instances that it creates.\r\n * But the original color instances are unchanged and has a \"deprecated map\".\r\n * If we keep using the color instances from step 1, it will now be a poison pill which will mess up optimizations in any code it touches.\r\n */\r\n static _V8PerformanceHack = new Color3(0.5, 0.5, 0.5) as DeepImmutable<Color3>;\r\n /**\r\n * @see Tensor.dimension\r\n */\r\n public declare readonly dimension: [3];\r\n\r\n /**\r\n * @see Tensor.rank\r\n */\r\n public declare readonly rank: 1;\r\n\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 * [0] Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * [0] Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * [0] 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): this {\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): this {\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(): Tuple<number, 3> {\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<IColor3Like>): 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 result Color3\r\n */\r\n public multiplyToRef<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\r\n }\r\n\r\n /**\r\n * Multiplies the current Color3 coordinates by the given ones\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public multiplyInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r *= otherColor.r;\r\n this.g *= otherColor.g;\r\n this.b *= otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the result of the multiplication of the current Color3 coordinates by the given floats\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the new Color3\r\n */\r\n public multiplyByFloats(r: number, g: number, b: number): Color3 {\r\n return new Color3(this.r * r, this.g * g, this.b * b);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divide(_other: DeepImmutable<IColor3Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideToRef(_other: DeepImmutable<IColor3Like>, _result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideInPlace(_other: DeepImmutable<IColor3Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the minimal coordinate values between its and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public minimizeInPlace(other: DeepImmutable<IColor3Like>): this {\r\n return this.minimizeInPlaceFromFloats(other.r, other.g, other.b);\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the maximal coordinate values between its and the given color ones.\r\n * @param other defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public maximizeInPlace(other: DeepImmutable<IColor3Like>): this {\r\n return this.maximizeInPlaceFromFloats(other.r, other.g, other.b);\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the minimal coordinate values between its and the given coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public minimizeInPlaceFromFloats(r: number, g: number, b: number): this {\r\n this.r = Math.min(r, this.r);\r\n this.g = Math.min(g, this.g);\r\n this.b = Math.min(b, this.b);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the maximal coordinate values between its and the given coordinates.\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public maximizeInPlaceFromFloats(r: number, g: number, b: number): this {\r\n this.r = Math.max(r, this.r);\r\n this.g = Math.max(g, this.g);\r\n this.b = Math.max(b, this.b);\r\n return this;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floorToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floor(): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fractToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fract(): never {\r\n throw new ReferenceError(\"Can not fract a color\");\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<IColor3Like>): 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 * Alias for equalsToFloats\r\n * @param r red color component\r\n * @param g green color component\r\n * @param b blue color component\r\n * @returns boolean\r\n */\r\n public equalsFloats(r: number, g: number, b: number): boolean {\r\n return this.equalsToFloats(r, g, 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 equalsToFloats(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 * Returns true if the current Color3 and the given color coordinates are distant less than epsilon\r\n * @param otherColor defines the second operand\r\n * @param epsilon defines the minimal distance to define values as equals\r\n * @returns true if both colors are distant less than epsilon\r\n */\r\n public equalsWithEpsilon(otherColor: DeepImmutable<IColor3Like>, epsilon: number = Epsilon): boolean {\r\n return WithinEpsilon(this.r, otherColor.r, epsilon) && WithinEpsilon(this.g, otherColor.g, epsilon) && WithinEpsilon(this.b, otherColor.b, epsilon);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negate(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateInPlace(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with the current Color3 values multiplied by scale\r\n * @param scale defines the scaling factor to apply\r\n * @returns a new Color3 object\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 Color3 values by the float \"scale\"\r\n * @param scale defines the scaling factor to apply\r\n * @returns the current updated Color3\r\n */\r\n public scaleInPlace(scale: number): this {\r\n this.r *= scale;\r\n this.g *= scale;\r\n this.b *= scale;\r\n return this;\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 result Color3\r\n */\r\n public scaleToRef<T extends IColor3Like>(scale: number, result: T): T {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n return result;\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 result Color3\r\n */\r\n public scaleAndAddToRef<T extends IColor3Like>(scale: number, result: T): T {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n return result;\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 result Color3\r\n */\r\n public clampToRef<T extends IColor3Like>(min: number = 0, max: number = 1, result: T): T {\r\n result.r = Clamp(this.r, min, max);\r\n result.g = Clamp(this.g, min, max);\r\n result.b = Clamp(this.b, min, max);\r\n return result;\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<IColor3Like>): 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 * Adds the given color to the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public addInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r += otherColor.r;\r\n this.g += otherColor.g;\r\n this.b += otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Color3\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public addInPlaceFromFloats(r: number, g: number, b: number): this {\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 * 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<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\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<IColor3Like>): 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<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\r\n }\r\n\r\n /**\r\n * Subtract the given color from the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public subtractInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r -= otherColor.r;\r\n this.g -= otherColor.g;\r\n this.b -= otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the subtraction of the given floats from the current Color3 coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the resulting Color3\r\n */\r\n public subtractFromFloats(r: number, g: number, b: number): Color3 {\r\n return new Color3(this.r - r, this.g - g, this.b - b);\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current Color3 coordinates and set the given color \"result\" with this result\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the result\r\n */\r\n public subtractFromFloatsToRef<T extends IColor3Like>(r: number, g: number, b: number, result: T): T {\r\n result.r = this.r - r;\r\n result.g = this.g - g;\r\n result.b = this.b - b;\r\n return result;\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<IColor3Like>): this {\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): this {\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): this {\r\n return this.copyFromFloats(r, g, b);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Color3 coordinates\r\n * @param v defines the r, g and b coordinates of the operand\r\n * @returns the current updated Color3\r\n */\r\n public setAll(v: number): this {\r\n this.r = this.g = this.b = v;\r\n return this;\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 \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB);\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the string containing valid hexadecimal values\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns the current Color3 object\r\n */\r\n public fromHexString(hex: string): this {\r\n if (hex.substring(0, 1) !== \"#\" || hex.length !== 7) {\r\n return this;\r\n }\r\n\r\n this.r = parseInt(hex.substring(1, 3), 16) / 255;\r\n this.g = parseInt(hex.substring(3, 5), 16) / 255;\r\n this.b = parseInt(hex.substring(5, 7), 16) / 255;\r\n\r\n return this;\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 return this.toHSVToRef(new Color3());\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 * @returns the updated result\r\n */\r\n public toHSVToRef<T extends IColor3Like>(result: T): T {\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 return result;\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to linear space\r\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color3 object\r\n */\r\n public toLinearSpace(exact = false): Color3 {\r\n const convertedColor = new Color3();\r\n this.toLinearSpaceToRef(convertedColor, exact);\r\n return convertedColor;\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color3\r\n */\r\n public toLinearSpaceToRef(convertedColor: IColor3Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\r\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\r\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToLinearSpace(this.r);\r\n convertedColor.g = colorChannelToLinearSpace(this.g);\r\n convertedColor.b = colorChannelToLinearSpace(this.b);\r\n }\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color3 object\r\n */\r\n public toGammaSpace(exact = false): Color3 {\r\n const convertedColor = new Color3();\r\n this.toGammaSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color3\r\n */\r\n public toGammaSpaceToRef(convertedColor: IColor3Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\r\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\r\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToGammaSpace(this.r);\r\n convertedColor.g = colorChannelToGammaSpace(this.g);\r\n convertedColor.b = colorChannelToGammaSpace(this.b);\r\n }\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 * Converts Hue, saturation and value to a Color3 (RGB)\r\n * @param hue defines the hue (value between 0 and 360)\r\n * @param saturation defines the saturation (value between 0 and 1)\r\n * @param value defines the value (value between 0 and 1)\r\n * @param result defines the Color3 where to store the RGB values\r\n * @returns the updated result\r\n */\r\n public static HSVtoRGBToRef<T extends IColor3Like>(hue: number, saturation: number, value: number, result: T): T {\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.r = r + m;\r\n result.g = g + m;\r\n result.b = b + m;\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts Hue, saturation and value to a new Color3 (RGB)\r\n * @param hue defines the hue (value between 0 and 360)\r\n * @param saturation defines the saturation (value between 0 and 1)\r\n * @param value defines the value (value between 0 and 1)\r\n * @returns a new Color3 object\r\n */\r\n public static FromHSV(hue: number, saturation: number, value: number): Color3 {\r\n const result = new Color3(0, 0, 0);\r\n Color3.HSVtoRGBToRef(hue, saturation, value, result);\r\n return result;\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 return new Color3(0, 0, 0).fromHexString(hex);\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\nObject.defineProperties(Color3.prototype, {\r\n dimension: { value: [3] },\r\n rank: { value: 1 },\r\n});\r\n\r\n/**\r\n * Class used to hold a RBGA color\r\n */\r\nexport class Color4 implements Tensor<Tuple<number, 4>, IColor4Like>, IColor4Like {\r\n /**\r\n * If the first color is flagged with integers (as everything is 0,0,0,0), V8 stores all of the properties as integers internally because it doesn't know any better yet.\r\n * If subsequent colors are created with non-integer values, V8 determines that it would be best to represent these properties as doubles instead of integers,\r\n * and henceforth it will use floating-point representation for all color instances that it creates.\r\n * But the original color instances are unchanged and has a \"deprecated map\".\r\n * If we keep using the color instances from step 1, it will now be a poison pill which will mess up optimizations in any code it touches.\r\n */\r\n static _V8PerformanceHack = new Color4(0.5, 0.5, 0.5, 0.5) as DeepImmutable<Color4>;\r\n /**\r\n * @see Tensor.dimension\r\n */\r\n public declare readonly dimension: [4];\r\n\r\n /**\r\n * @see Tensor.rank\r\n */\r\n public declare readonly rank: 1;\r\n\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 * [0] Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * [0] Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * [0] Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0,\r\n /**\r\n * [1] 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 * 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(): Tuple<number, 4> {\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): this {\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): this {\r\n this.r = array[offset];\r\n this.g = array[offset + 1];\r\n this.b = array[offset + 2];\r\n this.a = array[offset + 3];\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<IColor4Like>): 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 otherColor defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public add(otherColor: DeepImmutable<IColor4Like>): Color4 {\r\n return new Color4(this.r + otherColor.r, this.g + otherColor.g, this.b + otherColor.b, this.a + otherColor.a);\r\n }\r\n\r\n /**\r\n * Updates the given color \"result\" with the result of the addition of the current Color4 and the given one.\r\n * @param otherColor the color to add\r\n * @param result the color to store the result\r\n * @returns result input\r\n */\r\n public addToRef<T extends IColor4Like>(otherColor: DeepImmutable<IColor4Like>, result: T): T {\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 result.a = this.a + otherColor.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Adds in place the given Color4 values to the current Color4 object\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color4 object\r\n */\r\n public addInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r += otherColor.r;\r\n this.g += otherColor.g;\r\n this.b += otherColor.b;\r\n this.a += otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Color4\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public addInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\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 * Creates a new Color4 set with the subtracted values of the given one from the current Color4\r\n * @param otherColor defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public subtract(otherColor: DeepImmutable<IColor4Like>): Color4 {\r\n return new Color4(this.r - otherColor.r, this.g - otherColor.g, this.b - otherColor.b, this.a - otherColor.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 otherColor defines the second operand\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the result Color4 object\r\n */\r\n public subtractToRef<T extends IColor4Like>(otherColor: DeepImmutable<IColor4Like>, result: T): T {\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 result.a = this.a - otherColor.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Subtract in place the given color from the current Color4.\r\n * @param otherColor the color to subtract\r\n * @returns the updated Color4.\r\n */\r\n public subtractInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r -= otherColor.r;\r\n this.g -= otherColor.g;\r\n this.b -= otherColor.b;\r\n this.a -= otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 set with the result of the subtraction of the given floats from the current Color4 coordinates.\r\n * @param r value to subtract\r\n * @param g value to subtract\r\n * @param b value to subtract\r\n * @param a value to subtract\r\n * @returns new color containing the result\r\n */\r\n public subtractFromFloats(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(this.r - r, this.g - g, this.b - b, this.a - a);\r\n }\r\n\r\n /**\r\n * Sets the given color \"result\" set with the result of the subtraction of the given floats from the current Color4 coordinates.\r\n * @param r value to subtract\r\n * @param g value to subtract\r\n * @param b value to subtract\r\n * @param a value to subtract\r\n * @param result the color to store the result in\r\n * @returns result input\r\n */\r\n public subtractFromFloatsToRef<T extends IColor4Like>(r: number, g: number, b: number, a: number, result: T): T {\r\n result.r = this.r - r;\r\n result.g = this.g - g;\r\n result.b = this.b - b;\r\n result.a = this.a - a;\r\n return result;\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 Color4 values by the float \"scale\"\r\n * @param scale defines the scaling factor to apply\r\n * @returns the current updated Color4\r\n */\r\n public scaleInPlace(scale: number): this {\r\n this.r *= scale;\r\n this.g *= scale;\r\n this.b *= scale;\r\n this.a *= scale;\r\n return this;\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 result Color4\r\n */\r\n public scaleToRef<T extends IColor4Like>(scale: number, result: T): T {\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 result;\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 result Color4\r\n */\r\n public scaleAndAddToRef<T extends IColor4Like>(scale: number, result: T): T {\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 result;\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 result Color4\r\n */\r\n public clampToRef<T extends IColor4Like>(min: number = 0, max: number = 1, result: T): T {\r\n result.r = Clamp(this.r, min, max);\r\n result.g = Clamp(this.g, min, max);\r\n result.b = Clamp(this.b, min, max);\r\n result.a = Clamp(this.a, min, max);\r\n return result;\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: DeepImmutable<IColor4Like>): 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<T extends IColor4Like>(color: DeepImmutable<IColor4Like>, result: T): T {\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 * Multiplies in place the current Color4 by the given one.\r\n * @param otherColor color to multiple with\r\n * @returns the updated Color4.\r\n */\r\n public multiplyInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r *= otherColor.r;\r\n this.g *= otherColor.g;\r\n this.b *= otherColor.b;\r\n this.a *= otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 set with the multiplication result of the given floats and the current Color4 coordinates.\r\n * @param r value multiply with\r\n * @param g value multiply with\r\n * @param b value multiply with\r\n * @param a value multiply with\r\n * @returns resulting new color\r\n */\r\n public multiplyByFloats(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(this.r * r, this.g * g, this.b * b, this.a * a);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divide(_other: DeepImmutable<IColor4Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideToRef(_other: DeepImmutable<IColor4Like>, _result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideInPlace(_other: DeepImmutable<IColor4Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * Updates the Color4 coordinates with the minimum values between its own and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color4\r\n */\r\n public minimizeInPlace(other: DeepImmutable<IColor4Like>): this {\r\n this.r = Math.min(this.r, other.r);\r\n this.g = Math.min(this.g, other.g);\r\n this.b = Math.min(this.b, other.b);\r\n this.a = Math.min(this.a, other.a);\r\n return this;\r\n }\r\n /**\r\n * Updates the Color4 coordinates with the maximum values between its own and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color4\r\n */\r\n public maximizeInPlace(other: DeepImmutable<IColor4Like>): this {\r\n this.r = Math.max(this.r, other.r);\r\n this.g = Math.max(this.g, other.g);\r\n this.b = Math.max(this.b, other.b);\r\n this.a = Math.max(this.a, other.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color4 with the minimal coordinate values between its and the given coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public minimizeInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\r\n this.r = Math.min(r, this.r);\r\n this.g = Math.min(g, this.g);\r\n this.b = Math.min(b, this.b);\r\n this.a = Math.min(a, this.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color4 with the maximal coordinate values between its and the given coordinates.\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public maximizeInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\r\n this.r = Math.max(r, this.r);\r\n this.g = Math.max(g, this.g);\r\n this.b = Math.max(b, this.b);\r\n this.a = Math.max(a, this.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floorToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floor(): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fractToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fract(): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negate(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateInPlace(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Color4 coordinates are each beneath the distance \"epsilon\" from the given color ones.\r\n * @param otherColor color to compare against\r\n * @param epsilon (Default: very small number)\r\n * @returns true if they are equal\r\n */\r\n public equalsWithEpsilon(otherColor: DeepImmutable<IColor4Like>, epsilon: number = Epsilon): boolean {\r\n return (\r\n WithinEpsilon(this.r, otherColor.r, epsilon) &&\r\n WithinEpsilon(this.g, otherColor.g, epsilon) &&\r\n WithinEpsilon(this.b, otherColor.b, epsilon) &&\r\n WithinEpsilon(this.a, otherColor.a, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Boolean : True if the given floats are strictly equal to the current Color4 coordinates.\r\n * @param x x value to compare against\r\n * @param y y value to compare against\r\n * @param z z value to compare against\r\n * @param w w value to compare against\r\n * @returns true if equal\r\n */\r\n public equalsToFloats(x: number, y: number, z: number, w: number): boolean {\r\n return this.r === x && this.g === y && this.b === z && this.a === w;\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 const result = new Color4();\r\n return result.copyFrom(this);\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: DeepImmutable<IColor4Like>): this {\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): this {\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): this {\r\n return this.copyFromFloats(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector4 coordinates\r\n * @param v defines the r, g, b, and a coordinates of the operand\r\n * @returns the current updated Vector4\r\n */\r\n public setAll(v: number): this {\r\n this.r = this.g = this.b = this.a = v;\r\n return this;\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 \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB);\r\n }\r\n\r\n const intA = Math.round(this.a * 255);\r\n return \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB) + ToHex(intA);\r\n }\r\n\r\n /**\r\n * Updates the Color4 rgba values 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 keeps\r\n * its previous alpha value.\r\n *\r\n * An invalid string does not modify this object\r\n *\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns the current updated Color4 object\r\n */\r\n public fromHexString(hex: string): this {\r\n if (hex.substring(0, 1) !== \"#\" || (hex.length !== 9 && hex.length !== 7)) {\r\n return this;\r\n }\r\n\r\n this.r = parseInt(hex.substring(1, 3), 16) / 255;\r\n this.g = parseInt(hex.substring(3, 5), 16) / 255;\r\n this.b = parseInt(hex.substring(5, 7), 16) / 255;\r\n if (hex.length === 9) {\r\n this.a = parseInt(hex.substring(7, 9), 16) / 255;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to linear space\r\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color4 object\r\n */\r\n public toLinearSpace(exact = false): Color4 {\r\n const convertedColor = new Color4();\r\n this.toLinearSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color4\r\n */\r\n public toLinearSpaceToRef(convertedColor: IColor4Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\r\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\r\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToLinearSpace(this.r);\r\n convertedColor.g = colorChannelToLinearSpace(this.g);\r\n convertedColor.b = colorChannelToLinearSpace(this.b);\r\n }\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color4 object\r\n */\r\n public toGammaSpace(exact = false): Color4 {\r\n const convertedColor = new Color4();\r\n this.toGammaSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color4\r\n */\r\n public toGammaSpaceToRef(convertedColor: IColor4Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\r\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\r\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToGammaSpace(this.r);\r\n convertedColor.g = colorChannelToGammaSpace(this.g);\r\n convertedColor.b = colorChannelToGammaSpace(this.b);\r\n }\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 return new Color4(0.0, 0.0, 0.0, 1.0).fromHexString(hex);\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<IColor4Like>, right: DeepImmutable<IColor4Like>, amount: number): Color4 {\r\n return Color4.LerpToRef(left, right, amount, new Color4());\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 * @returns the updated result\r\n */\r\n public static LerpToRef<T extends IColor4Like>(left: DeepImmutable<IColor4Like>, right: DeepImmutable<IColor4Like>, amount: number, result: T): T {\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 return result;\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(\r\n value1: DeepImmutable<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\r\n amount: number\r\n ): 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<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\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<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\r\n time: number,\r\n result: IColor4Like\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<IColor3Like>, 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 (less than 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\nObject.defineProperties(Color4.prototype, {\r\n dimension: { value: [4] },\r\n rank: { value: 1 },\r\n});\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class TmpColors {\r\n public static Color3: Color3[] = BuildArray(3, Color3.Black);\r\n public static Color4: Color4[] = 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":["../../../../dev/core/src/Maths/math.color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;A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AC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;YAChC,CAAC;YAED,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;;AA92BD;;;;;;GAMG;AACI,yBAAkB,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAA0B,CAAC;AAy2BxF,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE;IACtC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;IACzB,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,OAAO,SAAS;;AACJ,gBAAM,GAAa,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/C,gBAAM,GAAa,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAGjF,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACxC,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import { BuildArray } from \"../Misc/arrayTools\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { DeepImmutable, FloatArray, Tuple } from \"../types\";\r\nimport { Epsilon, ToGammaSpace, ToLinearSpace } from \"./math.constants\";\r\nimport type { IColor3Like, IColor4Like } from \"./math.like\";\r\nimport { Clamp, ToHex, WithinEpsilon } from \"./math.scalar.functions\";\r\nimport type { Tensor } from \"./tensor\";\r\n\r\nfunction colorChannelToLinearSpace(color: number): number {\r\n return Math.pow(color, ToLinearSpace);\r\n}\r\n\r\nfunction colorChannelToLinearSpaceExact(color: number): number {\r\n if (color <= 0.04045) {\r\n return 0.0773993808 * color;\r\n }\r\n return Math.pow(0.947867299 * (color + 0.055), 2.4);\r\n}\r\n\r\nfunction colorChannelToGammaSpace(color: number): number {\r\n return Math.pow(color, ToGammaSpace);\r\n}\r\n\r\nfunction colorChannelToGammaSpaceExact(color: number): number {\r\n if (color <= 0.0031308) {\r\n return 12.92 * color;\r\n }\r\n return 1.055 * Math.pow(color, 0.41666) - 0.055;\r\n}\r\n\r\n/**\r\n * Class used to hold a RGB color\r\n */\r\nexport class Color3 implements Tensor<Tuple<number, 3>, IColor3Like>, IColor3Like {\r\n /**\r\n * If the first color is flagged with integers (as everything is 0,0,0), V8 stores all of the properties as integers internally because it doesn't know any better yet.\r\n * If subsequent colors are created with non-integer values, V8 determines that it would be best to represent these properties as doubles instead of integers,\r\n * and henceforth it will use floating-point representation for all color instances that it creates.\r\n * But the original color instances are unchanged and has a \"deprecated map\".\r\n * If we keep using the color instances from step 1, it will now be a poison pill which will mess up optimizations in any code it touches.\r\n */\r\n static _V8PerformanceHack = new Color3(0.5, 0.5, 0.5) as DeepImmutable<Color3>;\r\n /**\r\n * @see Tensor.dimension\r\n */\r\n declare public readonly dimension: [3];\r\n\r\n /**\r\n * @see Tensor.rank\r\n */\r\n declare public readonly rank: 1;\r\n\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 * [0] Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * [0] Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * [0] 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): this {\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): this {\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(): Tuple<number, 3> {\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<IColor3Like>): 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 result Color3\r\n */\r\n public multiplyToRef<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\r\n }\r\n\r\n /**\r\n * Multiplies the current Color3 coordinates by the given ones\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public multiplyInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r *= otherColor.r;\r\n this.g *= otherColor.g;\r\n this.b *= otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the result of the multiplication of the current Color3 coordinates by the given floats\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the new Color3\r\n */\r\n public multiplyByFloats(r: number, g: number, b: number): Color3 {\r\n return new Color3(this.r * r, this.g * g, this.b * b);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divide(_other: DeepImmutable<IColor3Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideToRef(_other: DeepImmutable<IColor3Like>, _result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideInPlace(_other: DeepImmutable<IColor3Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the minimal coordinate values between its and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public minimizeInPlace(other: DeepImmutable<IColor3Like>): this {\r\n return this.minimizeInPlaceFromFloats(other.r, other.g, other.b);\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the maximal coordinate values between its and the given color ones.\r\n * @param other defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public maximizeInPlace(other: DeepImmutable<IColor3Like>): this {\r\n return this.maximizeInPlaceFromFloats(other.r, other.g, other.b);\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the minimal coordinate values between its and the given coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public minimizeInPlaceFromFloats(r: number, g: number, b: number): this {\r\n this.r = Math.min(r, this.r);\r\n this.g = Math.min(g, this.g);\r\n this.b = Math.min(b, this.b);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color3 with the maximal coordinate values between its and the given coordinates.\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public maximizeInPlaceFromFloats(r: number, g: number, b: number): this {\r\n this.r = Math.max(r, this.r);\r\n this.g = Math.max(g, this.g);\r\n this.b = Math.max(b, this.b);\r\n return this;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floorToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floor(): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fractToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fract(): never {\r\n throw new ReferenceError(\"Can not fract a color\");\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<IColor3Like>): 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 * Alias for equalsToFloats\r\n * @param r red color component\r\n * @param g green color component\r\n * @param b blue color component\r\n * @returns boolean\r\n */\r\n public equalsFloats(r: number, g: number, b: number): boolean {\r\n return this.equalsToFloats(r, g, 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 equalsToFloats(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 * Returns true if the current Color3 and the given color coordinates are distant less than epsilon\r\n * @param otherColor defines the second operand\r\n * @param epsilon defines the minimal distance to define values as equals\r\n * @returns true if both colors are distant less than epsilon\r\n */\r\n public equalsWithEpsilon(otherColor: DeepImmutable<IColor3Like>, epsilon: number = Epsilon): boolean {\r\n return WithinEpsilon(this.r, otherColor.r, epsilon) && WithinEpsilon(this.g, otherColor.g, epsilon) && WithinEpsilon(this.b, otherColor.b, epsilon);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negate(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateInPlace(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateToRef(_result: IColor3Like): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * Creates a new Color3 with the current Color3 values multiplied by scale\r\n * @param scale defines the scaling factor to apply\r\n * @returns a new Color3 object\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 Color3 values by the float \"scale\"\r\n * @param scale defines the scaling factor to apply\r\n * @returns the current updated Color3\r\n */\r\n public scaleInPlace(scale: number): this {\r\n this.r *= scale;\r\n this.g *= scale;\r\n this.b *= scale;\r\n return this;\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 result Color3\r\n */\r\n public scaleToRef<T extends IColor3Like>(scale: number, result: T): T {\r\n result.r = this.r * scale;\r\n result.g = this.g * scale;\r\n result.b = this.b * scale;\r\n return result;\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 result Color3\r\n */\r\n public scaleAndAddToRef<T extends IColor3Like>(scale: number, result: T): T {\r\n result.r += this.r * scale;\r\n result.g += this.g * scale;\r\n result.b += this.b * scale;\r\n return result;\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 result Color3\r\n */\r\n public clampToRef<T extends IColor3Like>(min: number = 0, max: number = 1, result: T): T {\r\n result.r = Clamp(this.r, min, max);\r\n result.g = Clamp(this.g, min, max);\r\n result.b = Clamp(this.b, min, max);\r\n return result;\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<IColor3Like>): 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 * Adds the given color to the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public addInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r += otherColor.r;\r\n this.g += otherColor.g;\r\n this.b += otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Color3\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the current updated Color3\r\n */\r\n public addInPlaceFromFloats(r: number, g: number, b: number): this {\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 * 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<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\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<IColor3Like>): 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<T extends IColor3Like>(otherColor: DeepImmutable<IColor3Like>, result: T): T {\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 result;\r\n }\r\n\r\n /**\r\n * Subtract the given color from the current Color3\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color3\r\n */\r\n public subtractInPlace(otherColor: DeepImmutable<IColor3Like>): this {\r\n this.r -= otherColor.r;\r\n this.g -= otherColor.g;\r\n this.b -= otherColor.b;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color3 set with the subtraction of the given floats from the current Color3 coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @returns the resulting Color3\r\n */\r\n public subtractFromFloats(r: number, g: number, b: number): Color3 {\r\n return new Color3(this.r - r, this.g - g, this.b - b);\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current Color3 coordinates and set the given color \"result\" with this result\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param result defines the Color3 object where to store the result\r\n * @returns the result\r\n */\r\n public subtractFromFloatsToRef<T extends IColor3Like>(r: number, g: number, b: number, result: T): T {\r\n result.r = this.r - r;\r\n result.g = this.g - g;\r\n result.b = this.b - b;\r\n return result;\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<IColor3Like>): this {\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): this {\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): this {\r\n return this.copyFromFloats(r, g, b);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Color3 coordinates\r\n * @param v defines the r, g and b coordinates of the operand\r\n * @returns the current updated Color3\r\n */\r\n public setAll(v: number): this {\r\n this.r = this.g = this.b = v;\r\n return this;\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 \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB);\r\n }\r\n\r\n /**\r\n * Updates the Color3 rgb values from the string containing valid hexadecimal values\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns the current Color3 object\r\n */\r\n public fromHexString(hex: string): this {\r\n if (hex.substring(0, 1) !== \"#\" || hex.length !== 7) {\r\n return this;\r\n }\r\n\r\n this.r = parseInt(hex.substring(1, 3), 16) / 255;\r\n this.g = parseInt(hex.substring(3, 5), 16) / 255;\r\n this.b = parseInt(hex.substring(5, 7), 16) / 255;\r\n\r\n return this;\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 return this.toHSVToRef(new Color3());\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 * @returns the updated result\r\n */\r\n public toHSVToRef<T extends IColor3Like>(result: T): T {\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 return result;\r\n }\r\n\r\n /**\r\n * Computes a new Color3 converted from the current one to linear space\r\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color3 object\r\n */\r\n public toLinearSpace(exact = false): Color3 {\r\n const convertedColor = new Color3();\r\n this.toLinearSpaceToRef(convertedColor, exact);\r\n return convertedColor;\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color3\r\n */\r\n public toLinearSpaceToRef(convertedColor: IColor3Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\r\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\r\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToLinearSpace(this.r);\r\n convertedColor.g = colorChannelToLinearSpace(this.g);\r\n convertedColor.b = colorChannelToLinearSpace(this.b);\r\n }\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color3 object\r\n */\r\n public toGammaSpace(exact = false): Color3 {\r\n const convertedColor = new Color3();\r\n this.toGammaSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color3\r\n */\r\n public toGammaSpaceToRef(convertedColor: IColor3Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\r\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\r\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToGammaSpace(this.r);\r\n convertedColor.g = colorChannelToGammaSpace(this.g);\r\n convertedColor.b = colorChannelToGammaSpace(this.b);\r\n }\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 * Converts Hue, saturation and value to a Color3 (RGB)\r\n * @param hue defines the hue (value between 0 and 360)\r\n * @param saturation defines the saturation (value between 0 and 1)\r\n * @param value defines the value (value between 0 and 1)\r\n * @param result defines the Color3 where to store the RGB values\r\n * @returns the updated result\r\n */\r\n public static HSVtoRGBToRef<T extends IColor3Like>(hue: number, saturation: number, value: number, result: T): T {\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.r = r + m;\r\n result.g = g + m;\r\n result.b = b + m;\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts Hue, saturation and value to a new Color3 (RGB)\r\n * @param hue defines the hue (value between 0 and 360)\r\n * @param saturation defines the saturation (value between 0 and 1)\r\n * @param value defines the value (value between 0 and 1)\r\n * @returns a new Color3 object\r\n */\r\n public static FromHSV(hue: number, saturation: number, value: number): Color3 {\r\n const result = new Color3(0, 0, 0);\r\n Color3.HSVtoRGBToRef(hue, saturation, value, result);\r\n return result;\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 return new Color3(0, 0, 0).fromHexString(hex);\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\nObject.defineProperties(Color3.prototype, {\r\n dimension: { value: [3] },\r\n rank: { value: 1 },\r\n});\r\n\r\n/**\r\n * Class used to hold a RBGA color\r\n */\r\nexport class Color4 implements Tensor<Tuple<number, 4>, IColor4Like>, IColor4Like {\r\n /**\r\n * If the first color is flagged with integers (as everything is 0,0,0,0), V8 stores all of the properties as integers internally because it doesn't know any better yet.\r\n * If subsequent colors are created with non-integer values, V8 determines that it would be best to represent these properties as doubles instead of integers,\r\n * and henceforth it will use floating-point representation for all color instances that it creates.\r\n * But the original color instances are unchanged and has a \"deprecated map\".\r\n * If we keep using the color instances from step 1, it will now be a poison pill which will mess up optimizations in any code it touches.\r\n */\r\n static _V8PerformanceHack = new Color4(0.5, 0.5, 0.5, 0.5) as DeepImmutable<Color4>;\r\n /**\r\n * @see Tensor.dimension\r\n */\r\n declare public readonly dimension: [4];\r\n\r\n /**\r\n * @see Tensor.rank\r\n */\r\n declare public readonly rank: 1;\r\n\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 * [0] Defines the red component (between 0 and 1, default is 0)\r\n */\r\n public r: number = 0,\r\n /**\r\n * [0] Defines the green component (between 0 and 1, default is 0)\r\n */\r\n public g: number = 0,\r\n /**\r\n * [0] Defines the blue component (between 0 and 1, default is 0)\r\n */\r\n public b: number = 0,\r\n /**\r\n * [1] 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 * 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(): Tuple<number, 4> {\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): this {\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): this {\r\n this.r = array[offset];\r\n this.g = array[offset + 1];\r\n this.b = array[offset + 2];\r\n this.a = array[offset + 3];\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<IColor4Like>): 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 otherColor defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public add(otherColor: DeepImmutable<IColor4Like>): Color4 {\r\n return new Color4(this.r + otherColor.r, this.g + otherColor.g, this.b + otherColor.b, this.a + otherColor.a);\r\n }\r\n\r\n /**\r\n * Updates the given color \"result\" with the result of the addition of the current Color4 and the given one.\r\n * @param otherColor the color to add\r\n * @param result the color to store the result\r\n * @returns result input\r\n */\r\n public addToRef<T extends IColor4Like>(otherColor: DeepImmutable<IColor4Like>, result: T): T {\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 result.a = this.a + otherColor.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Adds in place the given Color4 values to the current Color4 object\r\n * @param otherColor defines the second operand\r\n * @returns the current updated Color4 object\r\n */\r\n public addInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r += otherColor.r;\r\n this.g += otherColor.g;\r\n this.b += otherColor.b;\r\n this.a += otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Color4\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public addInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\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 * Creates a new Color4 set with the subtracted values of the given one from the current Color4\r\n * @param otherColor defines the second operand\r\n * @returns a new Color4 object\r\n */\r\n public subtract(otherColor: DeepImmutable<IColor4Like>): Color4 {\r\n return new Color4(this.r - otherColor.r, this.g - otherColor.g, this.b - otherColor.b, this.a - otherColor.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 otherColor defines the second operand\r\n * @param result defines the Color4 object where to store the result\r\n * @returns the result Color4 object\r\n */\r\n public subtractToRef<T extends IColor4Like>(otherColor: DeepImmutable<IColor4Like>, result: T): T {\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 result.a = this.a - otherColor.a;\r\n return result;\r\n }\r\n\r\n /**\r\n * Subtract in place the given color from the current Color4.\r\n * @param otherColor the color to subtract\r\n * @returns the updated Color4.\r\n */\r\n public subtractInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r -= otherColor.r;\r\n this.g -= otherColor.g;\r\n this.b -= otherColor.b;\r\n this.a -= otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 set with the result of the subtraction of the given floats from the current Color4 coordinates.\r\n * @param r value to subtract\r\n * @param g value to subtract\r\n * @param b value to subtract\r\n * @param a value to subtract\r\n * @returns new color containing the result\r\n */\r\n public subtractFromFloats(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(this.r - r, this.g - g, this.b - b, this.a - a);\r\n }\r\n\r\n /**\r\n * Sets the given color \"result\" set with the result of the subtraction of the given floats from the current Color4 coordinates.\r\n * @param r value to subtract\r\n * @param g value to subtract\r\n * @param b value to subtract\r\n * @param a value to subtract\r\n * @param result the color to store the result in\r\n * @returns result input\r\n */\r\n public subtractFromFloatsToRef<T extends IColor4Like>(r: number, g: number, b: number, a: number, result: T): T {\r\n result.r = this.r - r;\r\n result.g = this.g - g;\r\n result.b = this.b - b;\r\n result.a = this.a - a;\r\n return result;\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 Color4 values by the float \"scale\"\r\n * @param scale defines the scaling factor to apply\r\n * @returns the current updated Color4\r\n */\r\n public scaleInPlace(scale: number): this {\r\n this.r *= scale;\r\n this.g *= scale;\r\n this.b *= scale;\r\n this.a *= scale;\r\n return this;\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 result Color4\r\n */\r\n public scaleToRef<T extends IColor4Like>(scale: number, result: T): T {\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 result;\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 result Color4\r\n */\r\n public scaleAndAddToRef<T extends IColor4Like>(scale: number, result: T): T {\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 result;\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 result Color4\r\n */\r\n public clampToRef<T extends IColor4Like>(min: number = 0, max: number = 1, result: T): T {\r\n result.r = Clamp(this.r, min, max);\r\n result.g = Clamp(this.g, min, max);\r\n result.b = Clamp(this.b, min, max);\r\n result.a = Clamp(this.a, min, max);\r\n return result;\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: DeepImmutable<IColor4Like>): 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<T extends IColor4Like>(color: DeepImmutable<IColor4Like>, result: T): T {\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 * Multiplies in place the current Color4 by the given one.\r\n * @param otherColor color to multiple with\r\n * @returns the updated Color4.\r\n */\r\n public multiplyInPlace(otherColor: DeepImmutable<IColor4Like>): this {\r\n this.r *= otherColor.r;\r\n this.g *= otherColor.g;\r\n this.b *= otherColor.b;\r\n this.a *= otherColor.a;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Color4 set with the multiplication result of the given floats and the current Color4 coordinates.\r\n * @param r value multiply with\r\n * @param g value multiply with\r\n * @param b value multiply with\r\n * @param a value multiply with\r\n * @returns resulting new color\r\n */\r\n public multiplyByFloats(r: number, g: number, b: number, a: number): Color4 {\r\n return new Color4(this.r * r, this.g * g, this.b * b, this.a * a);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divide(_other: DeepImmutable<IColor4Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideToRef(_other: DeepImmutable<IColor4Like>, _result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public divideInPlace(_other: DeepImmutable<IColor4Like>): never {\r\n throw new ReferenceError(\"Can not divide a color\");\r\n }\r\n\r\n /**\r\n * Updates the Color4 coordinates with the minimum values between its own and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color4\r\n */\r\n public minimizeInPlace(other: DeepImmutable<IColor4Like>): this {\r\n this.r = Math.min(this.r, other.r);\r\n this.g = Math.min(this.g, other.g);\r\n this.b = Math.min(this.b, other.b);\r\n this.a = Math.min(this.a, other.a);\r\n return this;\r\n }\r\n /**\r\n * Updates the Color4 coordinates with the maximum values between its own and the given color ones\r\n * @param other defines the second operand\r\n * @returns the current updated Color4\r\n */\r\n public maximizeInPlace(other: DeepImmutable<IColor4Like>): this {\r\n this.r = Math.max(this.r, other.r);\r\n this.g = Math.max(this.g, other.g);\r\n this.b = Math.max(this.b, other.b);\r\n this.a = Math.max(this.a, other.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color4 with the minimal coordinate values between its and the given coordinates\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public minimizeInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\r\n this.r = Math.min(r, this.r);\r\n this.g = Math.min(g, this.g);\r\n this.b = Math.min(b, this.b);\r\n this.a = Math.min(a, this.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Color4 with the maximal coordinate values between its and the given coordinates.\r\n * @param r defines the r coordinate of the operand\r\n * @param g defines the g coordinate of the operand\r\n * @param b defines the b coordinate of the operand\r\n * @param a defines the a coordinate of the operand\r\n * @returns the current updated Color4\r\n */\r\n public maximizeInPlaceFromFloats(r: number, g: number, b: number, a: number): this {\r\n this.r = Math.max(r, this.r);\r\n this.g = Math.max(g, this.g);\r\n this.b = Math.max(b, this.b);\r\n this.a = Math.max(a, this.a);\r\n return this;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floorToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public floor(): never {\r\n throw new ReferenceError(\"Can not floor a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fractToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public fract(): never {\r\n throw new ReferenceError(\"Can not fract a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negate(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateInPlace(): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * @internal\r\n * Do not use\r\n */\r\n public negateToRef(_result: IColor4Like): never {\r\n throw new ReferenceError(\"Can not negate a color\");\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Color4 coordinates are each beneath the distance \"epsilon\" from the given color ones.\r\n * @param otherColor color to compare against\r\n * @param epsilon (Default: very small number)\r\n * @returns true if they are equal\r\n */\r\n public equalsWithEpsilon(otherColor: DeepImmutable<IColor4Like>, epsilon: number = Epsilon): boolean {\r\n return (\r\n WithinEpsilon(this.r, otherColor.r, epsilon) &&\r\n WithinEpsilon(this.g, otherColor.g, epsilon) &&\r\n WithinEpsilon(this.b, otherColor.b, epsilon) &&\r\n WithinEpsilon(this.a, otherColor.a, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Boolean : True if the given floats are strictly equal to the current Color4 coordinates.\r\n * @param x x value to compare against\r\n * @param y y value to compare against\r\n * @param z z value to compare against\r\n * @param w w value to compare against\r\n * @returns true if equal\r\n */\r\n public equalsToFloats(x: number, y: number, z: number, w: number): boolean {\r\n return this.r === x && this.g === y && this.b === z && this.a === w;\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 const result = new Color4();\r\n return result.copyFrom(this);\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: DeepImmutable<IColor4Like>): this {\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): this {\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): this {\r\n return this.copyFromFloats(r, g, b, a);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector4 coordinates\r\n * @param v defines the r, g, b, and a coordinates of the operand\r\n * @returns the current updated Vector4\r\n */\r\n public setAll(v: number): this {\r\n this.r = this.g = this.b = this.a = v;\r\n return this;\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 \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB);\r\n }\r\n\r\n const intA = Math.round(this.a * 255);\r\n return \"#\" + ToHex(intR) + ToHex(intG) + ToHex(intB) + ToHex(intA);\r\n }\r\n\r\n /**\r\n * Updates the Color4 rgba values 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 keeps\r\n * its previous alpha value.\r\n *\r\n * An invalid string does not modify this object\r\n *\r\n * @param hex defines a string containing valid hexadecimal values\r\n * @returns the current updated Color4 object\r\n */\r\n public fromHexString(hex: string): this {\r\n if (hex.substring(0, 1) !== \"#\" || (hex.length !== 9 && hex.length !== 7)) {\r\n return this;\r\n }\r\n\r\n this.r = parseInt(hex.substring(1, 3), 16) / 255;\r\n this.g = parseInt(hex.substring(3, 5), 16) / 255;\r\n this.b = parseInt(hex.substring(5, 7), 16) / 255;\r\n if (hex.length === 9) {\r\n this.a = parseInt(hex.substring(7, 9), 16) / 255;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Computes a new Color4 converted from the current one to linear space\r\n * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color4 object\r\n */\r\n public toLinearSpace(exact = false): Color4 {\r\n const convertedColor = new Color4();\r\n this.toLinearSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color4\r\n */\r\n public toLinearSpaceToRef(convertedColor: IColor4Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToLinearSpaceExact(this.r);\r\n convertedColor.g = colorChannelToLinearSpaceExact(this.g);\r\n convertedColor.b = colorChannelToLinearSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToLinearSpace(this.r);\r\n convertedColor.g = colorChannelToLinearSpace(this.g);\r\n convertedColor.b = colorChannelToLinearSpace(this.b);\r\n }\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns a new Color4 object\r\n */\r\n public toGammaSpace(exact = false): Color4 {\r\n const convertedColor = new Color4();\r\n this.toGammaSpaceToRef(convertedColor, exact);\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 * @param exact defines if the conversion will be done in an exact way which is slower but more accurate (default is false)\r\n * @returns the unmodified Color4\r\n */\r\n public toGammaSpaceToRef(convertedColor: IColor4Like, exact = false): this {\r\n if (exact) {\r\n convertedColor.r = colorChannelToGammaSpaceExact(this.r);\r\n convertedColor.g = colorChannelToGammaSpaceExact(this.g);\r\n convertedColor.b = colorChannelToGammaSpaceExact(this.b);\r\n } else {\r\n convertedColor.r = colorChannelToGammaSpace(this.r);\r\n convertedColor.g = colorChannelToGammaSpace(this.g);\r\n convertedColor.b = colorChannelToGammaSpace(this.b);\r\n }\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 return new Color4(0.0, 0.0, 0.0, 1.0).fromHexString(hex);\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<IColor4Like>, right: DeepImmutable<IColor4Like>, amount: number): Color4 {\r\n return Color4.LerpToRef(left, right, amount, new Color4());\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 * @returns the updated result\r\n */\r\n public static LerpToRef<T extends IColor4Like>(left: DeepImmutable<IColor4Like>, right: DeepImmutable<IColor4Like>, amount: number, result: T): T {\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 return result;\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(\r\n value1: DeepImmutable<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\r\n amount: number\r\n ): 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<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\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<IColor4Like>,\r\n tangent1: DeepImmutable<IColor4Like>,\r\n value2: DeepImmutable<IColor4Like>,\r\n tangent2: DeepImmutable<IColor4Like>,\r\n time: number,\r\n result: IColor4Like\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<IColor3Like>, 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 (less than 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\nObject.defineProperties(Color4.prototype, {\r\n dimension: { value: [4] },\r\n rank: { value: 1 },\r\n});\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class TmpColors {\r\n public static Color3: Color3[] = BuildArray(3, Color3.Black);\r\n public static Color4: Color4[] = BuildArray(3, () => new Color4(0, 0, 0, 0));\r\n}\r\n\r\nRegisterClass(\"BABYLON.Color3\", Color3);\r\nRegisterClass(\"BABYLON.Color4\", Color4);\r\n"]}