@babylonjs/core 6.45.0 → 6.46.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 (235) hide show
  1. package/Animations/animation.js +1 -1
  2. package/Animations/animation.js.map +1 -1
  3. package/BakedVertexAnimation/bakedVertexAnimationManager.js +2 -1
  4. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  5. package/Bones/skeleton.js +2 -2
  6. package/Bones/skeleton.js.map +1 -1
  7. package/Cameras/camera.d.ts +3 -3
  8. package/Cameras/camera.js +2 -1
  9. package/Cameras/camera.js.map +1 -1
  10. package/Cameras/cameraInputsManager.js +1 -1
  11. package/Cameras/cameraInputsManager.js.map +1 -1
  12. package/Cameras/targetCamera.js +4 -0
  13. package/Cameras/targetCamera.js.map +1 -1
  14. package/Compute/computeShader.d.ts +4 -2
  15. package/Compute/computeShader.js +7 -3
  16. package/Compute/computeShader.js.map +1 -1
  17. package/Debug/directionalLightFrustumViewer.js +6 -6
  18. package/Debug/directionalLightFrustumViewer.js.map +1 -1
  19. package/Engines/Extensions/engine.computeShader.d.ts +2 -1
  20. package/Engines/Extensions/engine.computeShader.js +1 -0
  21. package/Engines/Extensions/engine.computeShader.js.map +1 -1
  22. package/Engines/Extensions/engine.rawTexture.js +3 -3
  23. package/Engines/Extensions/engine.rawTexture.js.map +1 -1
  24. package/Engines/Native/nativePipelineContext.js +1 -1
  25. package/Engines/Native/nativePipelineContext.js.map +1 -1
  26. package/Engines/WebGL/webGLPipelineContext.js +1 -1
  27. package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
  28. package/Engines/WebGPU/webgpuComputeContext.js +7 -3
  29. package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
  30. package/Engines/engine.d.ts +1 -1
  31. package/Engines/thinEngine.js +2 -2
  32. package/Engines/thinEngine.js.map +1 -1
  33. package/Engines/webgpuEngine.js +2 -15
  34. package/Engines/webgpuEngine.js.map +1 -1
  35. package/Layers/glowLayer.js +2 -1
  36. package/Layers/glowLayer.js.map +1 -1
  37. package/Layers/highlightLayer.js +2 -1
  38. package/Layers/highlightLayer.js.map +1 -1
  39. package/Lights/light.js +2 -1
  40. package/Lights/light.js.map +1 -1
  41. package/Loading/Plugins/babylonFileLoader.js +9 -0
  42. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  43. package/Loading/sceneLoader.d.ts +6 -1
  44. package/Loading/sceneLoader.js +6 -5
  45. package/Loading/sceneLoader.js.map +1 -1
  46. package/Materials/Background/backgroundMaterial.js +2 -1
  47. package/Materials/Background/backgroundMaterial.js.map +1 -1
  48. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
  49. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  50. package/Materials/Node/nodeMaterial.d.ts +2 -1
  51. package/Materials/Node/nodeMaterial.js +5 -1
  52. package/Materials/Node/nodeMaterial.js.map +1 -1
  53. package/Materials/PBR/pbrBaseMaterial.d.ts +1 -1
  54. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  55. package/Materials/PBR/pbrMaterial.js +2 -1
  56. package/Materials/PBR/pbrMaterial.js.map +1 -1
  57. package/Materials/PBR/pbrMetallicRoughnessMaterial.js +2 -1
  58. package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
  59. package/Materials/PBR/pbrSpecularGlossinessMaterial.js +2 -1
  60. package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
  61. package/Materials/Textures/baseTexture.js +2 -1
  62. package/Materials/Textures/baseTexture.js.map +1 -1
  63. package/Materials/Textures/cubeTexture.js +2 -1
  64. package/Materials/Textures/cubeTexture.js.map +1 -1
  65. package/Materials/Textures/rawCubeTexture.js +1 -1
  66. package/Materials/Textures/rawCubeTexture.js.map +1 -1
  67. package/Materials/Textures/texture.js +2 -1
  68. package/Materials/Textures/texture.js.map +1 -1
  69. package/Materials/colorCurves.d.ts +1 -1
  70. package/Materials/colorCurves.functions.d.ts +5 -0
  71. package/Materials/colorCurves.functions.js +8 -0
  72. package/Materials/colorCurves.functions.js.map +1 -0
  73. package/Materials/colorCurves.js +8 -8
  74. package/Materials/colorCurves.js.map +1 -1
  75. package/Materials/fresnelParameters.js +1 -1
  76. package/Materials/fresnelParameters.js.map +1 -1
  77. package/Materials/imageProcessingConfiguration.d.ts +3 -48
  78. package/Materials/imageProcessingConfiguration.defines.d.ts +46 -0
  79. package/Materials/imageProcessingConfiguration.defines.js +27 -0
  80. package/Materials/imageProcessingConfiguration.defines.js.map +1 -0
  81. package/Materials/imageProcessingConfiguration.functions.d.ts +13 -0
  82. package/Materials/imageProcessingConfiguration.functions.js +41 -0
  83. package/Materials/imageProcessingConfiguration.functions.js.map +1 -0
  84. package/Materials/imageProcessingConfiguration.js +18 -69
  85. package/Materials/imageProcessingConfiguration.js.map +1 -1
  86. package/Materials/material.js +2 -1
  87. package/Materials/material.js.map +1 -1
  88. package/Materials/materialHelper.d.ts +33 -33
  89. package/Materials/materialHelper.js +244 -286
  90. package/Materials/materialHelper.js.map +1 -1
  91. package/Materials/materialPluginBase.js +2 -1
  92. package/Materials/materialPluginBase.js.map +1 -1
  93. package/Materials/materialStencilState.js +2 -1
  94. package/Materials/materialStencilState.js.map +1 -1
  95. package/Materials/shaderMaterial.js +1 -1
  96. package/Materials/shaderMaterial.js.map +1 -1
  97. package/Materials/standardMaterial.d.ts +1 -1
  98. package/Materials/standardMaterial.js +2 -1
  99. package/Materials/standardMaterial.js.map +1 -1
  100. package/Materials/uniformBuffer.js +2 -2
  101. package/Materials/uniformBuffer.js.map +1 -1
  102. package/Maths/math.color.d.ts +392 -66
  103. package/Maths/math.color.js +541 -65
  104. package/Maths/math.color.js.map +1 -1
  105. package/Maths/math.like.d.ts +17 -28
  106. package/Maths/math.like.js.map +1 -1
  107. package/Maths/math.plane.d.ts +2 -1
  108. package/Maths/math.plane.js.map +1 -1
  109. package/Maths/math.polar.d.ts +1 -1
  110. package/Maths/math.polar.js.map +1 -1
  111. package/Maths/math.scalar.d.ts +6 -6
  112. package/Maths/math.scalar.functions.d.ts +51 -0
  113. package/Maths/math.scalar.functions.js +80 -0
  114. package/Maths/math.scalar.functions.js.map +1 -0
  115. package/Maths/math.scalar.js +48 -73
  116. package/Maths/math.scalar.js.map +1 -1
  117. package/Maths/math.vector.d.ts +571 -72
  118. package/Maths/math.vector.js +917 -119
  119. package/Maths/math.vector.js.map +1 -1
  120. package/Maths/math.viewport.d.ts +2 -1
  121. package/Maths/math.viewport.js.map +1 -1
  122. package/Maths/tensor.d.ts +411 -0
  123. package/Maths/tensor.js +3 -0
  124. package/Maths/tensor.js.map +1 -0
  125. package/Meshes/Node/Blocks/Set/setColorsBlock.js +20 -4
  126. package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
  127. package/Meshes/Node/nodeGeometry.js +2 -1
  128. package/Meshes/Node/nodeGeometry.js.map +1 -1
  129. package/Meshes/mesh.js +2 -2
  130. package/Meshes/mesh.js.map +1 -1
  131. package/Meshes/mesh.vertexData.d.ts +4 -0
  132. package/Meshes/mesh.vertexData.js +10 -0
  133. package/Meshes/mesh.vertexData.js.map +1 -1
  134. package/Meshes/transformNode.js +2 -1
  135. package/Meshes/transformNode.js.map +1 -1
  136. package/Misc/arrayTools.d.ts +2 -19
  137. package/Misc/arrayTools.js.map +1 -1
  138. package/Misc/decorators.d.ts +0 -80
  139. package/Misc/decorators.functions.d.ts +7 -0
  140. package/Misc/decorators.functions.js +52 -0
  141. package/Misc/decorators.functions.js.map +1 -0
  142. package/Misc/decorators.js +2 -318
  143. package/Misc/decorators.js.map +1 -1
  144. package/Misc/decorators.serialization.d.ts +81 -0
  145. package/Misc/decorators.serialization.js +269 -0
  146. package/Misc/decorators.serialization.js.map +1 -0
  147. package/Misc/index.d.ts +1 -0
  148. package/Misc/index.js +1 -0
  149. package/Misc/index.js.map +1 -1
  150. package/Misc/sceneRecorder.js +1 -1
  151. package/Misc/sceneRecorder.js.map +1 -1
  152. package/Misc/sceneSerializer.js +8 -1
  153. package/Misc/sceneSerializer.js.map +1 -1
  154. package/Misc/tools.functions.d.ts +14 -0
  155. package/Misc/tools.functions.js +23 -0
  156. package/Misc/tools.functions.js.map +1 -0
  157. package/Misc/tools.js +5 -6
  158. package/Misc/tools.js.map +1 -1
  159. package/Morph/morphTarget.js +2 -1
  160. package/Morph/morphTarget.js.map +1 -1
  161. package/Particles/EmitterTypes/boxParticleEmitter.js +8 -8
  162. package/Particles/EmitterTypes/boxParticleEmitter.js.map +1 -1
  163. package/Particles/baseParticleSystem.d.ts +8 -11
  164. package/Particles/baseParticleSystem.js +9 -40
  165. package/Particles/baseParticleSystem.js.map +1 -1
  166. package/Particles/gpuParticleSystem.d.ts +71 -1
  167. package/Particles/gpuParticleSystem.js +102 -1
  168. package/Particles/gpuParticleSystem.js.map +1 -1
  169. package/Particles/particle.d.ts +3 -3
  170. package/Particles/particle.js +3 -3
  171. package/Particles/particle.js.map +1 -1
  172. package/Particles/particleSystem.d.ts +81 -455
  173. package/Particles/particleSystem.functions.d.ts +61 -0
  174. package/Particles/particleSystem.functions.js +79 -0
  175. package/Particles/particleSystem.functions.js.map +1 -0
  176. package/Particles/particleSystem.js +390 -1984
  177. package/Particles/particleSystem.js.map +1 -1
  178. package/Particles/thinParticleSystem.d.ts +485 -0
  179. package/Particles/thinParticleSystem.js +1768 -0
  180. package/Particles/thinParticleSystem.js.map +1 -0
  181. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +2 -1
  182. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  183. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -1
  184. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  185. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +2 -1
  186. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  187. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +2 -1
  188. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  189. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js +2 -1
  190. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
  191. package/PostProcesses/blackAndWhitePostProcess.js +2 -1
  192. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  193. package/PostProcesses/blurPostProcess.js +2 -1
  194. package/PostProcesses/blurPostProcess.js.map +1 -1
  195. package/PostProcesses/chromaticAberrationPostProcess.js +2 -1
  196. package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
  197. package/PostProcesses/colorCorrectionPostProcess.js +2 -1
  198. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  199. package/PostProcesses/convolutionPostProcess.js +2 -1
  200. package/PostProcesses/convolutionPostProcess.js.map +1 -1
  201. package/PostProcesses/displayPassPostProcess.js +1 -1
  202. package/PostProcesses/displayPassPostProcess.js.map +1 -1
  203. package/PostProcesses/filterPostProcess.js +2 -1
  204. package/PostProcesses/filterPostProcess.js.map +1 -1
  205. package/PostProcesses/fxaaPostProcess.js +1 -1
  206. package/PostProcesses/fxaaPostProcess.js.map +1 -1
  207. package/PostProcesses/grainPostProcess.js +2 -1
  208. package/PostProcesses/grainPostProcess.js.map +1 -1
  209. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  210. package/PostProcesses/motionBlurPostProcess.js +2 -1
  211. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  212. package/PostProcesses/passPostProcess.js +1 -1
  213. package/PostProcesses/passPostProcess.js.map +1 -1
  214. package/PostProcesses/postProcess.js +2 -1
  215. package/PostProcesses/postProcess.js.map +1 -1
  216. package/PostProcesses/refractionPostProcess.js +2 -1
  217. package/PostProcesses/refractionPostProcess.js.map +1 -1
  218. package/PostProcesses/screenSpaceCurvaturePostProcess.js +2 -1
  219. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  220. package/PostProcesses/screenSpaceReflectionPostProcess.js +2 -1
  221. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  222. package/PostProcesses/sharpenPostProcess.js +2 -1
  223. package/PostProcesses/sharpenPostProcess.js.map +1 -1
  224. package/Probes/reflectionProbe.js +2 -1
  225. package/Probes/reflectionProbe.js.map +1 -1
  226. package/Sprites/spriteManager.d.ts +4 -0
  227. package/Sprites/spriteManager.js.map +1 -1
  228. package/XR/features/WebXRControllerTeleportation.d.ts +9 -0
  229. package/XR/features/WebXRControllerTeleportation.js +75 -31
  230. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  231. package/node.js +2 -1
  232. package/node.js.map +1 -1
  233. package/package.json +1 -1
  234. package/types.d.ts +105 -0
  235. package/types.js.map +1 -1
