@babylonjs/core 7.5.0 → 7.6.1
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.
- package/Audio/sound.js +3 -0
- package/Audio/sound.js.map +1 -1
- package/Bones/bone.js +1 -1
- package/Bones/bone.js.map +1 -1
- package/Buffers/storageBuffer.d.ts +2 -2
- package/Buffers/storageBuffer.js.map +1 -1
- package/Cameras/arcRotateCamera.js +3 -0
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.js +1 -1
- package/Cameras/camera.js.map +1 -1
- package/Cameras/flyCamera.js +3 -0
- package/Cameras/flyCamera.js.map +1 -1
- package/Cameras/followCamera.js +4 -0
- package/Cameras/followCamera.js.map +1 -1
- package/Cameras/freeCamera.js +3 -0
- package/Cameras/freeCamera.js.map +1 -1
- package/Engines/Extensions/index.d.ts +0 -3
- package/Engines/Extensions/index.js +0 -3
- package/Engines/Extensions/index.js.map +1 -1
- package/Engines/WebGPU/Extensions/index.d.ts +0 -3
- package/Engines/WebGPU/Extensions/index.js +0 -3
- package/Engines/WebGPU/Extensions/index.js.map +1 -1
- package/Engines/abstractEngine.d.ts +0 -51
- package/Engines/abstractEngine.js +7 -3
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.js +5 -2
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +2 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.functions.d.ts +0 -10
- package/Engines/thinEngine.functions.js +0 -19
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.js +18 -1
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +54 -2
- package/Engines/webgpuEngine.js +147 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Inputs/scene.inputManager.d.ts +1 -0
- package/Inputs/scene.inputManager.js +1 -0
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/directionalLight.js +3 -0
- package/Lights/directionalLight.js.map +1 -1
- package/Lights/hemisphericLight.js +3 -0
- package/Lights/hemisphericLight.js.map +1 -1
- package/Lights/light.js +1 -1
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.js +3 -0
- package/Lights/pointLight.js.map +1 -1
- package/Lights/spotLight.js +3 -0
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js +9 -3
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -2
- package/Materials/Node/Blocks/Dual/textureBlock.js +13 -3
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/shadowMapBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
- package/Materials/Node/Blocks/Input/animatedInputBlockTypes.d.ts +2 -1
- package/Materials/Node/Blocks/Input/animatedInputBlockTypes.js +1 -0
- package/Materials/Node/Blocks/Input/animatedInputBlockTypes.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.js +16 -0
- package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/vertexOutputBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/baseMathBlock.js +2 -4
- package/Materials/Node/Blocks/baseMathBlock.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.d.ts +3 -1
- package/Materials/Node/Blocks/trigonometryBlock.js +6 -0
- package/Materials/Node/Blocks/trigonometryBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +6 -3
- package/Materials/Node/nodeMaterial.js +9 -6
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.d.ts +1 -1
- package/Materials/Node/nodeMaterialBlock.js +1 -1
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +34 -14
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js +87 -9
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +1 -1
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +0 -1
- package/Materials/Textures/htmlElementTexture.js +7 -2
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/videoTexture.js +4 -2
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Materials/effect.functions.d.ts +1 -1
- package/Materials/effect.functions.js +4 -4
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +1 -1
- package/Materials/effect.js.map +1 -1
- package/Materials/effect.webgl.functions.js +2 -2
- package/Materials/effect.webgl.functions.js.map +1 -1
- package/Materials/imageProcessingConfiguration.js +3 -0
- package/Materials/imageProcessingConfiguration.js.map +1 -1
- package/Materials/materialPluginBase.js +3 -0
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/shaderMaterial.js +18 -8
- package/Materials/shaderMaterial.js.map +1 -1
- package/Maths/math.color.d.ts +85 -82
- package/Maths/math.color.js +34 -27
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.vector.d.ts +202 -202
- package/Maths/math.vector.js +133 -130
- package/Maths/math.vector.js.map +1 -1
- package/Maths/tensor.d.ts +44 -42
- package/Maths/tensor.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +7 -0
- package/Meshes/Compression/dracoCompression.js +14 -0
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/instancedMesh.js +3 -0
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/transformNode.js +1 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/dumpTools.js +11 -0
- package/Misc/dumpTools.js.map +1 -1
- package/Misc/fileTools.d.ts +9 -9
- package/Misc/fileTools.js +17 -15
- package/Misc/fileTools.js.map +1 -1
- package/Misc/tools.d.ts +5 -0
- package/Misc/tools.js +9 -0
- package/Misc/tools.js.map +1 -1
- package/Misc/typeStore.d.ts +4 -0
- package/Misc/typeStore.js +11 -0
- package/Misc/typeStore.js.map +1 -1
- package/NOTICE.md +8 -0
- package/Particles/baseParticleSystem.js +3 -0
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/computeShaderParticleSystem.d.ts +2 -2
- package/Particles/computeShaderParticleSystem.js.map +1 -1
- package/Physics/v1/Plugins/ammoJSPlugin.js +39 -10
- package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +3 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +4 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +7 -0
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +40 -20
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.js +3 -0
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js +8 -0
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
- package/Shaders/fluidRenderingRender.fragment.js +11 -2
- package/Shaders/fluidRenderingRender.fragment.js.map +1 -1
- package/Shaders/screenSpaceReflection2.fragment.js +7 -1
- package/Shaders/screenSpaceReflection2.fragment.js.map +1 -1
- package/Shaders/sprites.fragment.d.ts +2 -0
- package/Shaders/sprites.fragment.js +8 -1
- package/Shaders/sprites.fragment.js.map +1 -1
- package/Shaders/sprites.vertex.d.ts +2 -0
- package/Shaders/sprites.vertex.js +4 -0
- package/Shaders/sprites.vertex.js.map +1 -1
- package/Shaders/ssao2.fragment.js +1 -1
- package/Shaders/ssao2.fragment.js.map +1 -1
- package/Sprites/spriteManager.d.ts +3 -0
- package/Sprites/spriteManager.js +11 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/Sprites/spriteRenderer.d.ts +11 -3
- package/Sprites/spriteRenderer.js +49 -32
- package/Sprites/spriteRenderer.js.map +1 -1
- package/XR/features/WebXRNearInteraction.d.ts +6 -0
- package/XR/features/WebXRNearInteraction.js +14 -2
- package/XR/features/WebXRNearInteraction.js.map +1 -1
- package/XR/webXRManagedOutputCanvas.d.ts +2 -0
- package/XR/webXRManagedOutputCanvas.js +14 -6
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/abstractScene.js +3 -0
- package/abstractScene.js.map +1 -1
- package/assets/glslang/glslang.js +113 -0
- package/assets/glslang/glslang.wasm +0 -0
- package/assets/twgsl/twgsl.js +53 -0
- package/assets/twgsl/twgsl.wasm +0 -0
- package/node.d.ts +2 -1
- package/node.js +5 -1
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +3 -0
- package/scene.js.map +1 -1
- package/Engines/Extensions/engine.externalTexture.d.ts +0 -18
- package/Engines/Extensions/engine.externalTexture.js +0 -10
- package/Engines/Extensions/engine.externalTexture.js.map +0 -1
- package/Engines/Extensions/engine.storageBuffer.d.ts +0 -39
- package/Engines/Extensions/engine.storageBuffer.js +0 -16
- package/Engines/Extensions/engine.storageBuffer.js.map +0 -1
- package/Engines/Extensions/engine.textureSampler.d.ts +0 -12
- package/Engines/Extensions/engine.textureSampler.js +0 -6
- package/Engines/Extensions/engine.textureSampler.js.map +0 -1
- package/Engines/WebGPU/Extensions/engine.externalTexture.d.ts +0 -28
- package/Engines/WebGPU/Extensions/engine.externalTexture.js +0 -18
- package/Engines/WebGPU/Extensions/engine.externalTexture.js.map +0 -1
- package/Engines/WebGPU/Extensions/engine.storageBuffer.d.ts +0 -50
- package/Engines/WebGPU/Extensions/engine.storageBuffer.js +0 -88
- package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +0 -1
- package/Engines/WebGPU/Extensions/engine.textureSampler.d.ts +0 -22
- package/Engines/WebGPU/Extensions/engine.textureSampler.js +0 -9
- package/Engines/WebGPU/Extensions/engine.textureSampler.js.map +0 -1
package/Maths/math.vector.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import type { Viewport } from "./math.viewport";
|
|
|
2
2
|
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
|
-
import type { Dimension, Tensor, TensorStatic } from "./tensor";
|
|
5
|
+
import type { Dimension, Tensor, TensorLike, TensorStatic } from "./tensor";
|
|
6
6
|
import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike } from "./math.like";
|
|
7
7
|
/**
|
|
8
8
|
* Represents a vector of any dimension
|
|
9
9
|
*/
|
|
10
|
-
export interface Vector<N extends number[]
|
|
10
|
+
export interface Vector<N extends number[], I> extends Tensor<N, I> {
|
|
11
11
|
/**
|
|
12
12
|
* @see Tensor.dimension
|
|
13
13
|
*/
|
|
@@ -42,25 +42,25 @@ export interface Vector<N extends number[] = number[]> extends Tensor<N> {
|
|
|
42
42
|
* Normalize the current Vector to a new vector
|
|
43
43
|
* @returns the new Vector
|
|
44
44
|
*/
|
|
45
|
-
normalizeToNew():
|
|
45
|
+
normalizeToNew(): Vector<N, I>;
|
|
46
46
|
/**
|
|
47
47
|
* Normalize the current Vector to the reference
|
|
48
48
|
* @param reference define the Vector to update
|
|
49
49
|
* @returns the updated Vector
|
|
50
50
|
*/
|
|
51
|
-
normalizeToRef(reference:
|
|
51
|
+
normalizeToRef<T extends I>(reference: T): T;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Static side of Vector
|
|
55
55
|
*/
|
|
56
|
-
export interface VectorStatic<T extends Vector
|
|
56
|
+
export interface VectorStatic<T extends Vector<any[], _I>, _I = TensorLike<T>> extends TensorStatic<T, _I> {
|
|
57
57
|
/**
|
|
58
58
|
* Checks if a given vector is inside a specific range
|
|
59
|
-
* @param
|
|
59
|
+
* @param value defines the vector to test
|
|
60
60
|
* @param min defines the minimum range
|
|
61
61
|
* @param max defines the maximum range
|
|
62
62
|
*/
|
|
63
|
-
CheckExtends(
|
|
63
|
+
CheckExtends(value: _I, min: _I, max: _I): void;
|
|
64
64
|
/**
|
|
65
65
|
* Returns a new Vector equal to the normalized given vector
|
|
66
66
|
* @param vector defines the vector to normalize
|
|
@@ -79,7 +79,7 @@ export interface VectorStatic<T extends Vector> extends TensorStatic<T> {
|
|
|
79
79
|
* Class representing a vector containing 2 coordinates
|
|
80
80
|
* Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9
|
|
81
81
|
*/
|
|
82
|
-
export declare class Vector2 implements Vector<Tuple<number, 2
|
|
82
|
+
export declare class Vector2 implements Vector<Tuple<number, 2>, IVector2Like>, IVector2Like {
|
|
83
83
|
/** defines the first coordinate */
|
|
84
84
|
x: number;
|
|
85
85
|
/** defines the second coordinate */
|
|
@@ -146,7 +146,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
146
146
|
* @param source defines the source Vector2
|
|
147
147
|
* @returns the current updated Vector2
|
|
148
148
|
*/
|
|
149
|
-
copyFrom(source: DeepImmutable<
|
|
149
|
+
copyFrom(source: DeepImmutable<IVector2Like>): this;
|
|
150
150
|
/**
|
|
151
151
|
* Sets the Vector2 coordinates with the given floats
|
|
152
152
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#25
|
|
@@ -175,7 +175,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
175
175
|
* @param otherVector defines the other vector
|
|
176
176
|
* @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates
|
|
177
177
|
*/
|
|
178
|
-
add(otherVector: DeepImmutable<
|
|
178
|
+
add(otherVector: DeepImmutable<IVector2Like>): Vector2;
|
|
179
179
|
/**
|
|
180
180
|
* Sets the "result" coordinates with the addition of the current Vector2 and the given one coordinates
|
|
181
181
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#12
|
|
@@ -183,14 +183,14 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
183
183
|
* @param result defines the target vector
|
|
184
184
|
* @returns result input
|
|
185
185
|
*/
|
|
186
|
-
addToRef<T extends
|
|
186
|
+
addToRef<T extends IVector2Like>(otherVector: DeepImmutable<IVector2Like>, result: T): T;
|
|
187
187
|
/**
|
|
188
188
|
* Set the Vector2 coordinates by adding the given Vector2 coordinates
|
|
189
189
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#13
|
|
190
190
|
* @param otherVector defines the other vector
|
|
191
191
|
* @returns the current updated Vector2
|
|
192
192
|
*/
|
|
193
|
-
addInPlace(otherVector: DeepImmutable<
|
|
193
|
+
addInPlace(otherVector: DeepImmutable<IVector2Like>): this;
|
|
194
194
|
/**
|
|
195
195
|
* Adds the given coordinates to the current Vector2
|
|
196
196
|
* @param x defines the x coordinate of the operand
|
|
@@ -204,14 +204,14 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
204
204
|
* @param otherVector defines the other vector
|
|
205
205
|
* @returns a new Vector2
|
|
206
206
|
*/
|
|
207
|
-
addVector3(otherVector:
|
|
207
|
+
addVector3(otherVector: IVector3Like): Vector2;
|
|
208
208
|
/**
|
|
209
209
|
* Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2
|
|
210
210
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#61
|
|
211
211
|
* @param otherVector defines the other vector
|
|
212
212
|
* @returns a new Vector2
|
|
213
213
|
*/
|
|
214
|
-
subtract(otherVector: DeepImmutable<
|
|
214
|
+
subtract(otherVector: DeepImmutable<IVector2Like>): Vector2;
|
|
215
215
|
/**
|
|
216
216
|
* Sets the "result" coordinates with the subtraction of the given one from the current Vector2 coordinates.
|
|
217
217
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#63
|
|
@@ -219,28 +219,28 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
219
219
|
* @param result defines the target vector
|
|
220
220
|
* @returns result input
|
|
221
221
|
*/
|
|
222
|
-
subtractToRef<T extends
|
|
222
|
+
subtractToRef<T extends IVector2Like>(otherVector: DeepImmutable<IVector2Like>, result: T): T;
|
|
223
223
|
/**
|
|
224
224
|
* Sets the current Vector2 coordinates by subtracting from it the given one coordinates
|
|
225
225
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#88
|
|
226
226
|
* @param otherVector defines the other vector
|
|
227
227
|
* @returns the current updated Vector2
|
|
228
228
|
*/
|
|
229
|
-
subtractInPlace(otherVector: DeepImmutable<
|
|
229
|
+
subtractInPlace(otherVector: DeepImmutable<IVector2Like>): this;
|
|
230
230
|
/**
|
|
231
231
|
* Multiplies in place the current Vector2 coordinates by the given ones
|
|
232
232
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#43
|
|
233
233
|
* @param otherVector defines the other vector
|
|
234
234
|
* @returns the current updated Vector2
|
|
235
235
|
*/
|
|
236
|
-
multiplyInPlace(otherVector: DeepImmutable<
|
|
236
|
+
multiplyInPlace(otherVector: DeepImmutable<IVector2Like>): this;
|
|
237
237
|
/**
|
|
238
238
|
* Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates
|
|
239
239
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#42
|
|
240
240
|
* @param otherVector defines the other vector
|
|
241
241
|
* @returns a new Vector2
|
|
242
242
|
*/
|
|
243
|
-
multiply(otherVector: DeepImmutable<
|
|
243
|
+
multiply(otherVector: DeepImmutable<IVector2Like>): Vector2;
|
|
244
244
|
/**
|
|
245
245
|
* Sets "result" coordinates with the multiplication of the current Vector2 and the given one coordinates
|
|
246
246
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#44
|
|
@@ -248,7 +248,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
248
248
|
* @param result defines the target vector
|
|
249
249
|
* @returns result input
|
|
250
250
|
*/
|
|
251
|
-
multiplyToRef<T extends
|
|
251
|
+
multiplyToRef<T extends IVector2Like>(otherVector: DeepImmutable<IVector2Like>, result: T): T;
|
|
252
252
|
/**
|
|
253
253
|
* Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats
|
|
254
254
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#89
|
|
@@ -256,14 +256,14 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
256
256
|
* @param y defines the second coordinate
|
|
257
257
|
* @returns a new Vector2
|
|
258
258
|
*/
|
|
259
|
-
multiplyByFloats(x: number, y: number):
|
|
259
|
+
multiplyByFloats(x: number, y: number): Vector2;
|
|
260
260
|
/**
|
|
261
261
|
* Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates
|
|
262
262
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#27
|
|
263
263
|
* @param otherVector defines the other vector
|
|
264
264
|
* @returns a new Vector2
|
|
265
265
|
*/
|
|
266
|
-
divide(otherVector: DeepImmutable<
|
|
266
|
+
divide(otherVector: DeepImmutable<IVector2Like>): Vector2;
|
|
267
267
|
/**
|
|
268
268
|
* Sets the "result" coordinates with the Vector2 divided by the given one coordinates
|
|
269
269
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#30
|
|
@@ -271,26 +271,26 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
271
271
|
* @param result defines the target vector
|
|
272
272
|
* @returns result input
|
|
273
273
|
*/
|
|
274
|
-
divideToRef<T extends
|
|
274
|
+
divideToRef<T extends IVector2Like>(otherVector: DeepImmutable<IVector2Like>, result: T): T;
|
|
275
275
|
/**
|
|
276
276
|
* Divides the current Vector2 coordinates by the given ones
|
|
277
277
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#28
|
|
278
278
|
* @param otherVector defines the other vector
|
|
279
279
|
* @returns the current updated Vector2
|
|
280
280
|
*/
|
|
281
|
-
divideInPlace(otherVector: DeepImmutable<
|
|
281
|
+
divideInPlace(otherVector: DeepImmutable<IVector2Like>): this;
|
|
282
282
|
/**
|
|
283
283
|
* Updates the current Vector2 with the minimal coordinate values between its and the given vector ones
|
|
284
284
|
* @param other defines the second operand
|
|
285
285
|
* @returns the current updated Vector2
|
|
286
286
|
*/
|
|
287
|
-
minimizeInPlace(other: DeepImmutable<
|
|
287
|
+
minimizeInPlace(other: DeepImmutable<IVector2Like>): this;
|
|
288
288
|
/**
|
|
289
289
|
* Updates the current Vector2 with the maximal coordinate values between its and the given vector ones.
|
|
290
290
|
* @param other defines the second operand
|
|
291
291
|
* @returns the current updated Vector2
|
|
292
292
|
*/
|
|
293
|
-
maximizeInPlace(other: DeepImmutable<
|
|
293
|
+
maximizeInPlace(other: DeepImmutable<IVector2Like>): this;
|
|
294
294
|
/**
|
|
295
295
|
* Updates the current Vector2 with the minimal coordinate values between its and the given coordinates
|
|
296
296
|
* @param x defines the x coordinate of the operand
|
|
@@ -311,7 +311,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
311
311
|
* @param y defines the y coordinate of the operand
|
|
312
312
|
* @returns the resulting Vector2
|
|
313
313
|
*/
|
|
314
|
-
subtractFromFloats(x: number, y: number):
|
|
314
|
+
subtractFromFloats(x: number, y: number): Vector2;
|
|
315
315
|
/**
|
|
316
316
|
* Subtracts the given floats from the current Vector2 coordinates and set the given vector "result" with this result
|
|
317
317
|
* @param x defines the x coordinate of the operand
|
|
@@ -319,12 +319,12 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
319
319
|
* @param result defines the Vector2 object where to store the result
|
|
320
320
|
* @returns the result
|
|
321
321
|
*/
|
|
322
|
-
subtractFromFloatsToRef<T extends
|
|
322
|
+
subtractFromFloatsToRef<T extends IVector2Like>(x: number, y: number, result: T): T;
|
|
323
323
|
/**
|
|
324
324
|
* Gets a new Vector2 with current Vector2 negated coordinates
|
|
325
325
|
* @returns a new Vector2
|
|
326
326
|
*/
|
|
327
|
-
negate():
|
|
327
|
+
negate(): Vector2;
|
|
328
328
|
/**
|
|
329
329
|
* Negate this vector in place
|
|
330
330
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#23
|
|
@@ -337,7 +337,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
337
337
|
* @param result defines the Vector3 object where to store the result
|
|
338
338
|
* @returns the result
|
|
339
339
|
*/
|
|
340
|
-
negateToRef<T extends
|
|
340
|
+
negateToRef<T extends IVector2Like>(result: T): T;
|
|
341
341
|
/**
|
|
342
342
|
* Multiply the Vector2 coordinates by
|
|
343
343
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#59
|
|
@@ -351,7 +351,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
351
351
|
* @param scale defines the scaling factor
|
|
352
352
|
* @returns a new Vector2
|
|
353
353
|
*/
|
|
354
|
-
scale(scale: number):
|
|
354
|
+
scale(scale: number): Vector2;
|
|
355
355
|
/**
|
|
356
356
|
* Scale the current Vector2 values by a factor to a given Vector2
|
|
357
357
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#57
|
|
@@ -359,7 +359,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
359
359
|
* @param result defines the Vector2 object where to store the result
|
|
360
360
|
* @returns result input
|
|
361
361
|
*/
|
|
362
|
-
scaleToRef<T extends
|
|
362
|
+
scaleToRef<T extends IVector2Like>(scale: number, result: T): T;
|
|
363
363
|
/**
|
|
364
364
|
* Scale the current Vector2 values by a factor and add the result to a given Vector2
|
|
365
365
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#58
|
|
@@ -367,14 +367,14 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
367
367
|
* @param result defines the Vector2 object where to store the result
|
|
368
368
|
* @returns result input
|
|
369
369
|
*/
|
|
370
|
-
scaleAndAddToRef<T extends
|
|
370
|
+
scaleAndAddToRef<T extends IVector2Like>(scale: number, result: T): T;
|
|
371
371
|
/**
|
|
372
372
|
* Gets a boolean if two vectors are equals
|
|
373
373
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#31
|
|
374
374
|
* @param otherVector defines the other vector
|
|
375
375
|
* @returns true if the given vector coordinates strictly equal the current Vector2 ones
|
|
376
376
|
*/
|
|
377
|
-
equals(otherVector: DeepImmutable<
|
|
377
|
+
equals(otherVector: DeepImmutable<IVector2Like>): boolean;
|
|
378
378
|
/**
|
|
379
379
|
* Gets a boolean if two vectors are equals (using an epsilon value)
|
|
380
380
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#32
|
|
@@ -382,7 +382,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
382
382
|
* @param epsilon defines the minimal distance to consider equality
|
|
383
383
|
* @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.
|
|
384
384
|
*/
|
|
385
|
-
equalsWithEpsilon(otherVector: DeepImmutable<
|
|
385
|
+
equalsWithEpsilon(otherVector: DeepImmutable<IVector2Like>, epsilon?: number): boolean;
|
|
386
386
|
/**
|
|
387
387
|
* Returns true if the current Vector2 coordinates equals the given floats
|
|
388
388
|
* @param x defines the x coordinate of the operand
|
|
@@ -396,26 +396,26 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
396
396
|
* eg (1.2, 2.31) returns (1, 2)
|
|
397
397
|
* @returns a new Vector2
|
|
398
398
|
*/
|
|
399
|
-
floor():
|
|
399
|
+
floor(): Vector2;
|
|
400
400
|
/**
|
|
401
401
|
* Gets the current Vector2's floored values and stores them in result
|
|
402
402
|
* @param result the Vector2 to store the result in
|
|
403
403
|
* @returns the result Vector2
|
|
404
404
|
*/
|
|
405
|
-
floorToRef<T extends
|
|
405
|
+
floorToRef<T extends IVector2Like>(result: T): T;
|
|
406
406
|
/**
|
|
407
407
|
* Gets a new Vector2 from current Vector2 fractional values
|
|
408
408
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#34
|
|
409
409
|
* eg (1.2, 2.31) returns (0.2, 0.31)
|
|
410
410
|
* @returns a new Vector2
|
|
411
411
|
*/
|
|
412
|
-
fract():
|
|
412
|
+
fract(): Vector2;
|
|
413
413
|
/**
|
|
414
414
|
* Gets the current Vector2's fractional values and stores them in result
|
|
415
415
|
* @param result the Vector2 to store the result in
|
|
416
416
|
* @returns the result Vector2
|
|
417
417
|
*/
|
|
418
|
-
fractToRef<T extends
|
|
418
|
+
fractToRef<T extends IVector2Like>(result: T): T;
|
|
419
419
|
/**
|
|
420
420
|
* Rotate the current vector into a given result vector
|
|
421
421
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#49
|
|
@@ -423,7 +423,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
423
423
|
* @param result defines the result vector where to store the rotated vector
|
|
424
424
|
* @returns result input
|
|
425
425
|
*/
|
|
426
|
-
rotateToRef<T extends
|
|
426
|
+
rotateToRef<T extends IVector2Like>(angle: number, result: T): T;
|
|
427
427
|
/**
|
|
428
428
|
* Gets the length of the vector
|
|
429
429
|
* @returns the vector length (float)
|
|
@@ -451,25 +451,25 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
451
451
|
* Normalize the current Vector2 to a new vector
|
|
452
452
|
* @returns the new Vector2
|
|
453
453
|
*/
|
|
454
|
-
normalizeToNew():
|
|
454
|
+
normalizeToNew(): Vector2;
|
|
455
455
|
/**
|
|
456
456
|
* Normalize the current Vector2 to the reference
|
|
457
|
-
* @param
|
|
457
|
+
* @param result define the Vector to update
|
|
458
458
|
* @returns the updated Vector2
|
|
459
459
|
*/
|
|
460
|
-
normalizeToRef<T extends
|
|
460
|
+
normalizeToRef<T extends IVector2Like>(result: T): T;
|
|
461
461
|
/**
|
|
462
462
|
* Gets a new Vector2 copied from the Vector2
|
|
463
463
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#20
|
|
464
464
|
* @returns a new Vector2
|
|
465
465
|
*/
|
|
466
|
-
clone():
|
|
466
|
+
clone(): Vector2;
|
|
467
467
|
/**
|
|
468
468
|
* Gets the dot product of the current vector and the vector "otherVector"
|
|
469
469
|
* @param otherVector defines second vector
|
|
470
470
|
* @returns the dot product (float)
|
|
471
471
|
*/
|
|
472
|
-
dot(otherVector: DeepImmutable<
|
|
472
|
+
dot(otherVector: DeepImmutable<IVector2Like>): number;
|
|
473
473
|
/**
|
|
474
474
|
* Gets a new Vector2(0, 0)
|
|
475
475
|
* @returns a new Vector2
|
|
@@ -534,7 +534,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
534
534
|
* @param amount defines the interpolation factor
|
|
535
535
|
* @returns a new Vector2
|
|
536
536
|
*/
|
|
537
|
-
static CatmullRom
|
|
537
|
+
static CatmullRom(value1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>, value3: DeepImmutable<IVector2Like>, value4: DeepImmutable<IVector2Like>, amount: number): Vector2;
|
|
538
538
|
/**
|
|
539
539
|
* Sets reference with same the coordinates than "value" ones if the vector "value" is in the square defined by "min" and "max".
|
|
540
540
|
* If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
|
|
@@ -545,7 +545,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
545
545
|
* @param ref the reference
|
|
546
546
|
* @returns the reference
|
|
547
547
|
*/
|
|
548
|
-
static ClampToRef<T extends Vector2>(value: DeepImmutable<
|
|
548
|
+
static ClampToRef<T extends Vector2>(value: DeepImmutable<IVector2Like>, min: DeepImmutable<IVector2Like>, max: DeepImmutable<IVector2Like>, ref: T): T;
|
|
549
549
|
/**
|
|
550
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".
|
|
551
551
|
* If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
|
|
@@ -556,7 +556,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
556
556
|
* @param max defines the upper limit
|
|
557
557
|
* @returns a new Vector2
|
|
558
558
|
*/
|
|
559
|
-
static Clamp
|
|
559
|
+
static Clamp(value: DeepImmutable<IVector2Like>, min: DeepImmutable<IVector2Like>, max: DeepImmutable<IVector2Like>): Vector2;
|
|
560
560
|
/**
|
|
561
561
|
* Returns a new Vector2 located for "amount" (float) on the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2"
|
|
562
562
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#81
|
|
@@ -567,7 +567,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
567
567
|
* @param amount defines the interpolation factor
|
|
568
568
|
* @returns a new Vector2
|
|
569
569
|
*/
|
|
570
|
-
static Hermite
|
|
570
|
+
static Hermite(value1: DeepImmutable<IVector2Like>, tangent1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>, tangent2: DeepImmutable<IVector2Like>, amount: number): Vector2;
|
|
571
571
|
/**
|
|
572
572
|
* Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
573
573
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#82
|
|
@@ -578,7 +578,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
578
578
|
* @param time define where the derivative must be done
|
|
579
579
|
* @returns 1st derivative
|
|
580
580
|
*/
|
|
581
|
-
static Hermite1stDerivative
|
|
581
|
+
static Hermite1stDerivative(value1: DeepImmutable<IVector2Like>, tangent1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>, tangent2: DeepImmutable<IVector2Like>, time: number): Vector2;
|
|
582
582
|
/**
|
|
583
583
|
* Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
584
584
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#83
|
|
@@ -590,7 +590,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
590
590
|
* @param result define where the derivative will be stored
|
|
591
591
|
* @returns result input
|
|
592
592
|
*/
|
|
593
|
-
static Hermite1stDerivativeToRef<T extends Vector2>(value1: DeepImmutable<
|
|
593
|
+
static Hermite1stDerivativeToRef<T extends Vector2>(value1: DeepImmutable<IVector2Like>, tangent1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>, tangent2: DeepImmutable<IVector2Like>, time: number, result: T): T;
|
|
594
594
|
/**
|
|
595
595
|
* Returns a new Vector2 located for "amount" (float) on the linear interpolation between the vector "start" adn the vector "end".
|
|
596
596
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#84
|
|
@@ -599,7 +599,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
599
599
|
* @param amount defines the interpolation factor
|
|
600
600
|
* @returns a new Vector2
|
|
601
601
|
*/
|
|
602
|
-
static Lerp
|
|
602
|
+
static Lerp(start: DeepImmutable<IVector2Like>, end: DeepImmutable<IVector2Like>, amount: number): Vector2;
|
|
603
603
|
/**
|
|
604
604
|
* Gets the dot product of the vector "left" and the vector "right"
|
|
605
605
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#90
|
|
@@ -607,14 +607,14 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
607
607
|
* @param right defines second vector
|
|
608
608
|
* @returns the dot product (float)
|
|
609
609
|
*/
|
|
610
|
-
static Dot(left: DeepImmutable<
|
|
610
|
+
static Dot(left: DeepImmutable<IVector2Like>, right: DeepImmutable<IVector2Like>): number;
|
|
611
611
|
/**
|
|
612
612
|
* Returns a new Vector2 equal to the normalized given vector
|
|
613
613
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#46
|
|
614
614
|
* @param vector defines the vector to normalize
|
|
615
615
|
* @returns a new Vector2
|
|
616
616
|
*/
|
|
617
|
-
static Normalize
|
|
617
|
+
static Normalize(vector: DeepImmutable<Vector2>): Vector2;
|
|
618
618
|
/**
|
|
619
619
|
* Normalize a given vector into a second one
|
|
620
620
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#50
|
|
@@ -630,7 +630,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
630
630
|
* @param right defines 2nd vector
|
|
631
631
|
* @returns a new Vector2
|
|
632
632
|
*/
|
|
633
|
-
static Minimize
|
|
633
|
+
static Minimize(left: DeepImmutable<IVector2Like>, right: DeepImmutable<IVector2Like>): Vector2;
|
|
634
634
|
/**
|
|
635
635
|
* Gets a new Vector2 set with the maximal coordinate values from the "left" and "right" vectors
|
|
636
636
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#86
|
|
@@ -638,7 +638,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
638
638
|
* @param right defines 2nd vector
|
|
639
639
|
* @returns a new Vector2
|
|
640
640
|
*/
|
|
641
|
-
static Maximize
|
|
641
|
+
static Maximize(left: DeepImmutable<IVector2Like>, right: DeepImmutable<IVector2Like>): Vector2;
|
|
642
642
|
/**
|
|
643
643
|
* Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix
|
|
644
644
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#17
|
|
@@ -646,7 +646,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
646
646
|
* @param transformation defines the matrix to apply
|
|
647
647
|
* @returns a new Vector2
|
|
648
648
|
*/
|
|
649
|
-
static Transform
|
|
649
|
+
static Transform(vector: DeepImmutable<IVector2Like>, transformation: DeepImmutable<Matrix>): Vector2;
|
|
650
650
|
/**
|
|
651
651
|
* Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector "result" coordinates
|
|
652
652
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#19
|
|
@@ -655,7 +655,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
655
655
|
* @param result defines the target vector
|
|
656
656
|
* @returns result input
|
|
657
657
|
*/
|
|
658
|
-
static TransformToRef<T extends Vector2>(vector: DeepImmutable<
|
|
658
|
+
static TransformToRef<T extends Vector2>(vector: DeepImmutable<IVector2Like>, transformation: DeepImmutable<Matrix>, result: T): T;
|
|
659
659
|
/**
|
|
660
660
|
* Determines if a given vector is included in a triangle
|
|
661
661
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#87
|
|
@@ -665,7 +665,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
665
665
|
* @param p2 defines 3rd triangle point
|
|
666
666
|
* @returns true if the point "p" is in the triangle defined by the vectors "p0", "p1", "p2"
|
|
667
667
|
*/
|
|
668
|
-
static PointInTriangle(p: DeepImmutable<
|
|
668
|
+
static PointInTriangle(p: DeepImmutable<IVector2Like>, p0: DeepImmutable<IVector2Like>, p1: DeepImmutable<IVector2Like>, p2: DeepImmutable<IVector2Like>): boolean;
|
|
669
669
|
/**
|
|
670
670
|
* Gets the distance between the vectors "value1" and "value2"
|
|
671
671
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#71
|
|
@@ -673,7 +673,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
673
673
|
* @param value2 defines second vector
|
|
674
674
|
* @returns the distance between vectors
|
|
675
675
|
*/
|
|
676
|
-
static Distance(value1: DeepImmutable<
|
|
676
|
+
static Distance(value1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>): number;
|
|
677
677
|
/**
|
|
678
678
|
* Returns the squared distance between the vectors "value1" and "value2"
|
|
679
679
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#72
|
|
@@ -681,7 +681,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
681
681
|
* @param value2 defines second vector
|
|
682
682
|
* @returns the squared distance between vectors
|
|
683
683
|
*/
|
|
684
|
-
static DistanceSquared(value1: DeepImmutable<
|
|
684
|
+
static DistanceSquared(value1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>): number;
|
|
685
685
|
/**
|
|
686
686
|
* Gets a new Vector2 located at the center of the vectors "value1" and "value2"
|
|
687
687
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#86
|
|
@@ -690,7 +690,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
690
690
|
* @param value2 defines second vector
|
|
691
691
|
* @returns a new Vector2
|
|
692
692
|
*/
|
|
693
|
-
static Center
|
|
693
|
+
static Center(value1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>): Vector2;
|
|
694
694
|
/**
|
|
695
695
|
* Gets the center of the vectors "value1" and "value2" and stores the result in the vector "ref"
|
|
696
696
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#66
|
|
@@ -699,7 +699,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
699
699
|
* @param ref defines third vector
|
|
700
700
|
* @returns ref
|
|
701
701
|
*/
|
|
702
|
-
static CenterToRef<T extends Vector2>(value1: DeepImmutable<
|
|
702
|
+
static CenterToRef<T extends Vector2>(value1: DeepImmutable<IVector2Like>, value2: DeepImmutable<IVector2Like>, ref: T): T;
|
|
703
703
|
/**
|
|
704
704
|
* Gets the shortest distance (float) between the point "p" and the segment defined by the two points "segA" and "segB".
|
|
705
705
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#77
|
|
@@ -717,7 +717,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>>, IVector2Like {
|
|
|
717
717
|
* Reminder: js uses a left handed forward facing system
|
|
718
718
|
* Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU
|
|
719
719
|
*/
|
|
720
|
-
export declare class Vector3 implements Vector<Tuple<number, 3
|
|
720
|
+
export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVector3Like {
|
|
721
721
|
private static _UpReadOnly;
|
|
722
722
|
private static _DownReadOnly;
|
|
723
723
|
private static _LeftHandedForwardReadOnly;
|
|
@@ -826,7 +826,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
826
826
|
* @param otherVector defines the second operand
|
|
827
827
|
* @returns the resulting Vector3
|
|
828
828
|
*/
|
|
829
|
-
add(otherVector: DeepImmutable<Vector3>):
|
|
829
|
+
add(otherVector: DeepImmutable<Vector3>): Vector3;
|
|
830
830
|
/**
|
|
831
831
|
* Adds the current Vector3 to the given one and stores the result in the vector "result"
|
|
832
832
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#6
|
|
@@ -848,7 +848,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
848
848
|
* @param otherVector defines the second operand
|
|
849
849
|
* @returns the resulting Vector3
|
|
850
850
|
*/
|
|
851
|
-
subtract(otherVector: DeepImmutable<Vector3>):
|
|
851
|
+
subtract(otherVector: DeepImmutable<Vector3>): Vector3;
|
|
852
852
|
/**
|
|
853
853
|
* Subtracts the given vector from the current Vector3 and stores the result in the vector "result".
|
|
854
854
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#63
|
|
@@ -865,7 +865,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
865
865
|
* @param z defines the z coordinate of the operand
|
|
866
866
|
* @returns the resulting Vector3
|
|
867
867
|
*/
|
|
868
|
-
subtractFromFloats(x: number, y: number, z: number):
|
|
868
|
+
subtractFromFloats(x: number, y: number, z: number): Vector3;
|
|
869
869
|
/**
|
|
870
870
|
* Subtracts the given floats from the current Vector3 coordinates and set the given vector "result" with this result
|
|
871
871
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#64
|
|
@@ -881,7 +881,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
881
881
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#35
|
|
882
882
|
* @returns a new Vector3
|
|
883
883
|
*/
|
|
884
|
-
negate():
|
|
884
|
+
negate(): Vector3;
|
|
885
885
|
/**
|
|
886
886
|
* Negate this vector in place
|
|
887
887
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#36
|
|
@@ -908,7 +908,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
908
908
|
* @param scale defines the multiplier factor
|
|
909
909
|
* @returns a new Vector3
|
|
910
910
|
*/
|
|
911
|
-
scale(scale: number):
|
|
911
|
+
scale(scale: number): Vector3;
|
|
912
912
|
/**
|
|
913
913
|
* Multiplies the current Vector3 coordinates by the float "scale" and stores the result in the given vector "result" coordinates
|
|
914
914
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#57
|
|
@@ -950,7 +950,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
950
950
|
* @param q the unit quaternion representing the rotation
|
|
951
951
|
* @returns a new Vector3
|
|
952
952
|
*/
|
|
953
|
-
applyRotationQuaternion(q: Quaternion):
|
|
953
|
+
applyRotationQuaternion(q: Quaternion): Vector3;
|
|
954
954
|
/**
|
|
955
955
|
* Scale the current Vector3 values by a factor and add the result to a given Vector3
|
|
956
956
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#55
|
|
@@ -966,7 +966,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
966
966
|
* @param origin defines the origin of the projection ray
|
|
967
967
|
* @returns the projected vector3
|
|
968
968
|
*/
|
|
969
|
-
projectOnPlane
|
|
969
|
+
projectOnPlane(plane: Plane, origin: Vector3): Vector3;
|
|
970
970
|
/**
|
|
971
971
|
* Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
|
|
972
972
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#49
|
|
@@ -1013,7 +1013,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1013
1013
|
* @param otherVector defines the second operand
|
|
1014
1014
|
* @returns the new Vector3
|
|
1015
1015
|
*/
|
|
1016
|
-
multiply(otherVector: DeepImmutable<Vector3>):
|
|
1016
|
+
multiply(otherVector: DeepImmutable<Vector3>): Vector3;
|
|
1017
1017
|
/**
|
|
1018
1018
|
* Multiplies the current Vector3 by the given one and stores the result in the given vector "result"
|
|
1019
1019
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#33
|
|
@@ -1030,14 +1030,14 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1030
1030
|
* @param z defines the z coordinate of the operand
|
|
1031
1031
|
* @returns the new Vector3
|
|
1032
1032
|
*/
|
|
1033
|
-
multiplyByFloats(x: number, y: number, z: number):
|
|
1033
|
+
multiplyByFloats(x: number, y: number, z: number): Vector3;
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones
|
|
1036
1036
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#16
|
|
1037
1037
|
* @param otherVector defines the second operand
|
|
1038
1038
|
* @returns the new Vector3
|
|
1039
1039
|
*/
|
|
1040
|
-
divide(otherVector: DeepImmutable<Vector3>):
|
|
1040
|
+
divide(otherVector: DeepImmutable<Vector3>): Vector3;
|
|
1041
1041
|
/**
|
|
1042
1042
|
* Divides the current Vector3 coordinates by the given ones and stores the result in the given vector "result"
|
|
1043
1043
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#18
|
|
@@ -1101,25 +1101,25 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1101
1101
|
* @param result the vector to store the result in
|
|
1102
1102
|
* @returns the result vector
|
|
1103
1103
|
*/
|
|
1104
|
-
floorToRef<T extends
|
|
1104
|
+
floorToRef<T extends Vector3>(result: T): T;
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Gets a new Vector3 from current Vector3 floored values
|
|
1107
1107
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#22
|
|
1108
1108
|
* @returns a new Vector3
|
|
1109
1109
|
*/
|
|
1110
|
-
floor():
|
|
1110
|
+
floor(): Vector3;
|
|
1111
1111
|
/**
|
|
1112
1112
|
* Gets the current Vector3's fractional values and stores them in result
|
|
1113
1113
|
* @param result the vector to store the result in
|
|
1114
1114
|
* @returns the result vector
|
|
1115
1115
|
*/
|
|
1116
|
-
fractToRef<T extends
|
|
1116
|
+
fractToRef<T extends Vector3>(result: T): T;
|
|
1117
1117
|
/**
|
|
1118
1118
|
* Gets a new Vector3 from current Vector3 fractional values
|
|
1119
1119
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#23
|
|
1120
1120
|
* @returns a new Vector3
|
|
1121
1121
|
*/
|
|
1122
|
-
fract():
|
|
1122
|
+
fract(): Vector3;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Gets the length of the Vector3
|
|
1125
1125
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#25
|
|
@@ -1175,7 +1175,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1175
1175
|
* @param other defines the right operand
|
|
1176
1176
|
* @returns the cross product
|
|
1177
1177
|
*/
|
|
1178
|
-
cross(other: Vector3):
|
|
1178
|
+
cross(other: Vector3): Vector3;
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Normalize the current Vector3 with the given input length.
|
|
1181
1181
|
* Please note that this is an in place operation.
|
|
@@ -1189,7 +1189,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1189
1189
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#124
|
|
1190
1190
|
* @returns the new Vector3
|
|
1191
1191
|
*/
|
|
1192
|
-
normalizeToNew():
|
|
1192
|
+
normalizeToNew(): Vector3;
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Normalize the current Vector3 to the reference
|
|
1195
1195
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#125
|
|
@@ -1202,7 +1202,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1202
1202
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#11
|
|
1203
1203
|
* @returns the new Vector3
|
|
1204
1204
|
*/
|
|
1205
|
-
clone():
|
|
1205
|
+
clone(): Vector3;
|
|
1206
1206
|
/**
|
|
1207
1207
|
* Copies the given vector coordinates to the current Vector3 ones
|
|
1208
1208
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#12
|
|
@@ -1524,7 +1524,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1524
1524
|
* @param amount defines the amount on the spline to use
|
|
1525
1525
|
* @returns the new Vector3
|
|
1526
1526
|
*/
|
|
1527
|
-
static CatmullRom
|
|
1527
|
+
static CatmullRom(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, value3: DeepImmutable<Vector3>, value4: DeepImmutable<Vector3>, amount: number): Vector3;
|
|
1528
1528
|
/**
|
|
1529
1529
|
* Returns a new Vector3 set with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max"
|
|
1530
1530
|
* If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
|
|
@@ -1535,7 +1535,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1535
1535
|
* @param max defines the upper range value
|
|
1536
1536
|
* @returns the new Vector3
|
|
1537
1537
|
*/
|
|
1538
|
-
static Clamp
|
|
1538
|
+
static Clamp(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>): Vector3;
|
|
1539
1539
|
/**
|
|
1540
1540
|
* 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"
|
|
1541
1541
|
* If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
|
|
@@ -1566,7 +1566,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1566
1566
|
* @param amount defines the amount on the interpolation spline (between 0 and 1)
|
|
1567
1567
|
* @returns the new Vector3
|
|
1568
1568
|
*/
|
|
1569
|
-
static Hermite
|
|
1569
|
+
static Hermite(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, amount: number): Vector3;
|
|
1570
1570
|
/**
|
|
1571
1571
|
* Returns a new Vector3 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
1572
1572
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#90
|
|
@@ -1577,7 +1577,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1577
1577
|
* @param time define where the derivative must be done
|
|
1578
1578
|
* @returns 1st derivative
|
|
1579
1579
|
*/
|
|
1580
|
-
static Hermite1stDerivative
|
|
1580
|
+
static Hermite1stDerivative(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, time: number): Vector3;
|
|
1581
1581
|
/**
|
|
1582
1582
|
* Update a Vector3 with the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
1583
1583
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#91
|
|
@@ -1598,7 +1598,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1598
1598
|
* @param amount max defines amount between both (between 0 and 1)
|
|
1599
1599
|
* @returns the new Vector3
|
|
1600
1600
|
*/
|
|
1601
|
-
static Lerp
|
|
1601
|
+
static Lerp(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number): Vector3;
|
|
1602
1602
|
/**
|
|
1603
1603
|
* Sets the given vector "result" with the result of the linear interpolation from the vector "start" for "amount" to the vector "end"
|
|
1604
1604
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#93
|
|
@@ -1622,7 +1622,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1622
1622
|
* @param otherVector defines the right operand
|
|
1623
1623
|
* @returns the dot product
|
|
1624
1624
|
*/
|
|
1625
|
-
dot(otherVector: DeepImmutable<
|
|
1625
|
+
dot(otherVector: DeepImmutable<Vector3>): number;
|
|
1626
1626
|
/**
|
|
1627
1627
|
* Returns a new Vector3 as the cross product of the vectors "left" and "right"
|
|
1628
1628
|
* The cross product is then orthogonal to both "left" and "right"
|
|
@@ -1631,7 +1631,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1631
1631
|
* @param right defines the right operand
|
|
1632
1632
|
* @returns the cross product
|
|
1633
1633
|
*/
|
|
1634
|
-
static Cross
|
|
1634
|
+
static Cross(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3;
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Sets the given vector "result" with the cross product of "left" and "right"
|
|
1637
1637
|
* The cross product is then orthogonal to both "left" and "right"
|
|
@@ -1666,7 +1666,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1666
1666
|
* @param viewport defines the screen viewport to use
|
|
1667
1667
|
* @returns the new Vector3
|
|
1668
1668
|
*/
|
|
1669
|
-
static Project
|
|
1669
|
+
static Project(vector: DeepImmutable<Vector3>, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>, viewport: DeepImmutable<Viewport>): Vector3;
|
|
1670
1670
|
/**
|
|
1671
1671
|
* Project a Vector3 onto screen space to reference
|
|
1672
1672
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#102
|
|
@@ -1707,7 +1707,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1707
1707
|
* @param transform defines the transform (view x projection) matrix to use
|
|
1708
1708
|
* @returns the new Vector3
|
|
1709
1709
|
*/
|
|
1710
|
-
static UnprojectFromTransform
|
|
1710
|
+
static UnprojectFromTransform(source: DeepImmutable<Vector3>, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>): Vector3;
|
|
1711
1711
|
/**
|
|
1712
1712
|
* Unproject from screen space to object space
|
|
1713
1713
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#117
|
|
@@ -1719,7 +1719,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1719
1719
|
* @param projection defines the projection matrix to use
|
|
1720
1720
|
* @returns the new Vector3
|
|
1721
1721
|
*/
|
|
1722
|
-
static Unproject
|
|
1722
|
+
static Unproject(source: DeepImmutable<Vector3>, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): Vector3;
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Unproject from screen space to object space
|
|
1725
1725
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#119
|
|
@@ -1755,7 +1755,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1755
1755
|
* @param right defines the second operand
|
|
1756
1756
|
* @returns the new Vector3
|
|
1757
1757
|
*/
|
|
1758
|
-
static Minimize
|
|
1758
|
+
static Minimize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3;
|
|
1759
1759
|
/**
|
|
1760
1760
|
* Gets the maximal coordinate values between two Vector3
|
|
1761
1761
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#96
|
|
@@ -1763,7 +1763,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1763
1763
|
* @param right defines the second operand
|
|
1764
1764
|
* @returns the new Vector3
|
|
1765
1765
|
*/
|
|
1766
|
-
static Maximize
|
|
1766
|
+
static Maximize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3;
|
|
1767
1767
|
/**
|
|
1768
1768
|
* Returns the distance between the vectors "value1" and "value2"
|
|
1769
1769
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#81
|
|
@@ -1823,7 +1823,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1823
1823
|
* @returns a new Vector3
|
|
1824
1824
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/target_align
|
|
1825
1825
|
*/
|
|
1826
|
-
static RotationFromAxis
|
|
1826
|
+
static RotationFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Vector3;
|
|
1827
1827
|
/**
|
|
1828
1828
|
* The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3
|
|
1829
1829
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#107
|
|
@@ -1838,7 +1838,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>>, IVector3Like {
|
|
|
1838
1838
|
/**
|
|
1839
1839
|
* Vector4 class created for EulerAngle class conversion to Quaternion
|
|
1840
1840
|
*/
|
|
1841
|
-
export declare class Vector4 implements Vector<Tuple<number, 4
|
|
1841
|
+
export declare class Vector4 implements Vector<Tuple<number, 4>, IVector4Like>, IVector4Like {
|
|
1842
1842
|
/** x value of the vector */
|
|
1843
1843
|
x: number;
|
|
1844
1844
|
/** y value of the vector */
|
|
@@ -1926,33 +1926,33 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
1926
1926
|
* @param otherVector the vector to add
|
|
1927
1927
|
* @returns the resulting vector
|
|
1928
1928
|
*/
|
|
1929
|
-
add(otherVector: DeepImmutable<
|
|
1929
|
+
add(otherVector: DeepImmutable<IVector4Like>): Vector4;
|
|
1930
1930
|
/**
|
|
1931
1931
|
* Updates the given vector "result" with the result of the addition of the current Vector4 and the given one.
|
|
1932
1932
|
* @param otherVector the vector to add
|
|
1933
1933
|
* @param result the vector to store the result
|
|
1934
1934
|
* @returns result input
|
|
1935
1935
|
*/
|
|
1936
|
-
addToRef<T extends
|
|
1936
|
+
addToRef<T extends IVector4Like>(otherVector: DeepImmutable<IVector4Like>, result: T): T;
|
|
1937
1937
|
/**
|
|
1938
1938
|
* Subtract in place the given vector from the current Vector4.
|
|
1939
1939
|
* @param otherVector the vector to subtract
|
|
1940
1940
|
* @returns the updated Vector4.
|
|
1941
1941
|
*/
|
|
1942
|
-
subtractInPlace(otherVector: DeepImmutable<
|
|
1942
|
+
subtractInPlace(otherVector: DeepImmutable<IVector4Like>): this;
|
|
1943
1943
|
/**
|
|
1944
1944
|
* Returns a new Vector4 with the result of the subtraction of the given vector from the current Vector4.
|
|
1945
1945
|
* @param otherVector the vector to add
|
|
1946
1946
|
* @returns the new vector with the result
|
|
1947
1947
|
*/
|
|
1948
|
-
subtract(otherVector: DeepImmutable<
|
|
1948
|
+
subtract(otherVector: DeepImmutable<IVector4Like>): Vector4;
|
|
1949
1949
|
/**
|
|
1950
1950
|
* Sets the given vector "result" with the result of the subtraction of the given vector from the current Vector4.
|
|
1951
1951
|
* @param otherVector the vector to subtract
|
|
1952
1952
|
* @param result the vector to store the result
|
|
1953
1953
|
* @returns result input
|
|
1954
1954
|
*/
|
|
1955
|
-
subtractToRef<T extends
|
|
1955
|
+
subtractToRef<T extends IVector4Like>(otherVector: DeepImmutable<IVector4Like>, result: T): T;
|
|
1956
1956
|
/**
|
|
1957
1957
|
* Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.
|
|
1958
1958
|
* @param x value to subtract
|
|
@@ -1961,7 +1961,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
1961
1961
|
* @param w value to subtract
|
|
1962
1962
|
* @returns new vector containing the result
|
|
1963
1963
|
*/
|
|
1964
|
-
subtractFromFloats(x: number, y: number, z: number, w: number):
|
|
1964
|
+
subtractFromFloats(x: number, y: number, z: number, w: number): Vector4;
|
|
1965
1965
|
/**
|
|
1966
1966
|
* Sets the given vector "result" set with the result of the subtraction of the given floats from the current Vector4 coordinates.
|
|
1967
1967
|
* @param x value to subtract
|
|
@@ -1971,12 +1971,12 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
1971
1971
|
* @param result the vector to store the result in
|
|
1972
1972
|
* @returns result input
|
|
1973
1973
|
*/
|
|
1974
|
-
subtractFromFloatsToRef<T extends
|
|
1974
|
+
subtractFromFloatsToRef<T extends IVector4Like>(x: number, y: number, z: number, w: number, result: T): T;
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Returns a new Vector4 set with the current Vector4 negated coordinates.
|
|
1977
1977
|
* @returns a new vector with the negated values
|
|
1978
1978
|
*/
|
|
1979
|
-
negate():
|
|
1979
|
+
negate(): Vector4;
|
|
1980
1980
|
/**
|
|
1981
1981
|
* Negate this vector in place
|
|
1982
1982
|
* @returns this
|
|
@@ -1987,7 +1987,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
1987
1987
|
* @param result defines the Vector3 object where to store the result
|
|
1988
1988
|
* @returns the result
|
|
1989
1989
|
*/
|
|
1990
|
-
negateToRef<T extends
|
|
1990
|
+
negateToRef<T extends IVector4Like>(result: T): T;
|
|
1991
1991
|
/**
|
|
1992
1992
|
* Multiplies the current Vector4 coordinates by scale (float).
|
|
1993
1993
|
* @param scale the number to scale with
|
|
@@ -1999,34 +1999,34 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
1999
1999
|
* @param scale the number to scale with
|
|
2000
2000
|
* @returns a new vector with the result
|
|
2001
2001
|
*/
|
|
2002
|
-
scale(scale: number):
|
|
2002
|
+
scale(scale: number): Vector4;
|
|
2003
2003
|
/**
|
|
2004
2004
|
* Sets the given vector "result" with the current Vector4 coordinates multiplied by scale (float).
|
|
2005
2005
|
* @param scale the number to scale with
|
|
2006
2006
|
* @param result a vector to store the result in
|
|
2007
2007
|
* @returns result input
|
|
2008
2008
|
*/
|
|
2009
|
-
scaleToRef<T extends
|
|
2009
|
+
scaleToRef<T extends IVector4Like>(scale: number, result: T): T;
|
|
2010
2010
|
/**
|
|
2011
2011
|
* Scale the current Vector4 values by a factor and add the result to a given Vector4
|
|
2012
2012
|
* @param scale defines the scale factor
|
|
2013
2013
|
* @param result defines the Vector4 object where to store the result
|
|
2014
2014
|
* @returns result input
|
|
2015
2015
|
*/
|
|
2016
|
-
scaleAndAddToRef<T extends
|
|
2016
|
+
scaleAndAddToRef<T extends IVector4Like>(scale: number, result: T): T;
|
|
2017
2017
|
/**
|
|
2018
2018
|
* Boolean : True if the current Vector4 coordinates are stricly equal to the given ones.
|
|
2019
2019
|
* @param otherVector the vector to compare against
|
|
2020
2020
|
* @returns true if they are equal
|
|
2021
2021
|
*/
|
|
2022
|
-
equals(otherVector: DeepImmutable<
|
|
2022
|
+
equals(otherVector: DeepImmutable<IVector4Like>): boolean;
|
|
2023
2023
|
/**
|
|
2024
2024
|
* Boolean : True if the current Vector4 coordinates are each beneath the distance "epsilon" from the given vector ones.
|
|
2025
2025
|
* @param otherVector vector to compare against
|
|
2026
2026
|
* @param epsilon (Default: very small number)
|
|
2027
2027
|
* @returns true if they are equal
|
|
2028
2028
|
*/
|
|
2029
|
-
equalsWithEpsilon(otherVector: DeepImmutable<
|
|
2029
|
+
equalsWithEpsilon(otherVector: DeepImmutable<IVector4Like>, epsilon?: number): boolean;
|
|
2030
2030
|
/**
|
|
2031
2031
|
* Boolean : True if the given floats are strictly equal to the current Vector4 coordinates.
|
|
2032
2032
|
* @param x x value to compare against
|
|
@@ -2041,20 +2041,20 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2041
2041
|
* @param otherVector vector to multiple with
|
|
2042
2042
|
* @returns the updated Vector4.
|
|
2043
2043
|
*/
|
|
2044
|
-
multiplyInPlace(otherVector: DeepImmutable<
|
|
2044
|
+
multiplyInPlace(otherVector: DeepImmutable<IVector4Like>): this;
|
|
2045
2045
|
/**
|
|
2046
2046
|
* Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one.
|
|
2047
2047
|
* @param otherVector vector to multiple with
|
|
2048
2048
|
* @returns resulting new vector
|
|
2049
2049
|
*/
|
|
2050
|
-
multiply(otherVector: DeepImmutable<
|
|
2050
|
+
multiply(otherVector: DeepImmutable<IVector4Like>): Vector4;
|
|
2051
2051
|
/**
|
|
2052
2052
|
* Updates the given vector "result" with the multiplication result of the current Vector4 and the given one.
|
|
2053
2053
|
* @param otherVector vector to multiple with
|
|
2054
2054
|
* @param result vector to store the result
|
|
2055
2055
|
* @returns result input
|
|
2056
2056
|
*/
|
|
2057
|
-
multiplyToRef<T extends
|
|
2057
|
+
multiplyToRef<T extends IVector4Like>(otherVector: DeepImmutable<IVector4Like>, result: T): T;
|
|
2058
2058
|
/**
|
|
2059
2059
|
* Returns a new Vector4 set with the multiplication result of the given floats and the current Vector4 coordinates.
|
|
2060
2060
|
* @param x x value multiply with
|
|
@@ -2063,38 +2063,38 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2063
2063
|
* @param w w value multiply with
|
|
2064
2064
|
* @returns resulting new vector
|
|
2065
2065
|
*/
|
|
2066
|
-
multiplyByFloats(x: number, y: number, z: number, w: number):
|
|
2066
|
+
multiplyByFloats(x: number, y: number, z: number, w: number): Vector4;
|
|
2067
2067
|
/**
|
|
2068
2068
|
* Returns a new Vector4 set with the division result of the current Vector4 by the given one.
|
|
2069
2069
|
* @param otherVector vector to devide with
|
|
2070
2070
|
* @returns resulting new vector
|
|
2071
2071
|
*/
|
|
2072
|
-
divide(otherVector: DeepImmutable<
|
|
2072
|
+
divide(otherVector: DeepImmutable<IVector4Like>): Vector4;
|
|
2073
2073
|
/**
|
|
2074
2074
|
* Updates the given vector "result" with the division result of the current Vector4 by the given one.
|
|
2075
2075
|
* @param otherVector vector to devide with
|
|
2076
2076
|
* @param result vector to store the result
|
|
2077
2077
|
* @returns result input
|
|
2078
2078
|
*/
|
|
2079
|
-
divideToRef<T extends
|
|
2079
|
+
divideToRef<T extends IVector4Like>(otherVector: DeepImmutable<IVector4Like>, result: T): T;
|
|
2080
2080
|
/**
|
|
2081
2081
|
* Divides the current Vector3 coordinates by the given ones.
|
|
2082
2082
|
* @param otherVector vector to devide with
|
|
2083
2083
|
* @returns the updated Vector3.
|
|
2084
2084
|
*/
|
|
2085
|
-
divideInPlace(otherVector: DeepImmutable<
|
|
2085
|
+
divideInPlace(otherVector: DeepImmutable<IVector4Like>): this;
|
|
2086
2086
|
/**
|
|
2087
2087
|
* Updates the Vector4 coordinates with the minimum values between its own and the given vector ones
|
|
2088
2088
|
* @param other defines the second operand
|
|
2089
2089
|
* @returns the current updated Vector4
|
|
2090
2090
|
*/
|
|
2091
|
-
minimizeInPlace(other: DeepImmutable<
|
|
2091
|
+
minimizeInPlace(other: DeepImmutable<IVector4Like>): this;
|
|
2092
2092
|
/**
|
|
2093
2093
|
* Updates the Vector4 coordinates with the maximum values between its own and the given vector ones
|
|
2094
2094
|
* @param other defines the second operand
|
|
2095
2095
|
* @returns the current updated Vector4
|
|
2096
2096
|
*/
|
|
2097
|
-
maximizeInPlace(other: DeepImmutable<
|
|
2097
|
+
maximizeInPlace(other: DeepImmutable<IVector4Like>): this;
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Updates the current Vector4 with the minimal coordinate values between its and the given coordinates
|
|
2100
2100
|
* @param x defines the x coordinate of the operand
|
|
@@ -2118,23 +2118,23 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2118
2118
|
* @param result the vector to store the result in
|
|
2119
2119
|
* @returns the result vector
|
|
2120
2120
|
*/
|
|
2121
|
-
floorToRef<T extends
|
|
2121
|
+
floorToRef<T extends IVector4Like>(result: T): T;
|
|
2122
2122
|
/**
|
|
2123
2123
|
* Gets a new Vector4 from current Vector4 floored values
|
|
2124
2124
|
* @returns a new Vector4
|
|
2125
2125
|
*/
|
|
2126
|
-
floor():
|
|
2126
|
+
floor(): Vector4;
|
|
2127
2127
|
/**
|
|
2128
2128
|
* Gets the current Vector4's fractional values and stores them in result
|
|
2129
2129
|
* @param result the vector to store the result in
|
|
2130
2130
|
* @returns the result vector
|
|
2131
2131
|
*/
|
|
2132
|
-
fractToRef<T extends
|
|
2132
|
+
fractToRef<T extends IVector4Like>(result: T): T;
|
|
2133
2133
|
/**
|
|
2134
2134
|
* Gets a new Vector4 from current Vector4 fractional values
|
|
2135
2135
|
* @returns a new Vector4
|
|
2136
2136
|
*/
|
|
2137
|
-
fract():
|
|
2137
|
+
fract(): Vector4;
|
|
2138
2138
|
/**
|
|
2139
2139
|
* Returns the Vector4 length (float).
|
|
2140
2140
|
* @returns the length
|
|
@@ -2161,13 +2161,13 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2161
2161
|
* Normalize the current Vector4 to a new vector
|
|
2162
2162
|
* @returns the new Vector4
|
|
2163
2163
|
*/
|
|
2164
|
-
normalizeToNew():
|
|
2164
|
+
normalizeToNew(): Vector4;
|
|
2165
2165
|
/**
|
|
2166
2166
|
* Normalize the current Vector4 to the reference
|
|
2167
2167
|
* @param reference define the Vector4 to update
|
|
2168
2168
|
* @returns the updated Vector4
|
|
2169
2169
|
*/
|
|
2170
|
-
normalizeToRef<T extends
|
|
2170
|
+
normalizeToRef<T extends IVector4Like>(reference: T): T;
|
|
2171
2171
|
/**
|
|
2172
2172
|
* Returns a new Vector3 from the Vector4 (x, y, z) coordinates.
|
|
2173
2173
|
* @returns this converted to a new vector3
|
|
@@ -2177,13 +2177,13 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2177
2177
|
* Returns a new Vector4 copied from the current one.
|
|
2178
2178
|
* @returns the new cloned vector
|
|
2179
2179
|
*/
|
|
2180
|
-
clone():
|
|
2180
|
+
clone(): Vector4;
|
|
2181
2181
|
/**
|
|
2182
2182
|
* Updates the current Vector4 with the given one coordinates.
|
|
2183
2183
|
* @param source the source vector to copy from
|
|
2184
2184
|
* @returns the updated Vector4.
|
|
2185
2185
|
*/
|
|
2186
|
-
copyFrom(source: DeepImmutable<
|
|
2186
|
+
copyFrom(source: DeepImmutable<IVector4Like>): this;
|
|
2187
2187
|
/**
|
|
2188
2188
|
* Updates the current Vector4 coordinates with the given floats.
|
|
2189
2189
|
* @param x float to copy from
|
|
@@ -2213,7 +2213,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2213
2213
|
* @param otherVector defines the right operand
|
|
2214
2214
|
* @returns the dot product
|
|
2215
2215
|
*/
|
|
2216
|
-
dot(otherVector: DeepImmutable<
|
|
2216
|
+
dot(otherVector: DeepImmutable<IVector4Like>): number;
|
|
2217
2217
|
/**
|
|
2218
2218
|
* Returns a new Vector4 set from the starting index of the given array.
|
|
2219
2219
|
* @param array the array to pull values from
|
|
@@ -2228,7 +2228,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2228
2228
|
* @param result the vector to store the result in
|
|
2229
2229
|
* @returns result input
|
|
2230
2230
|
*/
|
|
2231
|
-
static FromArrayToRef<T extends
|
|
2231
|
+
static FromArrayToRef<T extends IVector4Like>(array: DeepImmutable<ArrayLike<number>>, offset: number, result: T): T;
|
|
2232
2232
|
/**
|
|
2233
2233
|
* Updates the given vector "result" from the starting index of the given Float32Array.
|
|
2234
2234
|
* @param array the array to pull values from
|
|
@@ -2236,7 +2236,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2236
2236
|
* @param result the vector to store the result in
|
|
2237
2237
|
* @returns result input
|
|
2238
2238
|
*/
|
|
2239
|
-
static FromFloatArrayToRef<T extends
|
|
2239
|
+
static FromFloatArrayToRef<T extends IVector4Like>(array: DeepImmutable<Float32Array>, offset: number, result: T): T;
|
|
2240
2240
|
/**
|
|
2241
2241
|
* Updates the given vector "result" coordinates from the given floats.
|
|
2242
2242
|
* @param x float to set from
|
|
@@ -2246,7 +2246,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2246
2246
|
* @param result the vector to the floats in
|
|
2247
2247
|
* @returns result input
|
|
2248
2248
|
*/
|
|
2249
|
-
static FromFloatsToRef<T extends
|
|
2249
|
+
static FromFloatsToRef<T extends IVector4Like>(x: number, y: number, z: number, w: number, result: T): T;
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Returns a new Vector4 set to (0.0, 0.0, 0.0, 0.0)
|
|
2252
2252
|
* @returns the new vector
|
|
@@ -2271,7 +2271,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2271
2271
|
* @param ref the ref to store the values in
|
|
2272
2272
|
* @returns the ref with random values between min and max
|
|
2273
2273
|
*/
|
|
2274
|
-
static RandomToRef<T extends
|
|
2274
|
+
static RandomToRef<T extends IVector4Like>(min: number | undefined, max: number | undefined, ref: T): T;
|
|
2275
2275
|
/**
|
|
2276
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
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
|
|
@@ -2281,7 +2281,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2281
2281
|
* @param max defines the upper range value
|
|
2282
2282
|
* @returns the new Vector4
|
|
2283
2283
|
*/
|
|
2284
|
-
static Clamp
|
|
2284
|
+
static Clamp(value: DeepImmutable<IVector4Like>, min: DeepImmutable<IVector4Like>, max: DeepImmutable<IVector4Like>): Vector4;
|
|
2285
2285
|
/**
|
|
2286
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
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
|
|
@@ -2292,7 +2292,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2292
2292
|
* @param result defines the Vector4 where to store the result
|
|
2293
2293
|
* @returns result input
|
|
2294
2294
|
*/
|
|
2295
|
-
static ClampToRef<T extends
|
|
2295
|
+
static ClampToRef<T extends IVector4Like>(value: DeepImmutable<IVector4Like>, min: DeepImmutable<IVector4Like>, max: DeepImmutable<IVector4Like>, result: T): T;
|
|
2296
2296
|
/**
|
|
2297
2297
|
* Checks if a given vector is inside a specific range
|
|
2298
2298
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#75
|
|
@@ -2300,7 +2300,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2300
2300
|
* @param min defines the minimum range
|
|
2301
2301
|
* @param max defines the maximum range
|
|
2302
2302
|
*/
|
|
2303
|
-
static CheckExtends(v:
|
|
2303
|
+
static CheckExtends(v: IVector4Like, min: Vector4, max: Vector4): void;
|
|
2304
2304
|
/**
|
|
2305
2305
|
* Gets a zero Vector4 that must not be updated
|
|
2306
2306
|
*/
|
|
@@ -2317,42 +2317,42 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2317
2317
|
* @param result the vector to store the result in
|
|
2318
2318
|
* @returns result input
|
|
2319
2319
|
*/
|
|
2320
|
-
static NormalizeToRef<T extends
|
|
2320
|
+
static NormalizeToRef<T extends IVector4Like>(vector: DeepImmutable<Vector4>, result: T): T;
|
|
2321
2321
|
/**
|
|
2322
2322
|
* Returns a vector with the minimum values from the left and right vectors
|
|
2323
2323
|
* @param left left vector to minimize
|
|
2324
2324
|
* @param right right vector to minimize
|
|
2325
2325
|
* @returns a new vector with the minimum of the left and right vector values
|
|
2326
2326
|
*/
|
|
2327
|
-
static Minimize<T extends Vector4>(left: DeepImmutable<T>, right: DeepImmutable<Vector4>):
|
|
2327
|
+
static Minimize<T extends Vector4>(left: DeepImmutable<T>, right: DeepImmutable<Vector4>): Vector4;
|
|
2328
2328
|
/**
|
|
2329
2329
|
* Returns a vector with the maximum values from the left and right vectors
|
|
2330
2330
|
* @param left left vector to maximize
|
|
2331
2331
|
* @param right right vector to maximize
|
|
2332
2332
|
* @returns a new vector with the maximum of the left and right vector values
|
|
2333
2333
|
*/
|
|
2334
|
-
static Maximize
|
|
2334
|
+
static Maximize(left: DeepImmutable<IVector4Like>, right: DeepImmutable<IVector4Like>): Vector4;
|
|
2335
2335
|
/**
|
|
2336
2336
|
* Returns the distance (float) between the vectors "value1" and "value2".
|
|
2337
2337
|
* @param value1 value to calulate the distance between
|
|
2338
2338
|
* @param value2 value to calulate the distance between
|
|
2339
2339
|
* @returns the distance between the two vectors
|
|
2340
2340
|
*/
|
|
2341
|
-
static Distance(value1: DeepImmutable<
|
|
2341
|
+
static Distance(value1: DeepImmutable<IVector4Like>, value2: DeepImmutable<IVector4Like>): number;
|
|
2342
2342
|
/**
|
|
2343
2343
|
* Returns the squared distance (float) between the vectors "value1" and "value2".
|
|
2344
2344
|
* @param value1 value to calulate the distance between
|
|
2345
2345
|
* @param value2 value to calulate the distance between
|
|
2346
2346
|
* @returns the distance between the two vectors squared
|
|
2347
2347
|
*/
|
|
2348
|
-
static DistanceSquared(value1: DeepImmutable<
|
|
2348
|
+
static DistanceSquared(value1: DeepImmutable<IVector4Like>, value2: DeepImmutable<IVector4Like>): number;
|
|
2349
2349
|
/**
|
|
2350
2350
|
* Returns a new Vector4 located at the center between the vectors "value1" and "value2".
|
|
2351
2351
|
* @param value1 value to calulate the center between
|
|
2352
2352
|
* @param value2 value to calulate the center between
|
|
2353
2353
|
* @returns the center between the two vectors
|
|
2354
2354
|
*/
|
|
2355
|
-
static Center(value1: DeepImmutable<
|
|
2355
|
+
static Center(value1: DeepImmutable<IVector4Like>, value2: DeepImmutable<IVector4Like>): Vector4;
|
|
2356
2356
|
/**
|
|
2357
2357
|
* Gets the center of the vectors "value1" and "value2" and stores the result in the vector "ref"
|
|
2358
2358
|
* @param value1 defines first vector
|
|
@@ -2360,7 +2360,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2360
2360
|
* @param ref defines third vector
|
|
2361
2361
|
* @returns ref
|
|
2362
2362
|
*/
|
|
2363
|
-
static CenterToRef<T extends
|
|
2363
|
+
static CenterToRef<T extends IVector4Like>(value1: DeepImmutable<IVector4Like>, value2: DeepImmutable<IVector4Like>, ref: T): T;
|
|
2364
2364
|
/**
|
|
2365
2365
|
* Returns a new Vector4 set with the result of the transformation by the given matrix of the given vector.
|
|
2366
2366
|
* This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
|
|
@@ -2379,7 +2379,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2379
2379
|
* @param result defines the Vector4 where to store the result
|
|
2380
2380
|
* @returns result input
|
|
2381
2381
|
*/
|
|
2382
|
-
static TransformCoordinatesToRef<T extends
|
|
2382
|
+
static TransformCoordinatesToRef<T extends IVector4Like>(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: T): T;
|
|
2383
2383
|
/**
|
|
2384
2384
|
* Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)
|
|
2385
2385
|
* This method computes tranformed coordinates only, not transformed direction vectors
|
|
@@ -2391,7 +2391,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2391
2391
|
* @param result defines the Vector4 where to store the result
|
|
2392
2392
|
* @returns result input
|
|
2393
2393
|
*/
|
|
2394
|
-
static TransformCoordinatesFromFloatsToRef<T extends
|
|
2394
|
+
static TransformCoordinatesFromFloatsToRef<T extends IVector4Like>(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: T): T;
|
|
2395
2395
|
/**
|
|
2396
2396
|
* Returns a new Vector4 set with the result of the normal transformation by the given matrix of the given vector.
|
|
2397
2397
|
* This methods computes transformed normalized direction vectors only.
|
|
@@ -2399,7 +2399,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2399
2399
|
* @param transformation the transformation matrix to apply
|
|
2400
2400
|
* @returns the new vector
|
|
2401
2401
|
*/
|
|
2402
|
-
static TransformNormal
|
|
2402
|
+
static TransformNormal(vector: DeepImmutable<IVector4Like>, transformation: DeepImmutable<Matrix>): Vector4;
|
|
2403
2403
|
/**
|
|
2404
2404
|
* Sets the given vector "result" with the result of the normal transformation by the given matrix of the given vector.
|
|
2405
2405
|
* This methods computes transformed normalized direction vectors only.
|
|
@@ -2408,7 +2408,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2408
2408
|
* @param result the vector to store the result in
|
|
2409
2409
|
* @returns result input
|
|
2410
2410
|
*/
|
|
2411
|
-
static TransformNormalToRef<T extends
|
|
2411
|
+
static TransformNormalToRef<T extends IVector4Like>(vector: DeepImmutable<IVector4Like>, transformation: DeepImmutable<Matrix>, result: T): T;
|
|
2412
2412
|
/**
|
|
2413
2413
|
* Sets the given vector "result" with the result of the normal transformation by the given matrix of the given floats (x, y, z, w).
|
|
2414
2414
|
* This methods computes transformed normalized direction vectors only.
|
|
@@ -2420,7 +2420,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2420
2420
|
* @param result the vector to store the results in
|
|
2421
2421
|
* @returns result input
|
|
2422
2422
|
*/
|
|
2423
|
-
static TransformNormalFromFloatsToRef<T extends
|
|
2423
|
+
static TransformNormalFromFloatsToRef<T extends IVector4Like>(x: number, y: number, z: number, w: number, transformation: DeepImmutable<Matrix>, result: T): T;
|
|
2424
2424
|
/**
|
|
2425
2425
|
* Creates a new Vector4 from a Vector3
|
|
2426
2426
|
* @param source defines the source data
|
|
@@ -2434,7 +2434,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2434
2434
|
* @param right defines the right operand
|
|
2435
2435
|
* @returns the dot product
|
|
2436
2436
|
*/
|
|
2437
|
-
static Dot(left: DeepImmutable<
|
|
2437
|
+
static Dot(left: DeepImmutable<IVector4Like>, right: DeepImmutable<IVector4Like>): number;
|
|
2438
2438
|
}
|
|
2439
2439
|
/**
|
|
2440
2440
|
* Class used to store quaternion data
|
|
@@ -2442,7 +2442,7 @@ export declare class Vector4 implements Vector<Tuple<number, 4>>, IVector4Like {
|
|
|
2442
2442
|
* @see https://en.wikipedia.org/wiki/Quaternion
|
|
2443
2443
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms
|
|
2444
2444
|
*/
|
|
2445
|
-
export declare class Quaternion implements Tensor<Tuple<number, 4
|
|
2445
|
+
export declare class Quaternion implements Tensor<Tuple<number, 4>, Quaternion>, IQuaternionLike {
|
|
2446
2446
|
/** @internal */
|
|
2447
2447
|
_x: number;
|
|
2448
2448
|
/** @internal */
|
|
@@ -2531,7 +2531,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2531
2531
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#12
|
|
2532
2532
|
* @returns a new quaternion copied from the current one
|
|
2533
2533
|
*/
|
|
2534
|
-
clone():
|
|
2534
|
+
clone(): Quaternion;
|
|
2535
2535
|
/**
|
|
2536
2536
|
* Copy a quaternion to the current one
|
|
2537
2537
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#86
|
|
@@ -2566,7 +2566,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2566
2566
|
* @param other defines the second operand
|
|
2567
2567
|
* @returns a new quaternion as the addition result of the given one and the current quaternion
|
|
2568
2568
|
*/
|
|
2569
|
-
add(other: DeepImmutable<Quaternion>):
|
|
2569
|
+
add(other: DeepImmutable<Quaternion>): Quaternion;
|
|
2570
2570
|
/**
|
|
2571
2571
|
* Add a quaternion to the current one
|
|
2572
2572
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#11
|
|
@@ -2574,18 +2574,18 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2574
2574
|
* @returns the current quaternion
|
|
2575
2575
|
*/
|
|
2576
2576
|
addInPlace(other: DeepImmutable<Quaternion>): this;
|
|
2577
|
-
addToRef<T extends
|
|
2577
|
+
addToRef<T extends Quaternion>(other: DeepImmutable<this>, result: T): T;
|
|
2578
2578
|
addInPlaceFromFloats(x: number, y: number, z: number, w: number): this;
|
|
2579
|
-
subtractToRef<T extends
|
|
2580
|
-
subtractFromFloats(x: number, y: number, z: number, w: number):
|
|
2581
|
-
subtractFromFloatsToRef<T extends
|
|
2579
|
+
subtractToRef<T extends Quaternion>(other: DeepImmutable<this>, result: T): T;
|
|
2580
|
+
subtractFromFloats(x: number, y: number, z: number, w: number): Quaternion;
|
|
2581
|
+
subtractFromFloatsToRef<T extends Quaternion>(x: number, y: number, z: number, w: number, result: T): T;
|
|
2582
2582
|
/**
|
|
2583
2583
|
* Subtract two quaternions
|
|
2584
2584
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#57
|
|
2585
2585
|
* @param other defines the second operand
|
|
2586
2586
|
* @returns a new quaternion as the subtraction result of the given one from the current one
|
|
2587
2587
|
*/
|
|
2588
|
-
subtract(other: DeepImmutable<this>):
|
|
2588
|
+
subtract(other: DeepImmutable<this>): Quaternion;
|
|
2589
2589
|
/**
|
|
2590
2590
|
* Subtract a quaternion to the current one
|
|
2591
2591
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#58
|
|
@@ -2599,7 +2599,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2599
2599
|
* @param value defines the scale factor
|
|
2600
2600
|
* @returns a new quaternion set by multiplying the current quaternion coordinates by the float "scale"
|
|
2601
2601
|
*/
|
|
2602
|
-
scale(value: number):
|
|
2602
|
+
scale(value: number): Quaternion;
|
|
2603
2603
|
/**
|
|
2604
2604
|
* Scale the current quaternion values by a factor and stores the result to a given quaternion
|
|
2605
2605
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#89
|
|
@@ -2629,7 +2629,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2629
2629
|
* @param q1 defines the second operand
|
|
2630
2630
|
* @returns a new quaternion set as the multiplication result of the current one with the given one "q1"
|
|
2631
2631
|
*/
|
|
2632
|
-
multiply(q1: DeepImmutable<Quaternion>):
|
|
2632
|
+
multiply(q1: DeepImmutable<Quaternion>): Quaternion;
|
|
2633
2633
|
/**
|
|
2634
2634
|
* Sets the given "result" as the multiplication result of the current one with the given one "q1"
|
|
2635
2635
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#45
|
|
@@ -2655,7 +2655,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2655
2655
|
* @internal
|
|
2656
2656
|
* Do not use
|
|
2657
2657
|
*/
|
|
2658
|
-
divideToRef<T extends
|
|
2658
|
+
divideToRef<T extends Quaternion>(_other: DeepImmutable<this>, _result: T): T;
|
|
2659
2659
|
/**
|
|
2660
2660
|
* @internal
|
|
2661
2661
|
* Do not use
|
|
@@ -2681,30 +2681,30 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2681
2681
|
* Do not use
|
|
2682
2682
|
*/
|
|
2683
2683
|
maximizeInPlaceFromFloats(): this;
|
|
2684
|
-
negate():
|
|
2684
|
+
negate(): Quaternion;
|
|
2685
2685
|
negateInPlace(): this;
|
|
2686
|
-
negateToRef<T extends
|
|
2686
|
+
negateToRef<T extends Quaternion>(result: T): T;
|
|
2687
2687
|
equalsToFloats(x: number, y: number, z: number, w: number): boolean;
|
|
2688
2688
|
/**
|
|
2689
2689
|
* @internal
|
|
2690
2690
|
* Do not use
|
|
2691
2691
|
*/
|
|
2692
|
-
floorToRef<T extends
|
|
2692
|
+
floorToRef<T extends Quaternion>(_result: T): T;
|
|
2693
2693
|
/**
|
|
2694
2694
|
* @internal
|
|
2695
2695
|
* Do not use
|
|
2696
2696
|
*/
|
|
2697
|
-
floor():
|
|
2697
|
+
floor(): Quaternion;
|
|
2698
2698
|
/**
|
|
2699
2699
|
* @internal
|
|
2700
2700
|
* Do not use
|
|
2701
2701
|
*/
|
|
2702
|
-
fractToRef<T extends
|
|
2702
|
+
fractToRef<T extends Quaternion>(_result: T): T;
|
|
2703
2703
|
/**
|
|
2704
2704
|
* @internal
|
|
2705
2705
|
* Do not use
|
|
2706
2706
|
*/
|
|
2707
|
-
fract():
|
|
2707
|
+
fract(): Quaternion;
|
|
2708
2708
|
/**
|
|
2709
2709
|
* Conjugates the current quaternion and stores the result in the given quaternion
|
|
2710
2710
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#81
|
|
@@ -2723,13 +2723,13 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2723
2723
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#83
|
|
2724
2724
|
* @returns a new quaternion
|
|
2725
2725
|
*/
|
|
2726
|
-
conjugate():
|
|
2726
|
+
conjugate(): Quaternion;
|
|
2727
2727
|
/**
|
|
2728
2728
|
* Returns the inverse of the current quaternion
|
|
2729
2729
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#84
|
|
2730
2730
|
* @returns a new quaternion
|
|
2731
2731
|
*/
|
|
2732
|
-
invert():
|
|
2732
|
+
invert(): Quaternion;
|
|
2733
2733
|
/**
|
|
2734
2734
|
* Invert in place the current quaternion
|
|
2735
2735
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#85
|
|
@@ -2766,7 +2766,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2766
2766
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#55
|
|
2767
2767
|
* @returns the normalized quaternion
|
|
2768
2768
|
*/
|
|
2769
|
-
normalizeToNew():
|
|
2769
|
+
normalizeToNew(): Quaternion;
|
|
2770
2770
|
/**
|
|
2771
2771
|
* Normalize the current Quaternion to the reference
|
|
2772
2772
|
* @param reference define the Quaternion to update
|
|
@@ -2862,7 +2862,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
2862
2862
|
* @param q defines the source quaternion
|
|
2863
2863
|
* @returns a new quaternion as the inverted current quaternion
|
|
2864
2864
|
*/
|
|
2865
|
-
static Inverse
|
|
2865
|
+
static Inverse(q: DeepImmutable<Quaternion>): Quaternion;
|
|
2866
2866
|
/**
|
|
2867
2867
|
* Inverse a given quaternion
|
|
2868
2868
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#104
|
|
@@ -3095,7 +3095,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
3095
3095
|
* @param amount defines the target quaternion
|
|
3096
3096
|
* @returns the new interpolated quaternion
|
|
3097
3097
|
*/
|
|
3098
|
-
static Hermite
|
|
3098
|
+
static Hermite(value1: DeepImmutable<Quaternion>, tangent1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>, tangent2: DeepImmutable<Quaternion>, amount: number): Quaternion;
|
|
3099
3099
|
/**
|
|
3100
3100
|
* Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions "value1", "value2", "tangent1", "tangent2".
|
|
3101
3101
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#48
|
|
@@ -3106,7 +3106,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
3106
3106
|
* @param time define where the derivative must be done
|
|
3107
3107
|
* @returns 1st derivative
|
|
3108
3108
|
*/
|
|
3109
|
-
static Hermite1stDerivative
|
|
3109
|
+
static Hermite1stDerivative(value1: DeepImmutable<Quaternion>, tangent1: DeepImmutable<Quaternion>, value2: DeepImmutable<Quaternion>, tangent2: DeepImmutable<Quaternion>, time: number): Quaternion;
|
|
3110
3110
|
/**
|
|
3111
3111
|
* Update a Quaternion with the 1st derivative of the Hermite spline defined by the quaternions "value1", "value2", "tangent1", "tangent2".
|
|
3112
3112
|
* Example Playground https://playground.babylonjs.com/#L49EJ7#49
|
|
@@ -3141,7 +3141,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
3141
3141
|
* @param max defines the upper range value
|
|
3142
3142
|
* @returns the new Quaternion
|
|
3143
3143
|
*/
|
|
3144
|
-
static Clamp
|
|
3144
|
+
static Clamp(value: DeepImmutable<Quaternion>, min: DeepImmutable<Quaternion>, max: DeepImmutable<Quaternion>): Quaternion;
|
|
3145
3145
|
/**
|
|
3146
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
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
|
|
@@ -3230,7 +3230,7 @@ export declare class Quaternion implements Tensor<Tuple<number, 4>>, IQuaternion
|
|
|
3230
3230
|
* Example Playground - Overview Transformation - https://playground.babylonjs.com/#AV9X17#1
|
|
3231
3231
|
* Example Playground - Overview Projection - https://playground.babylonjs.com/#AV9X17#2
|
|
3232
3232
|
*/
|
|
3233
|
-
export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4
|
|
3233
|
+
export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>, Matrix>, IMatrixLike {
|
|
3234
3234
|
/**
|
|
3235
3235
|
* @see Tensor.dimension
|
|
3236
3236
|
*/
|
|
@@ -3330,7 +3330,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3330
3330
|
* @param other defines the matrix to add
|
|
3331
3331
|
* @returns a new matrix as the addition of the current matrix and the given one
|
|
3332
3332
|
*/
|
|
3333
|
-
add(other: DeepImmutable<Matrix>):
|
|
3333
|
+
add(other: DeepImmutable<Matrix>): Matrix;
|
|
3334
3334
|
/**
|
|
3335
3335
|
* Sets the given matrix "result" to the addition of the current matrix and the given one
|
|
3336
3336
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#45
|
|
@@ -3346,13 +3346,13 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3346
3346
|
* @returns the current updated matrix
|
|
3347
3347
|
*/
|
|
3348
3348
|
addToSelf(other: DeepImmutable<Matrix>): this;
|
|
3349
|
-
addInPlace(other: DeepImmutable<
|
|
3349
|
+
addInPlace(other: DeepImmutable<Matrix>): this;
|
|
3350
3350
|
addInPlaceFromFloats(...floats: Tuple<number, 16>): this;
|
|
3351
|
-
subtract(other: DeepImmutable<
|
|
3352
|
-
subtractToRef<T extends
|
|
3353
|
-
subtractInPlace(other: DeepImmutable<
|
|
3354
|
-
subtractFromFloats(...floats: Tuple<number, 16>):
|
|
3355
|
-
subtractFromFloatsToRef<T extends
|
|
3351
|
+
subtract(other: DeepImmutable<Matrix>): this;
|
|
3352
|
+
subtractToRef<T extends Matrix>(other: DeepImmutable<Matrix>, result: T): T;
|
|
3353
|
+
subtractInPlace(other: DeepImmutable<Matrix>): this;
|
|
3354
|
+
subtractFromFloats(...floats: Tuple<number, 16>): Matrix;
|
|
3355
|
+
subtractFromFloatsToRef<T extends Matrix>(...args: [...Tuple<number, 16>, T]): T;
|
|
3356
3356
|
/**
|
|
3357
3357
|
* Sets the given matrix to the current inverted Matrix
|
|
3358
3358
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#119
|
|
@@ -3440,14 +3440,14 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3440
3440
|
* @param other defines the second operand
|
|
3441
3441
|
* @returns a new matrix set with the multiplication result of the current Matrix and the given one
|
|
3442
3442
|
*/
|
|
3443
|
-
multiply(other: DeepImmutable<Matrix>):
|
|
3443
|
+
multiply(other: DeepImmutable<Matrix>): Matrix;
|
|
3444
3444
|
/**
|
|
3445
3445
|
* This method performs component-by-component in-place multiplication, rather than true matrix multiplication.
|
|
3446
3446
|
* Use multiply or multiplyToRef for matrix multiplication.
|
|
3447
3447
|
* @param other defines the second operand
|
|
3448
3448
|
* @returns the current updated matrix
|
|
3449
3449
|
*/
|
|
3450
|
-
multiplyInPlace(other: DeepImmutable<
|
|
3450
|
+
multiplyInPlace(other: DeepImmutable<Matrix>): this;
|
|
3451
3451
|
/**
|
|
3452
3452
|
* This method performs a component-by-component multiplication of the current matrix with the array of transmitted numbers.
|
|
3453
3453
|
* Use multiply or multiplyToRef for matrix multiplication.
|
|
@@ -3460,7 +3460,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3460
3460
|
* @param args The floats and ref
|
|
3461
3461
|
* @returns The updated ref
|
|
3462
3462
|
*/
|
|
3463
|
-
multiplyByFloatsToRef<T extends
|
|
3463
|
+
multiplyByFloatsToRef<T extends Matrix>(...args: [...Tuple<number, 16>, T]): T;
|
|
3464
3464
|
/**
|
|
3465
3465
|
* Sets the given matrix "result" with the multiplication result of the current Matrix and the given one
|
|
3466
3466
|
* A.multiplyToRef(B, R) means apply B to A and store in R and R = B x A
|
|
@@ -3478,34 +3478,34 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3478
3478
|
* @returns the current matrix
|
|
3479
3479
|
*/
|
|
3480
3480
|
multiplyToArray(other: DeepImmutable<Matrix>, result: Float32Array | Array<number>, offset: number): this;
|
|
3481
|
-
divide(other: DeepImmutable<
|
|
3482
|
-
divideToRef<T extends
|
|
3483
|
-
divideInPlace(other: DeepImmutable<
|
|
3484
|
-
minimizeInPlace(other: DeepImmutable<
|
|
3481
|
+
divide(other: DeepImmutable<Matrix>): Matrix;
|
|
3482
|
+
divideToRef<T extends Matrix>(other: DeepImmutable<Matrix>, result: T): T;
|
|
3483
|
+
divideInPlace(other: DeepImmutable<Matrix>): this;
|
|
3484
|
+
minimizeInPlace(other: DeepImmutable<Matrix>): this;
|
|
3485
3485
|
minimizeInPlaceFromFloats(...floats: Tuple<number, 16>): this;
|
|
3486
|
-
maximizeInPlace(other: DeepImmutable<
|
|
3486
|
+
maximizeInPlace(other: DeepImmutable<Matrix>): this;
|
|
3487
3487
|
maximizeInPlaceFromFloats(...floats: Tuple<number, 16>): this;
|
|
3488
|
-
negate():
|
|
3488
|
+
negate(): Matrix;
|
|
3489
3489
|
negateInPlace(): this;
|
|
3490
|
-
negateToRef<T extends
|
|
3490
|
+
negateToRef<T extends Matrix>(result: T): T;
|
|
3491
3491
|
/**
|
|
3492
3492
|
* Check equality between this matrix and a second one
|
|
3493
3493
|
* @param value defines the second matrix to compare
|
|
3494
3494
|
* @returns true is the current matrix and the given one values are strictly equal
|
|
3495
3495
|
*/
|
|
3496
3496
|
equals(value: DeepImmutable<Matrix>): boolean;
|
|
3497
|
-
equalsWithEpsilon(other: DeepImmutable<
|
|
3497
|
+
equalsWithEpsilon(other: DeepImmutable<Matrix>, epsilon?: number): boolean;
|
|
3498
3498
|
equalsToFloats(...floats: Tuple<number, 16>): boolean;
|
|
3499
|
-
floor():
|
|
3500
|
-
floorToRef<T extends
|
|
3501
|
-
fract():
|
|
3502
|
-
fractToRef<T extends
|
|
3499
|
+
floor(): Matrix;
|
|
3500
|
+
floorToRef<T extends Matrix>(result: T): T;
|
|
3501
|
+
fract(): Matrix;
|
|
3502
|
+
fractToRef<T extends Matrix>(result: T): T;
|
|
3503
3503
|
/**
|
|
3504
3504
|
* Clone the current matrix
|
|
3505
3505
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#18
|
|
3506
3506
|
* @returns a new matrix from the current matrix
|
|
3507
3507
|
*/
|
|
3508
|
-
clone():
|
|
3508
|
+
clone(): Matrix;
|
|
3509
3509
|
/**
|
|
3510
3510
|
* Returns the name of the current matrix class
|
|
3511
3511
|
* @returns the string "Matrix"
|
|
@@ -3562,7 +3562,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3562
3562
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#40
|
|
3563
3563
|
* @returns the new transposed matrix
|
|
3564
3564
|
*/
|
|
3565
|
-
transpose():
|
|
3565
|
+
transpose(): Matrix;
|
|
3566
3566
|
/**
|
|
3567
3567
|
* Compute the transpose of the matrix and store it in a given matrix
|
|
3568
3568
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#41
|
|
@@ -3586,7 +3586,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3586
3586
|
* @param scale defines the scale factor
|
|
3587
3587
|
* @returns a new matrix
|
|
3588
3588
|
*/
|
|
3589
|
-
scale(scale: number):
|
|
3589
|
+
scale(scale: number): Matrix;
|
|
3590
3590
|
/**
|
|
3591
3591
|
* Scale the current matrix values by a factor to a given result matrix
|
|
3592
3592
|
* @param scale defines the scale factor
|
|
@@ -3613,7 +3613,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3613
3613
|
* Gets only rotation part of the current matrix
|
|
3614
3614
|
* @returns a new matrix sets to the extracted rotation matrix from the current one
|
|
3615
3615
|
*/
|
|
3616
|
-
getRotationMatrix():
|
|
3616
|
+
getRotationMatrix(): Matrix;
|
|
3617
3617
|
/**
|
|
3618
3618
|
* Extracts the rotation matrix from the current one and sets it as the given "result"
|
|
3619
3619
|
* @param result defines the target matrix to store data to
|
|
@@ -3751,7 +3751,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3751
3751
|
* @param source defines the source matrix
|
|
3752
3752
|
* @returns the new matrix
|
|
3753
3753
|
*/
|
|
3754
|
-
static Invert
|
|
3754
|
+
static Invert(source: DeepImmutable<Matrix>): Matrix;
|
|
3755
3755
|
/**
|
|
3756
3756
|
* Creates a new rotation matrix for "angle" radians around the X axis and stores it in a given matrix
|
|
3757
3757
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#98
|
|
@@ -3884,7 +3884,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3884
3884
|
* @param gradient defines the gradient factor
|
|
3885
3885
|
* @returns the new matrix
|
|
3886
3886
|
*/
|
|
3887
|
-
static Lerp
|
|
3887
|
+
static Lerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix;
|
|
3888
3888
|
/**
|
|
3889
3889
|
* Set the given matrix "result" as the interpolated values for "gradient" (float) between the ones of the matrices "startValue" and "endValue".
|
|
3890
3890
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#54
|
|
@@ -3907,7 +3907,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
3907
3907
|
* @param gradient defines the gradient between the two matrices
|
|
3908
3908
|
* @returns the new matrix
|
|
3909
3909
|
*/
|
|
3910
|
-
static DecomposeLerp
|
|
3910
|
+
static DecomposeLerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix;
|
|
3911
3911
|
/**
|
|
3912
3912
|
* Update a matrix to values which are computed by:
|
|
3913
3913
|
* * decomposing the "startValue" and "endValue" matrices into their respective scale, rotation and translation matrices
|
|
@@ -4222,7 +4222,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
4222
4222
|
* @param zmax defines the far clip plane
|
|
4223
4223
|
* @returns the transformation matrix
|
|
4224
4224
|
*/
|
|
4225
|
-
static GetFinalMatrix
|
|
4225
|
+
static GetFinalMatrix(viewport: DeepImmutable<Viewport>, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>, zmin: number, zmax: number): Matrix;
|
|
4226
4226
|
/**
|
|
4227
4227
|
* Extracts a 2x2 matrix from a given matrix and store the result in a Float32Array
|
|
4228
4228
|
* @param matrix defines the matrix to use
|
|
@@ -4241,7 +4241,7 @@ export declare class Matrix implements Tensor<Tuple<Tuple<number, 4>, 4>>, IMatr
|
|
|
4241
4241
|
* @param matrix defines the matrix to transpose
|
|
4242
4242
|
* @returns the new matrix
|
|
4243
4243
|
*/
|
|
4244
|
-
static Transpose
|
|
4244
|
+
static Transpose(matrix: DeepImmutable<Matrix>): Matrix;
|
|
4245
4245
|
/**
|
|
4246
4246
|
* Compute the transpose of a matrix and store it in a target matrix
|
|
4247
4247
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#112
|