@babylonjs/core 6.45.0 → 6.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animation.js +1 -1
- package/Animations/animation.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +2 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Bones/skeleton.js +2 -2
- package/Bones/skeleton.js.map +1 -1
- package/Cameras/camera.d.ts +3 -3
- package/Cameras/camera.js +2 -1
- package/Cameras/camera.js.map +1 -1
- package/Cameras/cameraInputsManager.js +1 -1
- package/Cameras/cameraInputsManager.js.map +1 -1
- package/Cameras/targetCamera.js +4 -0
- package/Cameras/targetCamera.js.map +1 -1
- package/Compute/computeShader.d.ts +4 -2
- package/Compute/computeShader.js +7 -3
- package/Compute/computeShader.js.map +1 -1
- package/Debug/directionalLightFrustumViewer.js +6 -6
- package/Debug/directionalLightFrustumViewer.js.map +1 -1
- package/Engines/Extensions/engine.computeShader.d.ts +2 -1
- package/Engines/Extensions/engine.computeShader.js +1 -0
- package/Engines/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.js +3 -3
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Native/nativePipelineContext.js +1 -1
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.js +1 -1
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuComputeContext.js +7 -3
- package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
- package/Engines/engine.d.ts +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +2 -15
- package/Engines/webgpuEngine.js.map +1 -1
- package/Layers/glowLayer.js +2 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.js +2 -1
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/light.js +2 -1
- package/Lights/light.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +9 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/sceneLoader.d.ts +6 -1
- package/Loading/sceneLoader.js +6 -5
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +2 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +2 -1
- package/Materials/Node/nodeMaterial.js +5 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.js +2 -1
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js +2 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js +2 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
- package/Materials/Textures/baseTexture.js +2 -1
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.js +2 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.js +1 -1
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/Textures/texture.js +2 -1
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/colorCurves.d.ts +1 -1
- package/Materials/colorCurves.functions.d.ts +5 -0
- package/Materials/colorCurves.functions.js +8 -0
- package/Materials/colorCurves.functions.js.map +1 -0
- package/Materials/colorCurves.js +8 -8
- package/Materials/colorCurves.js.map +1 -1
- package/Materials/fresnelParameters.js +1 -1
- package/Materials/fresnelParameters.js.map +1 -1
- package/Materials/imageProcessingConfiguration.d.ts +3 -48
- package/Materials/imageProcessingConfiguration.defines.d.ts +46 -0
- package/Materials/imageProcessingConfiguration.defines.js +27 -0
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -0
- package/Materials/imageProcessingConfiguration.functions.d.ts +13 -0
- package/Materials/imageProcessingConfiguration.functions.js +41 -0
- package/Materials/imageProcessingConfiguration.functions.js.map +1 -0
- package/Materials/imageProcessingConfiguration.js +18 -69
- package/Materials/imageProcessingConfiguration.js.map +1 -1
- package/Materials/material.js +2 -1
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.d.ts +33 -33
- package/Materials/materialHelper.js +244 -286
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/materialPluginBase.js +2 -1
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/materialStencilState.js +2 -1
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/shaderMaterial.js +1 -1
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -1
- package/Materials/standardMaterial.js +2 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBuffer.js +2 -2
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/math.color.d.ts +392 -66
- package/Maths/math.color.js +541 -65
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.like.d.ts +17 -28
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.plane.d.ts +2 -1
- package/Maths/math.plane.js.map +1 -1
- package/Maths/math.polar.d.ts +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.scalar.d.ts +6 -6
- package/Maths/math.scalar.functions.d.ts +51 -0
- package/Maths/math.scalar.functions.js +80 -0
- package/Maths/math.scalar.functions.js.map +1 -0
- package/Maths/math.scalar.js +48 -73
- package/Maths/math.scalar.js.map +1 -1
- package/Maths/math.vector.d.ts +571 -72
- package/Maths/math.vector.js +917 -119
- package/Maths/math.vector.js.map +1 -1
- package/Maths/math.viewport.d.ts +2 -1
- package/Maths/math.viewport.js.map +1 -1
- package/Maths/tensor.d.ts +411 -0
- package/Maths/tensor.js +3 -0
- package/Maths/tensor.js.map +1 -0
- package/Meshes/Node/Blocks/Set/setColorsBlock.js +20 -4
- package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +2 -1
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/mesh.js +2 -2
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.d.ts +4 -0
- package/Meshes/mesh.vertexData.js +10 -0
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.js +2 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/arrayTools.d.ts +2 -19
- package/Misc/arrayTools.js.map +1 -1
- package/Misc/decorators.d.ts +0 -80
- package/Misc/decorators.functions.d.ts +7 -0
- package/Misc/decorators.functions.js +52 -0
- package/Misc/decorators.functions.js.map +1 -0
- package/Misc/decorators.js +2 -318
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.d.ts +81 -0
- package/Misc/decorators.serialization.js +269 -0
- package/Misc/decorators.serialization.js.map +1 -0
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/sceneRecorder.js +1 -1
- package/Misc/sceneRecorder.js.map +1 -1
- package/Misc/sceneSerializer.js +8 -1
- package/Misc/sceneSerializer.js.map +1 -1
- package/Misc/tools.functions.d.ts +14 -0
- package/Misc/tools.functions.js +23 -0
- package/Misc/tools.functions.js.map +1 -0
- package/Misc/tools.js +5 -6
- package/Misc/tools.js.map +1 -1
- package/Morph/morphTarget.js +2 -1
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/EmitterTypes/boxParticleEmitter.js +8 -8
- package/Particles/EmitterTypes/boxParticleEmitter.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +8 -11
- package/Particles/baseParticleSystem.js +9 -40
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +71 -1
- package/Particles/gpuParticleSystem.js +102 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particle.d.ts +3 -3
- package/Particles/particle.js +3 -3
- package/Particles/particle.js.map +1 -1
- package/Particles/particleSystem.d.ts +81 -455
- package/Particles/particleSystem.functions.d.ts +61 -0
- package/Particles/particleSystem.functions.js +79 -0
- package/Particles/particleSystem.functions.js.map +1 -0
- package/Particles/particleSystem.js +390 -1984
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +485 -0
- package/Particles/thinParticleSystem.js +1768 -0
- package/Particles/thinParticleSystem.js.map +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js +2 -1
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.js +2 -1
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js +2 -1
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.js +2 -1
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.js +2 -1
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/displayPassPostProcess.js +1 -1
- package/PostProcesses/displayPassPostProcess.js.map +1 -1
- package/PostProcesses/filterPostProcess.js +2 -1
- package/PostProcesses/filterPostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.js +1 -1
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.js +2 -1
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js +2 -1
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.js +1 -1
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.js +2 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/refractionPostProcess.js +2 -1
- package/PostProcesses/refractionPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +2 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js +2 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.js +2 -1
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/Probes/reflectionProbe.js +2 -1
- package/Probes/reflectionProbe.js.map +1 -1
- package/Sprites/spriteManager.d.ts +4 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.d.ts +9 -0
- package/XR/features/WebXRControllerTeleportation.js +75 -31
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/node.js +2 -1
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +105 -0
- package/types.js.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FactorGradient, ColorGradient, GradientHelper } from "../Misc/gradients.js";
|
|
2
2
|
import { Observable } from "../Misc/observable.js";
|
|
3
|
-
import { Matrix, TmpVectors } from "../Maths/math.vector.js";
|
|
3
|
+
import { Vector3, Matrix, TmpVectors } from "../Maths/math.vector.js";
|
|
4
4
|
import { Color4, TmpColors } from "../Maths/math.color.js";
|
|
5
5
|
import { Scalar } from "../Maths/math.scalar.js";
|
|
6
6
|
import { VertexBuffer, Buffer } from "../Buffers/buffer.js";
|
|
@@ -21,6 +21,7 @@ import "../Engines/Extensions/engine.transformFeedback.js";
|
|
|
21
21
|
import "../Shaders/gpuRenderParticles.fragment.js";
|
|
22
22
|
import "../Shaders/gpuRenderParticles.vertex.js";
|
|
23
23
|
import { BindFogParameters, BindLogDepth } from "../Materials/materialHelper.functions.js";
|
|
24
|
+
import { CreateConeEmitter, CreateCylinderEmitter, CreateDirectedCylinderEmitter, CreateDirectedSphereEmitter, CreateHemisphericEmitter, CreatePointEmitter, CreateSphereEmitter, } from "./particleSystem.functions.js";
|
|
24
25
|
/**
|
|
25
26
|
* This represents a GPU particle system in Babylon
|
|
26
27
|
* This is the fastest particle system in Babylon as it uses the GPU to update the individual particle data
|
|
@@ -67,6 +68,106 @@ export class GPUParticleSystem extends BaseParticleSystem {
|
|
|
67
68
|
set activeParticleCount(value) {
|
|
68
69
|
this.maxActiveParticleCount = value;
|
|
69
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Creates a Point Emitter for the particle system (emits directly from the emitter position)
|
|
73
|
+
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
74
|
+
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
75
|
+
* @returns the emitter
|
|
76
|
+
*/
|
|
77
|
+
createPointEmitter(direction1, direction2) {
|
|
78
|
+
const particleEmitter = CreatePointEmitter(direction1, direction2);
|
|
79
|
+
this.particleEmitterType = particleEmitter;
|
|
80
|
+
return particleEmitter;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
|
|
84
|
+
* @param radius The radius of the hemisphere to emit from
|
|
85
|
+
* @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
86
|
+
* @returns the emitter
|
|
87
|
+
*/
|
|
88
|
+
createHemisphericEmitter(radius = 1, radiusRange = 1) {
|
|
89
|
+
const particleEmitter = CreateHemisphericEmitter(radius, radiusRange);
|
|
90
|
+
this.particleEmitterType = particleEmitter;
|
|
91
|
+
return particleEmitter;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Creates a Sphere Emitter for the particle system (emits along the sphere radius)
|
|
95
|
+
* @param radius The radius of the sphere to emit from
|
|
96
|
+
* @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
97
|
+
* @returns the emitter
|
|
98
|
+
*/
|
|
99
|
+
createSphereEmitter(radius = 1, radiusRange = 1) {
|
|
100
|
+
const particleEmitter = CreateSphereEmitter(radius, radiusRange);
|
|
101
|
+
this.particleEmitterType = particleEmitter;
|
|
102
|
+
return particleEmitter;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
|
|
106
|
+
* @param radius The radius of the sphere to emit from
|
|
107
|
+
* @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
108
|
+
* @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
109
|
+
* @returns the emitter
|
|
110
|
+
*/
|
|
111
|
+
createDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
112
|
+
const particleEmitter = CreateDirectedSphereEmitter(radius, direction1, direction2);
|
|
113
|
+
this.particleEmitterType = particleEmitter;
|
|
114
|
+
return particleEmitter;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
|
|
118
|
+
* @param radius The radius of the emission cylinder
|
|
119
|
+
* @param height The height of the emission cylinder
|
|
120
|
+
* @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
|
|
121
|
+
* @param directionRandomizer How much to randomize the particle direction [0-1]
|
|
122
|
+
* @returns the emitter
|
|
123
|
+
*/
|
|
124
|
+
createCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0) {
|
|
125
|
+
const particleEmitter = CreateCylinderEmitter(radius, height, radiusRange, directionRandomizer);
|
|
126
|
+
this.particleEmitterType = particleEmitter;
|
|
127
|
+
return particleEmitter;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
|
|
131
|
+
* @param radius The radius of the cylinder to emit from
|
|
132
|
+
* @param height The height of the emission cylinder
|
|
133
|
+
* @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
|
|
134
|
+
* @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
135
|
+
* @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
136
|
+
* @returns the emitter
|
|
137
|
+
*/
|
|
138
|
+
createDirectedCylinderEmitter(radius = 1, height = 1, radiusRange = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
139
|
+
const particleEmitter = CreateDirectedCylinderEmitter(radius, height, radiusRange, direction1, direction2);
|
|
140
|
+
this.particleEmitterType = particleEmitter;
|
|
141
|
+
return particleEmitter;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
|
|
145
|
+
* @param radius The radius of the cone to emit from
|
|
146
|
+
* @param angle The base angle of the cone
|
|
147
|
+
* @returns the emitter
|
|
148
|
+
*/
|
|
149
|
+
createConeEmitter(radius = 1, angle = Math.PI / 4) {
|
|
150
|
+
const particleEmitter = CreateConeEmitter(radius, angle);
|
|
151
|
+
this.particleEmitterType = particleEmitter;
|
|
152
|
+
return particleEmitter;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
|
|
156
|
+
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
157
|
+
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
158
|
+
* @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
159
|
+
* @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
160
|
+
* @returns the emitter
|
|
161
|
+
*/
|
|
162
|
+
createBoxEmitter(direction1, direction2, minEmitBox, maxEmitBox) {
|
|
163
|
+
const particleEmitter = new BoxParticleEmitter();
|
|
164
|
+
this.particleEmitterType = particleEmitter;
|
|
165
|
+
this.direction1 = direction1;
|
|
166
|
+
this.direction2 = direction2;
|
|
167
|
+
this.minEmitBox = minEmitBox;
|
|
168
|
+
this.maxEmitBox = maxEmitBox;
|
|
169
|
+
return particleEmitter;
|
|
170
|
+
}
|
|
70
171
|
/**
|
|
71
172
|
* Is this system ready to be used/rendered
|
|
72
173
|
* @returns true if the system is ready
|