@babylonjs/core 7.19.0 → 7.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/Buffers/buffer.nonFloatVertexBuffers.js +1 -1
  2. package/Buffers/buffer.nonFloatVertexBuffers.js.map +1 -1
  3. package/Collisions/gpuPicker.d.ts +8 -2
  4. package/Collisions/gpuPicker.js +41 -20
  5. package/Collisions/gpuPicker.js.map +1 -1
  6. package/Engines/Processors/shaderProcessor.d.ts +1 -0
  7. package/Engines/Processors/shaderProcessor.js +1 -0
  8. package/Engines/Processors/shaderProcessor.js.map +1 -1
  9. package/Engines/WebGPU/Extensions/engine.rawTexture.js +1 -0
  10. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  11. package/Engines/WebGPU/webgpuShaderProcessingContext.d.ts +1 -1
  12. package/Engines/WebGPU/webgpuShaderProcessingContext.js +4 -2
  13. package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
  14. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +2 -1
  15. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +12 -5
  16. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  17. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -4
  18. package/Engines/WebGPU/webgpuTextureManager.js +90 -75
  19. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  20. package/Engines/abstractEngine.d.ts +2 -2
  21. package/Engines/abstractEngine.js +2 -2
  22. package/Engines/abstractEngine.js.map +1 -1
  23. package/Engines/nativeEngine.d.ts +1 -1
  24. package/Engines/nativeEngine.js +2 -1
  25. package/Engines/nativeEngine.js.map +1 -1
  26. package/Engines/thinEngine.d.ts +1 -1
  27. package/Engines/thinEngine.functions.d.ts +1 -1
  28. package/Engines/thinEngine.functions.js +2 -1
  29. package/Engines/thinEngine.functions.js.map +1 -1
  30. package/Engines/thinEngine.js +2 -2
  31. package/Engines/thinEngine.js.map +1 -1
  32. package/Engines/webgpuEngine.d.ts +9 -5
  33. package/Engines/webgpuEngine.js +35 -22
  34. package/Engines/webgpuEngine.js.map +1 -1
  35. package/Layers/effectLayer.d.ts +16 -1
  36. package/Layers/effectLayer.js +32 -2
  37. package/Layers/effectLayer.js.map +1 -1
  38. package/Layers/glowLayer.d.ts +1 -2
  39. package/Layers/glowLayer.js +16 -3
  40. package/Layers/glowLayer.js.map +1 -1
  41. package/Layers/highlightLayer.d.ts +5 -4
  42. package/Layers/highlightLayer.js +36 -11
  43. package/Layers/highlightLayer.js.map +1 -1
  44. package/Layers/index.d.ts +10 -0
  45. package/Layers/index.js +12 -0
  46. package/Layers/index.js.map +1 -1
  47. package/Lights/Shadows/index.d.ts +8 -0
  48. package/Lights/Shadows/index.js +9 -0
  49. package/Lights/Shadows/index.js.map +1 -1
  50. package/Lights/Shadows/shadowGenerator.d.ts +18 -5
  51. package/Lights/Shadows/shadowGenerator.js +44 -5
  52. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  53. package/Loading/sceneLoader.d.ts +155 -16
  54. package/Loading/sceneLoader.js +197 -99
  55. package/Loading/sceneLoader.js.map +1 -1
  56. package/Materials/Node/nodeMaterial.d.ts +1 -0
  57. package/Materials/Node/nodeMaterial.js +15 -1
  58. package/Materials/Node/nodeMaterial.js.map +1 -1
  59. package/Materials/Node/nodeMaterialBuildState.js +1 -1
  60. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  61. package/Materials/effect.functions.d.ts +1 -1
  62. package/Materials/effect.functions.js +6 -3
  63. package/Materials/effect.functions.js.map +1 -1
  64. package/Materials/effect.js +1 -1
  65. package/Materials/effect.js.map +1 -1
  66. package/Materials/standardMaterial.d.ts +1 -1
  67. package/Materials/standardMaterial.js +1 -1
  68. package/Materials/standardMaterial.js.map +1 -1
  69. package/Maths/math.constants.d.ts +1 -2
  70. package/Maths/math.constants.js +1 -2
  71. package/Maths/math.constants.js.map +1 -1
  72. package/Maths/math.like.d.ts +9 -0
  73. package/Maths/math.like.js.map +1 -1
  74. package/Maths/math.vector.d.ts +23 -23
  75. package/Maths/math.vector.js +43 -11
  76. package/Maths/math.vector.js.map +1 -1
  77. package/Misc/index.d.ts +4 -0
  78. package/Misc/index.js +5 -0
  79. package/Misc/index.js.map +1 -1
  80. package/Misc/rgbdTextureTools.d.ts +1 -0
  81. package/Misc/rgbdTextureTools.js +15 -2
  82. package/Misc/rgbdTextureTools.js.map +1 -1
  83. package/PostProcesses/blurPostProcess.d.ts +6 -0
  84. package/PostProcesses/blurPostProcess.js +21 -2
  85. package/PostProcesses/blurPostProcess.js.map +1 -1
  86. package/PostProcesses/index.d.ts +8 -0
  87. package/PostProcesses/index.js +10 -0
  88. package/PostProcesses/index.js.map +1 -1
  89. package/PostProcesses/passPostProcess.d.ts +2 -0
  90. package/PostProcesses/passPostProcess.js +26 -2
  91. package/PostProcesses/passPostProcess.js.map +1 -1
  92. package/PostProcesses/postProcess.d.ts +11 -2
  93. package/PostProcesses/postProcess.js +17 -1
  94. package/PostProcesses/postProcess.js.map +1 -1
  95. package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.d.ts +5 -0
  96. package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js +17 -0
  97. package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js.map +1 -0
  98. package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js +1 -1
  99. package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js.map +1 -1
  100. package/ShadersWGSL/ShadersInclude/kernelBlurFragment.d.ts +5 -0
  101. package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js +20 -0
  102. package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js.map +1 -0
  103. package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.d.ts +5 -0
  104. package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js +19 -0
  105. package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js.map +1 -0
  106. package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.d.ts +5 -0
  107. package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js +9 -0
  108. package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js.map +1 -0
  109. package/ShadersWGSL/ShadersInclude/kernelBlurVertex.d.ts +5 -0
  110. package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js +9 -0
  111. package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js.map +1 -0
  112. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +4 -4
  113. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
  114. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
  115. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
  116. package/ShadersWGSL/ShadersInclude/shadowMapFragment.js +5 -5
  117. package/ShadersWGSL/ShadersInclude/shadowMapFragment.js.map +1 -1
  118. package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.d.ts +7 -0
  119. package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js +26 -0
  120. package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js.map +1 -0
  121. package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.d.ts +5 -0
  122. package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js +12 -0
  123. package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js.map +1 -0
  124. package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.d.ts +5 -0
  125. package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js +19 -0
  126. package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js.map +1 -0
  127. package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js +4 -4
  128. package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js.map +1 -1
  129. package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.d.ts +5 -0
  130. package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js +17 -0
  131. package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js.map +1 -0
  132. package/ShadersWGSL/default.fragment.js +2 -2
  133. package/ShadersWGSL/default.fragment.js.map +1 -1
  134. package/ShadersWGSL/depthBoxBlur.fragment.d.ts +5 -0
  135. package/ShadersWGSL/depthBoxBlur.fragment.js +14 -0
  136. package/ShadersWGSL/depthBoxBlur.fragment.js.map +1 -0
  137. package/ShadersWGSL/glowBlurPostProcess.fragment.d.ts +5 -0
  138. package/ShadersWGSL/glowBlurPostProcess.fragment.js +15 -0
  139. package/ShadersWGSL/glowBlurPostProcess.fragment.js.map +1 -0
  140. package/ShadersWGSL/glowMapGeneration.fragment.d.ts +8 -0
  141. package/ShadersWGSL/glowMapGeneration.fragment.js +74 -0
  142. package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -0
  143. package/ShadersWGSL/glowMapGeneration.vertex.d.ts +17 -0
  144. package/ShadersWGSL/glowMapGeneration.vertex.js +92 -0
  145. package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -0
  146. package/ShadersWGSL/glowMapMerge.fragment.d.ts +5 -0
  147. package/ShadersWGSL/glowMapMerge.fragment.js +32 -0
  148. package/ShadersWGSL/glowMapMerge.fragment.js.map +1 -0
  149. package/ShadersWGSL/glowMapMerge.vertex.d.ts +5 -0
  150. package/ShadersWGSL/glowMapMerge.vertex.js +16 -0
  151. package/ShadersWGSL/glowMapMerge.vertex.js.map +1 -0
  152. package/ShadersWGSL/kernelBlur.fragment.d.ts +9 -0
  153. package/ShadersWGSL/kernelBlur.fragment.js +48 -0
  154. package/ShadersWGSL/kernelBlur.fragment.js.map +1 -0
  155. package/ShadersWGSL/kernelBlur.vertex.d.ts +7 -0
  156. package/ShadersWGSL/kernelBlur.vertex.js +21 -0
  157. package/ShadersWGSL/kernelBlur.vertex.js.map +1 -0
  158. package/ShadersWGSL/pass.fragment.d.ts +5 -0
  159. package/ShadersWGSL/pass.fragment.js +12 -0
  160. package/ShadersWGSL/pass.fragment.js.map +1 -0
  161. package/ShadersWGSL/passCube.fragment.d.ts +5 -0
  162. package/ShadersWGSL/passCube.fragment.js +31 -0
  163. package/ShadersWGSL/passCube.fragment.js.map +1 -0
  164. package/ShadersWGSL/rgbdDecode.fragment.d.ts +6 -0
  165. package/ShadersWGSL/rgbdDecode.fragment.js +14 -0
  166. package/ShadersWGSL/rgbdDecode.fragment.js.map +1 -0
  167. package/ShadersWGSL/rgbdEncode.fragment.d.ts +6 -0
  168. package/ShadersWGSL/rgbdEncode.fragment.js +14 -0
  169. package/ShadersWGSL/rgbdEncode.fragment.js.map +1 -0
  170. package/ShadersWGSL/shadowMap.fragment.d.ts +9 -0
  171. package/ShadersWGSL/shadowMap.fragment.js +39 -0
  172. package/ShadersWGSL/shadowMap.fragment.js.map +1 -0
  173. package/ShadersWGSL/shadowMap.vertex.d.ts +22 -0
  174. package/ShadersWGSL/shadowMap.vertex.js +89 -0
  175. package/ShadersWGSL/shadowMap.vertex.js.map +1 -0
  176. package/package.json +1 -1
