@babylonjs/core 9.3.0 → 9.3.2
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/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.d.ts +49 -1118
- package/FlowGraph/flowGraph.d.ts +11 -0
- package/FlowGraph/flowGraph.js +20 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +30 -0
- package/FlowGraph/flowGraphContext.js +42 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +13 -0
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +16 -0
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/Layers/thinSelectionOutlineLayer.js +25 -1
- package/Layers/thinSelectionOutlineLayer.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.d.ts +1 -0
- package/Lights/Clustered/clusteredLightContainer.js +19 -0
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Lights/light.d.ts +6 -0
- package/Lights/light.js +8 -0
- package/Lights/light.js.map +1 -1
- package/Lights/spotLight.d.ts +2 -0
- package/Lights/spotLight.js +10 -0
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +4 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +18 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +116 -3
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.d.ts +8 -0
- package/Materials/Node/Blocks/Dual/lightBlock.js +16 -0
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +4 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.js +4 -1
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +4 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/baseTexture.d.ts +1 -0
- package/Materials/Textures/baseTexture.js +1 -0
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +12 -0
- package/Materials/materialHelper.functions.js +24 -0
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.js +4 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +18 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +40 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.d.ts +27 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js +241 -10
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js.map +1 -1
- package/Misc/tools.js +1 -1
- package/Misc/tools.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +7 -1
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +18 -2
- package/Particles/baseParticleSystem.js +53 -11
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/computeShaderParticleSystem.js +16 -0
- package/Particles/computeShaderParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +14 -72
- package/Particles/gpuParticleSystem.js +130 -106
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +0 -80
- package/Particles/particleSystem.functions.d.ts +16 -0
- package/Particles/particleSystem.functions.js +18 -0
- package/Particles/particleSystem.functions.js.map +1 -1
- package/Particles/particleSystem.js +0 -114
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/webgl2ParticleSystem.js +12 -0
- package/Particles/webgl2ParticleSystem.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +17 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +10 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +146 -24
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/depthRenderer.d.ts +8 -0
- package/Rendering/depthRenderer.js +48 -13
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/depthRendererSceneComponent.d.ts +1 -0
- package/Rendering/depthRendererSceneComponent.js +26 -0
- package/Rendering/depthRendererSceneComponent.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +2 -0
- package/Rendering/objectRenderer.js +10 -0
- package/Rendering/objectRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +21 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/gaussianSplattingVoxel.fragment.d.ts +5 -0
- package/Shaders/gaussianSplattingVoxel.fragment.js +27 -0
- package/Shaders/gaussianSplattingVoxel.fragment.js.map +1 -0
- package/Shaders/gaussianSplattingVoxel.vertex.d.ts +8 -0
- package/Shaders/gaussianSplattingVoxel.vertex.js +31 -0
- package/Shaders/gaussianSplattingVoxel.vertex.js.map +1 -0
- package/Shaders/gpuUpdateParticles.vertex.js +13 -0
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +21 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js +22 -0
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.d.ts +8 -0
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +42 -0
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -0
- package/ShadersWGSL/gpuUpdateParticles.compute.js +19 -0
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/XR/features/WebXRBodyTracking.d.ts +952 -0
- package/XR/features/WebXRBodyTracking.js +2221 -0
- package/XR/features/WebXRBodyTracking.js.map +1 -0
- package/XR/features/index.d.ts +1 -0
- package/XR/features/index.js +1 -0
- package/XR/features/index.js.map +1 -1
- package/XR/webXRFeaturesManager.d.ts +7 -0
- package/XR/webXRFeaturesManager.js +4 -0
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/package.json +1 -1
- package/sceneComponent.d.ts +1 -0
- package/sceneComponent.js +1 -0
- package/sceneComponent.js.map +1 -1
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { ThinParticleSystem } from "./thinParticleSystem.js";
|
|
2
2
|
import { SubEmitter } from "./subEmitter.js";
|
|
3
|
-
import { Vector3 } from "../Maths/math.vector.js";
|
|
4
3
|
import { type IParticleSystem } from "./IParticleSystem.js";
|
|
5
4
|
import { type Nullable } from "../types.js";
|
|
6
5
|
import { type Scene } from "../scene.js";
|
|
7
6
|
import { AbstractEngine } from "../Engines/abstractEngine.js";
|
|
8
7
|
import { type Particle } from "./particle.js";
|
|
9
|
-
import { BoxParticleEmitter } from "./EmitterTypes/boxParticleEmitter.js";
|
|
10
|
-
import { PointParticleEmitter } from "./EmitterTypes/pointParticleEmitter.js";
|
|
11
|
-
import { HemisphericParticleEmitter } from "./EmitterTypes/hemisphericParticleEmitter.js";
|
|
12
|
-
import { SphereDirectedParticleEmitter, SphereParticleEmitter } from "./EmitterTypes/sphereParticleEmitter.js";
|
|
13
|
-
import { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from "./EmitterTypes/cylinderParticleEmitter.js";
|
|
14
|
-
import { ConeDirectedParticleEmitter, ConeParticleEmitter } from "./EmitterTypes/coneParticleEmitter.js";
|
|
15
8
|
import { Attractor } from "./attractor.js";
|
|
16
9
|
import { type FlowMap } from "./flowMap.js";
|
|
17
10
|
import { type NodeParticleSystemSet } from "./Node/nodeParticleSystemSet.js";
|
|
@@ -58,13 +51,6 @@ export declare class ParticleSystem extends ThinParticleSystem {
|
|
|
58
51
|
* Specifies if the particle system should be serialized
|
|
59
52
|
*/
|
|
60
53
|
doNotSerialize: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Creates a Point Emitter for the particle system (emits directly from the emitter position)
|
|
63
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
64
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
65
|
-
* @returns the emitter
|
|
66
|
-
*/
|
|
67
|
-
createPointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter;
|
|
68
54
|
/**
|
|
69
55
|
* Gets or sets a function indicating if the particle system can start.
|
|
70
56
|
* @returns true if the particle system can start, false otherwise.
|
|
@@ -113,72 +99,6 @@ export declare class ParticleSystem extends ThinParticleSystem {
|
|
|
113
99
|
* @param delay defines the delay in milliseconds before starting the system (this.startDelay by default)
|
|
114
100
|
*/
|
|
115
101
|
start(delay?: number): void;
|
|
116
|
-
/**
|
|
117
|
-
* Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
|
|
118
|
-
* @param radius The radius of the hemisphere to emit from
|
|
119
|
-
* @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
120
|
-
* @returns the emitter
|
|
121
|
-
*/
|
|
122
|
-
createHemisphericEmitter(radius?: number, radiusRange?: number): HemisphericParticleEmitter;
|
|
123
|
-
/**
|
|
124
|
-
* Creates a Sphere Emitter for the particle system (emits along the sphere radius)
|
|
125
|
-
* @param radius The radius of the sphere to emit from
|
|
126
|
-
* @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
127
|
-
* @returns the emitter
|
|
128
|
-
*/
|
|
129
|
-
createSphereEmitter(radius?: number, radiusRange?: number): SphereParticleEmitter;
|
|
130
|
-
/**
|
|
131
|
-
* Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
|
|
132
|
-
* @param radius The radius of the sphere to emit from
|
|
133
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
134
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
135
|
-
* @returns the emitter
|
|
136
|
-
*/
|
|
137
|
-
createDirectedSphereEmitter(radius?: number, direction1?: Vector3, direction2?: Vector3): SphereDirectedParticleEmitter;
|
|
138
|
-
/**
|
|
139
|
-
* Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
|
|
140
|
-
* @param radius The radius of the emission cylinder
|
|
141
|
-
* @param height The height of the emission cylinder
|
|
142
|
-
* @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
|
|
143
|
-
* @param directionRandomizer How much to randomize the particle direction [0-1]
|
|
144
|
-
* @returns the emitter
|
|
145
|
-
*/
|
|
146
|
-
createCylinderEmitter(radius?: number, height?: number, radiusRange?: number, directionRandomizer?: number): CylinderParticleEmitter;
|
|
147
|
-
/**
|
|
148
|
-
* Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
|
|
149
|
-
* @param radius The radius of the cylinder to emit from
|
|
150
|
-
* @param height The height of the emission cylinder
|
|
151
|
-
* @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
|
|
152
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
153
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
154
|
-
* @returns the emitter
|
|
155
|
-
*/
|
|
156
|
-
createDirectedCylinderEmitter(radius?: number, height?: number, radiusRange?: number, direction1?: Vector3, direction2?: Vector3): CylinderDirectedParticleEmitter;
|
|
157
|
-
/**
|
|
158
|
-
* Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
|
|
159
|
-
* @param radius The radius of the cone to emit from
|
|
160
|
-
* @param angle The base angle of the cone
|
|
161
|
-
* @returns the emitter
|
|
162
|
-
*/
|
|
163
|
-
createConeEmitter(radius?: number, angle?: number): ConeParticleEmitter;
|
|
164
|
-
/**
|
|
165
|
-
* Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
|
|
166
|
-
* @param radius The radius of the cone to emit from
|
|
167
|
-
* @param angle The base angle of the cone
|
|
168
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
|
|
169
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
|
|
170
|
-
* @returns the emitter
|
|
171
|
-
*/
|
|
172
|
-
createDirectedConeEmitter(radius?: number, angle?: number, direction1?: Vector3, direction2?: Vector3): ConeDirectedParticleEmitter;
|
|
173
|
-
/**
|
|
174
|
-
* Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
|
|
175
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
176
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
177
|
-
* @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
178
|
-
* @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
179
|
-
* @returns the emitter
|
|
180
|
-
*/
|
|
181
|
-
createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter;
|
|
182
102
|
private _prepareSubEmitterInternalArray;
|
|
183
103
|
private _stopSubEmitters;
|
|
184
104
|
private _removeFromRoot;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Vector3 } from "../Maths/math.vector.js";
|
|
2
|
+
import { BoxParticleEmitter } from "./EmitterTypes/boxParticleEmitter.js";
|
|
2
3
|
import { PointParticleEmitter } from "./EmitterTypes/pointParticleEmitter.js";
|
|
3
4
|
import { HemisphericParticleEmitter } from "./EmitterTypes/hemisphericParticleEmitter.js";
|
|
4
5
|
import { SphereDirectedParticleEmitter, SphereParticleEmitter } from "./EmitterTypes/sphereParticleEmitter.js";
|
|
5
6
|
import { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from "./EmitterTypes/cylinderParticleEmitter.js";
|
|
6
7
|
import { ConeDirectedParticleEmitter, ConeParticleEmitter } from "./EmitterTypes/coneParticleEmitter.js";
|
|
8
|
+
import { MeshParticleEmitter } from "./EmitterTypes/meshParticleEmitter.js";
|
|
9
|
+
import { type Nullable } from "../types.js";
|
|
10
|
+
import { type AbstractMesh } from "../Meshes/abstractMesh.js";
|
|
7
11
|
/**
|
|
8
12
|
* Creates a Point Emitter for the particle system (emits directly from the emitter position)
|
|
9
13
|
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
@@ -60,3 +64,15 @@ export declare function CreateDirectedCylinderEmitter(radius?: number, height?:
|
|
|
60
64
|
*/
|
|
61
65
|
export declare function CreateConeEmitter(radius?: number, angle?: number): ConeParticleEmitter;
|
|
62
66
|
export declare function CreateDirectedConeEmitter(radius?: number, angle?: number, direction1?: Vector3, direction2?: Vector3): ConeDirectedParticleEmitter;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a Box Emitter for the particle system.
|
|
69
|
+
* Direction and box bounds are configured on the returned emitter instance.
|
|
70
|
+
* @returns the emitter
|
|
71
|
+
*/
|
|
72
|
+
export declare function CreateBoxEmitter(): BoxParticleEmitter;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a Mesh Emitter for the particle system (emits from the surface of a mesh)
|
|
75
|
+
* @param mesh The mesh to use as the emitter source
|
|
76
|
+
* @returns the emitter
|
|
77
|
+
*/
|
|
78
|
+
export declare function CreateMeshEmitter(mesh?: Nullable<AbstractMesh>): MeshParticleEmitter;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Vector3 } from "../Maths/math.vector.js";
|
|
2
|
+
import { BoxParticleEmitter } from "./EmitterTypes/boxParticleEmitter.js";
|
|
2
3
|
import { PointParticleEmitter } from "./EmitterTypes/pointParticleEmitter.js";
|
|
3
4
|
import { HemisphericParticleEmitter } from "./EmitterTypes/hemisphericParticleEmitter.js";
|
|
4
5
|
import { SphereDirectedParticleEmitter, SphereParticleEmitter } from "./EmitterTypes/sphereParticleEmitter.js";
|
|
5
6
|
import { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from "./EmitterTypes/cylinderParticleEmitter.js";
|
|
6
7
|
import { ConeDirectedParticleEmitter, ConeParticleEmitter } from "./EmitterTypes/coneParticleEmitter.js";
|
|
8
|
+
import { MeshParticleEmitter } from "./EmitterTypes/meshParticleEmitter.js";
|
|
7
9
|
/**
|
|
8
10
|
* Creates a Point Emitter for the particle system (emits directly from the emitter position)
|
|
9
11
|
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
@@ -79,4 +81,20 @@ export function CreateConeEmitter(radius = 1, angle = Math.PI / 4) {
|
|
|
79
81
|
export function CreateDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
80
82
|
return new ConeDirectedParticleEmitter(radius, angle, direction1, direction2);
|
|
81
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Creates a Box Emitter for the particle system.
|
|
86
|
+
* Direction and box bounds are configured on the returned emitter instance.
|
|
87
|
+
* @returns the emitter
|
|
88
|
+
*/
|
|
89
|
+
export function CreateBoxEmitter() {
|
|
90
|
+
return new BoxParticleEmitter();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Creates a Mesh Emitter for the particle system (emits from the surface of a mesh)
|
|
94
|
+
* @param mesh The mesh to use as the emitter source
|
|
95
|
+
* @returns the emitter
|
|
96
|
+
*/
|
|
97
|
+
export function CreateMeshEmitter(mesh = null) {
|
|
98
|
+
return new MeshParticleEmitter(mesh);
|
|
99
|
+
}
|
|
82
100
|
//# sourceMappingURL=particleSystem.functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"particleSystem.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/particleSystem.functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAClH,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"particleSystem.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Particles/particleSystem.functions.ts"],"names":[],"mappings":"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","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\r\nimport { BoxParticleEmitter } from \"./EmitterTypes/boxParticleEmitter\";\r\nimport { PointParticleEmitter } from \"./EmitterTypes/pointParticleEmitter\";\r\nimport { HemisphericParticleEmitter } from \"./EmitterTypes/hemisphericParticleEmitter\";\r\nimport { SphereDirectedParticleEmitter, SphereParticleEmitter } from \"./EmitterTypes/sphereParticleEmitter\";\r\nimport { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from \"./EmitterTypes/cylinderParticleEmitter\";\r\nimport { ConeDirectedParticleEmitter, ConeParticleEmitter } from \"./EmitterTypes/coneParticleEmitter\";\r\nimport { MeshParticleEmitter } from \"./EmitterTypes/meshParticleEmitter\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type AbstractMesh } from \"../Meshes/abstractMesh\";\r\n\r\n/**\r\n * Creates a Point Emitter for the particle system (emits directly from the emitter position)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the box\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the box\r\n * @returns the emitter\r\n */\r\nexport function CreatePointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter {\r\n const particleEmitter = new PointParticleEmitter();\r\n particleEmitter.direction1 = direction1;\r\n particleEmitter.direction2 = direction2;\r\n return particleEmitter;\r\n}\r\n\r\n/**\r\n * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)\r\n * @param radius The radius of the hemisphere to emit from\r\n * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n * @returns the emitter\r\n */\r\nexport function CreateHemisphericEmitter(radius = 1, radiusRange = 1): HemisphericParticleEmitter {\r\n return new HemisphericParticleEmitter(radius, radiusRange);\r\n}\r\n\r\n/**\r\n * Creates a Sphere Emitter for the particle system (emits along the sphere radius)\r\n * @param radius The radius of the sphere to emit from\r\n * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius\r\n * @returns the emitter\r\n */\r\nexport function CreateSphereEmitter(radius = 1, radiusRange = 1): SphereParticleEmitter {\r\n return new SphereParticleEmitter(radius, radiusRange);\r\n}\r\n\r\n/**\r\n * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the sphere to emit from\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere\r\n * @returns the emitter\r\n */\r\nexport function CreateDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): SphereDirectedParticleEmitter {\r\n return new SphereDirectedParticleEmitter(radius, direction1, direction2);\r\n}\r\n\r\n/**\r\n * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)\r\n * @param radius The radius of the emission cylinder\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius\r\n * @param directionRandomizer How much to randomize the particle direction [0-1]\r\n * @returns the emitter\r\n */\r\nexport function CreateCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0): CylinderParticleEmitter {\r\n return new CylinderParticleEmitter(radius, height, radiusRange, directionRandomizer);\r\n}\r\n\r\n/**\r\n * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)\r\n * @param radius The radius of the cylinder to emit from\r\n * @param height The height of the emission cylinder\r\n * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)\r\n * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder\r\n * @returns the emitter\r\n */\r\nexport function CreateDirectedCylinderEmitter(\r\n radius = 1,\r\n height = 1,\r\n radiusRange = 1,\r\n direction1 = new Vector3(0, 1.0, 0),\r\n direction2 = new Vector3(0, 1.0, 0)\r\n): CylinderDirectedParticleEmitter {\r\n return new CylinderDirectedParticleEmitter(radius, height, radiusRange, direction1, direction2);\r\n}\r\n\r\n/**\r\n * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)\r\n * @param radius The radius of the cone to emit from\r\n * @param angle The base angle of the cone\r\n * @returns the emitter\r\n */\r\nexport function CreateConeEmitter(radius = 1, angle = Math.PI / 4): ConeParticleEmitter {\r\n return new ConeParticleEmitter(radius, angle);\r\n}\r\n\r\nexport function CreateDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)): ConeDirectedParticleEmitter {\r\n return new ConeDirectedParticleEmitter(radius, angle, direction1, direction2);\r\n}\r\n\r\n/**\r\n * Creates a Box Emitter for the particle system.\r\n * Direction and box bounds are configured on the returned emitter instance.\r\n * @returns the emitter\r\n */\r\nexport function CreateBoxEmitter(): BoxParticleEmitter {\r\n return new BoxParticleEmitter();\r\n}\r\n\r\n/**\r\n * Creates a Mesh Emitter for the particle system (emits from the surface of a mesh)\r\n * @param mesh The mesh to use as the emitter source\r\n * @returns the emitter\r\n */\r\nexport function CreateMeshEmitter(mesh: Nullable<AbstractMesh> = null): MeshParticleEmitter {\r\n return new MeshParticleEmitter(mesh);\r\n}\r\n"]}
|
|
@@ -14,7 +14,6 @@ import { HemisphericParticleEmitter } from "./EmitterTypes/hemisphericParticleEm
|
|
|
14
14
|
import { SphereDirectedParticleEmitter, SphereParticleEmitter } from "./EmitterTypes/sphereParticleEmitter.js";
|
|
15
15
|
import { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from "./EmitterTypes/cylinderParticleEmitter.js";
|
|
16
16
|
import { ConeDirectedParticleEmitter, ConeParticleEmitter } from "./EmitterTypes/coneParticleEmitter.js";
|
|
17
|
-
import { CreateConeEmitter, CreateCylinderEmitter, CreateDirectedCylinderEmitter, CreateDirectedSphereEmitter, CreateDirectedConeEmitter, CreateHemisphericEmitter, CreatePointEmitter, CreateSphereEmitter, } from "./particleSystem.functions.js";
|
|
18
17
|
import { Attractor } from "./attractor.js";
|
|
19
18
|
import { _ConnectAfter, _RemoveFromQueue } from "./Queue/executionQueue.js";
|
|
20
19
|
/**
|
|
@@ -76,17 +75,6 @@ export class ParticleSystem extends ThinParticleSystem {
|
|
|
76
75
|
}
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Creates a Point Emitter for the particle system (emits directly from the emitter position)
|
|
81
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
82
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
83
|
-
* @returns the emitter
|
|
84
|
-
*/
|
|
85
|
-
createPointEmitter(direction1, direction2) {
|
|
86
|
-
const particleEmitter = CreatePointEmitter(direction1, direction2);
|
|
87
|
-
this.particleEmitterType = particleEmitter;
|
|
88
|
-
return particleEmitter;
|
|
89
|
-
}
|
|
90
78
|
/**
|
|
91
79
|
* Gets the NodeParticleSystemSet that this particle system belongs to.
|
|
92
80
|
*/
|
|
@@ -163,108 +151,6 @@ export class ParticleSystem extends ThinParticleSystem {
|
|
|
163
151
|
}
|
|
164
152
|
super.start(delay);
|
|
165
153
|
}
|
|
166
|
-
/**
|
|
167
|
-
* Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
|
|
168
|
-
* @param radius The radius of the hemisphere to emit from
|
|
169
|
-
* @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
170
|
-
* @returns the emitter
|
|
171
|
-
*/
|
|
172
|
-
createHemisphericEmitter(radius = 1, radiusRange = 1) {
|
|
173
|
-
const particleEmitter = CreateHemisphericEmitter(radius, radiusRange);
|
|
174
|
-
this.particleEmitterType = particleEmitter;
|
|
175
|
-
return particleEmitter;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Creates a Sphere Emitter for the particle system (emits along the sphere radius)
|
|
179
|
-
* @param radius The radius of the sphere to emit from
|
|
180
|
-
* @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
|
|
181
|
-
* @returns the emitter
|
|
182
|
-
*/
|
|
183
|
-
createSphereEmitter(radius = 1, radiusRange = 1) {
|
|
184
|
-
const particleEmitter = CreateSphereEmitter(radius, radiusRange);
|
|
185
|
-
this.particleEmitterType = particleEmitter;
|
|
186
|
-
return particleEmitter;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
|
|
190
|
-
* @param radius The radius of the sphere to emit from
|
|
191
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
192
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
|
|
193
|
-
* @returns the emitter
|
|
194
|
-
*/
|
|
195
|
-
createDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
196
|
-
const particleEmitter = CreateDirectedSphereEmitter(radius, direction1, direction2);
|
|
197
|
-
this.particleEmitterType = particleEmitter;
|
|
198
|
-
return particleEmitter;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
|
|
202
|
-
* @param radius The radius of the emission cylinder
|
|
203
|
-
* @param height The height of the emission cylinder
|
|
204
|
-
* @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
|
|
205
|
-
* @param directionRandomizer How much to randomize the particle direction [0-1]
|
|
206
|
-
* @returns the emitter
|
|
207
|
-
*/
|
|
208
|
-
createCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0) {
|
|
209
|
-
const particleEmitter = CreateCylinderEmitter(radius, height, radiusRange, directionRandomizer);
|
|
210
|
-
this.particleEmitterType = particleEmitter;
|
|
211
|
-
return particleEmitter;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
|
|
215
|
-
* @param radius The radius of the cylinder to emit from
|
|
216
|
-
* @param height The height of the emission cylinder
|
|
217
|
-
* @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
|
|
218
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
219
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
|
|
220
|
-
* @returns the emitter
|
|
221
|
-
*/
|
|
222
|
-
createDirectedCylinderEmitter(radius = 1, height = 1, radiusRange = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
223
|
-
const particleEmitter = CreateDirectedCylinderEmitter(radius, height, radiusRange, direction1, direction2);
|
|
224
|
-
this.particleEmitterType = particleEmitter;
|
|
225
|
-
return particleEmitter;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
|
|
229
|
-
* @param radius The radius of the cone to emit from
|
|
230
|
-
* @param angle The base angle of the cone
|
|
231
|
-
* @returns the emitter
|
|
232
|
-
*/
|
|
233
|
-
createConeEmitter(radius = 1, angle = Math.PI / 4) {
|
|
234
|
-
const particleEmitter = CreateConeEmitter(radius, angle);
|
|
235
|
-
this.particleEmitterType = particleEmitter;
|
|
236
|
-
return particleEmitter;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
|
|
240
|
-
* @param radius The radius of the cone to emit from
|
|
241
|
-
* @param angle The base angle of the cone
|
|
242
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
|
|
243
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
|
|
244
|
-
* @returns the emitter
|
|
245
|
-
*/
|
|
246
|
-
createDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
|
|
247
|
-
const particleEmitter = CreateDirectedConeEmitter(radius, angle, direction1, direction2);
|
|
248
|
-
this.particleEmitterType = particleEmitter;
|
|
249
|
-
return particleEmitter;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
|
|
253
|
-
* @param direction1 Particles are emitted between the direction1 and direction2 from within the box
|
|
254
|
-
* @param direction2 Particles are emitted between the direction1 and direction2 from within the box
|
|
255
|
-
* @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
256
|
-
* @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
|
|
257
|
-
* @returns the emitter
|
|
258
|
-
*/
|
|
259
|
-
createBoxEmitter(direction1, direction2, minEmitBox, maxEmitBox) {
|
|
260
|
-
const particleEmitter = new BoxParticleEmitter();
|
|
261
|
-
this.particleEmitterType = particleEmitter;
|
|
262
|
-
this.direction1 = direction1;
|
|
263
|
-
this.direction2 = direction2;
|
|
264
|
-
this.minEmitBox = minEmitBox;
|
|
265
|
-
this.maxEmitBox = maxEmitBox;
|
|
266
|
-
return particleEmitter;
|
|
267
|
-
}
|
|
268
154
|
_prepareSubEmitterInternalArray() {
|
|
269
155
|
this._subEmitters = new Array();
|
|
270
156
|
if (this.subEmitters) {
|