@onerjs/core 8.50.1 → 8.50.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.
Files changed (52) hide show
  1. package/Engines/abstractEngine.js +2 -2
  2. package/Engines/abstractEngine.js.map +1 -1
  3. package/Engines/engine.d.ts +49 -1118
  4. package/Layers/thinSelectionOutlineLayer.js +25 -1
  5. package/Layers/thinSelectionOutlineLayer.js.map +1 -1
  6. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +13 -2
  7. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  8. package/Materials/Textures/baseTexture.d.ts +1 -0
  9. package/Materials/Textures/baseTexture.js +1 -0
  10. package/Materials/Textures/baseTexture.js.map +1 -1
  11. package/Materials/Textures/texture.d.ts +1 -1
  12. package/Materials/Textures/texture.js.map +1 -1
  13. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.d.ts +37 -3
  14. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js +107 -20
  15. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js.map +1 -1
  16. package/Misc/tools.js +1 -1
  17. package/Misc/tools.js.map +1 -1
  18. package/Particles/IParticleSystem.d.ts +7 -1
  19. package/Particles/IParticleSystem.js.map +1 -1
  20. package/Particles/baseParticleSystem.d.ts +18 -2
  21. package/Particles/baseParticleSystem.js +53 -11
  22. package/Particles/baseParticleSystem.js.map +1 -1
  23. package/Particles/computeShaderParticleSystem.js +16 -0
  24. package/Particles/computeShaderParticleSystem.js.map +1 -1
  25. package/Particles/gpuParticleSystem.d.ts +14 -72
  26. package/Particles/gpuParticleSystem.js +130 -106
  27. package/Particles/gpuParticleSystem.js.map +1 -1
  28. package/Particles/particleSystem.d.ts +0 -80
  29. package/Particles/particleSystem.functions.d.ts +16 -0
  30. package/Particles/particleSystem.functions.js +18 -0
  31. package/Particles/particleSystem.functions.js.map +1 -1
  32. package/Particles/particleSystem.js +0 -114
  33. package/Particles/particleSystem.js.map +1 -1
  34. package/Particles/webgl2ParticleSystem.js +12 -0
  35. package/Particles/webgl2ParticleSystem.js.map +1 -1
  36. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
  37. package/Rendering/objectRenderer.d.ts +2 -0
  38. package/Rendering/objectRenderer.js +10 -0
  39. package/Rendering/objectRenderer.js.map +1 -1
  40. package/Shaders/ShadersInclude/gaussianSplatting.js +25 -4
  41. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  42. package/Shaders/gaussianSplatting.vertex.js +3 -0
  43. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  44. package/Shaders/gpuUpdateParticles.vertex.js +13 -0
  45. package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
  46. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +37 -5
  47. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  48. package/ShadersWGSL/gaussianSplatting.vertex.js +3 -0
  49. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  50. package/ShadersWGSL/gpuUpdateParticles.compute.js +19 -0
  51. package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
  52. package/package.json +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.
