@newkrok/three-particles 2.10.3 → 2.11.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/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @newkrok/three-particles — Full API Reference
2
2
 
3
- > Three.js-based high-performance particle system library (v2.5.0)
3
+ > Three.js-based high-performance particle system library (v2.10.4)
4
4
  > License: MIT | Author: Istvan Krisztian Somoracz
5
5
  > Repository: https://github.com/NewKrok/three-particles
6
6
 
@@ -62,7 +62,7 @@ function animate() {
62
62
 
63
63
  | Property/Method | Type | Description |
64
64
  |-----------------|------|-------------|
65
- | `instance` | `THREE.Points \| Gyroscope` | The renderable object — add to scene |
65
+ | `instance` | `THREE.Points \| THREE.Mesh \| Gyroscope` | The renderable object — add to scene (Mesh when using RendererType.INSTANCED) |
66
66
  | `pauseEmitter()` | `() => void` | Stop emitting new particles |
67
67
  | `resumeEmitter()` | `() => void` | Resume emitting particles |
68
68
  | `dispose()` | `() => void` | Destroy system, free resources |
@@ -337,7 +337,15 @@ type Renderer = {
337
337
  transparent: boolean; // Default: true
338
338
  depthTest: boolean; // Default: true
339
339
  depthWrite: boolean; // Default: false
340
+ rendererType?: RendererType; // Default: RendererType.POINTS
340
341
  };
342
+
343
+ enum RendererType {
344
+ POINTS = 'POINTS', // Classic point sprites (THREE.Points). Default.
345
+ INSTANCED = 'INSTANCED', // Camera-facing quads via InstancedBufferGeometry.
346
+ // Removes gl_PointSize hardware limit, supports large particles.
347
+ // Recommended for 10 000+ particles or large on-screen sizes.
348
+ }
341
349
  ```
342
350
 
343
351
  Common blending modes: `THREE.NormalBlending`, `THREE.AdditiveBlending`, `THREE.SubtractiveBlending`
@@ -417,6 +425,9 @@ const system = createParticleSystem({
417
425
  ### LifeTimeCurve
418
426
  `BEZIER` | `EASING`
419
427
 
428
+ ### RendererType
429
+ `POINTS` (default — classic point sprites) | `INSTANCED` (GPU instanced quads, no gl_PointSize limit)
430
+
420
431
  ---
421
432
 
422
433
  ## Callbacks
@@ -425,7 +436,7 @@ const system = createParticleSystem({
425
436
  createParticleSystem({
426
437
  // Called every frame
427
438
  onUpdate: ({ particleSystem, delta, elapsed, lifetime, iterationCount }) => {
428
- // particleSystem: THREE.Points instance
439
+ // particleSystem: THREE.Points or THREE.Mesh instance
429
440
  // delta: seconds since last frame
430
441
  // elapsed: total seconds
431
442
  // lifetime: system duration
package/llms.txt CHANGED
@@ -69,6 +69,12 @@ function animate() {
69
69
  | emission | Emission | rateOverTime: 10 | Emission config |
70
70
  | shape | ShapeConfig | — | Emitter shape |
71
71
  | map | THREE.Texture | undefined | Particle texture |
72
+ | renderer | Renderer | — | Renderer settings (blending, rendererType, etc.) |
73
+
74
+ ## Renderer Types
75
+
76
+ - `RendererType.POINTS` (default) — Classic point sprites via `THREE.Points`
77
+ - `RendererType.INSTANCED` — Camera-facing quads via `InstancedBufferGeometry`, removes `gl_PointSize` hardware limit
72
78
 
73
79
  ## Emitter Shapes
74
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newkrok/three-particles",
3
- "version": "2.10.3",
3
+ "version": "2.11.0",
4
4
  "type": "module",
5
5
  "description": "Three.js-based high-performance particle system library designed for creating visually stunning particle effects with ease. Perfect for game developers and 3D applications.",
6
6
  "main": "./dist/index.js",