@newkrok/three-particles 0.6.0 → 0.6.1
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 +1 -1
- package/package.json +1 -1
- package/src/js/effects/three-particles.js +6 -10
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -652,10 +652,10 @@ export const updateParticleSystems = ({ now, delta, elapsed }) => {
|
|
|
652
652
|
currentWorldPosition.y - lastWorldPosition.y,
|
|
653
653
|
currentWorldPosition.z - lastWorldPosition.z
|
|
654
654
|
);
|
|
655
|
+
worldPositionChange.applyQuaternion(worldQuaternion.invert())
|
|
655
656
|
}
|
|
656
657
|
generalData.distanceFromLastEmitByDistance += worldPositionChange.length();
|
|
657
658
|
particleSystem.getWorldPosition(lastWorldPosition);
|
|
658
|
-
|
|
659
659
|
particleSystem.getWorldQuaternion(worldQuaternion);
|
|
660
660
|
if (
|
|
661
661
|
lastWorldQuaternion.x === -99999 ||
|
|
@@ -665,16 +665,12 @@ export const updateParticleSystems = ({ now, delta, elapsed }) => {
|
|
|
665
665
|
) {
|
|
666
666
|
worldEuler.setFromQuaternion(worldQuaternion);
|
|
667
667
|
lastWorldQuaternion.copy(worldQuaternion);
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
particleSystem.position.set(0, 0, 0);
|
|
674
|
-
particleSystem.updateMatrixWorld();
|
|
668
|
+
gravityVelocity.set(
|
|
669
|
+
lastWorldPosition.x,
|
|
670
|
+
lastWorldPosition.y + gravity,
|
|
671
|
+
lastWorldPosition.z
|
|
672
|
+
);
|
|
675
673
|
particleSystem.worldToLocal(gravityVelocity);
|
|
676
|
-
particleSystem.position.set(tempPosX, tempPosY, tempPosZ);
|
|
677
|
-
particleSystem.updateMatrixWorld();
|
|
678
674
|
}
|
|
679
675
|
|
|
680
676
|
generalData.creationTimes.forEach((entry, index) => {
|