@newkrok/three-particles 2.16.1 → 3.0.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/README.md +20 -0
- package/dist/index.d.ts +58 -6
- package/dist/index.js +187 -84
- package/dist/index.js.map +1 -1
- package/dist/three-particles.min.js +1 -1
- package/dist/three-particles.min.js.map +1 -1
- package/dist/webgpu.js +261 -255
- package/dist/webgpu.js.map +1 -1
- package/llms-full.txt +16 -1
- package/llms.txt +3 -1
- package/package.json +1 -1
package/llms-full.txt
CHANGED
|
@@ -62,7 +62,7 @@ function animate() {
|
|
|
62
62
|
|
|
63
63
|
| Property/Method | Type | Description |
|
|
64
64
|
|-----------------|------|-------------|
|
|
65
|
-
| `instance` | `THREE.Points \| THREE.Mesh
|
|
65
|
+
| `instance` | `THREE.Points \| THREE.Mesh` | The renderable object — add to scene (Mesh when using RendererType.INSTANCED or RendererType.MESH) |
|
|
66
66
|
| `pauseEmitter()` | `() => void` | Stop emitting new particles |
|
|
67
67
|
| `resumeEmitter()` | `() => void` | Resume emitting particles |
|
|
68
68
|
| `dispose()` | `() => void` | Destroy system, free resources |
|
|
@@ -516,6 +516,19 @@ const system = createParticleSystem({
|
|
|
516
516
|
### SimulationSpace
|
|
517
517
|
`LOCAL` | `WORLD`
|
|
518
518
|
|
|
519
|
+
- **`LOCAL`** (default): particles are children of the emitter in the scene
|
|
520
|
+
graph and move/rotate with it. The buffer stores positions in the
|
|
521
|
+
emitter's local frame.
|
|
522
|
+
- **`WORLD`**: particles are decoupled from the emitter once spawned. The
|
|
523
|
+
buffer stores world coordinates directly and `instance.matrixWorld` is
|
|
524
|
+
held at identity. New particles spawn from the emitter's current world
|
|
525
|
+
pose (parent chain + `instance.position` / `instance.rotation`), so
|
|
526
|
+
moving the emitter only affects future emissions, not existing
|
|
527
|
+
particles. The shape-emission offset is scaled by the emitter's world
|
|
528
|
+
scale at spawn time (matching Unity's Shape module with `Scaling Mode =
|
|
529
|
+
Local/Hierarchy`); live particles are unaffected by later scale
|
|
530
|
+
changes. Matches Unity's world simulation space.
|
|
531
|
+
|
|
519
532
|
### TimeMode
|
|
520
533
|
`LIFETIME` | `FPS`
|
|
521
534
|
|
|
@@ -852,6 +865,8 @@ enableWebGPU();
|
|
|
852
865
|
import * as THREE from "three/webgpu";
|
|
853
866
|
const renderer = new THREE.WebGPURenderer({ antialias: true });
|
|
854
867
|
await renderer.init();
|
|
868
|
+
// No outputColorSpace override needed — the library uses the standard
|
|
869
|
+
// three.js linear workflow and works with the default (SRGBColorSpace).
|
|
855
870
|
|
|
856
871
|
// 3. Create a GPU-accelerated particle system
|
|
857
872
|
import { createParticleSystem, SimulationBackend } from "@newkrok/three-particles";
|
package/llms.txt
CHANGED
|
@@ -45,7 +45,7 @@ function animate() {
|
|
|
45
45
|
|
|
46
46
|
### ParticleSystem Methods
|
|
47
47
|
|
|
48
|
-
- `instance` — The Three.js Points or
|
|
48
|
+
- `instance` — The Three.js Points or Mesh object (add to scene)
|
|
49
49
|
- `pauseEmitter()` — Pause particle emission
|
|
50
50
|
- `resumeEmitter()` — Resume particle emission
|
|
51
51
|
- `dispose()` — Clean up and free resources
|
|
@@ -227,6 +227,8 @@ enableWebGPU();
|
|
|
227
227
|
import * as THREE from "three/webgpu";
|
|
228
228
|
const renderer = new THREE.WebGPURenderer({ antialias: true });
|
|
229
229
|
await renderer.init();
|
|
230
|
+
// No outputColorSpace override needed — the library uses the standard
|
|
231
|
+
// three.js linear workflow and works with the default (SRGBColorSpace).
|
|
230
232
|
|
|
231
233
|
// 3. Create a GPU-accelerated particle system
|
|
232
234
|
import { createParticleSystem, SimulationBackend } from "@newkrok/three-particles";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newkrok/three-particles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.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",
|