@@ -1,23 +1,98 @@
1
1
  import type { Viewport } from "./math.viewport";
2
- import type { DeepImmutable, Nullable, FloatArray, float } from "../types";
3
- import type { IPlaneLike } from "./math.like";
2
+ import type { DeepImmutable, Nullable, FloatArray, float, Tuple } from "../types";
4
3
  import type { Plane } from "./math.plane";
5
4
  import type { TransformNode } from "../Meshes/transformNode";
6
- export type Vector2Constructor<T extends Vector2> = new (...args: ConstructorParameters<typeof Vector2>) => T;
7
- export type Vector3Constructor<T extends Vector3> = new (...args: ConstructorParameters<typeof Vector3>) => T;
8
- export type Vector4Constructor<T extends Vector4> = new (...args: ConstructorParameters<typeof Vector4>) => T;
9
- export type QuaternionConstructor<T extends Quaternion> = new (...args: ConstructorParameters<typeof Quaternion>) => T;
10
- export type MatrixConstructor<T extends Matrix> = new () => T;
5
+ import type { Dimension, Tensor, TensorStatic } from "./tensor";
6
+ import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike } from "./math.like";
7
+ /**
8
+ * Represents a vector of any dimension
9
+ */
10
+ export interface Vector<N extends number[] = number[]> extends Tensor<N> {
11
+ /**
12
+ * @see Tensor.dimension
13
+ */
14
+ readonly dimension: Readonly<Dimension<N>>;
15
+ /**
16
+ * @see Tensor.rank
17
+ */
18
+ readonly rank: 1;
19
+ /**
20
+ * Gets the length of the vector
21
+ * @returns the vector length (float)
22
+ */
23
+ length(): number;
24
+ /**
25
+ * Gets the vector squared length
26
+ * @returns the vector squared length (float)
27
+ */
28
+ lengthSquared(): number;
29
+ /**
30
+ * Normalize the vector
31
+ * @returns the current updated Vector
32
+ */
33
+ normalize(): this;
34
+ /**
35
+ * Normalize the current Vector with the given input length.
36
+ * Please note that this is an in place operation.
37
+ * @param len the length of the vector
38
+ * @returns the current updated Vector
39
+ */
40
+ normalizeFromLength(len: number): this;
41
+ /**
42
+ * Normalize the current Vector to a new vector
43
+ * @returns the new Vector
44
+ */
45
+ normalizeToNew(): this;
46
+ /**
47
+ * Normalize the current Vector to the reference
48
+ * @param reference define the Vector to update
49
+ * @returns the updated Vector
50
+ */
51
+ normalizeToRef(reference: this): this;
52
+ }
53
+ /**
54
+ * Static side of Vector
55
+ */
56
+ export interface VectorStatic<T extends Vector> extends TensorStatic<T> {
57
+ /**
58
+ * Checks if a given vector is inside a specific range
59
+ * @param v defines the vector to test
60
+ * @param min defines the minimum range
61
+ * @param max defines the maximum range
62
+ */
63
+ CheckExtends(v: T, min: T, max: T): void;
64
+ /**
65
+ * Returns a new Vector equal to the normalized given vector
66
+ * @param vector defines the vector to normalize
67
+ * @returns a new Vector
68
+ */
69
+ Normalize(vector: DeepImmutable<T>): T;
70
+ /**
71
+ * Normalize a given vector into a second one
72
+ * @param vector defines the vector to normalize
73
+ * @param result defines the vector where to store the result
74
+ * @returns result input
75
+ */
76
+ NormalizeToRef(vector: DeepImmutable<T>, result: T): T;
77
+ }
11
78
  /**
12
79
  * Class representing a vector containing 2 coordinates
13
80
  * Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9
14
81
  */
