summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2023-03-24 08:50:44 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2023-04-08 18:59:17 -0400
commitc751c487da98e67b7566aef95e28e9705866e973 (patch)
treecbce93a58ecedc7d11a0210ba82b8740714bfda7 /resources/qml
parentAllow sending custom msgtypes (diff)
downloadnheko-c751c487da98e67b7566aef95e28e9705866e973.tar.xz
Use particle groups to separate effects
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/TimelineView.qml23
1 files changed, 10 insertions, 13 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 72570d4a..4621956f 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -365,7 +365,7 @@ Item {
     }
 
     ParticleSystem {
-        id: confettiParticleSystem
+        id: particleSystem
 
         Component.onCompleted: pause();
         paused: !shouldEffectsRun
@@ -374,13 +374,14 @@ Item {
     Emitter {
         id: confettiEmitter
 
+        group: "confetti"
         width: parent.width * 3/4
         enabled: false
         anchors.horizontalCenter: parent.horizontalCenter
         y: parent.height
         emitRate: Math.min(400 * Math.sqrt(parent.width * parent.height) / 870, 1000)
         lifeSpan: 15000
-        system: confettiParticleSystem
+        system: particleSystem
         maximumEmitted: 500
         velocityFromMovement: 8
         size: 16
@@ -394,7 +395,8 @@ Item {
     }
 
     ImageParticle {
-        system: confettiParticleSystem
+        system: particleSystem
+        groups: ["confetti"]
         source: "qrc:/confettiparticle.svg"
         rotationVelocity: 0
         rotationVelocityVariation: 360
@@ -416,29 +418,23 @@ Item {
     }
 
     Gravity {
-        system: confettiParticleSystem
+        system: particleSystem
         anchors.fill: parent
         magnitude: 350
         angle: 90
     }
 
-    ParticleSystem {
-        id: rainfallParticleSystem
-
-        Component.onCompleted: pause();
-        paused: !shouldEffectsRun
-    }
-
     Emitter {
         id: rainfallEmitter
 
+        group: "rain"
         width: parent.width
         enabled: false
         anchors.horizontalCenter: parent.horizontalCenter
         y: -60
         emitRate: parent.width / 50
         lifeSpan: 10000
-        system: rainfallParticleSystem
+        system: particleSystem
         velocity: PointDirection {
             x: 0
             y: 300
@@ -447,7 +443,8 @@ Item {
         }
 
         ItemParticle {
-            system: rainfallParticleSystem
+            system: particleSystem
+            groups: ["rain"]
             fade: false
             delegate: Rectangle {
                 width: 2