@@ -108,72 +94,6 @@ export declare class ParticleSystem extends ThinParticleSystem {
108
94
  * @param delay defines the delay in milliseconds before starting the system (this.startDelay by default)
109
95
  */
110
96
  start(delay?: number): void;
111
- /**
112
- * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
113
- * @param radius The radius of the hemisphere to emit from
114
- * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
115
- * @returns the emitter
116
- */
117
- createHemisphericEmitter(radius?: number, radiusRange?: number): HemisphericParticleEmitter;
118
- /**
119
- * Creates a Sphere Emitter for the particle system (emits along the sphere radius)
120
- * @param radius The radius of the sphere to emit from
121
- * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
122
- * @returns the emitter
123
- */
124
- createSphereEmitter(radius?: number, radiusRange?: number): SphereParticleEmitter;
125
- /**
126
- * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
127
- * @param radius The radius of the sphere to emit from
128
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
129
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
130
- * @returns the emitter
131
- */
132
- createDirectedSphereEmitter(radius?: number, direction1?: Vector3, direction2?: Vector3): SphereDirectedParticleEmitter;
133
- /**
134
- * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
135
- * @param radius The radius of the emission cylinder
136
- * @param height The height of the emission cylinder
137
- * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
138
- * @param directionRandomizer How much to randomize the particle direction [0-1]
139
- * @returns the emitter
140
- */
141
- createCylinderEmitter(radius?: number, height?: number, radiusRange?: number, directionRandomizer?: number): CylinderParticleEmitter;
142
- /**
143
- * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
144
- * @param radius The radius of the cylinder to emit from
145
- * @param height The height of the emission cylinder
146
- * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
147
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
148
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
149
- * @returns the emitter
150
- */
151
- createDirectedCylinderEmitter(radius?: number, height?: number, radiusRange?: number, direction1?: Vector3, direction2?: Vector3): CylinderDirectedParticleEmitter;
152
- /**
153
- * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
154
- * @param radius The radius of the cone to emit from
155
- * @param angle The base angle of the cone
156
- * @returns the emitter
157
- */
158
- createConeEmitter(radius?: number, angle?: number): ConeParticleEmitter;
159
- /**
160
- * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
161
- * @param radius The radius of the cone to emit from
162
- * @param angle The base angle of the cone
163
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
164
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
165
- * @returns the emitter
166
- */
167
- createDirectedConeEmitter(radius?: number, angle?: number, direction1?: Vector3, direction2?: Vector3): ConeDirectedParticleEmitter;
168
- /**
169
- * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
170
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
171
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
172
- * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
173
- * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
174
- * @returns the emitter
175
- */
176
- createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter;
177
97
  private _prepareSubEmitterInternalArray;
178
98
  private _stopSubEmitters;
179
99
  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;AAEtG;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAmB,EAAE,UAAmB;IACvE,MAAM,eAAe,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACnD,eAAe,CAAC,UAAU,GAAG,UAAU,CAAC;IACxC,eAAe,CAAC,UAAU,GAAG,UAAU,CAAC;IACxC,OAAO,eAAe,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAM,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC;IAChE,OAAO,IAAI,0BAA0B,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC;IAC3D,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACH,MA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E,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/I,OAAO,IAAI,2BAA2B,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAClF,CAAC","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\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\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"]}
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,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,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;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIzE;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAmB,EAAE,UAAmB;IACvE,MAAM,eAAe,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACnD,eAAe,CAAC,UAAU,GAAG,UAAU,CAAC;IACxC,eAAe,CAAC,UAAU,GAAG,UAAU,CAAC;IACxC,OAAO,eAAe,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,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GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;IAC7D,OAAO,IAAI,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/I,OAAO,IAAI,2BAA2B,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAClF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC5B,OAAO,IAAI,kBAAkB,EAAE,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA+B,IAAI;IACjE,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC","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
  /**
@@ -71,17 +70,6 @@ export class ParticleSystem extends ThinParticleSystem {
71
70
  }
72
71
  };
73
72
  }
74
- /**
75
- * Creates a Point Emitter for the particle system (emits directly from the emitter position)
76
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
77
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
78
- * @returns the emitter
79
- */
80
- createPointEmitter(direction1, direction2) {
81
- const particleEmitter = CreatePointEmitter(direction1, direction2);
82
- this.particleEmitterType = particleEmitter;
83
- return particleEmitter;
84
- }
85
73
  /**
86
74
  * Gets the NodeParticleSystemSet that this particle system belongs to.
87
75
  */
@@ -158,108 +146,6 @@ export class ParticleSystem extends ThinParticleSystem {
158
146
  }
159
147
  super.start(delay);
160
148
  }