15
- export declare class Vector2 {
82
+ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
16
83
  /** defines the first coordinate */
17
84
  x: number;
18
85
  /** defines the second coordinate */
19
86
  y: number;
20
87
  private static _ZeroReadOnly;
88
+ /**
89
+ * @see Tensor.dimension
90
+ */
91
+ readonly dimension: Readonly<[2]>;
92
+ /**
93
+ * @see Tensor.rank
94
+ */
95
+ readonly rank: 1;
21
96
  /**
22
97
  * Creates a new Vector2 from the given x and y coordinates
23
98
  * @param x defines the first coordinate
@@ -55,23 +130,23 @@ export declare class Vector2 {
55
130
  * Update the current vector from an array
56
131
  * Example Playground https://playground.babylonjs.com/#QYBWV4#39
57
132
  * @param array defines the destination array
58
- * @param index defines the offset in the destination array
133
+ * @param offset defines the offset in the destination array
59
134
  * @returns the current Vector2
60
135
  */
61
- fromArray(array: FloatArray, index?: number): this;
136
+ fromArray(array: FloatArray, offset?: number): this;
62
137
  /**
63
138
  * Copy the current vector to an array
64
139
  * Example Playground https://playground.babylonjs.com/#QYBWV4#40
65
140
  * @returns a new array with 2 elements: the Vector2 coordinates.
66
141
  */
67
- asArray(): number[];
142
+ asArray(): [number, number];
68
143
  /**
69
144
  * Sets the Vector2 coordinates with the given Vector2 coordinates
70
145
  * Example Playground https://playground.babylonjs.com/#QYBWV4#24
71
146
  * @param source defines the source Vector2
72
147
  * @returns the current updated Vector2
73
148
  */
74
- copyFrom(source: DeepImmutable<Vector2>): this;
149
+ copyFrom(source: DeepImmutable<this>): this;
75
150
  /**
76
151
  * Sets the Vector2 coordinates with the given floats
77
152
  * Example Playground https://playground.babylonjs.com/#QYBWV4#25
@@ -88,13 +163,19 @@ export declare class Vector2 {
88
163
  * @returns the current updated Vector2
89
164
  */
90
165
  set(x: number, y: number): this;
166
+ /**
167
+ * Copies the given float to the current Vector2 coordinates
168
+ * @param v defines the x and y coordinates of the operand
169
+ * @returns the current updated Vector2
170
+ */
171
+ setAll(v: number): this;
91
172
  /**
92
173
  * Add another vector with the current one
93
174
  * Example Playground https://playground.babylonjs.com/#QYBWV4#11
94
175
  * @param otherVector defines the other vector
95
176
  * @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates
96
177
  */
97
- add(otherVector: DeepImmutable<Vector2>): this;
178
+ add(otherVector: DeepImmutable<this>): this;
98
179
  /**
99
180
  * Sets the "result" coordinates with the addition of the current Vector2 and the given one coordinates
100
181
  * Example Playground https://playground.babylonjs.com/#QYBWV4#12
@@ -102,14 +183,21 @@ export declare class Vector2 {
102
183
  * @param result defines the target vector
103
184
  * @returns result input
104
185
  */
105
- addToRef<T extends Vector2>(otherVector: DeepImmutable<Vector2>, result: T): T;
186
+ addToRef<T extends this>(otherVector: DeepImmutable<this>, result: T): T;
106
187
  /**
107
188
  * Set the Vector2 coordinates by adding the given Vector2 coordinates
108
189
  * Example Playground https://playground.babylonjs.com/#QYBWV4#13
109
190
  * @param otherVector defines the other vector
110
191
  * @returns the current updated Vector2
111
192
  */
112
- addInPlace(otherVector: DeepImmutable<Vector2>): this;
193
+ addInPlace(otherVector: DeepImmutable<this>): this;
194
+ /**
195
+ * Adds the given coordinates to the current Vector2
196
+ * @param x defines the x coordinate of the operand
197
+ * @param y defines the y coordinate of the operand
198
+ * @returns the current updated Vector2
199
+ */
200
+ addInPlaceFromFloats(x: number, y: number): this;
113
201
  /**
114
202
  * Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates
115
203
  * Example Playground https://playground.babylonjs.com/#QYBWV4#14
@@ -123,7 +211,7 @@ export declare class Vector2 {
123
211
  * @param otherVector defines the other vector
124
212
  * @returns a new Vector2
125
213
  */
126
- subtract(otherVector: Vector2): this;
214
+ subtract(otherVector: DeepImmutable<this>): this;
127
215
  /**
128
216
  * Sets the "result" coordinates with the subtraction of the given one from the current Vector2 coordinates.
129
217
  * Example Playground https://playground.babylonjs.com/#QYBWV4#63
@@ -131,28 +219,28 @@ export declare class Vector2 {
131
219
  * @param result defines the target vector
132
220
  * @returns result input
133
221
  */
134
- subtractToRef<T extends Vector2>(otherVector: DeepImmutable<Vector2>, result: T): T;
222
+ subtractToRef<T extends this>(otherVector: DeepImmutable<this>, result: T): T;
135
223
  /**
136
224
  * Sets the current Vector2 coordinates by subtracting from it the given one coordinates
137
225
  * Example Playground https://playground.babylonjs.com/#QYBWV4#88
138
226
  * @param otherVector defines the other vector
139
227
  * @returns the current updated Vector2
140
228
  */
141
- subtractInPlace(otherVector: DeepImmutable<Vector2>): this;
229
+ subtractInPlace(otherVector: DeepImmutable<this>): this;
142
230
  /**
143
231
  * Multiplies in place the current Vector2 coordinates by the given ones
144
232
  * Example Playground https://playground.babylonjs.com/#QYBWV4#43
145
233
  * @param otherVector defines the other vector
146
234
  * @returns the current updated Vector2
147
235
  */
148
- multiplyInPlace(otherVector: DeepImmutable<Vector2>): this;
236
+ multiplyInPlace(otherVector: DeepImmutable<this>): this;
149
237
  /**
150
238
  * Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates
151
239
  * Example Playground https://playground.babylonjs.com/#QYBWV4#42
152
240
  * @param otherVector defines the other vector
153
241
  * @returns a new Vector2
154
242
  */
155
- multiply(otherVector: DeepImmutable<Vector2>): this;
243
+ multiply(otherVector: DeepImmutable<this>): this;
156
244
  /**
157
245
  * Sets "result" coordinates with the multiplication of the current Vector2 and the given one coordinates
158
246
  * Example Playground https://playground.babylonjs.com/#QYBWV4#44
@@ -160,7 +248,7 @@ export declare class Vector2 {
160
248
  * @param result defines the target vector
161
249
  * @returns result input
162
250
  */
163
- multiplyToRef<T extends Vector2>(otherVector: DeepImmutable<Vector2>, result: T): T;
251
+ multiplyToRef<T extends this>(otherVector: DeepImmutable<this>, result: T): T;
164
252
  /**
165
253
  * Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats
166
254
  * Example Playground https://playground.babylonjs.com/#QYBWV4#89
@@ -175,7 +263,7 @@ export declare class Vector2 {
175
263
  * @param otherVector defines the other vector
176
264
  * @returns a new Vector2
177
265
  */
178
- divide(otherVector: Vector2): this;
266
+ divide(otherVector: DeepImmutable<this>): this;
179
267
  /**
180
268
  * Sets the "result" coordinates with the Vector2 divided by the given one coordinates
181
269
  * Example Playground https://playground.babylonjs.com/#QYBWV4#30
@@ -183,17 +271,57 @@ export declare class Vector2 {
183
271
  * @param result defines the target vector
184
272
  * @returns result input
185
273
  */
186
- divideToRef<T extends Vector2>(otherVector: DeepImmutable<Vector2>, result: T): T;
274
+ divideToRef<T extends this>(otherVector: DeepImmutable<this>, result: T): T;
187
275
  /**
188
276
  * Divides the current Vector2 coordinates by the given ones
189
277
  * Example Playground https://playground.babylonjs.com/#QYBWV4#28
190
278
  * @param otherVector defines the other vector
191
279
  * @returns the current updated Vector2
192
280
  */
193
- divideInPlace(otherVector: DeepImmutable<Vector2>): this;
281
+ divideInPlace(otherVector: DeepImmutable<this>): this;
282
+ /**
283
+ * Updates the current Vector2 with the minimal coordinate values between its and the given vector ones
284
+ * @param other defines the second operand
285
+ * @returns the current updated Vector2
286
+ */
287
+ minimizeInPlace(other: DeepImmutable<this>): this;
288
+ /**
289
+ * Updates the current Vector2 with the maximal coordinate values between its and the given vector ones.
290
+ * @param other defines the second operand
291
+ * @returns the current updated Vector2
292
+ */
293
+ maximizeInPlace(other: DeepImmutable<this>): this;
294
+ /**
295
+ * Updates the current Vector2 with the minimal coordinate values between its and the given coordinates
296
+ * @param x defines the x coordinate of the operand
297
+ * @param y defines the y coordinate of the operand
298
+ * @returns the current updated Vector2
299
+ */
300
+ minimizeInPlaceFromFloats(x: number, y: number): this;
301
+ /**
302
+ * Updates the current Vector2 with the maximal coordinate values between its and the given coordinates.
303
+ * @param x defines the x coordinate of the operand
304
+ * @param y defines the y coordinate of the operand
305
+ * @returns the current updated Vector2
306
+ */
307
+ maximizeInPlaceFromFloats(x: number, y: number): this;
308
+ /**
309
+ * Returns a new Vector2 set with the subtraction of the given floats from the current Vector2 coordinates
310
+ * @param x defines the x coordinate of the operand
311
+ * @param y defines the y coordinate of the operand
312
+ * @returns the resulting Vector2
313
+ */
314
+ subtractFromFloats(x: number, y: number): this;
315
+ /**
316
+ * Subtracts the given floats from the current Vector2 coordinates and set the given vector "result" with this result
317
+ * @param x defines the x coordinate of the operand
318
+ * @param y defines the y coordinate of the operand
319
+ * @param result defines the Vector2 object where to store the result
320
+ * @returns the result
321
+ */
322
+ subtractFromFloatsToRef<T extends this>(x: number, y: number, result: T): T;
194
323
  /**
195
324
  * Gets a new Vector2 with current Vector2 negated coordinates
196
- * Example Playground https://playground.babylonjs.com/#QYBWV4#22
197
325
  * @returns a new Vector2
198
326
  */
199
327
  negate(): this;
@@ -209,7 +337,7 @@ export declare class Vector2 {
209
337
  * @param result defines the Vector3 object where to store the result
210
338
  * @returns the result
211
339
  */
212
- negateToRef<T extends Vector2>(result: T): T;
340
+ negateToRef<T extends this>(result: T): T;
213
341
  /**
214
342
  * Multiply the Vector2 coordinates by
215
343
  * Example Playground https://playground.babylonjs.com/#QYBWV4#59
@@ -231,7 +359,7 @@ export declare class Vector2 {
231
359
  * @param result defines the Vector2 object where to store the result
232
360
  * @returns result input
233
361
  */
234
- scaleToRef<T extends Vector2>(scale: number, result: T): T;
362
+ scaleToRef<T extends this>(scale: number, result: T): T;
235
363
  /**
236
364
  * Scale the current Vector2 values by a factor and add the result to a given Vector2
237
365
  * Example Playground https://playground.babylonjs.com/#QYBWV4#58
@@ -239,14 +367,14 @@ export declare class Vector2 {
239
367
  * @param result defines the Vector2 object where to store the result
240
368
  * @returns result input
241
369
  */
242
- scaleAndAddToRef<T extends Vector2>(scale: number, result: T): T;
370
+ scaleAndAddToRef<T extends this>(scale: number, result: T): T;
243
371
  /**
244
372
  * Gets a boolean if two vectors are equals
245
373
  * Example Playground https://playground.babylonjs.com/#QYBWV4#31
246
374
  * @param otherVector defines the other vector
247
375
  * @returns true if the given vector coordinates strictly equal the current Vector2 ones
248
376
  */
249
- equals(otherVector: DeepImmutable<Vector2>): boolean;
377
+ equals(otherVector: DeepImmutable<this>): boolean;
250
378
  /**
251
379
  * Gets a boolean if two vectors are equals (using an epsilon value)
252
380
  * Example Playground https://playground.babylonjs.com/#QYBWV4#32
@@ -254,7 +382,14 @@ export declare class Vector2 {
254
382
  * @param epsilon defines the minimal distance to consider equality
255
383
  * @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.
256
384
  */
257
- equalsWithEpsilon(otherVector: DeepImmutable<Vector2>, epsilon?: number): boolean;
385
+ equalsWithEpsilon(otherVector: DeepImmutable<this>, epsilon?: number): boolean;
386
+ /**
387
+ * Returns true if the current Vector2 coordinates equals the given floats
388
+ * @param x defines the x coordinate of the operand
389
+ * @param y defines the y coordinate of the operand
390
+ * @returns true if both vectors are equal
391
+ */
392
+ equalsToFloats(x: number, y: number): boolean;
258
393
  /**
259
394
  * Gets a new Vector2 from current Vector2 floored values
260
395
  * Example Playground https://playground.babylonjs.com/#QYBWV4#35
@@ -262,6 +397,12 @@ export declare class Vector2 {
262
397
  * @returns a new Vector2
263
398
  */
264
399
  floor(): this;
400
+ /**
401
+ * Gets the current Vector2's floored values and stores them in result
402
+ * @param result the Vector2 to store the result in
403
+ * @returns the result Vector2
404
+ */
405
+ floorToRef<T extends this>(result: T): T;
265
406
  /**
266
407
  * Gets a new Vector2 from current Vector2 fractional values
267
408
  * Example Playground https://playground.babylonjs.com/#QYBWV4#34
@@ -269,6 +410,12 @@ export declare class Vector2 {
269
410
  * @returns a new Vector2
270
411
  */
271
412
  fract(): this;
413
+ /**
414
+ * Gets the current Vector2's fractional values and stores them in result
415
+ * @param result the Vector2 to store the result in
416
+ * @returns the result Vector2
417
+ */
418
+ fractToRef<T extends this>(result: T): T;
272
419
  /**
273
420
  * Rotate the current vector into a given result vector
274
421
  * Example Playground https://playground.babylonjs.com/#QYBWV4#49
@@ -276,7 +423,7 @@ export declare class Vector2 {
276
423
  * @param result defines the result vector where to store the rotated vector
277
424
  * @returns result input
278
425
  */
279
- rotateToRef<T extends Vector2>(angle: number, result: T): T;
426
+ rotateToRef<T extends this>(angle: number, result: T): T;
280
427
  /**
281
428
  * Gets the length of the vector
282
429
  * @returns the vector length (float)
@@ -307,10 +454,10 @@ export declare class Vector2 {
307
454
  normalizeToNew(): this;
308
455
  /**
309
456
  * Normalize the current Vector2 to the reference
310
- * @param reference define the Vector2 to update
457
+ * @param reference define the Vector to update
311
458
  * @returns the updated Vector2
312
459
  */
313
- normalizeToRef<T extends Vector2>(reference: T): T;
460
+ normalizeToRef<T extends this>(reference: T): T;
314
461
  /**
315
462
  * Gets a new Vector2 copied from the Vector2
316
463
  * Example Playground https://playground.babylonjs.com/#QYBWV4#20
@@ -340,6 +487,14 @@ export declare class Vector2 {
340
487
  * @returns a Vector2 with random values between min and max
341
488
  */
342
489
  static Random(min?: number, max?: number): Vector2;
490
+ /**
491
+ * Sets a Vector2 with random values between min and max
492
+ * @param min the minimum random value
493
+ * @param max the maximum random value
494
+ * @param ref the ref to store the values in
495
+ * @returns the ref with random values between min and max
496
+ */
497
+ static RandomToRef<T extends Vector2>(min: number | undefined, max: number | undefined, ref: T): T;
343
498
  /**
344
499
  * Gets a zero Vector2 that must not be updated
345
500
  */
@@ -361,6 +516,14 @@ export declare class Vector2 {
361
516
  * @returns result input
362
517
  */
363
518
  static FromArrayToRef<T extends Vector2>(array: DeepImmutable<ArrayLike<number>>, offset: number, result: T): T;
519
+ /**
520
+ * Sets the given vector "result" with the given floats.
521
+ * @param x defines the x coordinate of the source
522
+ * @param y defines the y coordinate of the source
523
+ * @param result defines the Vector2 where to store the result
524
+ * @returns the result vector
525
+ */
526
+ static FromFloatsToRef<T extends Vector2>(x: number, y: number, result: T): T;
364
527
  /**
365
528
  * Gets a new Vector2 located for "amount" (float) on the CatmullRom spline defined by the given four Vector2
366
529
  * Example Playground https://playground.babylonjs.com/#QYBWV4#65
@@ -372,6 +535,17 @@ export declare class Vector2 {
372
535
  * @returns a new Vector2
373
536
  */
374
537
  static CatmullRom<T extends Vector2>(value1: DeepImmutable<T>, value2: DeepImmutable<Vector2>, value3: DeepImmutable<Vector2>, value4: DeepImmutable<Vector2>, amount: number): T;
538
+ /**
539
+ * Sets reference with same the coordinates than "value" ones if the vector "value" is in the square defined by "min" and "max".
540
+ * If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
541
+ * If a coordinate of "value" is greater than "max" coordinates, the returned Vector2 is given this "max" coordinate
542
+ * @param value defines the value to clamp
543
+ * @param min defines the lower limit
544
+ * @param max defines the upper limit
545
+ * @param ref the reference
546
+ * @returns the reference
547
+ */
548
+ static ClampToRef<T extends Vector2>(value: DeepImmutable<T>, min: DeepImmutable<Vector2>, max: DeepImmutable<Vector2>, ref: T): T;
375
549
  /**
376
550
  * Returns a new Vector2 set with same the coordinates than "value" ones if the vector "value" is in the square defined by "min" and "max".
377
551
  * If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
@@ -543,7 +717,7 @@ export declare class Vector2 {
543
717
  * Reminder: js uses a left handed forward facing system
544
718
  * Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU
545
719
  */
546
- export declare class Vector3 {
720
+ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
547
721
  private static _UpReadOnly;
548
722
  private static _DownReadOnly;
549
723
  private static _LeftHandedForwardReadOnly;
@@ -554,6 +728,14 @@ export declare class Vector3 {
554
728
  private static _LeftReadOnly;
555
729
  private static _ZeroReadOnly;
556
730
  private static _OneReadOnly;
731
+ /**
732
+ * @see Tensor.dimension
733
+ */
734
+ readonly dimension: Readonly<[3]>;
735
+ /**
736
+ * @see Tensor.rank
737
+ */
738
+ readonly rank: 1;
557
739
  /** @internal */
558
740
  _x: number;
559
741
  /** @internal */
@@ -599,7 +781,7 @@ export declare class Vector3 {
599
781
  * Example Playground https://playground.babylonjs.com/#R1F8YU#10
600
782
  * @returns a new array of numbers
601
783
  */
602
- asArray(): number[];
784
+ asArray(): Tuple<number, 3>;
603
785
  /**
604
786
  * Populates the given array or Float32Array from the given index with the successive coordinates of the Vector3
605
787
  * Example Playground https://playground.babylonjs.com/#R1F8YU#65
@@ -612,10 +794,10 @@ export declare class Vector3 {
612
794
  * Update the current vector from an array
613
795
  * Example Playground https://playground.babylonjs.com/#R1F8YU#24
614
796
  * @param array defines the destination array
615
- * @param index defines the offset in the destination array
797
+ * @param offset defines the offset in the destination array
616
798
  * @returns the current Vector3
617
799
  */
618
- fromArray(array: FloatArray, index?: number): this;
800
+ fromArray(array: FloatArray, offset?: number): this;
619
801
  /**
620
802
  * Converts the current Vector3 into a quaternion (considering that the Vector3 contains Euler angles representation of a rotation)
621
803
  * Example Playground https://playground.babylonjs.com/#R1F8YU#66
@@ -746,7 +928,7 @@ export declare class Vector3 {
746
928
  * @param result defines the Vector3 object where to store the resultant normal
747
929
  * @returns the result
748
930
  */
749
- getNormalToRef(result: DeepImmutable<Vector3>): Vector3;
931
+ getNormalToRef(result: Vector3): Vector3;
750
932
  /**
751
933
  * Rotates the vector using the given unit quaternion and stores the new vector in result
752
934
  * Example Playground https://playground.babylonjs.com/#R1F8YU#9
@@ -870,7 +1052,7 @@ export declare class Vector3 {
870
1052
  * @param otherVector defines the second operand
871
1053
  * @returns the current updated Vector3
872
1054
  */
873
- divideInPlace(otherVector: Vector3): this;
1055
+ divideInPlace(otherVector: DeepImmutable<Vector3>): this;
874
1056
  /**
875
1057
  * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones
876
1058
  * Example Playground https://playground.babylonjs.com/#R1F8YU#29
@@ -914,12 +1096,24 @@ export declare class Vector3 {
914
1096
  * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same
915
1097
  */
916
1098
  get isNonUniform(): boolean;
1099
+ /**
1100
+ * Gets the current Vector3's floored values and stores them in result
1101
+ * @param result the vector to store the result in
1102
+ * @returns the result vector
1103
+ */
1104
+ floorToRef<T extends this>(result: T): T;
917
1105
  /**
918
1106
  * Gets a new Vector3 from current Vector3 floored values
919
1107
  * Example Playground https://playground.babylonjs.com/#R1F8YU#22
920
1108
  * @returns a new Vector3
921
1109
  */
922
1110
  floor(): this;
1111
+ /**
1112
+ * Gets the current Vector3's fractional values and stores them in result
1113
+ * @param result the vector to store the result in
1114
+ * @returns the result vector
1115
+ */
1116
+ fractToRef<T extends this>(result: T): T;
923
1117
  /**
924
1118
  * Gets a new Vector3 from current Vector3 fractional values
925
1119
  * Example Playground https://playground.babylonjs.com/#R1F8YU#23
@@ -1069,7 +1263,7 @@ export declare class Vector3 {
1069
1263
  * @param normal Normal of the projection plane
1070
1264
  * @returns the angle in radians (float) between vector0 and vector1 projected on the plane with the specified normal
1071
1265
  */
1072
- static GetAngleBetweenVectorsOnPlane(vector0: Vector3, vector1: Vector3, normal: Vector3): number;
1266
+ static GetAngleBetweenVectorsOnPlane(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): number;
1073
1267
  /**
1074
1268
  * Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point and stores it in the ref Vector3
1075
1269
  * Example PG https://playground.babylonjs.com/#R1F8YU#189
@@ -1250,6 +1444,14 @@ export declare class Vector3 {
1250
1444
  * @returns a Vector3 with random values between min and max
1251
1445
  */
1252
1446
  static Random(min?: number, max?: number): Vector3;
1447
+ /**
1448
+ * Sets a Vector3 with random values between min and max
1449
+ * @param min the minimum random value
1450
+ * @param max the maximum random value
1451
+ * @param ref the ref to store the values in
1452
+ * @returns the ref with random values between min and max
1453
+ */
1454
+ static RandomToRef<T extends Vector3>(min: number | undefined, max: number | undefined, ref: T): T;
1253
1455
  /**
1254
1456
  * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.
1255
1457
  * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
@@ -1258,7 +1460,7 @@ export declare class Vector3 {
1258
1460
  * @param transformation defines the transformation matrix
1259
1461
  * @returns the transformed Vector3
1260
1462
  */
1261
- static TransformCoordinates<T extends Vector3>(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3;
1463
+ static TransformCoordinates(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3;
1262
1464
  /**
1263
1465
  * Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given vector
1264
1466
  * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
@@ -1482,7 +1684,7 @@ export declare class Vector3 {
1482
1684
  * @param normal defines the normal - Must be normalized
1483
1685
  * @returns the resulting vector
1484
1686
  */
1485
- static Reflect<T extends Vector3>(inDirection: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): Vector3;
1687
+ static Reflect(inDirection: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): Vector3;
1486
1688
  /**
1487
1689
  * Reflects a vector off the plane defined by a normalized normal to reference
1488
1690
  * @param inDirection defines the vector direction
@@ -1636,7 +1838,7 @@ export declare class Vector3 {
1636
1838
  /**
1637
1839
  * Vector4 class created for EulerAngle class conversion to Quaternion
1638
1840
  */
1639
- export declare class Vector4 {
1841
+ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
1640
1842
  /** x value of the vector */
1641
1843
  x: number;
1642
1844
  /** y value of the vector */
@@ -1646,6 +1848,14 @@ export declare class Vector4 {
1646
1848
  /** w value of the vector */
1647
1849
  w: number;
1648
1850
  private static _ZeroReadOnly;
1851
+ /**
1852
+ * @see Tensor.dimension
1853
+ */
1854
+ readonly dimension: Readonly<[4]>;
1855
+ /**
1856
+ * @see Tensor.rank
1857
+ */
1858
+ readonly rank: 1;
1649
1859
  /**
1650
1860
  * Creates a Vector4 object from the given floats.
1651
1861
  * @param x x value of the vector
@@ -1681,7 +1891,7 @@ export declare class Vector4 {
1681
1891
  * Returns a new array populated with 4 elements : the Vector4 coordinates.
1682
1892
  * @returns the resulting array
1683
1893
  */
1684
- asArray(): number[];
1894
+ asArray(): Tuple<number, 4>;
1685
1895
  /**
1686
1896
  * Populates the given array from the given index with the Vector4 coordinates.
1687
1897
  * @param array array to populate
@@ -1692,16 +1902,25 @@ export declare class Vector4 {
1692
1902
  /**
1693
1903
  * Update the current vector from an array
1694
1904
  * @param array defines the destination array
1695
- * @param index defines the offset in the destination array
1905
+ * @param offset defines the offset in the destination array
1696
1906
  * @returns the current Vector3
1697
1907
  */
1698
- fromArray(array: FloatArray, index?: number): this;
1908
+ fromArray(array: FloatArray, offset?: number): this;
1699
1909
  /**
1700
1910
  * Adds the given vector to the current Vector4.
1701
1911
  * @param otherVector the vector to add
1702
1912
  * @returns the updated Vector4.
1703
1913
  */
1704
1914
  addInPlace(otherVector: DeepImmutable<Vector4>): this;
1915
+ /**
1916
+ * Adds the given coordinates to the current Vector4
1917
+ * @param x defines the x coordinate of the operand
1918
+ * @param y defines the y coordinate of the operand
1919
+ * @param z defines the z coordinate of the operand
1920
+ * @param w defines the w coordinate of the operand
1921
+ * @returns the current updated Vector4
1922
+ */
1923
+ addInPlaceFromFloats(x: number, y: number, z: number, w: number): this;
1705
1924
  /**
1706
1925
  * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one.
1707
1926
  * @param otherVector the vector to add
@@ -1734,9 +1953,6 @@ export declare class Vector4 {
1734
1953
  * @returns result input
1735
1954
  */
1736
1955
  subtractToRef<T extends Vector4>(otherVector: DeepImmutable<Vector4>, result: T): T;
1737
- /**
1738
- * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.
1739
- */
1740
1956
  /**
1741
1957
  * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.
1742
1958
  * @param x value to subtract
@@ -1825,7 +2041,7 @@ export declare class Vector4 {
1825
2041
  * @param otherVector vector to multiple with
1826
2042
  * @returns the updated Vector4.
1827
2043
  */
1828
- multiplyInPlace(otherVector: Vector4): this;
2044
+ multiplyInPlace(otherVector: DeepImmutable<Vector4>): this;
1829
2045
  /**
1830
2046
  * Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one.
1831
2047
  * @param otherVector vector to multiple with
@@ -1879,11 +2095,41 @@ export declare class Vector4 {
1879
2095
  * @returns the current updated Vector4
1880
2096
  */
1881
2097
  maximizeInPlace(other: DeepImmutable<Vector4>): this;
2098
+ /**
2099
+ * Updates the current Vector4 with the minimal coordinate values between its and the given coordinates
2100
+ * @param x defines the x coordinate of the operand
2101
+ * @param y defines the y coordinate of the operand
2102
+ * @param z defines the z coordinate of the operand
2103
+ * @param w defines the w coordinate of the operand
2104
+ * @returns the current updated Vector4
2105
+ */
2106
+ minimizeInPlaceFromFloats(x: number, y: number, z: number, w: number): this;
2107
+ /**
2108
+ * Updates the current Vector4 with the maximal coordinate values between its and the given coordinates.
2109
+ * @param x defines the x coordinate of the operand
2110
+ * @param y defines the y coordinate of the operand
2111
+ * @param z defines the z coordinate of the operand
2112
+ * @param w defines the w coordinate of the operand
2113
+ * @returns the current updated Vector4
2114
+ */
2115
+ maximizeInPlaceFromFloats(x: number, y: number, z: number, w: number): this;
2116
+ /**
2117
+ * Gets the current Vector4's floored values and stores them in result
2118
+ * @param result the vector to store the result in
2119
+ * @returns the result vector
2120
+ */
2121
+ floorToRef<T extends this>(result: T): T;
1882
2122
  /**
1883
2123
  * Gets a new Vector4 from current Vector4 floored values
1884
2124
  * @returns a new Vector4
1885
2125
  */
1886
2126
  floor(): this;
2127
+ /**
2128
+ * Gets the current Vector4's fractional values and stores them in result
2129
+ * @param result the vector to store the result in
2130
+ * @returns the result vector
2131
+ */
2132
+ fractToRef<T extends this>(result: T): T;
1887
2133
  /**
1888
2134
  * Gets a new Vector4 from current Vector4 fractional values
1889
2135
  * @returns a new Vector4
@@ -1921,7 +2167,7 @@ export declare class Vector4 {
1921
2167
  * @param reference define the Vector4 to update
1922
2168
  * @returns the updated Vector4
1923
2169
  */
1924
- normalizeToRef<T extends Vector4>(reference: T): T;
2170
+ normalizeToRef<T extends this>(reference: T): T;
1925
2171
  /**
1926
2172
  * Returns a new Vector3 from the Vector4 (x, y, z) coordinates.
1927
2173
  * @returns this converted to a new vector3
@@ -1957,9 +2203,9 @@ export declare class Vector4 {
1957
2203
  */
1958
2204
  set(x: number, y: number, z: number, w: number): this;
1959
2205
  /**
1960
- * Copies the given float to the current Vector3 coordinates
2206
+ * Copies the given float to the current Vector4 coordinates
1961
2207
  * @param v defines the x, y, z and w coordinates of the operand
1962
- * @returns the current updated Vector3
2208
+ * @returns the current updated Vector4
1963
2209
  */
1964
2210
  setAll(v: number): this;
1965
2211
  /**
@@ -2018,6 +2264,43 @@ export declare class Vector4 {
2018
2264
  * @returns a Vector4 with random values between min and max
2019
2265
  */
2020
2266
  static Random(min?: number, max?: number): Vector4;
2267
+ /**
2268
+ * Sets a Vector4 with random values between min and max
2269
+ * @param min the minimum random value
2270
+ * @param max the maximum random value
2271
+ * @param ref the ref to store the values in
2272
+ * @returns the ref with random values between min and max
2273
+ */
2274
+ static RandomToRef<T extends Vector4>(min: number | undefined, max: number | undefined, ref: T): T;
2275
+ /**
2276
+ * Returns a new Vector4 set with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max"
2277
+ * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
2278
+ * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
2279
+ * @param value defines the current value
2280
+ * @param min defines the lower range value
2281
+ * @param max defines the upper range value
2282
+ * @returns the new Vector4
2283
+ */
2284
+ static Clamp<T extends Vector4>(value: DeepImmutable<T>, min: DeepImmutable<Vector4>, max: DeepImmutable<Vector4>): T;
2285
+ /**
2286
+ * Sets the given vector "result" with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max"
2287
+ * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
2288
+ * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
2289
+ * @param value defines the current value
2290
+ * @param min defines the lower range value
2291
+ * @param max defines the upper range value
2292
+ * @param result defines the Vector4 where to store the result
2293
+ * @returns result input
2294
+ */
2295
+ static ClampToRef<T extends Vector4>(value: DeepImmutable<Vector4>, min: DeepImmutable<Vector4>, max: DeepImmutable<Vector4>, result: T): T;
2296
+ /**
2297
+ * Checks if a given vector is inside a specific range
2298
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#75
2299
+ * @param v defines the vector to test
2300
+ * @param min defines the minimum range
2301
+ * @param max defines the maximum range
2302
+ */
2303
+ static CheckExtends(v: Vector4, min: Vector4, max: Vector4): void;
2021
2304
  /**
2022
2305
  * Gets a zero Vector4 that must not be updated
2023
2306
  */
@@ -2159,7 +2442,7 @@ export declare class Vector4 {
2159
2442
  * @see https://en.wikipedia.org/wiki/Quaternion
2160
2443
  * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms
2161
2444
  */
2162
- export declare class Quaternion {
2445
+ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternionLike {
2163
2446
  /** @internal */
2164
2447
  _x: number;
2165
2448
  /** @internal */
@@ -2182,6 +2465,14 @@ export declare class Quaternion {
2182
2465
  /** Gets or sets the w coordinate */
2183
2466
  get w(): number;
2184
2467
  set w(value: number);
2468
+ /**
2469
+ * @see Tensor.dimension
2470
+ */
2471
+ readonly dimension: Readonly<[4]>;
2472
+ /**
2473
+ * @see Tensor.rank
2474
+ */
2475
+ readonly rank: 1;
2185
2476
  /**
2186
2477
  * Creates a new Quaternion from the given floats
2187
2478
  * @param x defines the first component (0 by default)
@@ -2210,7 +2501,7 @@ export declare class Quaternion {
2210
2501
  * Example Playground https://playground.babylonjs.com/#L49EJ7#13
2211
2502
  * @returns a new array populated with 4 elements from the quaternion coordinates
2212
2503
  */
2213
- asArray(): number[];
2504
+ asArray(): Tuple<number, 4>;
2214
2505
  /**
2215
2506
  * Stores from the starting index in the given array the Quaternion successive values
2216
2507
  * Example Playground https://playground.babylonjs.com/#L49EJ7#59
@@ -2218,7 +2509,8 @@ export declare class Quaternion {
2218
2509
  * @param index defines an optional index in the target array to define where to start storing values
2219
2510
  * @returns the current Quaternion object
2220
2511
  */
2221
- toArray(array: FloatArray, index?: number): Quaternion;
2512
+ toArray(array: FloatArray, index?: number): this;
2513
+ fromArray(array: FloatArray, index?: number): this;
2222
2514
  /**
2223
2515
  * Check if two quaternions are equals
2224
2516
  * Example Playground https://playground.babylonjs.com/#L49EJ7#38
@@ -2267,6 +2559,7 @@ export declare class Quaternion {
2267
2559
  * @returns the updated current quaternion
2268
2560
  */
2269
2561
  set(x: number, y: number, z: number, w: number): this;
2562
+ setAll(value: number): this;
2270
2563
  /**
2271
2564
  * Adds two quaternions
2272
2565
  * Example Playground https://playground.babylonjs.com/#L49EJ7#10
@@ -2281,13 +2574,18 @@ export declare class Quaternion {
2281
2574
  * @returns the current quaternion
2282
2575
  */
2283
2576
  addInPlace(other: DeepImmutable<Quaternion>): this;
2577
+ addToRef<T extends this>(other: DeepImmutable<this>, result: T): T;
2578
+ addInPlaceFromFloats(x: number, y: number, z: number, w: number): this;
2579
+ subtractToRef<T extends this>(other: DeepImmutable<this>, result: T): T;
2580
+ subtractFromFloats(x: number, y: number, z: number, w: number): this;
2581
+ subtractFromFloatsToRef<T extends this>(x: number, y: number, z: number, w: number, result: T): T;
2284
2582
  /**
2285
2583
  * Subtract two quaternions
2286
2584
  * Example Playground https://playground.babylonjs.com/#L49EJ7#57
2287
2585
  * @param other defines the second operand
2288
2586
  * @returns a new quaternion as the subtraction result of the given one from the current one
2289
2587
  */
2290
- subtract(other: Quaternion): this;
2588
+ subtract(other: DeepImmutable<this>): this;
2291
2589
  /**
2292
2590
  * Subtract a quaternion to the current one
2293
2591
  * Example Playground https://playground.babylonjs.com/#L49EJ7#58
@@ -2343,10 +2641,70 @@ export declare class Quaternion {
2343
2641
  /**
2344
2642
  * Updates the current quaternion with the multiplication of itself with the given one "q1"
2345
2643
  * Example Playground https://playground.babylonjs.com/#L49EJ7#46
2346
- * @param q1 defines the second operand
2644
+ * @param other defines the second operand
2347
2645
  * @returns the currentupdated quaternion
2348
2646
  */
2349
- multiplyInPlace(q1: DeepImmutable<Quaternion>): this;
2647
+ multiplyInPlace(other: DeepImmutable<Quaternion>): this;
2648
+ multiplyByFloats(x: number, y: number, z: number, w: number): this;
2649
+ /**
2650
+ * @internal
2651
+ * Do not use
2652
+ */
2653
+ divide(_other: DeepImmutable<this>): this;
2654
+ /**
2655
+ * @internal
2656
+ * Do not use
2657
+ */
2658
+ divideToRef<T extends this>(_other: DeepImmutable<this>, _result: T): T;
2659
+ /**
2660
+ * @internal
2661
+ * Do not use
2662
+ */
2663
+ divideInPlace(_other: DeepImmutable<this>): this;
2664
+ /**
2665
+ * @internal
2666
+ * Do not use
2667
+ */
2668
+ minimizeInPlace(): this;
2669
+ /**
2670
+ * @internal
2671
+ * Do not use
2672
+ */
2673
+ minimizeInPlaceFromFloats(): this;
2674
+ /**
2675
+ * @internal
2676
+ * Do not use
2677
+ */
2678
+ maximizeInPlace(): this;
2679
+ /**
2680
+ * @internal
2681
+ * Do not use
2682
+ */
2683
+ maximizeInPlaceFromFloats(): this;
2684
+ negate(): this;
2685
+ negateInPlace(): this;
2686
+ negateToRef<T extends this>(result: T): T;
2687
+ equalsToFloats(x: number, y: number, z: number, w: number): boolean;
2688
+ /**
2689
+ * @internal
2690
+ * Do not use
2691
+ */
2692
+ floorToRef<T extends this>(_result: T): T;
2693
+ /**
2694
+ * @internal
2695
+ * Do not use
2696
+ */
2697
+ floor(): this;
2698
+ /**
2699
+ * @internal
2700
+ * Do not use
2701
+ */
2702
+ fractToRef<T extends this>(_result: T): T;
2703
+ /**
2704
+ * @internal
2705
+ * Do not use
2706
+ */
2707
+ fract(): this;
2350
2708
  /**
2351
2709
  * Conjugates the current quaternion and stores the result in the given quaternion
2352
2710
  * Example Playground https://playground.babylonjs.com/#L49EJ7#81
@@ -2558,6 +2916,16 @@ export declare class Quaternion {
2558
2916
  * @returns result input
2559
2917
  */
2560
2918
  static FromArrayToRef<T extends Quaternion>(array: DeepImmutable<ArrayLike<number>>, offset: number, result: T): T;
2919
+ /**
2920
+ * Sets the given quaternion "result" with the given floats.
2921
+ * @param x defines the x coordinate of the source
2922
+ * @param y defines the y coordinate of the source
2923
+ * @param z defines the z coordinate of the source
2924
+ * @param w defines the w coordinate of the source
2925
+ * @param result defines the quaternion where to store the result
2926
+ * @returns the result quaternion
2927
+ */
2928
+ static FromFloatsToRef<T extends Quaternion = Quaternion>(x: number, y: number, z: number, w: number, result: T): T;
2561
2929
  /**
2562
2930
  * Create a quaternion from Euler rotation angles
2563
2931
  * Example Playground https://playground.babylonjs.com/#L49EJ7#33
@@ -2764,6 +3132,81 @@ export declare class Quaternion {
2764
3132
  * @returns result input
2765
3133
  */
2766
3134
  static NormalizeToRef<T extends Quaternion>(quat: DeepImmutable<Quaternion>, result: T): T;
3135
+ /**
3136
+ * Returns a new Quaternion set with the coordinates of "value", if the quaternion "value" is in the cube defined by the quaternions "min" and "max"
3137
+ * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
3138
+ * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
3139
+ * @param value defines the current value
3140
+ * @param min defines the lower range value
3141
+ * @param max defines the upper range value
3142
+ * @returns the new Quaternion
3143
+ */
3144
+ static Clamp<T extends Quaternion>(value: DeepImmutable<T>, min: DeepImmutable<Quaternion>, max: DeepImmutable<Quaternion>): T;
3145
+ /**
3146
+ * Sets the given quaternion "result" with the coordinates of "value", if the quaternion "value" is in the cube defined by the quaternions "min" and "max"
3147
+ * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
3148
+ * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
3149
+ * @param value defines the current value
3150
+ * @param min defines the lower range value
3151
+ * @param max defines the upper range value
3152
+ * @param result defines the Quaternion where to store the result
3153
+ * @returns result input
3154
+ */
3155
+ static ClampToRef<T extends Quaternion>(value: DeepImmutable<Quaternion>, min: DeepImmutable<Quaternion>, max: DeepImmutable<Quaternion>, result: T): T;
3156
+ /**
3157
+ * Returns a new Quaternion with random values between min and max
3158
+ * @param min the minimum random value
3159
+ * @param max the maximum random value
3160
+ * @returns a Quaternion with random values between min and max
3161
+ */
3162
+ static Random(min?: number, max?: number): Quaternion;
3163
+ /**
3164
+ * Sets a Quaternion with random values between min and max
3165
+ * @param min the minimum random value
3166
+ * @param max the maximum random value
3167
+ * @param ref the ref to store the values in
3168
+ * @returns the ref with random values between min and max
3169
+ */
3170
+ static RandomToRef<T extends Quaternion>(min: number | undefined, max: number | undefined, ref: T): T;
3171
+ /**
3172
+ * Do not use
3173
+ * @internal
3174
+ */
3175
+ static Minimize(): Quaternion;
3176
+ /**
3177
+ * Do not use
3178
+ * @internal
3179
+ */
3180
+ static Maximize(): Quaternion;
3181
+ /**
3182
+ * Returns the distance (float) between the quaternions "value1" and "value2".
3183
+ * @param value1 value to calulate the distance between
3184
+ * @param value2 value to calulate the distance between
3185
+ * @returns the distance between the two quaternions
3186
+ */
3187
+ static Distance(value1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>): number;
3188
+ /**
3189
+ * Returns the squared distance (float) between the quaternions "value1" and "value2".
3190
+ * @param value1 value to calulate the distance between
3191
+ * @param value2 value to calulate the distance between
3192
+ * @returns the distance between the two quaternions squared
3193
+ */
3194
+ static DistanceSquared(value1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>): number;
3195
+ /**
3196
+ * Returns a new Quaternion located at the center between the quaternions "value1" and "value2".
3197
+ * @param value1 value to calulate the center between
3198
+ * @param value2 value to calulate the center between
3199
+ * @returns the center between the two quaternions
3200
+ */
3201
+ static Center(value1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>): Quaternion;
3202
+ /**
3203
+ * Gets the center of the quaternions "value1" and "value2" and stores the result in the quaternion "ref"
3204
+ * @param value1 defines first quaternion
3205
+ * @param value2 defines second quaternion
3206
+ * @param ref defines third quaternion
3207
+ * @returns ref
3208
+ */
3209
+ static CenterToRef<T extends Quaternion>(value1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>, ref: T): T;
2767
3210
  }
2768
3211
  /**
2769
3212
  * Class used to store matrix data (4x4)
@@ -2787,7 +3230,15 @@ export declare class Quaternion {
2787
3230
  * Example Playground - Overview Transformation - https://playground.babylonjs.com/#AV9X17#1
2788
3231
  * Example Playground - Overview Projection - https://playground.babylonjs.com/#AV9X17#2
2789
3232
  */
2790
- export declare class Matrix {
3233
+ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatrixLike {
3234
+ /**
3235
+ * @see Tensor.dimension
3236
+ */
3237
+ readonly dimension: Readonly<[4, 4]>;
3238
+ /**
3239
+ * @see Tensor.rank
3240
+ */
3241
+ readonly rank: 2;
2791
3242
  /**
2792
3243
  * Gets the precision of matrix computations
2793
3244
  */
@@ -2808,7 +3259,7 @@ export declare class Matrix {
2808
3259
  /**
2809
3260
  * Gets the internal data of the matrix
2810
3261
  */
2811
- get m(): DeepImmutable<Float32Array | Array<number>>;
3262
+ get m(): DeepImmutable<Tuple<number, 16>>;
2812
3263
  /**
2813
3264
  * Update the updateFlag to indicate that the matrix has been updated
2814
3265
  */
@@ -2841,16 +3292,27 @@ export declare class Matrix {
2841
3292
  toString(): string;
2842
3293
  /**
2843
3294
  * Returns the matrix as a Float32Array or Array<number>
3295
+ * @deprecated Use asArray
3296
+ */
3297
+ toArray(): FloatArray;
3298
+ /**
3299
+ * Stores the matrix in a Float32Array or Array<number>
2844
3300
  * Example Playground - https://playground.babylonjs.com/#AV9X17#49
2845
- * @returns the matrix underlying array
3301
+ * @param array The destination array
3302
+ * @param index The destination index to start ay
3303
+ * @returns the matrix
2846
3304
  */
2847
- toArray(): DeepImmutable<Float32Array | Array<number>>;
3305
+ toArray(array: FloatArray, index: number): this;
2848
3306
  /**
2849
3307
  * Returns the matrix as a Float32Array or Array<number>
2850
3308
  * Example Playground - https://playground.babylonjs.com/#AV9X17#114
2851
3309
  * @returns the matrix underlying array.
2852
3310
  */
2853
- asArray(): DeepImmutable<Float32Array | Array<number>>;
3311
+ asArray(): Tuple<number, 16>;
3312
+ fromArray(array: FloatArray, index?: number): this;
3313
+ copyFromFloats(...floats: Tuple<number, 16>): this;
3314
+ set(...values: Tuple<number, 16>): this;
3315
+ setAll(value: number): this;
2854
3316
  /**
2855
3317
  * Inverts the current matrix in place
2856
3318
  * Example Playground - https://playground.babylonjs.com/#AV9X17#118
@@ -2884,6 +3346,13 @@ export declare class Matrix {
2884
3346
  * @returns the current updated matrix
2885
3347
  */
2886
3348
  addToSelf(other: DeepImmutable<Matrix>): this;
3349
+ addInPlace(other: DeepImmutable<this>): this;
3350
+ addInPlaceFromFloats(...floats: Tuple<number, 16>): this;
3351
+ subtract(other: DeepImmutable<this>): this;
3352
+ subtractToRef<T extends this>(other: DeepImmutable<this>, result: T): T;
3353
+ subtractInPlace(other: DeepImmutable<this>): this;
3354
+ subtractFromFloats(...floats: Tuple<number, 16>): this;
3355
+ subtractFromFloatsToRef<T extends this>(...args: [...Tuple<number, 16>, T]): T;
2887
3356
  /**
2888
3357
  * Sets the given matrix to the current inverted Matrix
2889
3358
  * Example Playground - https://playground.babylonjs.com/#AV9X17#119
@@ -2950,14 +3419,6 @@ export declare class Matrix {
2950
3419
  * @returns the updated matrix
2951
3420
  */
2952
3421
  removeRotationAndScaling(): this;
2953
- /**
2954
- * Multiply two matrices
2955
- * Example Playground - https://playground.babylonjs.com/#AV9X17#15
2956
- * A.multiply(B) means apply B to A so result is B x A
2957
- * @param other defines the second operand
2958
- * @returns a new matrix set with the multiplication result of the current Matrix and the given one
2959
- */
2960
- multiply(other: DeepImmutable<Matrix>): this;
2961
3422
  /**
2962
3423
  * Copy the current matrix from the given one
2963
3424
  * Example Playground - https://playground.babylonjs.com/#AV9X17#21
@@ -2972,6 +3433,22 @@ export declare class Matrix {
2972
3433
  * @returns the current matrix
2973
3434
  */
2974
3435
  copyToArray(array: Float32Array | Array<number>, offset?: number): this;
3436
+ /**
3437
+ * Multiply two matrices
3438
+ * Example Playground - https://playground.babylonjs.com/#AV9X17#15
3439
+ * A.multiply(B) means apply B to A so result is B x A
3440
+ * @param other defines the second operand
3441
+ * @returns a new matrix set with the multiplication result of the current Matrix and the given one
3442
+ */
3443
+ multiply(other: DeepImmutable<Matrix>): this;
3444
+ multiplyInPlace(other: DeepImmutable<this>): this;
3445
+ multiplyByFloats(...floats: Tuple<number, 16>): this;
3446
+ /**
3447
+ * Multiples the current matrix by the given floats and stores them in the given ref
3448
+ * @param args The floats and ref
3449
+ * @returns The updated ref
3450
+ */
3451
+ multiplyByFloatsToRef<T extends this>(...args: [...Tuple<number, 16>, T]): T;
2975
3452
  /**
2976
3453
  * Sets the given matrix "result" with the multiplication result of the current Matrix and the given one
2977
3454
  * A.multiplyToRef(B, R) means apply B to A and store in R and R = B x A
@@ -2989,12 +3466,28 @@ export declare class Matrix {
2989
3466
  * @returns the current matrix
2990
3467
  */
2991
3468
  multiplyToArray(other: DeepImmutable<Matrix>, result: Float32Array | Array<number>, offset: number): this;
3469
+ divide(other: DeepImmutable<this>): this;
3470
+ divideToRef<T extends this>(other: DeepImmutable<this>, result: T): T;
3471
+ divideInPlace(other: DeepImmutable<this>): this;
3472
+ minimizeInPlace(other: DeepImmutable<this>): this;
3473
+ minimizeInPlaceFromFloats(...floats: Tuple<number, 16>): this;
3474
+ maximizeInPlace(other: DeepImmutable<this>): this;
3475
+ maximizeInPlaceFromFloats(...floats: Tuple<number, 16>): this;
3476
+ negate(): this;
3477
+ negateInPlace(): this;
3478
+ negateToRef<T extends this>(result: T): T;
2992
3479
  /**
2993
3480
  * Check equality between this matrix and a second one
2994
3481
  * @param value defines the second matrix to compare
2995
3482
  * @returns true is the current matrix and the given one values are strictly equal
2996
3483
  */
2997
3484
  equals(value: DeepImmutable<Matrix>): boolean;
3485
+ equalsWithEpsilon(other: DeepImmutable<this>, epsilon?: number): boolean;
3486
+ equalsToFloats(...floats: Tuple<number, 16>): boolean;
3487
+ floor(): this;
3488
+ floorToRef<T extends this>(result: T): T;
3489
+ fract(): this;
3490
+ fractToRef<T extends this>(result: T): T;
2998
3491
  /**
2999
3492
  * Clone the current matrix
3000
3493
  * Example Playground - https://playground.babylonjs.com/#AV9X17#18
@@ -3096,6 +3589,7 @@ export declare class Matrix {
3096
3589
  * @returns result input
3097
3590
  */
3098
3591
  scaleAndAddToRef<T extends Matrix>(scale: number, result: T): T;
3592
+ scaleInPlace(scale: number): this;
3099
3593
  /**
3100
3594
  * Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).
3101
3595
  * Example Playground - https://playground.babylonjs.com/#AV9X17#17
@@ -3780,9 +4274,14 @@ export declare class Matrix {
3780
4274
  * @internal
3781
4275
  */
3782
4276
  export declare class TmpVectors {
4277
+ /** 3 temp Vector2 at once should be enough */
3783
4278
  static Vector2: [Vector2, Vector2, Vector2];
4279
+ /** 13 temp Vector3 at once should be enough */
3784
4280
  static Vector3: [Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3];
4281
+ /** 3 temp Vector4 at once should be enough */
3785
4282
  static Vector4: [Vector4, Vector4, Vector4];
4283
+ /** 2 temp Quaternion at once should be enough */
3786
4284
  static Quaternion: [Quaternion, Quaternion];
4285
+ /** 8 temp Matrices at once should be enough */
3787
4286
  static Matrix: [Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix];
3788
4287
  }