@newkrok/three-particles 0.8.2 → 0.8.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newkrok/three-particles",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Particle system for ThreeJS",
|
|
5
5
|
"main": "src/js/three-particles.js",
|
|
6
6
|
"bin": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"homepage": "https://github.com/NewKrok/three-particles#readme",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"easing-functions": "1.0.1",
|
|
30
|
-
"three": "0.
|
|
30
|
+
"three": "^0.141.0",
|
|
31
31
|
"three-noise": "1.1.2",
|
|
32
|
-
"@newkrok/three-utils": "0.
|
|
32
|
+
"@newkrok/three-utils": "^0.3.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -284,9 +284,10 @@ const calculatePositionAndVelocity = (
|
|
|
284
284
|
};
|
|
285
285
|
|
|
286
286
|
export const createParticleSystem = (
|
|
287
|
-
config = DEFAULT_PARTICLE_SYSTEM_CONFIG
|
|
287
|
+
config = DEFAULT_PARTICLE_SYSTEM_CONFIG,
|
|
288
|
+
externalNow
|
|
288
289
|
) => {
|
|
289
|
-
const now = Date.now();
|
|
290
|
+
const now = externalNow || Date.now();
|
|
290
291
|
const generalData = {
|
|
291
292
|
distanceFromLastEmitByDistance: 0,
|
|
292
293
|
lastWorldPosition: new THREE.Vector3(-99999),
|
|
@@ -741,7 +742,6 @@ export const updateParticleSystems = ({ now, delta, elapsed }) => {
|
|
|
741
742
|
worldQuaternion,
|
|
742
743
|
worldEuler,
|
|
743
744
|
gravityVelocity,
|
|
744
|
-
hasOrbitalVelocity,
|
|
745
745
|
} = generalData;
|
|
746
746
|
|
|
747
747
|
if (wrapper) generalData.wrapperQuaternion.copy(wrapper.parent.quaternion);
|