aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-09-09 17:21:14 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-13 03:18:45 +0200
commit4dba5720e03542e0989adad2461358074c7d0dee (patch)
tree17cec83c78b3b50ebd68f60d07bbb66509540f90 /examples
parenta9f0f3562171508c107c321a91520719e4d7c43a (diff)
Implement Turbulence properly
Or at least closer to. Now uses curl noise off of a source noise image, documented as usable, and not an immense performance drain (just a normal one). Change-Id: Iac11c98cd9589cbe6a41b2b30893ab40d541d18f Reviewed-on: http://codereview.qt-project.org/4510 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/flickr/content/ImageDetails.qml3
-rw-r--r--examples/declarative/particles/trails/turbulence.qml22
2 files changed, 14 insertions, 11 deletions
diff --git a/examples/declarative/flickr/content/ImageDetails.qml b/examples/declarative/flickr/content/ImageDetails.qml
index 8d3cdfb494..3d64a33f87 100644
--- a/examples/declarative/flickr/content/ImageDetails.qml
+++ b/examples/declarative/flickr/content/ImageDetails.qml
@@ -162,8 +162,7 @@ Flipable {
id: turbulence
system: imageSystem
anchors.fill: parent
- frequency: 100
- strength: 250
+ strength: 240
enabled: false
}
diff --git a/examples/declarative/particles/trails/turbulence.qml b/examples/declarative/particles/trails/turbulence.qml
index 62216c3460..104bb10e80 100644
--- a/examples/declarative/particles/trails/turbulence.qml
+++ b/examples/declarative/particles/trails/turbulence.qml
@@ -56,15 +56,19 @@ Rectangle{
ParticleSystem{
id: ps
}
+ MouseArea{
+ anchors.fill: parent
+ onClicked: turb.enabled = !turb.enabled
+ }
Turbulence{
+ id: turb
system: ps
+ enabled: true
height: (parent.height / 2)
width: parent.width / 2
x: parent. width / 4
anchors.fill: parent
- strength: 16
- frequency: 64
- gridSize: 16
+ strength: 32
}
ImageParticle{
particles: ["smoke"]
@@ -79,7 +83,7 @@ Rectangle{
source: "content/particle.png"
color: "#11ff400f"
colorVariation: 0.1
- }
+ }
Emitter{
anchors.centerIn: parent
system: ps
@@ -96,12 +100,12 @@ Rectangle{
TrailEmitter{
id: smoke1
width: root.width
- height: 258
+ height: root.height/2 - 20
system: ps
particle: "smoke"
follow: "flame"
- emitRatePerParticle: 4
+ emitRatePerParticle: 1
lifeSpan: 2400
lifeSpanVariation: 400
size: 16
@@ -113,16 +117,16 @@ Rectangle{
TrailEmitter{
id: smoke2
width: root.width
- height: 232
+ height: root.height/2 - 40
system: ps
particle: "smoke"
follow: "flame"
- emitRatePerParticle: 1
+ emitRatePerParticle: 4
lifeSpan: 2400
size: 36
endSize: 24
- sizeVariation: 8
+ sizeVariation: 12
acceleration: PointDirection{ y: -40 }
speed: AngleDirection{ angle: 270; magnitude: 40; angleVariation: 22; magnitudeVariation: 5 }
}