@babylonjs/core 7.19.1 → 7.20.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/Bones/bone.js +3 -3
- package/Bones/bone.js.map +1 -1
- package/Bones/boneLookController.js +3 -3
- package/Bones/boneLookController.js.map +1 -1
- package/Buffers/buffer.nonFloatVertexBuffers.js +1 -1
- package/Buffers/buffer.nonFloatVertexBuffers.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +8 -2
- package/Collisions/gpuPicker.js +41 -20
- package/Collisions/gpuPicker.js.map +1 -1
- package/Compat/compatibilityOptions.d.ts +13 -6
- package/Compat/compatibilityOptions.js +20 -4
- package/Compat/compatibilityOptions.js.map +1 -1
- package/Compat/index.d.ts +1 -1
- package/Compat/index.js +1 -1
- package/Compat/index.js.map +1 -1
- package/Culling/boundingBox.js +5 -5
- package/Culling/boundingBox.js.map +1 -1
- package/Culling/boundingInfo.js +2 -2
- package/Culling/boundingInfo.js.map +1 -1
- package/Culling/boundingSphere.js +2 -2
- package/Culling/boundingSphere.js.map +1 -1
- package/Culling/ray.js +2 -2
- package/Culling/ray.js.map +1 -1
- package/Debug/debugLayer.d.ts +3 -0
- package/Debug/debugLayer.js +15 -0
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/Processors/shaderProcessor.d.ts +1 -0
- package/Engines/Processors/shaderProcessor.js +1 -0
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.js +1 -0
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.d.ts +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.js +4 -2
- package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +2 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +12 -5
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -4
- package/Engines/WebGPU/webgpuTextureManager.js +90 -75
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +2 -2
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.js +11 -2
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +1 -1
- package/Engines/nativeEngine.js +2 -1
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +1 -1
- package/Engines/thinEngine.functions.d.ts +1 -1
- package/Engines/thinEngine.functions.js +2 -1
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +9 -5
- package/Engines/webgpuEngine.js +35 -22
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/Layers/effectLayer.d.ts +16 -1
- package/Layers/effectLayer.js +32 -2
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -2
- package/Layers/glowLayer.js +16 -3
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +5 -4
- package/Layers/highlightLayer.js +35 -11
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/index.d.ts +10 -0
- package/Layers/index.js +12 -0
- package/Layers/index.js.map +1 -1
- package/Lights/Shadows/index.d.ts +8 -0
- package/Lights/Shadows/index.js +9 -0
- package/Lights/Shadows/index.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.d.ts +18 -5
- package/Lights/Shadows/shadowGenerator.js +44 -5
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Loading/sceneLoader.d.ts +155 -16
- package/Loading/sceneLoader.js +197 -99
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +8 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +1 -1
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Textures/Loaders/hdrTextureLoader.js +3 -3
- package/Materials/Textures/Loaders/hdrTextureLoader.js.map +1 -1
- package/Materials/Textures/hdrCubeTexture.js +2 -2
- package/Materials/Textures/hdrCubeTexture.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +2 -2
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/Textures/texture.js +3 -3
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/effect.functions.d.ts +1 -1
- package/Materials/effect.functions.js +6 -3
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +1 -1
- package/Materials/effect.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -1
- package/Materials/standardMaterial.js +1 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.color.js +3 -3
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.constants.d.ts +1 -2
- package/Maths/math.constants.js +1 -2
- package/Maths/math.constants.js.map +1 -1
- package/Maths/math.like.d.ts +9 -0
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.vector.d.ts +23 -23
- package/Maths/math.vector.js +56 -25
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Builders/boxBuilder.js +5 -5
- package/Meshes/Builders/boxBuilder.js.map +1 -1
- package/Meshes/Builders/capsuleBuilder.js +4 -4
- package/Meshes/Builders/capsuleBuilder.js.map +1 -1
- package/Meshes/Builders/cylinderBuilder.js +8 -8
- package/Meshes/Builders/cylinderBuilder.js.map +1 -1
- package/Meshes/Builders/decalBuilder.js +3 -3
- package/Meshes/Builders/decalBuilder.js.map +1 -1
- package/Meshes/Builders/discBuilder.js +3 -3
- package/Meshes/Builders/discBuilder.js.map +1 -1
- package/Meshes/Builders/goldbergBuilder.js +2 -2
- package/Meshes/Builders/goldbergBuilder.js.map +1 -1
- package/Meshes/Builders/groundBuilder.js +2 -2
- package/Meshes/Builders/groundBuilder.js.map +1 -1
- package/Meshes/Builders/icoSphereBuilder.js +2 -2
- package/Meshes/Builders/icoSphereBuilder.js.map +1 -1
- package/Meshes/Builders/planeBuilder.js +5 -5
- package/Meshes/Builders/planeBuilder.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.js +4 -4
- package/Meshes/Builders/polygonBuilder.js.map +1 -1
- package/Meshes/Builders/polyhedronBuilder.js +3 -3
- package/Meshes/Builders/polyhedronBuilder.js.map +1 -1
- package/Meshes/Builders/ribbonBuilder.js +4 -4
- package/Meshes/Builders/ribbonBuilder.js.map +1 -1
- package/Meshes/Builders/sphereBuilder.js +2 -2
- package/Meshes/Builders/sphereBuilder.js.map +1 -1
- package/Meshes/Builders/tiledBoxBuilder.js +2 -2
- package/Meshes/Builders/tiledBoxBuilder.js.map +1 -1
- package/Meshes/Builders/torusBuilder.js +2 -2
- package/Meshes/Builders/torusBuilder.js.map +1 -1
- package/Meshes/Builders/torusKnotBuilder.js +2 -2
- package/Meshes/Builders/torusKnotBuilder.js.map +1 -1
- package/Meshes/geometry.js +7 -7
- package/Meshes/geometry.js.map +1 -1
- package/Misc/HighDynamicRange/hdr.d.ts +40 -42
- package/Misc/HighDynamicRange/hdr.js +209 -202
- package/Misc/HighDynamicRange/hdr.js.map +1 -1
- package/Misc/HighDynamicRange/index.d.ts +1 -1
- package/Misc/HighDynamicRange/index.js +1 -1
- package/Misc/HighDynamicRange/index.js.map +1 -1
- package/Misc/arrayTools.d.ts +12 -17
- package/Misc/arrayTools.js +18 -23
- package/Misc/arrayTools.js.map +1 -1
- package/Misc/dumpTools.d.ts +50 -47
- package/Misc/dumpTools.js +153 -143
- package/Misc/dumpTools.js.map +1 -1
- package/Misc/environmentTextureTools.js +2 -2
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/equirectangularCapture.js +2 -2
- package/Misc/equirectangularCapture.js.map +1 -1
- package/Misc/index.d.ts +6 -1
- package/Misc/index.js +7 -1
- package/Misc/index.js.map +1 -1
- package/Misc/rgbdTextureTools.d.ts +1 -0
- package/Misc/rgbdTextureTools.js +16 -2
- package/Misc/rgbdTextureTools.js.map +1 -1
- package/Misc/screenshotTools.js +3 -3
- package/Misc/screenshotTools.js.map +1 -1
- package/Physics/v1/physicsImpostor.js +2 -2
- package/Physics/v1/physicsImpostor.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +2 -2
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/PostProcesses/blurPostProcess.d.ts +6 -0
- package/PostProcesses/blurPostProcess.js +20 -2
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/index.d.ts +8 -0
- package/PostProcesses/index.js +10 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/passPostProcess.d.ts +2 -0
- package/PostProcesses/passPostProcess.js +24 -2
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +17 -2
- package/PostProcesses/postProcess.js +38 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js +17 -0
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js +20 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js +19 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js +9 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js +9 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +4 -4
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapFragment.js +5 -5
- package/ShadersWGSL/ShadersInclude/shadowMapFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.d.ts +7 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js +26 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js +12 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js +19 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js +4 -4
- package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js +17 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js.map +1 -0
- package/ShadersWGSL/background.fragment.js +1 -1
- package/ShadersWGSL/background.fragment.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +2 -2
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/depthBoxBlur.fragment.d.ts +5 -0
- package/ShadersWGSL/depthBoxBlur.fragment.js +14 -0
- package/ShadersWGSL/depthBoxBlur.fragment.js.map +1 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.d.ts +5 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.js +15 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapGeneration.fragment.d.ts +8 -0
- package/ShadersWGSL/glowMapGeneration.fragment.js +74 -0
- package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapGeneration.vertex.d.ts +17 -0
- package/ShadersWGSL/glowMapGeneration.vertex.js +92 -0
- package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -0
- package/ShadersWGSL/glowMapMerge.fragment.d.ts +5 -0
- package/ShadersWGSL/glowMapMerge.fragment.js +32 -0
- package/ShadersWGSL/glowMapMerge.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapMerge.vertex.d.ts +5 -0
- package/ShadersWGSL/glowMapMerge.vertex.js +16 -0
- package/ShadersWGSL/glowMapMerge.vertex.js.map +1 -0
- package/ShadersWGSL/kernelBlur.fragment.d.ts +9 -0
- package/ShadersWGSL/kernelBlur.fragment.js +48 -0
- package/ShadersWGSL/kernelBlur.fragment.js.map +1 -0
- package/ShadersWGSL/kernelBlur.vertex.d.ts +7 -0
- package/ShadersWGSL/kernelBlur.vertex.js +21 -0
- package/ShadersWGSL/kernelBlur.vertex.js.map +1 -0
- package/ShadersWGSL/pass.fragment.d.ts +5 -0
- package/ShadersWGSL/pass.fragment.js +12 -0
- package/ShadersWGSL/pass.fragment.js.map +1 -0
- package/ShadersWGSL/passCube.fragment.d.ts +5 -0
- package/ShadersWGSL/passCube.fragment.js +31 -0
- package/ShadersWGSL/passCube.fragment.js.map +1 -0
- package/ShadersWGSL/rgbdDecode.fragment.d.ts +6 -0
- package/ShadersWGSL/rgbdDecode.fragment.js +14 -0
- package/ShadersWGSL/rgbdDecode.fragment.js.map +1 -0
- package/ShadersWGSL/rgbdEncode.fragment.d.ts +6 -0
- package/ShadersWGSL/rgbdEncode.fragment.js +14 -0
- package/ShadersWGSL/rgbdEncode.fragment.js.map +1 -0
- package/ShadersWGSL/shadowMap.fragment.d.ts +9 -0
- package/ShadersWGSL/shadowMap.fragment.js +39 -0
- package/ShadersWGSL/shadowMap.fragment.js.map +1 -0
- package/ShadersWGSL/shadowMap.vertex.d.ts +22 -0
- package/ShadersWGSL/shadowMap.vertex.js +89 -0
- package/ShadersWGSL/shadowMap.vertex.js.map +1 -0
- package/package.json +1 -1
package/Maths/math.like.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.like.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.like.ts"],"names":[],"mappings":"","sourcesContent":["import type { float, int, DeepImmutable, Tuple } from \"../types\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor3Like {\r\n r: float;\r\n g: float;\r\n b: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor4Like extends IColor3Like {\r\n a: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector2Like {\r\n x: float;\r\n y: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector3Like extends IVector2Like {\r\n z: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector4Like extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IQuaternionLike extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IPlaneLike {\r\n normal: IVector3Like;\r\n d: float;\r\n normalize(): void;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IMatrixLike {\r\n asArray(): DeepImmutable<Tuple<number, 16>>;\r\n updateFlag: int;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IViewportLike {\r\n x: float;\r\n y: float;\r\n width: float;\r\n height: float;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"math.like.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.like.ts"],"names":[],"mappings":"","sourcesContent":["import type { float, int, DeepImmutable, Tuple } from \"../types\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor3Like {\r\n r: float;\r\n g: float;\r\n b: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IColor4Like extends IColor3Like {\r\n a: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector2Like {\r\n x: float;\r\n y: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector3Like extends IVector2Like {\r\n z: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface Vector3LikeInternal {\r\n _x: number;\r\n _y: number;\r\n _z: number;\r\n _isDirty?: boolean;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IVector4Like extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IQuaternionLike extends IVector3Like {\r\n w: float;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IPlaneLike {\r\n normal: IVector3Like;\r\n d: float;\r\n normalize(): void;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IMatrixLike {\r\n asArray(): DeepImmutable<Tuple<number, 16>>;\r\n updateFlag: int;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface IViewportLike {\r\n x: float;\r\n y: float;\r\n width: float;\r\n height: float;\r\n}\r\n"]}
|
package/Maths/math.vector.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { DeepImmutable, Nullable, FloatArray, float, Tuple } from "../types
|
|
|
3
3
|
import type { Plane } from "./math.plane";
|
|
4
4
|
import type { TransformNode } from "../Meshes/transformNode";
|
|
5
5
|
import type { Dimension, Tensor, TensorLike, TensorStatic } from "./tensor";
|
|
6
|
-
import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike } from "./math.like";
|
|
6
|
+
import type { IVector2Like, IVector3Like, IVector4Like, IQuaternionLike, IMatrixLike, IPlaneLike, Vector3LikeInternal } from "./math.like";
|
|
7
7
|
/**
|
|
8
8
|
* Represents a vector of any dimension
|
|
9
9
|
*/
|
|
@@ -726,7 +726,7 @@ export declare class Vector2 implements Vector<Tuple<number, 2>, IVector2Like>,
|
|
|
726
726
|
* Reminder: js uses a left handed forward facing system
|
|
727
727
|
* Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU
|
|
728
728
|
*/
|
|
729
|
-
export declare class Vector3 implements Vector<Tuple<number, 3>,
|
|
729
|
+
export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3LikeInternal>, IVector3Like {
|
|
730
730
|
private static _UpReadOnly;
|
|
731
731
|
private static _DownReadOnly;
|
|
732
732
|
private static _LeftHandedForwardReadOnly;
|
|
@@ -835,7 +835,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
835
835
|
* @param otherVector defines the second operand
|
|
836
836
|
* @returns the resulting Vector3
|
|
837
837
|
*/
|
|
838
|
-
add(otherVector: DeepImmutable<
|
|
838
|
+
add(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
|
|
839
839
|
/**
|
|
840
840
|
* Adds the current Vector3 to the given one and stores the result in the vector "result"
|
|
841
841
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#6
|
|
@@ -843,21 +843,21 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
843
843
|
* @param result defines the Vector3 object where to store the result
|
|
844
844
|
* @returns the result
|
|
845
845
|
*/
|
|
846
|
-
addToRef<T extends
|
|
846
|
+
addToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
|
|
847
847
|
/**
|
|
848
848
|
* Subtract the given vector from the current Vector3
|
|
849
849
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#61
|
|
850
850
|
* @param otherVector defines the second operand
|
|
851
851
|
* @returns the current updated Vector3
|
|
852
852
|
*/
|
|
853
|
-
subtractInPlace(otherVector: DeepImmutable<
|
|
853
|
+
subtractInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
|
|
854
854
|
/**
|
|
855
855
|
* Returns a new Vector3, result of the subtraction of the given vector from the current Vector3
|
|
856
856
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#60
|
|
857
857
|
* @param otherVector defines the second operand
|
|
858
858
|
* @returns the resulting Vector3
|
|
859
859
|
*/
|
|
860
|
-
subtract(otherVector: DeepImmutable<
|
|
860
|
+
subtract(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
|
|
861
861
|
/**
|
|
862
862
|
* Subtracts the given vector from the current Vector3 and stores the result in the vector "result".
|
|
863
863
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#63
|
|
@@ -865,7 +865,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
865
865
|
* @param result defines the Vector3 object where to store the result
|
|
866
866
|
* @returns the result
|
|
867
867
|
*/
|
|
868
|
-
subtractToRef<T extends
|
|
868
|
+
subtractToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
|
|
869
869
|
/**
|
|
870
870
|
* Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates
|
|
871
871
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#62
|
|
@@ -884,7 +884,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
884
884
|
* @param result defines the Vector3 object where to store the result
|
|
885
885
|
* @returns the result
|
|
886
886
|
*/
|
|
887
|
-
subtractFromFloatsToRef<T extends
|
|
887
|
+
subtractFromFloatsToRef<T extends Vector3LikeInternal>(x: number, y: number, z: number, result: T): T;
|
|
888
888
|
/**
|
|
889
889
|
* Gets a new Vector3 set with the current Vector3 negated coordinates
|
|
890
890
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#35
|
|
@@ -903,7 +903,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
903
903
|
* @param result defines the Vector3 object where to store the result
|
|
904
904
|
* @returns the result
|
|
905
905
|
*/
|
|
906
|
-
negateToRef<T extends
|
|
906
|
+
negateToRef<T extends Vector3LikeInternal>(result: T): T;
|
|
907
907
|
/**
|
|
908
908
|
* Multiplies the Vector3 coordinates by the float "scale"
|
|
909
909
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#56
|
|
@@ -925,7 +925,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
925
925
|
* @param result defines the Vector3 object where to store the result
|
|
926
926
|
* @returns the result
|
|
927
927
|
*/
|
|
928
|
-
scaleToRef<T extends
|
|
928
|
+
scaleToRef<T extends Vector3LikeInternal>(scale: number, result: T): T;
|
|
929
929
|
/**
|
|
930
930
|
* Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector
|
|
931
931
|
* Out of the infinite possibilities the normal chosen is the one formed by rotating the current vector
|
|
@@ -967,7 +967,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
967
967
|
* @param result defines the Vector3 object where to store the result
|
|
968
968
|
* @returns result input
|
|
969
969
|
*/
|
|
970
|
-
scaleAndAddToRef<T extends
|
|
970
|
+
scaleAndAddToRef<T extends Vector3LikeInternal>(scale: number, result: T): T;
|
|
971
971
|
/**
|
|
972
972
|
* Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
|
|
973
973
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#48
|
|
@@ -1015,14 +1015,14 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1015
1015
|
* @param otherVector defines the second operand
|
|
1016
1016
|
* @returns the current updated Vector3
|
|
1017
1017
|
*/
|
|
1018
|
-
multiplyInPlace(otherVector: DeepImmutable<
|
|
1018
|
+
multiplyInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector
|
|
1021
1021
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#31
|
|
1022
1022
|
* @param otherVector defines the second operand
|
|
1023
1023
|
* @returns the new Vector3
|
|
1024
1024
|
*/
|
|
1025
|
-
multiply(otherVector: DeepImmutable<
|
|
1025
|
+
multiply(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
|
|
1026
1026
|
/**
|
|
1027
1027
|
* Multiplies the current Vector3 by the given one and stores the result in the given vector "result"
|
|
1028
1028
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#33
|
|
@@ -1030,7 +1030,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1030
1030
|
* @param result defines the Vector3 object where to store the result
|
|
1031
1031
|
* @returns the result
|
|
1032
1032
|
*/
|
|
1033
|
-
multiplyToRef<T extends
|
|
1033
|
+
multiplyToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats
|
|
1036
1036
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#34
|
|
@@ -1046,7 +1046,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1046
1046
|
* @param otherVector defines the second operand
|
|
1047
1047
|
* @returns the new Vector3
|
|
1048
1048
|
*/
|
|
1049
|
-
divide(otherVector: DeepImmutable<
|
|
1049
|
+
divide(otherVector: DeepImmutable<Vector3LikeInternal>): Vector3;
|
|
1050
1050
|
/**
|
|
1051
1051
|
* Divides the current Vector3 coordinates by the given ones and stores the result in the given vector "result"
|
|
1052
1052
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#18
|
|
@@ -1054,28 +1054,28 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1054
1054
|
* @param result defines the Vector3 object where to store the result
|
|
1055
1055
|
* @returns the result
|
|
1056
1056
|
*/
|
|
1057
|
-
divideToRef<T extends
|
|
1057
|
+
divideToRef<T extends Vector3LikeInternal>(otherVector: DeepImmutable<Vector3LikeInternal>, result: T): T;
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Divides the current Vector3 coordinates by the given ones.
|
|
1060
1060
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#17
|
|
1061
1061
|
* @param otherVector defines the second operand
|
|
1062
1062
|
* @returns the current updated Vector3
|
|
1063
1063
|
*/
|
|
1064
|
-
divideInPlace(otherVector: DeepImmutable<
|
|
1064
|
+
divideInPlace(otherVector: DeepImmutable<Vector3LikeInternal>): this;
|
|
1065
1065
|
/**
|
|
1066
1066
|
* Updates the current Vector3 with the minimal coordinate values between its and the given vector ones
|
|
1067
1067
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#29
|
|
1068
1068
|
* @param other defines the second operand
|
|
1069
1069
|
* @returns the current updated Vector3
|
|
1070
1070
|
*/
|
|
1071
|
-
minimizeInPlace(other: DeepImmutable<
|
|
1071
|
+
minimizeInPlace(other: DeepImmutable<Vector3LikeInternal>): this;
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
|
|
1074
1074
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#27
|
|
1075
1075
|
* @param other defines the second operand
|
|
1076
1076
|
* @returns the current updated Vector3
|
|
1077
1077
|
*/
|
|
1078
|
-
maximizeInPlace(other: DeepImmutable<
|
|
1078
|
+
maximizeInPlace(other: DeepImmutable<Vector3LikeInternal>): this;
|
|
1079
1079
|
/**
|
|
1080
1080
|
* Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
|
|
1081
1081
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#30
|
|
@@ -1110,7 +1110,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1110
1110
|
* @param result the vector to store the result in
|
|
1111
1111
|
* @returns the result vector
|
|
1112
1112
|
*/
|
|
1113
|
-
floorToRef<T extends
|
|
1113
|
+
floorToRef<T extends Vector3LikeInternal>(result: T): T;
|
|
1114
1114
|
/**
|
|
1115
1115
|
* Gets a new Vector3 from current Vector3 floored values
|
|
1116
1116
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#22
|
|
@@ -1122,7 +1122,7 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1122
1122
|
* @param result the vector to store the result in
|
|
1123
1123
|
* @returns the result vector
|
|
1124
1124
|
*/
|
|
1125
|
-
fractToRef<T extends
|
|
1125
|
+
fractToRef<T extends Vector3LikeInternal>(result: T): T;
|
|
1126
1126
|
/**
|
|
1127
1127
|
* Gets a new Vector3 from current Vector3 fractional values
|
|
1128
1128
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#23
|
|
@@ -1202,10 +1202,10 @@ export declare class Vector3 implements Vector<Tuple<number, 3>, Vector3>, IVect
|
|
|
1202
1202
|
/**
|
|
1203
1203
|
* Normalize the current Vector3 to the reference
|
|
1204
1204
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#125
|
|
1205
|
-
* @param
|
|
1205
|
+
* @param result define the Vector3 to update
|
|
1206
1206
|
* @returns the updated Vector3
|
|
1207
1207
|
*/
|
|
1208
|
-
normalizeToRef<T extends
|
|
1208
|
+
normalizeToRef<T extends Vector3LikeInternal>(result: T): T;
|
|
1209
1209
|
/**
|
|
1210
1210
|
* Creates a new Vector3 copied from the current Vector3
|
|
1211
1211
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#11
|
package/Maths/math.vector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
import { Epsilon } from "./math.constants.js";
|
|
3
|
-
import {
|
|
3
|
+
import { BuildTuple } from "../Misc/arrayTools.js";
|
|
4
4
|
import { RegisterClass } from "../Misc/typeStore.js";
|
|
5
5
|
import { PerformanceConfigurator } from "../Engines/performanceConfigurator.js";
|
|
6
6
|
import { EngineStore } from "../Engines/engineStore.js";
|
|
@@ -1098,7 +1098,11 @@ export class Vector3 {
|
|
|
1098
1098
|
* @returns the result
|
|
1099
1099
|
*/
|
|
1100
1100
|
addToRef(otherVector, result) {
|
|
1101
|
-
|
|
1101
|
+
result._x = this._x + otherVector._x;
|
|
1102
|
+
result._y = this._y + otherVector._y;
|
|
1103
|
+
result._z = this._z + otherVector._z;
|
|
1104
|
+
result._isDirty = true;
|
|
1105
|
+
return result;
|
|
1102
1106
|
}
|
|
1103
1107
|
/**
|
|
1104
1108
|
* Subtract the given vector from the current Vector3
|
|
@@ -1153,7 +1157,11 @@ export class Vector3 {
|
|
|
1153
1157
|
* @returns the result
|
|
1154
1158
|
*/
|
|
1155
1159
|
subtractFromFloatsToRef(x, y, z, result) {
|
|
1156
|
-
|
|
1160
|
+
result._x = this._x - x;
|
|
1161
|
+
result._y = this._y - y;
|
|
1162
|
+
result._z = this._z - z;
|
|
1163
|
+
result._isDirty = true;
|
|
1164
|
+
return result;
|
|
1157
1165
|
}
|
|
1158
1166
|
/**
|
|
1159
1167
|
* Gets a new Vector3 set with the current Vector3 negated coordinates
|
|
@@ -1182,7 +1190,11 @@ export class Vector3 {
|
|
|
1182
1190
|
* @returns the result
|
|
1183
1191
|
*/
|
|
1184
1192
|
negateToRef(result) {
|
|
1185
|
-
|
|
1193
|
+
result._x = this._x * -1;
|
|
1194
|
+
result._y = this._y * -1;
|
|
1195
|
+
result._z = this._z * -1;
|
|
1196
|
+
result._isDirty = true;
|
|
1197
|
+
return result;
|
|
1186
1198
|
}
|
|
1187
1199
|
/**
|
|
1188
1200
|
* Multiplies the Vector3 coordinates by the float "scale"
|
|
@@ -1214,7 +1226,11 @@ export class Vector3 {
|
|
|
1214
1226
|
* @returns the result
|
|
1215
1227
|
*/
|
|
1216
1228
|
scaleToRef(scale, result) {
|
|
1217
|
-
|
|
1229
|
+
result._x = this._x * scale;
|
|
1230
|
+
result._y = this._y * scale;
|
|
1231
|
+
result._z = this._z * scale;
|
|
1232
|
+
result._isDirty = true;
|
|
1233
|
+
return result;
|
|
1218
1234
|
}
|
|
1219
1235
|
/**
|
|
1220
1236
|
* Creates a vector normal (perpendicular) to the current Vector3 and stores the result in the given vector
|
|
@@ -1297,7 +1313,11 @@ export class Vector3 {
|
|
|
1297
1313
|
* @returns result input
|
|
1298
1314
|
*/
|
|
1299
1315
|
scaleAndAddToRef(scale, result) {
|
|
1300
|
-
|
|
1316
|
+
result._x += this._x * scale;
|
|
1317
|
+
result._y += this._y * scale;
|
|
1318
|
+
result._z += this._z * scale;
|
|
1319
|
+
result._isDirty = true;
|
|
1320
|
+
return result;
|
|
1301
1321
|
}
|
|
1302
1322
|
/**
|
|
1303
1323
|
* Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
|
|
@@ -1397,7 +1417,11 @@ export class Vector3 {
|
|
|
1397
1417
|
* @returns the result
|
|
1398
1418
|
*/
|
|
1399
1419
|
multiplyToRef(otherVector, result) {
|
|
1400
|
-
|
|
1420
|
+
result._x = this._x * otherVector._x;
|
|
1421
|
+
result._y = this._y * otherVector._y;
|
|
1422
|
+
result._z = this._z * otherVector._z;
|
|
1423
|
+
result._isDirty = true;
|
|
1424
|
+
return result;
|
|
1401
1425
|
}
|
|
1402
1426
|
/**
|
|
1403
1427
|
* Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats
|
|
@@ -1427,7 +1451,11 @@ export class Vector3 {
|
|
|
1427
1451
|
* @returns the result
|
|
1428
1452
|
*/
|
|
1429
1453
|
divideToRef(otherVector, result) {
|
|
1430
|
-
|
|
1454
|
+
result._x = this._x / otherVector._x;
|
|
1455
|
+
result._y = this._y / otherVector._y;
|
|
1456
|
+
result._z = this._z / otherVector._z;
|
|
1457
|
+
result._isDirty = true;
|
|
1458
|
+
return result;
|
|
1431
1459
|
}
|
|
1432
1460
|
/**
|
|
1433
1461
|
* Divides the current Vector3 coordinates by the given ones.
|
|
@@ -1686,15 +1714,19 @@ export class Vector3 {
|
|
|
1686
1714
|
/**
|
|
1687
1715
|
* Normalize the current Vector3 to the reference
|
|
1688
1716
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#125
|
|
1689
|
-
* @param
|
|
1717
|
+
* @param result define the Vector3 to update
|
|
1690
1718
|
* @returns the updated Vector3
|
|
1691
1719
|
*/
|
|
1692
|
-
normalizeToRef(
|
|
1720
|
+
normalizeToRef(result) {
|
|
1693
1721
|
const len = this.length();
|
|
1694
1722
|
if (len === 0 || len === 1.0) {
|
|
1695
|
-
|
|
1723
|
+
result._x = this._x;
|
|
1724
|
+
result._y = this._y;
|
|
1725
|
+
result._z = this._z;
|
|
1726
|
+
result._isDirty = true;
|
|
1727
|
+
return result;
|
|
1696
1728
|
}
|
|
1697
|
-
return this.scaleToRef(1.0 / len,
|
|
1729
|
+
return this.scaleToRef(1.0 / len, result);
|
|
1698
1730
|
}
|
|
1699
1731
|
/**
|
|
1700
1732
|
* Creates a new Vector3 copied from the current Vector3
|
|
@@ -4629,12 +4661,11 @@ export class Quaternion {
|
|
|
4629
4661
|
* @returns the target quaternion
|
|
4630
4662
|
*/
|
|
4631
4663
|
static RotationAxisToRef(axis, angle, result) {
|
|
4632
|
-
const sin = Math.sin(angle / 2);
|
|
4633
|
-
axis.normalize();
|
|
4634
4664
|
result._w = Math.cos(angle / 2);
|
|
4635
|
-
|
|
4636
|
-
result.
|
|
4637
|
-
result.
|
|
4665
|
+
const sinByLength = Math.sin(angle / 2) / axis.length();
|
|
4666
|
+
result._x = axis._x * sinByLength;
|
|
4667
|
+
result._y = axis._y * sinByLength;
|
|
4668
|
+
result._z = axis._z * sinByLength;
|
|
4638
4669
|
result._isDirty = true;
|
|
4639
4670
|
return result;
|
|
4640
4671
|
}
|
|
@@ -7489,26 +7520,26 @@ Object.defineProperties(Matrix.prototype, {
|
|
|
7489
7520
|
class MathTmp {
|
|
7490
7521
|
}
|
|
7491
7522
|
// Temporary Vector3s
|
|
7492
|
-
MathTmp.Vector3 =
|
|
7523
|
+
MathTmp.Vector3 = BuildTuple(11, Vector3.Zero);
|
|
7493
7524
|
// Temporary Matricies
|
|
7494
|
-
MathTmp.Matrix =
|
|
7525
|
+
MathTmp.Matrix = BuildTuple(2, Matrix.Identity);
|
|
7495
7526
|
// Temporary Quaternions
|
|
7496
|
-
MathTmp.Quaternion =
|
|
7527
|
+
MathTmp.Quaternion = BuildTuple(3, Quaternion.Zero);
|
|
7497
7528
|
/**
|
|
7498
7529
|
* @internal
|
|
7499
7530
|
*/
|
|
7500
7531
|
export class TmpVectors {
|
|
7501
7532
|
}
|
|
7502
7533
|
/** 3 temp Vector2 at once should be enough */
|
|
7503
|
-
TmpVectors.Vector2 =
|
|
7534
|
+
TmpVectors.Vector2 = BuildTuple(3, Vector2.Zero);
|
|
7504
7535
|
/** 13 temp Vector3 at once should be enough */
|
|
7505
|
-
TmpVectors.Vector3 =
|
|
7536
|
+
TmpVectors.Vector3 = BuildTuple(13, Vector3.Zero);
|
|
7506
7537
|
/** 3 temp Vector4 at once should be enough */
|
|
7507
|
-
TmpVectors.Vector4 =
|
|
7538
|
+
TmpVectors.Vector4 = BuildTuple(3, Vector4.Zero);
|
|
7508
7539
|
/** 3 temp Quaternion at once should be enough */
|
|
7509
|
-
TmpVectors.Quaternion =
|
|
7540
|
+
TmpVectors.Quaternion = BuildTuple(3, Quaternion.Zero);
|
|
7510
7541
|
/** 8 temp Matrices at once should be enough */
|
|
7511
|
-
TmpVectors.Matrix =
|
|
7542
|
+
TmpVectors.Matrix = BuildTuple(8, Matrix.Identity);
|
|
7512
7543
|
RegisterClass("BABYLON.Vector2", Vector2);
|
|
7513
7544
|
RegisterClass("BABYLON.Vector3", Vector3);
|
|
7514
7545
|
RegisterClass("BABYLON.Vector4", Vector4);
|