@newkrok/three-particles 2.6.3 → 2.6.5

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 (39) hide show
  1. package/dist/index.d.ts +1782 -7
  2. package/dist/index.js +1578 -6
  3. package/dist/index.js.map +1 -0
  4. package/dist/three-particles.min.js +1 -2
  5. package/dist/three-particles.min.js.map +1 -0
  6. package/package.json +5 -7
  7. package/dist/bundle-report.json +0 -1
  8. package/dist/index.d.ts.map +0 -1
  9. package/dist/js/effects/three-particles/index.d.ts +0 -7
  10. package/dist/js/effects/three-particles/index.d.ts.map +0 -1
  11. package/dist/js/effects/three-particles/index.js +0 -6
  12. package/dist/js/effects/three-particles/shaders/particle-system-fragment-shader.glsl.d.ts +0 -3
  13. package/dist/js/effects/three-particles/shaders/particle-system-fragment-shader.glsl.d.ts.map +0 -1
  14. package/dist/js/effects/three-particles/shaders/particle-system-fragment-shader.glsl.js +0 -71
  15. package/dist/js/effects/three-particles/shaders/particle-system-vertex-shader.glsl.d.ts +0 -3
  16. package/dist/js/effects/three-particles/shaders/particle-system-vertex-shader.glsl.d.ts.map +0 -1
  17. package/dist/js/effects/three-particles/shaders/particle-system-vertex-shader.glsl.js +0 -37
  18. package/dist/js/effects/three-particles/three-particles-bezier.d.ts +0 -5
  19. package/dist/js/effects/three-particles/three-particles-bezier.d.ts.map +0 -1
  20. package/dist/js/effects/three-particles/three-particles-bezier.js +0 -62
  21. package/dist/js/effects/three-particles/three-particles-curves.d.ts +0 -108
  22. package/dist/js/effects/three-particles/three-particles-curves.d.ts.map +0 -1
  23. package/dist/js/effects/three-particles/three-particles-curves.js +0 -62
  24. package/dist/js/effects/three-particles/three-particles-enums.d.ts +0 -115
  25. package/dist/js/effects/three-particles/three-particles-enums.d.ts.map +0 -1
  26. package/dist/js/effects/three-particles/three-particles-enums.js +0 -1
  27. package/dist/js/effects/three-particles/three-particles-modifiers.d.ts +0 -73
  28. package/dist/js/effects/three-particles/three-particles-modifiers.d.ts.map +0 -1
  29. package/dist/js/effects/three-particles/three-particles-modifiers.js +0 -168
  30. package/dist/js/effects/three-particles/three-particles-utils.d.ts +0 -159
  31. package/dist/js/effects/three-particles/three-particles-utils.d.ts.map +0 -1
  32. package/dist/js/effects/three-particles/three-particles-utils.js +0 -302
  33. package/dist/js/effects/three-particles/three-particles.d.ts +0 -107
  34. package/dist/js/effects/three-particles/three-particles.d.ts.map +0 -1
  35. package/dist/js/effects/three-particles/three-particles.js +0 -972
  36. package/dist/js/effects/three-particles/types.d.ts +0 -1223
  37. package/dist/js/effects/three-particles/types.d.ts.map +0 -1
  38. package/dist/js/effects/three-particles/types.js +0 -1
  39. package/dist/three-particles.min.js.LICENSE.txt +0 -6
