@newkrok/three-particles 2.3.0 → 2.4.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/dist/bundle-report.json +1 -1
- package/dist/js/effects/three-particles/three-particles.d.ts +1 -73
- package/dist/js/effects/three-particles/three-particles.d.ts.map +1 -1
- package/dist/js/effects/three-particles/three-particles.js +316 -172
- package/dist/js/effects/three-particles/types.d.ts +62 -0
- package/dist/js/effects/three-particles/types.d.ts.map +1 -1
- package/dist/three-particles.min.js +1 -1
- package/package.json +1 -1
package/dist/bundle-report.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"label":"three-particles.min.js","isAsset":true,"statSize":
|
|
1
|
+
[{"label":"three-particles.min.js","isAsset":true,"statSize":487442,"parsedSize":124649,"gzipSize":38313,"groups":[{"label":"dist","path":"./dist","statSize":477577,"groups":[{"id":706,"label":"index.js + 26 modules (concatenated)","path":"./dist/index.js + 26 modules (concatenated)","statSize":477577,"parsedSize":124649,"gzipSize":38313,"concatenated":true,"groups":[{"label":"dist","path":"./dist/index.js + 26 modules (concatenated)/dist","statSize":74199,"groups":[{"id":null,"label":"index.js","path":"./dist/index.js + 26 modules (concatenated)/dist/index.js","statSize":426,"parsedSize":111,"gzipSize":34,"inaccurateSizes":true},{"label":"js/effects/three-particles","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles","statSize":73773,"groups":[{"id":null,"label":"three-particles-bezier.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/three-particles-bezier.js","statSize":2350,"parsedSize":613,"gzipSize":188,"inaccurateSizes":true},{"id":null,"label":"three-particles-curves.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/three-particles-curves.js","statSize":3617,"parsedSize":944,"gzipSize":290,"inaccurateSizes":true},{"id":null,"label":"three-particles-modifiers.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/three-particles-modifiers.js","statSize":8644,"parsedSize":2256,"gzipSize":693,"inaccurateSizes":true},{"id":null,"label":"three-particles-utils.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/three-particles-utils.js","statSize":14332,"parsedSize":3740,"gzipSize":1149,"inaccurateSizes":true},{"id":null,"label":"three-particles.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/three-particles.js","statSize":41840,"parsedSize":10920,"gzipSize":3356,"inaccurateSizes":true},{"label":"shaders","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/shaders","statSize":2990,"groups":[{"id":null,"label":"particle-system-fragment-shader.glsl.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/shaders/particle-system-fragment-shader.glsl.js","statSize":2039,"parsedSize":532,"gzipSize":163,"inaccurateSizes":true},{"id":null,"label":"particle-system-vertex-shader.glsl.js","path":"./dist/index.js + 26 modules (concatenated)/dist/js/effects/three-particles/shaders/particle-system-vertex-shader.glsl.js","statSize":951,"parsedSize":248,"gzipSize":76,"inaccurateSizes":true}],"parsedSize":780,"gzipSize":239,"inaccurateSizes":true}],"parsedSize":19254,"gzipSize":5918,"inaccurateSizes":true}],"parsedSize":19366,"gzipSize":5952,"inaccurateSizes":true},{"label":"node_modules","path":"./dist/index.js + 26 modules (concatenated)/node_modules","statSize":403336,"groups":[{"label":"@newkrok/three-utils/dist","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist","statSize":25076,"groups":[{"id":null,"label":"index.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/index.js","statSize":411,"parsedSize":107,"gzipSize":32,"inaccurateSizes":true},{"id":null,"label":"callback-utils.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/callback-utils.js","statSize":1408,"parsedSize":367,"gzipSize":112,"inaccurateSizes":true},{"id":null,"label":"object-utils.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/object-utils.js","statSize":2889,"parsedSize":754,"gzipSize":231,"inaccurateSizes":true},{"id":null,"label":"time-utils.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/time-utils.js","statSize":1037,"parsedSize":270,"gzipSize":83,"inaccurateSizes":true},{"label":"assets","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/assets","statSize":15614,"groups":[{"id":null,"label":"index.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/assets/index.js","statSize":44,"parsedSize":11,"gzipSize":3,"inaccurateSizes":true},{"id":null,"label":"assets.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/assets/assets.js","statSize":9027,"parsedSize":2356,"gzipSize":724,"inaccurateSizes":true},{"id":null,"label":"loaders.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/assets/loaders.js","statSize":6543,"parsedSize":1707,"gzipSize":524,"inaccurateSizes":true}],"parsedSize":4075,"gzipSize":1252,"inaccurateSizes":true},{"label":"audio","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/audio","statSize":3717,"groups":[{"id":null,"label":"index.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/audio/index.js","statSize":42,"parsedSize":10,"gzipSize":3,"inaccurateSizes":true},{"id":null,"label":"audio.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/@newkrok/three-utils/dist/audio/audio.js","statSize":3675,"parsedSize":959,"gzipSize":294,"inaccurateSizes":true}],"parsedSize":970,"gzipSize":298,"inaccurateSizes":true}],"parsedSize":6544,"gzipSize":2011,"inaccurateSizes":true},{"label":"three/examples/jsm","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm","statSize":365339,"groups":[{"label":"misc","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/misc","statSize":1617,"groups":[{"id":null,"label":"Gyroscope.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/misc/Gyroscope.js","statSize":1617,"parsedSize":422,"gzipSize":129,"inaccurateSizes":true}],"parsedSize":422,"gzipSize":129,"inaccurateSizes":true},{"label":"helpers","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/helpers","statSize":4384,"groups":[{"id":null,"label":"PositionalAudioHelper.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/helpers/PositionalAudioHelper.js","statSize":4384,"parsedSize":1144,"gzipSize":351,"inaccurateSizes":true}],"parsedSize":1144,"gzipSize":351,"inaccurateSizes":true},{"label":"loaders","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/loaders","statSize":219725,"groups":[{"id":null,"label":"FBXLoader.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/loaders/FBXLoader.js","statSize":104842,"parsedSize":27364,"gzipSize":8410,"inaccurateSizes":true},{"id":null,"label":"GLTFLoader.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/loaders/GLTFLoader.js","statSize":114883,"parsedSize":29984,"gzipSize":9216,"inaccurateSizes":true}],"parsedSize":57348,"gzipSize":17627,"inaccurateSizes":true},{"label":"libs","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/libs","statSize":89384,"groups":[{"id":null,"label":"fflate.module.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/libs/fflate.module.js","statSize":89384,"parsedSize":23329,"gzipSize":7170,"inaccurateSizes":true}],"parsedSize":23329,"gzipSize":7170,"inaccurateSizes":true},{"label":"curves","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/curves","statSize":14690,"groups":[{"id":null,"label":"NURBSCurve.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/curves/NURBSCurve.js","statSize":3888,"parsedSize":1014,"gzipSize":311,"inaccurateSizes":true},{"id":null,"label":"NURBSUtils.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/curves/NURBSUtils.js","statSize":10802,"parsedSize":2819,"gzipSize":866,"inaccurateSizes":true}],"parsedSize":3834,"gzipSize":1178,"inaccurateSizes":true},{"label":"utils","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/utils","statSize":35539,"groups":[{"id":null,"label":"BufferGeometryUtils.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js","statSize":35539,"parsedSize":9275,"gzipSize":2851,"inaccurateSizes":true}],"parsedSize":9275,"gzipSize":2851,"inaccurateSizes":true}],"parsedSize":95354,"gzipSize":29308,"inaccurateSizes":true},{"label":"three-noise/build","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three-noise/build","statSize":12921,"groups":[{"id":null,"label":"three-noise.module.js","path":"./dist/index.js + 26 modules (concatenated)/node_modules/three-noise/build/three-noise.module.js","statSize":12921,"parsedSize":3372,"gzipSize":1036,"inaccurateSizes":true}],"parsedSize":3372,"gzipSize":1036,"inaccurateSizes":true}],"parsedSize":105271,"gzipSize":32357,"inaccurateSizes":true}]}],"parsedSize":124649,"gzipSize":38313},{"label":"node_modules/easing-functions","path":"./node_modules/easing-functions","statSize":9865,"groups":[{"id":300,"label":"index.js","path":"./node_modules/easing-functions/index.js","statSize":9865}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"main":true}}]
|
|
@@ -103,77 +103,5 @@ export declare const getDefaultParticleSystemConfig: () => any;
|
|
|
103
103
|
* @see {@link ParticleSystemConfig} - Complete configuration options
|
|
104
104
|
*/
|
|
105
105
|
export declare const createParticleSystem: (config?: ParticleSystemConfig, externalNow?: number) => ParticleSystem;
|
|
106
|
-
|
|
107
|
-
* Updates all active particle systems created with {@link createParticleSystem}.
|
|
108
|
-
*
|
|
109
|
-
* This function must be called once per frame in your animation loop to animate all particles.
|
|
110
|
-
* It handles particle emission, movement, lifetime tracking, modifier application, and cleanup
|
|
111
|
-
* of expired particle systems.
|
|
112
|
-
*
|
|
113
|
-
* @param cycleData - Object containing timing information for the current frame:
|
|
114
|
-
* - `now`: Current timestamp in milliseconds (typically from `performance.now()` or `Date.now()`)
|
|
115
|
-
* - `delta`: Time elapsed since the last frame in seconds
|
|
116
|
-
* - `elapsed`: Total time elapsed since the animation started in seconds
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```typescript
|
|
120
|
-
* import { createParticleSystem, updateParticleSystems } from '@newkrok/three-particles';
|
|
121
|
-
*
|
|
122
|
-
* const { instance } = createParticleSystem({
|
|
123
|
-
* // your config
|
|
124
|
-
* });
|
|
125
|
-
* scene.add(instance);
|
|
126
|
-
*
|
|
127
|
-
* // Animation loop
|
|
128
|
-
* let lastTime = 0;
|
|
129
|
-
* let elapsedTime = 0;
|
|
130
|
-
*
|
|
131
|
-
* function animate(currentTime) {
|
|
132
|
-
* requestAnimationFrame(animate);
|
|
133
|
-
*
|
|
134
|
-
* const delta = (currentTime - lastTime) / 1000; // Convert to seconds
|
|
135
|
-
* elapsedTime += delta;
|
|
136
|
-
* lastTime = currentTime;
|
|
137
|
-
*
|
|
138
|
-
* // Update all particle systems
|
|
139
|
-
* updateParticleSystems({
|
|
140
|
-
* now: currentTime,
|
|
141
|
-
* delta: delta,
|
|
142
|
-
* elapsed: elapsedTime
|
|
143
|
-
* });
|
|
144
|
-
*
|
|
145
|
-
* renderer.render(scene, camera);
|
|
146
|
-
* }
|
|
147
|
-
*
|
|
148
|
-
* animate(0);
|
|
149
|
-
* ```
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```typescript
|
|
153
|
-
* // Using Three.js Clock for timing
|
|
154
|
-
* import * as THREE from 'three';
|
|
155
|
-
* import { updateParticleSystems } from '@newkrok/three-particles';
|
|
156
|
-
*
|
|
157
|
-
* const clock = new THREE.Clock();
|
|
158
|
-
*
|
|
159
|
-
* function animate() {
|
|
160
|
-
* requestAnimationFrame(animate);
|
|
161
|
-
*
|
|
162
|
-
* const delta = clock.getDelta();
|
|
163
|
-
* const elapsed = clock.getElapsedTime();
|
|
164
|
-
*
|
|
165
|
-
* updateParticleSystems({
|
|
166
|
-
* now: performance.now(),
|
|
167
|
-
* delta: delta,
|
|
168
|
-
* elapsed: elapsed
|
|
169
|
-
* });
|
|
170
|
-
*
|
|
171
|
-
* renderer.render(scene, camera);
|
|
172
|
-
* }
|
|
173
|
-
* ```
|
|
174
|
-
*
|
|
175
|
-
* @see {@link createParticleSystem} - Creates particle systems to be updated
|
|
176
|
-
* @see {@link CycleData} - Timing data structure
|
|
177
|
-
*/
|
|
178
|
-
export declare const updateParticleSystems: ({ now, delta, elapsed }: CycleData) => void;
|
|
106
|
+
export declare const updateParticleSystems: (cycleData: CycleData) => void;
|
|
179
107
|
//# sourceMappingURL=three-particles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,cA0nBF,CAAC;AAyXF,eAAO,MAAM,qBAAqB,GAAI,WAAW,SAAS,SAIzD,CAAC"}
|