aboutsummaryrefslogtreecommitdiffstats
path: root/examples/particles/affectors/content/turbulence.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/particles/affectors/content/turbulence.qml')
-rw-r--r--examples/particles/affectors/content/turbulence.qml146
1 files changed, 70 insertions, 76 deletions
diff --git a/examples/particles/affectors/content/turbulence.qml b/examples/particles/affectors/content/turbulence.qml
index 62231e12ad..36b9561385 100644
--- a/examples/particles/affectors/content/turbulence.qml
+++ b/examples/particles/affectors/content/turbulence.qml
@@ -54,85 +54,79 @@ Rectangle {
anchors.horizontalCenterOffset: 2
}
ParticleSystem {
- id: ps
- }
- MouseArea {
anchors.fill: parent
- onClicked: turb.enabled = !turb.enabled
- }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: turb.enabled = !turb.enabled
+ }
- //! [0]
- Turbulence {
- id: turb
- system: ps
- enabled: true
- height: (parent.height / 2) - 4
- width: parent.width
- x: parent. width / 4
- anchors.fill: parent
- strength: 32
- NumberAnimation on strength{from: 16; to: 64; easing.type: Easing.InOutBounce; duration: 1800; loops: -1}
- }
- //! [0]
+ //! [0]
+ Turbulence {
+ id: turb
+ enabled: true
+ height: (parent.height / 2) - 4
+ width: parent.width
+ x: parent. width / 4
+ anchors.fill: parent
+ strength: 32
+ NumberAnimation on strength{from: 16; to: 64; easing.type: Easing.InOutBounce; duration: 1800; loops: -1}
+ }
+ //! [0]
- ImageParticle {
- groups: ["smoke"]
- system: ps
- source: "../../images/particle.png"
- color: "#11111111"
- colorVariation: 0
- }
- ImageParticle {
- groups: ["flame"]
- system: ps
- source: "../../images/particle.png"
- color: "#11ff400f"
- colorVariation: 0.1
- }
- Emitter {
- anchors.centerIn: parent
- system: ps
- group: "flame"
-
- emitRate: 120
- lifeSpan: 1200
- size: 20
- endSize: 10
- sizeVariation: 10
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 20; angleVariation: 22; magnitudeVariation: 5 }
- }
- TrailEmitter {
- id: smoke1
- width: root.width
- height: root.height/2
- system: ps
- group: "smoke"
- follow: "flame"
+ ImageParticle {
+ groups: ["smoke"]
+ source: "../../images/particle.png"
+ color: "#11111111"
+ colorVariation: 0
+ }
+ ImageParticle {
+ groups: ["flame"]
+ source: "../../images/particle.png"
+ color: "#11ff400f"
+ colorVariation: 0.1
+ }
+ Emitter {
+ anchors.centerIn: parent
+ group: "flame"
- emitRatePerParticle: 1
- lifeSpan: 2400
- lifeSpanVariation: 400
- size: 16
- endSize: 8
- sizeVariation: 8
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
- }
- TrailEmitter {
- id: smoke2
- width: root.width
- height: root.height/2 - 20
- system: ps
- group: "smoke"
- follow: "flame"
-
- emitRatePerParticle: 4
- lifeSpan: 2400
- size: 36
- endSize: 24
- sizeVariation: 12
- acceleration: PointDirection { y: -40 }
- velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
+ emitRate: 120
+ lifeSpan: 1200
+ size: 20
+ endSize: 10
+ sizeVariation: 10
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 20; angleVariation: 22; magnitudeVariation: 5 }
+ }
+ TrailEmitter {
+ id: smoke1
+ width: root.width
+ height: root.height/2
+ group: "smoke"
+ follow: "flame"
+
+ emitRatePerParticle: 1
+ lifeSpan: 2400
+ lifeSpanVariation: 400
+ size: 16
+ endSize: 8
+ sizeVariation: 8
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
+ }
+ TrailEmitter {
+ id: smoke2
+ width: root.width
+ height: root.height/2 - 20
+ group: "smoke"
+ follow: "flame"
+
+ emitRatePerParticle: 4
+ lifeSpan: 2400
+ size: 36
+ endSize: 24
+ sizeVariation: 12
+ acceleration: PointDirection { y: -40 }
+ velocity: AngleDirection { angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
+ }
}
}