@@ -1,107 +0,0 @@
1
- import { CycleData, ParticleSystem, ParticleSystemConfig } from './types.js';
2
- export * from './types.js';
3
- /**
4
- * Mapping of blending mode string identifiers to Three.js blending constants.
5
- *
6
- * Used for converting serialized particle system configurations (e.g., from JSON)
7
- * to actual Three.js blending mode constants.
8
- *
9
- * @example
10
- * ```typescript
11
- * import { blendingMap } from '@newkrok/three-particles';
12
- *
13
- * // Convert string to Three.js constant
14
- * const blending = blendingMap['THREE.AdditiveBlending'];
15
- * // blending === THREE.AdditiveBlending
16
- * ```
17
- */
18
- export declare const blendingMap: {
19
- 'THREE.NoBlending': 0;
20
- 'THREE.NormalBlending': 1;
21
- 'THREE.AdditiveBlending': 2;
22
- 'THREE.SubtractiveBlending': 3;
23
- 'THREE.MultiplyBlending': 4;
24
- };
25
- /**
26
- * Returns a deep copy of the default particle system configuration.
27
- *
28
- * This is useful when you want to start with default settings and modify specific properties
29
- * without affecting the internal default configuration object.
30
- *
31
- * @returns A new object containing all default particle system settings
32
- *
33
- * @example
34
- * ```typescript
35
- * import { getDefaultParticleSystemConfig, createParticleSystem } from '@newkrok/three-particles';
36
- *
37
- * // Get default config and modify it
38
- * const config = getDefaultParticleSystemConfig();
39
- * config.emission.rateOverTime = 100;
40
- * config.startColor.min = { r: 1, g: 0, b: 0 };
41
- *
42
- * const { instance } = createParticleSystem(config);
43
- * scene.add(instance);
44
- * ```
45
- */
46
- export declare const getDefaultParticleSystemConfig: () => any;
47
- /**
48
- * Creates a new particle system with the specified configuration.
49
- *
50
- * This is the primary function for instantiating particle effects. It handles the complete
51
- * setup of a particle system including geometry creation, material configuration, shader setup,
52
- * and initialization of all particle properties.
53
- *
54
- * @param config - Configuration object for the particle system. If not provided, uses default settings.
55
- * See {@link ParticleSystemConfig} for all available options.
56
- * @param externalNow - Optional custom timestamp in milliseconds. If not provided, uses `Date.now()`.
57
- * Useful for synchronized particle systems or testing.
58
- *
59
- * @returns A {@link ParticleSystem} object containing:
60
- * - `instance`: The THREE.Object3D that should be added to your scene
61
- * - `resumeEmitter()`: Function to resume particle emission
62
- * - `pauseEmitter()`: Function to pause particle emission
63
- * - `dispose()`: Function to clean up resources and remove the particle system
64
- *
65
- * @example
66
- * ```typescript
67
- * import { createParticleSystem, updateParticleSystems } from '@newkrok/three-particles';
68
- *
69
- * // Create a basic particle system with default settings
70
- * const { instance, dispose } = createParticleSystem();
71
- * scene.add(instance);
72
- *
73
- * // Create a custom fire effect
74
- * const fireEffect = createParticleSystem({
75
- * duration: 2.0,
76
- * looping: true,
77
- * startLifetime: { min: 0.5, max: 1.5 },
78
- * startSpeed: { min: 2, max: 4 },
79
- * startSize: { min: 0.5, max: 1.5 },
80
- * startColor: {
81
- * min: { r: 1.0, g: 0.3, b: 0.0 },
82
- * max: { r: 1.0, g: 0.8, b: 0.0 }
83
- * },
84
- * emission: { rateOverTime: 50 },
85
- * shape: {
86
- * shape: Shape.CONE,
87
- * cone: { angle: 10, radius: 0.2 }
88
- * }
89
- * });
90
- * scene.add(fireEffect.instance);
91
- *
92
- * // In your animation loop
93
- * function animate(time) {
94
- * updateParticleSystems({ now: time, delta: deltaTime, elapsed: elapsedTime });
95
- * renderer.render(scene, camera);
96
- * }
97
- *
98
- * // Clean up when done
99
- * fireEffect.dispose();
100
- * ```
101
- *
102
- * @see {@link updateParticleSystems} - Required function to call in your animation loop
103
- * @see {@link ParticleSystemConfig} - Complete configuration options
104
- */
105
- export declare const createParticleSystem: (config?: ParticleSystemConfig, externalNow?: number) => ParticleSystem;
106
- export declare const updateParticleSystems: (cycleData: CycleData) => void;
107
- //# sourceMappingURL=three-particles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"three-particles.d.ts","sourceRoot":"","sources":["../../../../src/js/effects/three-particles/three-particles.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,SAAS,EAIT,cAAc,EACd,oBAAoB,EAKrB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAkB3B;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,8BAA8B,WACiB,CAAC;AAyQ7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAQ,oBAAqD,EAC7D,cAAc,MAAM,KACnB,cAqoBF,CAAC;AA0WF,eAAO,MAAM,qBAAqB,GAAI,WAAW,SAAS,SAIzD,CAAC"}