@@ -17,5 +17,4 @@ export declare const PHI: number;
17
17
  * Constant used to define the minimal number value in Babylon.js
18
18
  * @ignorenaming
19
19
  */
20
- declare const Epsilon = 0.001;
21
- export { Epsilon };
20
+ export declare const Epsilon = 0.001;
@@ -20,6 +20,5 @@ export const PHI = (1 + Math.sqrt(5)) / 2;
20
20
  * @ignorenaming
21
21
  */
22
22
  // eslint-disable-next-line @typescript-eslint/naming-convention
23
- const Epsilon = 0.001;
24
- export { Epsilon };
23
+ export const Epsilon = 0.001;
25
24
  //# sourceMappingURL=math.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"math.constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC;AAEpC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE1C;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["/**\r\n * Constant used to convert a value to gamma space\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToGammaSpace = 1 / 2.2;\r\n\r\n/**\r\n * Constant used to convert a value to linear space\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToLinearSpace = 2.2;\r\n\r\n/**\r\n * Constant Golden Ratio value in Babylon.js\r\n * @ignorenaming\r\n */\r\nexport const PHI = (1 + Math.sqrt(5)) / 2;\r\n\r\n/**\r\n * Constant used to define the minimal number value in Babylon.js\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst Epsilon = 0.001;\r\nexport { Epsilon };\r\n"]}