161
- /**
162
- * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
163
- * @param radius The radius of the hemisphere to emit from
164
- * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
165
- * @returns the emitter
166
- */
167
- createHemisphericEmitter(radius = 1, radiusRange = 1) {
168
- const particleEmitter = CreateHemisphericEmitter(radius, radiusRange);
169
- this.particleEmitterType = particleEmitter;
170
- return particleEmitter;
171
- }
172
- /**
173
- * Creates a Sphere Emitter for the particle system (emits along the sphere radius)
174
- * @param radius The radius of the sphere to emit from
175
- * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
176
- * @returns the emitter
177
- */
178
- createSphereEmitter(radius = 1, radiusRange = 1) {
179
- const particleEmitter = CreateSphereEmitter(radius, radiusRange);
180
- this.particleEmitterType = particleEmitter;
181
- return particleEmitter;
182
- }
183
- /**
184
- * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
185
- * @param radius The radius of the sphere to emit from
186
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
187
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
188
- * @returns the emitter
189
- */
190
- createDirectedSphereEmitter(radius = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
191
- const particleEmitter = CreateDirectedSphereEmitter(radius, direction1, direction2);
192
- this.particleEmitterType = particleEmitter;
193
- return particleEmitter;
194
- }
195
- /**
196
- * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
197
- * @param radius The radius of the emission cylinder
198
- * @param height The height of the emission cylinder
199
- * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
200
- * @param directionRandomizer How much to randomize the particle direction [0-1]
201
- * @returns the emitter
202
- */
203
- createCylinderEmitter(radius = 1, height = 1, radiusRange = 1, directionRandomizer = 0) {
204
- const particleEmitter = CreateCylinderEmitter(radius, height, radiusRange, directionRandomizer);
205
- this.particleEmitterType = particleEmitter;
206
- return particleEmitter;
207
- }
208
- /**
209
- * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
210
- * @param radius The radius of the cylinder to emit from
211
- * @param height The height of the emission cylinder
212
- * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
213
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
214
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
215
- * @returns the emitter
216
- */
217
- createDirectedCylinderEmitter(radius = 1, height = 1, radiusRange = 1, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
218
- const particleEmitter = CreateDirectedCylinderEmitter(radius, height, radiusRange, direction1, direction2);
219
- this.particleEmitterType = particleEmitter;
220
- return particleEmitter;
221
- }
222
- /**
223
- * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
224
- * @param radius The radius of the cone to emit from
225
- * @param angle The base angle of the cone
226
- * @returns the emitter
227
- */
228
- createConeEmitter(radius = 1, angle = Math.PI / 4) {
229
- const particleEmitter = CreateConeEmitter(radius, angle);
230
- this.particleEmitterType = particleEmitter;
231
- return particleEmitter;
232
- }
233
- /**
234
- * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
235
- * @param radius The radius of the cone to emit from
236
- * @param angle The base angle of the cone
237
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the cone
238
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the cone
239
- * @returns the emitter
240
- */
241
- createDirectedConeEmitter(radius = 1, angle = Math.PI / 4, direction1 = new Vector3(0, 1.0, 0), direction2 = new Vector3(0, 1.0, 0)) {
242
- const particleEmitter = CreateDirectedConeEmitter(radius, angle, direction1, direction2);
243
- this.particleEmitterType = particleEmitter;
244
- return particleEmitter;
245
- }
246
- /**
247
- * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
248
- * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
249
- * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
250
- * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
251
- * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
252
- * @returns the emitter
253
- */
254
- createBoxEmitter(direction1, direction2, minEmitBox, maxEmitBox) {
255
- const particleEmitter = new BoxParticleEmitter();
256
- this.particleEmitterType = particleEmitter;
257
- this.direction1 = direction1;
258
- this.direction2 = direction2;
259
- this.minEmitBox = minEmitBox;
260
- this.maxEmitBox = maxEmitBox;
261
- return particleEmitter;
262
- }
263
149
  _prepareSubEmitterInternalArray() {
264
150
  this._subEmitters = new Array();
265
151
  if (this.subEmitters) {