1
+ {"version":3,"file":"math.constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC;AAEpC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE1C;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC","sourcesContent":["/**\r\n * Constant used to convert a value to gamma space\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToGammaSpace = 1 / 2.2;\r\n\r\n/**\r\n * Constant used to convert a value to linear space\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToLinearSpace = 2.2;\r\n\r\n/**\r\n * Constant Golden Ratio value in Babylon.js\r\n * @ignorenaming\r\n */\r\nexport const PHI = (1 + Math.sqrt(5)) / 2;\r\n\r\n/**\r\n * Constant used to define the minimal number value in Babylon.js\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const Epsilon = 0.001;\r\n"]}
@@ -26,6 +26,15 @@ export interface IVector2Like {
26
26
  export interface IVector3Like extends IVector2Like {
27
27
  z: float;
28
28
  }
29
+ /**
30
+ * @internal
31
+ */
32
+ export interface Vector3LikeInternal {
33
+ _x: number;
34
+ _y: number;
35
+ _z: number;
36
+ _isDirty?: boolean;
37
+ }
29
38
  /**
30
39
  * @internal
31
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"math.like.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.like.ts"],"names":[],"mappings":"","sourcesContent":["import type { float, int, DeepImmutable, Tuple } from \"../types\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor3Like {\r\n r: float;\r\n g: float;\r\n b: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor4Like extends IColor3Like {\r\n a: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector2Like {\r\n x: float;\r\n y: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector3Like extends IVector2Like {\r\n z: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector4Like extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IQuaternionLike extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IPlaneLike {\r\n normal: IVector3Like;\r\n d: float;\r\n normalize(): void;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IMatrixLike {\r\n asArray(): DeepImmutable<Tuple<number, 16>>;\r\n updateFlag: int;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IViewportLike {\r\n x: float;\r\n y: float;\r\n width: float;\r\n height: float;\r\n}\r\n"]}
1
+ {"version":3,"file":"math.like.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.like.ts"],"names":[],"mappings":"","sourcesContent":["import type { float, int, DeepImmutable, Tuple } from \"../types\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor3Like {\r\n r: float;\r\n g: float;\r\n b: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor4Like extends IColor3Like {\r\n a: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector2Like {\r\n x: float;\r\n y: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector3Like extends IVector2Like {\r\n z: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface Vector3LikeInternal {\r\n _x: number;\r\n _y: number;\r\n _z: number;\r\n _isDirty?: boolean;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector4Like extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IQuaternionLike extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IPlaneLike {\r\n normal: IVector3Like;\r\n d: float;\r\n normalize(): void;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IMatrixLike {\r\n asArray(): DeepImmutable<Tuple<number, 16>>;\r\n updateFlag: int;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IViewportLike {\r\n x: float;\r\n y: float;\r\n width: float;\r\n height: float;\r\n}\r\n"]}
@@ -3,7 +3,7 @@ import type { DeepImmutable, Nullable, FloatArray, float, Tuple } from "../types
3
3
  import type { Plane } from "./math.plane";
4
4
  import type { TransformNode } from "../Meshes/transformNode";
5
5
  import type { Dimension, Tensor, TensorLike, TensorStatic } from "./tensor";
6
- import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike } from "./math.like";
6
+ import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike, Vector3LikeInternal } from "./math.like";
7
7
  /**
8
8
  * Represents a vector of any dimension
9
9
  */
@@ -726,7 +726,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>, IVector2Like>,
726
726
  * Reminder: js uses a left handed forward facing system
727
727
  * Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU
728
728
  */
729
- export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVector3Like {
729
+ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3LikeInternal>, IVector3Like {
730
730
  private static _UpReadOnly;
731
731
  private static _DownReadOnly;
732
732
  private static _LeftHandedForwardReadOnly;
@@ -835,7 +835,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
835
835
  * @param otherVector defines the second operand
836
836
  * @returns the resulting Vector3
837
837
  */
838
- add(otherVector: DeepImmutable<Vector3>): Vector3;
838
+ add(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
839
839
  /**
840
840
  * Adds the current Vector3 to the given one and stores the result in the vector "result"
841
841
  * Example Playground https://playground.babylonjs.com/#R1F8YU#6
@@ -843,21 +843,21 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
843
843
  * @param result defines the Vector3 object where to store the result
844
844
  * @returns the result
845
845
  */
846
- addToRef<T extends Vector3>(otherVector: DeepImmutable<Vector3>, result: T): T;
846
+ addToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
847
847
  /**
848
848
  * Subtract the given vector from the current Vector3
849
849
  * Example Playground https://playground.babylonjs.com/#R1F8YU#61
850
850
  * @param otherVector defines the second operand
851
851
  * @returns the current updated Vector3
852
852
  */
853
- subtractInPlace(otherVector: DeepImmutable<Vector3>): this;
853
+ subtractInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
854
854
  /**
855
855
  * Returns a new Vector3, result of the subtraction of the given vector from the current Vector3
856
856
  * Example Playground https://playground.babylonjs.com/#R1F8YU#60
857
857
  * @param otherVector defines the second operand
858
858
  * @returns the resulting Vector3
859
859
  */
860
- subtract(otherVector: DeepImmutable<Vector3>): Vector3;
860
+ subtract(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
861
861
  /**
862
862
  * Subtracts the given vector from the current Vector3 and stores the result in the vector "result".
863
863
  * Example Playground https://playground.babylonjs.com/#R1F8YU#63
@@ -865,7 +865,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
865
865
  * @param result defines the Vector3 object where to store the result
866
866
  * @returns the result
867
867
  */
868
- subtractToRef<T extends Vector3>(otherVector: DeepImmutable<Vector3>, result: T): T;
868
+ subtractToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
869
869
  /**
870
870
  * Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates
871
871
  * Example Playground https://playground.babylonjs.com/#R1F8YU#62
@@ -884,7 +884,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
884
884
  * @param result defines the Vector3 object where to store the result
885
885
  * @returns the result
886
886
  */
887
- subtractFromFloatsToRef<T extends Vector3>(x: number, y: number, z: number, result: T): T;
887
+ subtractFromFloatsToRef<T extends Vector3LikeInternal>(x: number, y: number, z: number, result: T): T;
888
888
  /**
889
889
  * Gets a new Vector3 set with the current Vector3 negated coordinates
890
890
  * Example Playground https://playground.babylonjs.com/#R1F8YU#35
@@ -903,7 +903,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
903
903
  * @param result defines the Vector3 object where to store the result
904
904
  * @returns the result
905
905
  */
906
- negateToRef<T extends Vector3 = Vector3>(result: T): T;
906
+ negateToRef<T extends Vector3LikeInternal>(result: T): T;
907
907
  /**
908
908
  * Multiplies the Vector3 coordinates by the float "scale"
909
909
  * Example Playground https://playground.babylonjs.com/#R1F8YU#56
@@ -925,7 +925,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
925
925
  * @param result defines the Vector3 object where to store the result
926
926
  * @returns the result
927
927
  */
928
- scaleToRef<T extends Vector3>(scale: number, result: T): T;
928
+ scaleToRef<T extends Vector3LikeInternal>(scale: number, result: T): T;
929
929
  /**
930
930
  * Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector
931
931
  * Out of the infinite possibilities the normal chosen is the one formed by rotating the current vector
@@ -967,7 +967,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
967
967
  * @param result defines the Vector3 object where to store the result
968
968
  * @returns result input
969
969
  */
970
- scaleAndAddToRef<T extends Vector3>(scale: number, result: T): T;
970
+ scaleAndAddToRef<T extends Vector3LikeInternal>(scale: number, result: T): T;
971
971
  /**
972
972
  * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
973
973
  * Example Playground https://playground.babylonjs.com/#R1F8YU#48
@@ -1015,14 +1015,14 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1015
1015
  * @param otherVector defines the second operand
1016
1016
  * @returns the current updated Vector3
1017
1017
  */
1018
- multiplyInPlace(otherVector: DeepImmutable<Vector3>): this;
1018
+ multiplyInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
1019
1019
  /**
1020
1020
  * Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector
1021
1021
  * Example Playground https://playground.babylonjs.com/#R1F8YU#31
1022
1022
  * @param otherVector defines the second operand
1023
1023
  * @returns the new Vector3
1024
1024
  */
1025
- multiply(otherVector: DeepImmutable<Vector3>): Vector3;
1025
+ multiply(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
1026
1026
  /**
1027
1027
  * Multiplies the current Vector3 by the given one and stores the result in the given vector "result"
1028
1028
  * Example Playground https://playground.babylonjs.com/#R1F8YU#33
@@ -1030,7 +1030,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1030
1030
  * @param result defines the Vector3 object where to store the result
1031
1031
  * @returns the result
1032
1032
  */
1033
- multiplyToRef<T extends Vector3>(otherVector: DeepImmutable<Vector3>, result: T): T;
1033
+ multiplyToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
1034
1034
  /**
1035
1035
  * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats
1036
1036
  * Example Playground https://playground.babylonjs.com/#R1F8YU#34
@@ -1046,7 +1046,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1046
1046
  * @param otherVector defines the second operand
1047
1047
  * @returns the new Vector3
1048
1048
  */
1049
- divide(otherVector: DeepImmutable<Vector3>): Vector3;
1049
+ divide(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
1050
1050
  /**
1051
1051
  * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector "result"
1052
1052
  * Example Playground https://playground.babylonjs.com/#R1F8YU#18
@@ -1054,28 +1054,28 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1054
1054
  * @param result defines the Vector3 object where to store the result
1055
1055
  * @returns the result
1056
1056
  */
1057
- divideToRef<T extends Vector3>(otherVector: DeepImmutable<Vector3>, result: T): T;
1057
+ divideToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
1058
1058
  /**
1059
1059
  * Divides the current Vector3 coordinates by the given ones.
1060
1060
  * Example Playground https://playground.babylonjs.com/#R1F8YU#17
1061
1061
  * @param otherVector defines the second operand
1062
1062
  * @returns the current updated Vector3
1063
1063
  */
1064
- divideInPlace(otherVector: DeepImmutable<Vector3>): this;
1064
+ divideInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
1065
1065
  /**
1066
1066
  * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones
1067
1067
  * Example Playground https://playground.babylonjs.com/#R1F8YU#29
1068
1068
  * @param other defines the second operand
1069
1069
  * @returns the current updated Vector3
1070
1070
  */
1071
- minimizeInPlace(other: DeepImmutable<Vector3>): this;
1071
+ minimizeInPlace(other: DeepImmutable<Vector3LikeInternal>): this;
1072
1072
  /**
1073
1073
  * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
1074
1074
  * Example Playground https://playground.babylonjs.com/#R1F8YU#27
1075
1075
  * @param other defines the second operand
1076
1076
  * @returns the current updated Vector3
1077
1077
  */
1078
- maximizeInPlace(other: DeepImmutable<Vector3>): this;
1078
+ maximizeInPlace(other: DeepImmutable<Vector3LikeInternal>): this;
1079
1079
  /**
1080
1080
  * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
1081
1081
  * Example Playground https://playground.babylonjs.com/#R1F8YU#30
@@ -1110,7 +1110,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1110
1110
  * @param result the vector to store the result in
1111
1111
  * @returns the result vector
1112
1112
  */
1113
- floorToRef<T extends Vector3>(result: T): T;
1113
+ floorToRef<T extends Vector3LikeInternal>(result: T): T;
1114
1114
  /**
1115
1115
  * Gets a new Vector3 from current Vector3 floored values
1116
1116
  * Example Playground https://playground.babylonjs.com/#R1F8YU#22
@@ -1122,7 +1122,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1122
1122
  * @param result the vector to store the result in
1123
1123
  * @returns the result vector
1124
1124
  */
1125
- fractToRef<T extends Vector3>(result: T): T;
1125
+ fractToRef<T extends Vector3LikeInternal>(result: T): T;
1126
1126
  /**
1127
1127
  * Gets a new Vector3 from current Vector3 fractional values
1128
1128
  * Example Playground https://playground.babylonjs.com/#R1F8YU#23
@@ -1202,10 +1202,10 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
1202
1202
  /**
1203
1203
  * Normalize the current Vector3 to the reference
1204
1204
  * Example Playground https://playground.babylonjs.com/#R1F8YU#125
1205
- * @param reference define the Vector3 to update
1205
+ * @param result define the Vector3 to update
1206
1206
  * @returns the updated Vector3
1207
1207
  */
1208
- normalizeToRef<T extends Vector3>(reference: T): T;
1208
+ normalizeToRef<T extends Vector3LikeInternal>(result: T): T;
1209
1209
  /**
1210
1210
  * Creates a new Vector3 copied from the current Vector3
1211
1211
  * Example Playground https://playground.babylonjs.com/#R1F8YU#11
@@ -1098,7 +1098,11 @@ export class Vector3 {
1098
1098
  * @returns the result
1099
1099
  */
1100
1100
  addToRef(otherVector, result) {
1101
- return result.copyFromFloats(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);
1101
+ result._x = this._x + otherVector._x;
1102
+ result._y = this._y + otherVector._y;
1103
+ result._z = this._z + otherVector._z;
1104
+ result._isDirty = true;
1105
+ return result;
1102
1106
  }
1103
1107
  /**
1104
1108
  * Subtract the given vector from the current Vector3
@@ -1153,7 +1157,11 @@ export class Vector3 {
1153
1157
  * @returns the result
1154
1158
  */
1155
1159
  subtractFromFloatsToRef(x, y, z, result) {
1156
- return result.copyFromFloats(this._x - x, this._y - y, this._z - z);
1160
+ result._x = this._x - x;
1161
+ result._y = this._y - y;
1162
+ result._z = this._z - z;
1163
+ result._isDirty = true;
1164
+ return result;
1157
1165
  }
1158
1166
  /**
1159
1167
  * Gets a new Vector3 set with the current Vector3 negated coordinates
@@ -1182,7 +1190,11 @@ export class Vector3 {
1182
1190
  * @returns the result
1183
1191
  */
1184
1192
  negateToRef(result) {
1185
- return result.copyFromFloats(this._x * -1, this._y * -1, this._z * -1);
1193
+ result._x = this._x * -1;
1194
+ result._y = this._y * -1;
1195
+ result._z = this._z * -1;
1196
+ result._isDirty = true;
1197
+ return result;
1186
1198
  }
1187
1199
  /**
1188
1200
  * Multiplies the Vector3 coordinates by the float "scale"
@@ -1214,7 +1226,11 @@ export class Vector3 {
1214
1226
  * @returns the result
1215
1227
  */
1216
1228
  scaleToRef(scale, result) {
1217
- return result.copyFromFloats(this._x * scale, this._y * scale, this._z * scale);
1229
+ result._x = this._x * scale;
1230
+ result._y = this._y * scale;
1231
+ result._z = this._z * scale;
1232
+ result._isDirty = true;
1233
+ return result;
1218
1234
  }
1219
1235
  /**
1220
1236
  * Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector
@@ -1297,7 +1313,11 @@ export class Vector3 {
1297
1313
  * @returns result input
1298
1314
  */
1299
1315
  scaleAndAddToRef(scale, result) {
1300
- return result.addInPlaceFromFloats(this._x * scale, this._y * scale, this._z * scale);
1316
+ result._x += this._x * scale;
1317
+ result._y += this._y * scale;
1318
+ result._z += this._z * scale;
1319
+ result._isDirty = true;
1320
+ return result;
1301
1321
  }
1302
1322
  /**
1303
1323
  * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
@@ -1397,7 +1417,11 @@ export class Vector3 {
1397
1417
  * @returns the result
1398
1418
  */
1399
1419
  multiplyToRef(otherVector, result) {
1400
- return result.copyFromFloats(this._x * otherVector._x, this._y * otherVector._y, this._z * otherVector._z);
1420
+ result._x = this._x * otherVector._x;
1421
+ result._y = this._y * otherVector._y;
1422
+ result._z = this._z * otherVector._z;
1423
+ result._isDirty = true;
1424
+ return result;
1401
1425
  }
1402
1426
  /**
1403
1427
  * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats
@@ -1427,7 +1451,11 @@ export class Vector3 {
1427
1451
  * @returns the result
1428
1452
  */
1429
1453
  divideToRef(otherVector, result) {
1430
- return result.copyFromFloats(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);
1454
+ result._x = this._x / otherVector._x;
1455
+ result._y = this._y / otherVector._y;
1456
+ result._z = this._z / otherVector._z;
1457
+ result._isDirty = true;
1458
+ return result;
1431
1459
  }
1432
1460
  /**
1433
1461
  * Divides the current Vector3 coordinates by the given ones.
@@ -1686,15 +1714,19 @@ export class Vector3 {
1686
1714
  /**
1687
1715
  * Normalize the current Vector3 to the reference
1688
1716
  * Example Playground https://playground.babylonjs.com/#R1F8YU#125
1689
- * @param reference define the Vector3 to update
1717
+ * @param result define the Vector3 to update
1690
1718
  * @returns the updated Vector3
1691
1719
  */
1692
- normalizeToRef(reference) {
1720
+ normalizeToRef(result) {
1693
1721
  const len = this.length();
1694
1722
  if (len === 0 || len === 1.0) {
1695
- return reference.copyFrom(this);
1723
+ result._x = this._x;
1724
+ result._y = this._y;
1725
+ result._z = this._z;
1726
+ result._isDirty = true;
1727
+ return result;
1696
1728
  }
1697
- return this.scaleToRef(1.0 / len, reference);
1729
+ return this.scaleToRef(1.0 / len, result);
1698
1730
  }
1699
1731
  /**
1700
1732
  * Creates a new Vector3 copied from the current Vector3