From 3dbbcc09e98d768a5b7b6c0a498f8aefd9e25b9e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 1 Apr 2013 13:45:21 -0700 Subject: Embed some default particles. Most prototype level particle effects, at least in our example code, uses basic and generic particles. Embedding these images into the particles plugin will facilitate prototyping with the particles API. Currently finding an image and copying it between projects is a relatively large development cost for quick particle system prototypes. Change-Id: I077104915353ab298e2aabd36e2a0a2070030914 Reviewed-by: Gunnar Sletta --- examples/quick/particles/affectors/content/attractor.qml | 6 +++--- examples/quick/particles/affectors/content/groupgoal.qml | 4 ++-- examples/quick/particles/affectors/content/move.qml | 6 +++--- .../quick/particles/affectors/content/spritegoal.qml | 4 ++-- .../quick/particles/affectors/content/turbulence.qml | 4 ++-- .../particles/customparticle/content/imagecolors.qml | 2 +- .../quick/particles/emitters/content/burstandpulse.qml | 2 +- .../quick/particles/emitters/content/customemitter.qml | 2 +- examples/quick/particles/emitters/content/emitmask.qml | 2 +- .../quick/particles/emitters/content/maximumemitted.qml | 2 +- .../particles/emitters/content/shapeanddirection.qml | 2 +- .../quick/particles/emitters/content/trailemitter.qml | 4 ++-- .../particles/emitters/content/velocityfrommotion.qml | 8 ++++---- .../quick/particles/imageparticle/content/colored.qml | 4 ++-- .../quick/particles/imageparticle/content/colortable.qml | 2 +- examples/quick/particles/images.qrc | 3 --- examples/quick/particles/images/particle.png | Bin 861 -> 0 bytes examples/quick/particles/images/particle4.png | Bin 1799 -> 0 bytes examples/quick/particles/images/star.png | Bin 1550 -> 0 bytes .../quick/particles/system/content/dynamiccomparison.qml | 4 ++-- .../quick/particles/system/content/dynamicemitters.qml | 2 +- .../quick/particles/system/content/multiplepainters.qml | 2 +- examples/quick/particles/system/content/startstop.qml | 2 +- .../quick/particles/system/content/timedgroupchanges.qml | 2 +- 24 files changed, 33 insertions(+), 36 deletions(-) delete mode 100644 examples/quick/particles/images/particle.png delete mode 100644 examples/quick/particles/images/particle4.png delete mode 100644 examples/quick/particles/images/star.png (limited to 'examples/quick/particles') diff --git a/examples/quick/particles/affectors/content/attractor.qml b/examples/quick/particles/affectors/content/attractor.qml index fd7fd65b9c..349132e61a 100644 --- a/examples/quick/particles/affectors/content/attractor.qml +++ b/examples/quick/particles/affectors/content/attractor.qml @@ -77,7 +77,7 @@ Rectangle { ImageParticle { id: stars groups: ["stars"] - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color: "white" colorVariation: 0.1 alpha: 0 @@ -96,7 +96,7 @@ Rectangle { ImageParticle { id: shot groups: ["shot"] - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color: "#0FF06600" colorVariation: 0.3 @@ -104,7 +104,7 @@ Rectangle { ImageParticle { id: engine groups: ["engine"] - source: "../../images/particle4.png" + source: "qrc:///particleresources/fuzzydot.png" color: "orange" SequentialAnimation on color { diff --git a/examples/quick/particles/affectors/content/groupgoal.qml b/examples/quick/particles/affectors/content/groupgoal.qml index 19fa041288..cf4361eb94 100644 --- a/examples/quick/particles/affectors/content/groupgoal.qml +++ b/examples/quick/particles/affectors/content/groupgoal.qml @@ -124,7 +124,7 @@ Rectangle { id: smoke anchors.fill: parent groups: ["smoke"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorVariation: 0 color: "#00111111" } @@ -132,7 +132,7 @@ Rectangle { id: pilot anchors.fill: parent groups: ["pilot"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" redVariation: 0.01 blueVariation: 0.4 color: "#0010004f" diff --git a/examples/quick/particles/affectors/content/move.qml b/examples/quick/particles/affectors/content/move.qml index b4d83318b0..e90f8c685c 100644 --- a/examples/quick/particles/affectors/content/move.qml +++ b/examples/quick/particles/affectors/content/move.qml @@ -50,7 +50,7 @@ Rectangle { ImageParticle { groups: ["A"] anchors.fill: parent - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color:"#FF1010" redVariation: 0.8 } @@ -80,7 +80,7 @@ Rectangle { ImageParticle { groups: ["B"] anchors.fill: parent - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color:"#10FF10" greenVariation: 0.8 } @@ -112,7 +112,7 @@ Rectangle { ImageParticle { groups: ["C"] anchors.fill: parent - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color:"#1010FF" blueVariation: 0.8 } diff --git a/examples/quick/particles/affectors/content/spritegoal.qml b/examples/quick/particles/affectors/content/spritegoal.qml index 78b161f25b..ab108bb065 100644 --- a/examples/quick/particles/affectors/content/spritegoal.qml +++ b/examples/quick/particles/affectors/content/spritegoal.qml @@ -66,7 +66,7 @@ Item { ImageParticle { system: sys groups: ["starfield"] - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" colorVariation: 0.3 color: "white" } @@ -170,7 +170,7 @@ Item { z:0 system: sys groups: ["exhaust"] - source: "../../images/particle4.png" + source: "qrc:///particleresources/fuzzydot.png" color: "orange" SequentialAnimation on color { diff --git a/examples/quick/particles/affectors/content/turbulence.qml b/examples/quick/particles/affectors/content/turbulence.qml index d7a86039b4..eacedbe153 100644 --- a/examples/quick/particles/affectors/content/turbulence.qml +++ b/examples/quick/particles/affectors/content/turbulence.qml @@ -75,13 +75,13 @@ Rectangle { ImageParticle { groups: ["smoke"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" color: "#11111111" colorVariation: 0 } ImageParticle { groups: ["flame"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" color: "#11ff400f" colorVariation: 0.1 } diff --git a/examples/quick/particles/customparticle/content/imagecolors.qml b/examples/quick/particles/customparticle/content/imagecolors.qml index 130518a6f9..3fb4c9f378 100644 --- a/examples/quick/particles/customparticle/content/imagecolors.qml +++ b/examples/quick/particles/customparticle/content/imagecolors.qml @@ -71,7 +71,7 @@ Rectangle { } Image { id: particle - source: "../../images/particle4.png" + source: "qrc:///particleresources/fuzzydot.png" } //! [vertex] vertexShader:" diff --git a/examples/quick/particles/emitters/content/burstandpulse.qml b/examples/quick/particles/emitters/content/burstandpulse.qml index 18d1c43933..28c56b326d 100644 --- a/examples/quick/particles/emitters/content/burstandpulse.qml +++ b/examples/quick/particles/emitters/content/burstandpulse.qml @@ -67,7 +67,7 @@ Rectangle { id: particles anchors.fill: parent ImageParticle { - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" alpha: 0 colorVariation: 0.6 } diff --git a/examples/quick/particles/emitters/content/customemitter.qml b/examples/quick/particles/emitters/content/customemitter.qml index 966c78e70f..9ad504ebc8 100644 --- a/examples/quick/particles/emitters/content/customemitter.qml +++ b/examples/quick/particles/emitters/content/customemitter.qml @@ -90,7 +90,7 @@ ParticleSystem { } ImageParticle { - source: "../../images/particle4.png" + source: "qrc:///particleresources/fuzzydot.png" alpha: 0.0 } } diff --git a/examples/quick/particles/emitters/content/emitmask.qml b/examples/quick/particles/emitters/content/emitmask.qml index 08c04f6e5f..1c2e7b458f 100644 --- a/examples/quick/particles/emitters/content/emitmask.qml +++ b/examples/quick/particles/emitters/content/emitmask.qml @@ -51,7 +51,7 @@ Rectangle { anchors.centerIn: parent ImageParticle { - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" z: 2 anchors.fill: parent color: "#336666CC" diff --git a/examples/quick/particles/emitters/content/maximumemitted.qml b/examples/quick/particles/emitters/content/maximumemitted.qml index df92f05f4b..4bd9079770 100644 --- a/examples/quick/particles/emitters/content/maximumemitted.qml +++ b/examples/quick/particles/emitters/content/maximumemitted.qml @@ -53,7 +53,7 @@ Rectangle { ImageParticle { system: sys id: cp - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorVariation: 0.4 color: "#000000FF" } diff --git a/examples/quick/particles/emitters/content/shapeanddirection.qml b/examples/quick/particles/emitters/content/shapeanddirection.qml index 1dec5b2fa7..0ca433cfba 100644 --- a/examples/quick/particles/emitters/content/shapeanddirection.qml +++ b/examples/quick/particles/emitters/content/shapeanddirection.qml @@ -58,7 +58,7 @@ Rectangle { ImageParticle { groups: ["center","edge"] anchors.fill: parent - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorVariation: 0.1 color: "#009999FF" } diff --git a/examples/quick/particles/emitters/content/trailemitter.qml b/examples/quick/particles/emitters/content/trailemitter.qml index a4972b7b73..3186b511ef 100644 --- a/examples/quick/particles/emitters/content/trailemitter.qml +++ b/examples/quick/particles/emitters/content/trailemitter.qml @@ -56,7 +56,7 @@ Rectangle { system: particles anchors.fill: parent groups: ["A", "B"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorVariation: 0 color: "#00111111" } @@ -65,7 +65,7 @@ Rectangle { anchors.fill: parent system: particles groups: ["C", "D"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorVariation: 0.1 color: "#00ff400f" } diff --git a/examples/quick/particles/emitters/content/velocityfrommotion.qml b/examples/quick/particles/emitters/content/velocityfrommotion.qml index 1f1d6607d0..d325f9b7e1 100644 --- a/examples/quick/particles/emitters/content/velocityfrommotion.qml +++ b/examples/quick/particles/emitters/content/velocityfrommotion.qml @@ -61,7 +61,7 @@ Rectangle { ParticleSystem { id: sys1 } ImageParticle { system: sys1 - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" color: "cyan" alpha: 0 SequentialAnimation on color { @@ -127,7 +127,7 @@ Rectangle { } } colorVariation: 0.5 - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" } Emitter { id: trailsStars @@ -149,7 +149,7 @@ Rectangle { } ParticleSystem { id: sys3; } ImageParticle { - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" system: sys3 color: "orange" alpha: 0 @@ -191,7 +191,7 @@ Rectangle { ParticleSystem { id: sys4; } ImageParticle { system: sys4 - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" color: "green" alpha: 0 SequentialAnimation on color { diff --git a/examples/quick/particles/imageparticle/content/colored.qml b/examples/quick/particles/imageparticle/content/colored.qml index 939ec7e437..236cc0f372 100644 --- a/examples/quick/particles/imageparticle/content/colored.qml +++ b/examples/quick/particles/imageparticle/content/colored.qml @@ -50,7 +50,7 @@ Rectangle { ImageParticle { groups: ["stars"] anchors.fill: parent - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" } Emitter { group: "stars" @@ -64,7 +64,7 @@ Rectangle { // ![0] ImageParticle { anchors.fill: parent - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" alpha: 0 alphaVariation: 0.2 colorVariation: 1.0 diff --git a/examples/quick/particles/imageparticle/content/colortable.qml b/examples/quick/particles/imageparticle/content/colortable.qml index 4090163872..87b5ae2678 100644 --- a/examples/quick/particles/imageparticle/content/colortable.qml +++ b/examples/quick/particles/imageparticle/content/colortable.qml @@ -55,7 +55,7 @@ Rectangle { alpha: 0 //! [0] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" colorTable: "../../images/colortable.png" sizeTable: "../../images/colortable.png" //! [0] diff --git a/examples/quick/particles/images.qrc b/examples/quick/particles/images.qrc index 9f284a087d..1f754838a8 100644 --- a/examples/quick/particles/images.qrc +++ b/examples/quick/particles/images.qrc @@ -12,10 +12,8 @@ images/meteor.png images/meteors.png images/nullRock.png - images/particle.png images/particle2.png images/particle3.png - images/particle4.png images/particleA.png images/portal_bg.png images/realLeaf1.png @@ -27,7 +25,6 @@ images/sizeInOut.png images/snowflake.png images/sparkleSize.png - images/star.png images/starfish_0.png images/starfish_1.png images/starfish_2.png diff --git a/examples/quick/particles/images/particle.png b/examples/quick/particles/images/particle.png deleted file mode 100644 index 5c83896d22..0000000000 Binary files a/examples/quick/particles/images/particle.png and /dev/null differ diff --git a/examples/quick/particles/images/particle4.png b/examples/quick/particles/images/particle4.png deleted file mode 100644 index bc95b703c1..0000000000 Binary files a/examples/quick/particles/images/particle4.png and /dev/null differ diff --git a/examples/quick/particles/images/star.png b/examples/quick/particles/images/star.png deleted file mode 100644 index 0d592cfa87..0000000000 Binary files a/examples/quick/particles/images/star.png and /dev/null differ diff --git a/examples/quick/particles/system/content/dynamiccomparison.qml b/examples/quick/particles/system/content/dynamiccomparison.qml index 247a25a17d..9db7c0a1ec 100644 --- a/examples/quick/particles/system/content/dynamiccomparison.qml +++ b/examples/quick/particles/system/content/dynamiccomparison.qml @@ -52,7 +52,7 @@ Rectangle { ImageParticle { system: sys - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" color: "white" colorVariation: 1.0 alpha: 0.1 @@ -90,7 +90,7 @@ Rectangle { property int lifeSpan: 10000 width: 32 height: 32 - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" y: 0 PropertyAnimation on y {from: -16; to: root.height-16; duration: container.lifeSpan; running: true} SequentialAnimation on opacity { diff --git a/examples/quick/particles/system/content/dynamicemitters.qml b/examples/quick/particles/system/content/dynamicemitters.qml index 10ac33bd76..72ec1ffc23 100644 --- a/examples/quick/particles/system/content/dynamicemitters.qml +++ b/examples/quick/particles/system/content/dynamicemitters.qml @@ -51,7 +51,7 @@ Rectangle { } ImageParticle { system: sys - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" color: "white" colorVariation: 1.0 alpha: 0.1 diff --git a/examples/quick/particles/system/content/multiplepainters.qml b/examples/quick/particles/system/content/multiplepainters.qml index 8a38874533..e0a1288588 100644 --- a/examples/quick/particles/system/content/multiplepainters.qml +++ b/examples/quick/particles/system/content/multiplepainters.qml @@ -91,6 +91,6 @@ Rectangle { height: 240 width: root.width z: 1 - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" } } diff --git a/examples/quick/particles/system/content/startstop.qml b/examples/quick/particles/system/content/startstop.qml index 5ce8729a43..e787919b05 100644 --- a/examples/quick/particles/system/content/startstop.qml +++ b/examples/quick/particles/system/content/startstop.qml @@ -69,7 +69,7 @@ Rectangle { ImageParticle { anchors.fill: parent system: particles - source: "../../images/star.png" + source: "qrc:///particleresources/star.png" sizeTable: "../../images/sparkleSize.png" alpha: 0 colorVariation: 0.6 diff --git a/examples/quick/particles/system/content/timedgroupchanges.qml b/examples/quick/particles/system/content/timedgroupchanges.qml index 6443878a36..7131633769 100644 --- a/examples/quick/particles/system/content/timedgroupchanges.qml +++ b/examples/quick/particles/system/content/timedgroupchanges.qml @@ -119,7 +119,7 @@ Rectangle { ImageParticle { groups: ["works", "fire", "splode"] - source: "../../images/particle.png" + source: "qrc:///particleresources/glowdot.png" entryEffect: ImageParticle.Scale } } -- cgit v1.2.3 From 59f075df52f5e78b95b360fb0533c2249924e7a7 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Wed, 17 Apr 2013 23:03:16 +0800 Subject: Doc: Qt Quick: Fix module name format (Pt 1/2) Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33 Reviewed-by: Jerome Pasion --- examples/quick/particles/system/doc/src/system.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/quick/particles') diff --git a/examples/quick/particles/system/doc/src/system.qdoc b/examples/quick/particles/system/doc/src/system.qdoc index 04dc1727d2..2bef4c6947 100644 --- a/examples/quick/particles/system/doc/src/system.qdoc +++ b/examples/quick/particles/system/doc/src/system.qdoc @@ -53,6 +53,6 @@ \snippet quick/particles/system/content/dynamicemitters.qml 0 Note that this effect, a flurry of flying rainbow spears, would be better served with TrailEmitter. It is only done with dynamic emitters in this example to show the concept more simply. - Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for QtQuick items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle. + Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for \l {Qt Quick} items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle. */ -- cgit v1.2.3 From 0d4512c8bdfd7e1131c8633e8ad0d37c2dbc4ab3 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sun, 5 May 2013 08:08:41 +0800 Subject: Doc: Fix some broken snippet paths Change-Id: Ib79bfbea402b86e26a503de47383522317ca906b Reviewed-by: Jerome Pasion --- .../particles/affectors/doc/src/affectors.qdoc | 34 +++++++++++----------- .../customparticle/doc/src/customparticle.qdoc | 10 +++---- .../quick/particles/emitters/doc/src/emitters.qdoc | 12 ++++---- .../imageparticle/doc/src/imageparticle.qdoc | 14 ++++----- .../quick/particles/system/doc/src/system.qdoc | 10 +++---- 5 files changed, 40 insertions(+), 40 deletions(-) (limited to 'examples/quick/particles') diff --git a/examples/quick/particles/affectors/doc/src/affectors.qdoc b/examples/quick/particles/affectors/doc/src/affectors.qdoc index 58661d5b70..a1407abda2 100644 --- a/examples/quick/particles/affectors/doc/src/affectors.qdoc +++ b/examples/quick/particles/affectors/doc/src/affectors.qdoc @@ -35,7 +35,7 @@ Each example is a small QML file emphasizing a particular type or feature. Age demonstrates using an Age affector to prematurely end the lives of particles. - \snippet quick/particles/affectors/content/age.qml 0 + \snippet particles/affectors/content/age.qml 0 As you move the affector around the screen, the particles inside it (which haven't already been affected) jump to a period near the end @@ -44,7 +44,7 @@ the end of their life instantly. Attractor demonstrates using an Attractor affector to simulate a black hole - \snippet quick/particles/affectors/content/attractor.qml 0 + \snippet particles/affectors/content/attractor.qml 0 All particles in the scene, including the rocket ship's exhaust and pellets, are pulled towards the black hole. This effect is stronger closer to the black hole, so the @@ -55,58 +55,58 @@ Custom Affector manipulates the properties of the particles directly in javascript. One Affector is used to make the leaves rock back and forth as they fall, looking more leaf-like than just spinning in circles: - \snippet quick/particles/affectors/content/customaffector.qml 0 + \snippet particles/affectors/content/customaffector.qml 0 Another is used to provide a slightly varying friction to the leaves as they 'land', to look more natural: - \snippet quick/particles/affectors/content/customaffector.qml 1 + \snippet particles/affectors/content/customaffector.qml 1 Friction is similar to the falling leaves in the custom affector, except that it uses a flat friction the whole way down instead of custom affectors. - \snippet quick/particles/affectors/content/friction.qml 0 + \snippet particles/affectors/content/friction.qml 0 Gravity is a convenience affector for applying a constant acceleration to particles inside it - \snippet quick/particles/affectors/content/gravity.qml 0 + \snippet particles/affectors/content/gravity.qml 0 GroupGoal sets up two particle groups for flaming and non-flaming balls, and gives you various ways to transition between them. - \snippet quick/particles/affectors/content/groupgoal.qml unlit + \snippet particles/affectors/content/groupgoal.qml unlit The non-flaming balls have a one in a hundred chance of lighting on their own each second, but they also have a GroupGoal set on the whole group. This affector affects all particles of the unlit group, when colliding with particles in the lit group, and cause them to move to the lighting group. - \snippet quick/particles/affectors/content/groupgoal.qml lighting + \snippet particles/affectors/content/groupgoal.qml lighting lighting is an intermediate group so that the glow builds up and the transition is less jarring. So it automatically moves into the lit group after 100ms. - \snippet quick/particles/affectors/content/groupgoal.qml lit + \snippet particles/affectors/content/groupgoal.qml lit The lit group also has TrailEmitters on it for additional fire and smoke, but does not transition anywhere. There are two more GroupGoal objects that allow particles in the unlit group to transition to the lighting group (and then to the lit group). - \snippet quick/particles/affectors/content/groupgoal.qml groupgoal-pilot + \snippet particles/affectors/content/groupgoal.qml groupgoal-pilot The first is just an area bound to the location of an image of a pilot flame. When unlit balls pass through the flame, they go straight to lit because the pilot flame is so hot. - \snippet quick/particles/affectors/content/groupgoal.qml groupgoal-ma + \snippet particles/affectors/content/groupgoal.qml groupgoal-ma The second is bound to the location of the last pointer interaction, so that touching or clicking on unlit balls (which is hard due to their constant movement) causes them to move to the lighting group. Move shows some simple effects you can get by altering trajectory midway. The red particles have an affector that affects their position, jumping them forwards by 120px. - \snippet quick/particles/affectors/content/move.qml A + \snippet particles/affectors/content/move.qml A The green particles have an affector that affects their velocity, but with some angle variation. By adding some random direction velocity to their existing forwards velocity, they begin to spray off in a cone. - \snippet quick/particles/affectors/content/move.qml B + \snippet particles/affectors/content/move.qml B The blue particles have an affector that affects their acceleration, and because it sets relative to false this resets the acceleration instead of adding to it. Once the blue particles reach the affector, their horizontal velocity stops increasing as their vertical velocity decreases. - \snippet quick/particles/affectors/content/move.qml C + \snippet particles/affectors/content/move.qml C SpriteGoal has an affector which interacts with the sprite engine of particles, if they are being drawn as sprites by ImageParticle. - \snippet quick/particles/affectors/content/spritegoal.qml 0 + \snippet particles/affectors/content/spritegoal.qml 0 The SpriteGoal follows the image of the rocket ship on screen, and when it interacts with particles drawn by ImageParticle as sprites, it instructs them to move immediately to the "explode" state, which in this case is the animation of the asteroid breaking into many pieces. Turbulence has a flame with smoke, and both sets of particles being affected by a Turbulence affector. This gives a faint wind effect. - \snippet quick/particles/affectors/content/turbulence.qml 0 + \snippet particles/affectors/content/turbulence.qml 0 To make the wind change direction, subsitute a black and white noise image in the noiseSource parameter (it currently uses a default noise source). Wander uses a Wander affector to add some horizontal drift to snowflakes as they fall down. - \snippet quick/particles/affectors/content/wander.qml 0 + \snippet particles/affectors/content/wander.qml 0 There are different movements given by applying the Wander to different attributes of the trajectory, so the example makes it easy to play around and see the difference. */ diff --git a/examples/quick/particles/customparticle/doc/src/customparticle.qdoc b/examples/quick/particles/customparticle/doc/src/customparticle.qdoc index ccef82c922..fb53a67831 100644 --- a/examples/quick/particles/customparticle/doc/src/customparticle.qdoc +++ b/examples/quick/particles/customparticle/doc/src/customparticle.qdoc @@ -36,19 +36,19 @@ Blur Particles adds a blur effect to the particles, which increases over the particle's life time. It uses a custom vertex shader: - \snippet quick/particles/customparticle/content/blurparticles.qml vertex + \snippet particles/customparticle/content/blurparticles.qml vertex to propagate life time simulation to a custom fragement shader: - \snippet quick/particles/customparticle/content/blurparticles.qml fragment + \snippet particles/customparticle/content/blurparticles.qml fragment which has access to both the normal image sampler and a blurred sampler, the image plus a ShaderEffect. Fragment Shader just uses the particle system as a vertex delivery system. - \snippet quick/particles/customparticle/content/fragmentshader.qml 0 + \snippet particles/customparticle/content/fragmentshader.qml 0 Image Colors uses CustomParticle to assign colors to particles based on their location in a picture. The vertex shader, - \snippet quick/particles/customparticle/content/imagecolors.qml vertex + \snippet particles/customparticle/content/imagecolors.qml vertex passes along the starting position for each vertex to the fragment shader, - \snippet quick/particles/customparticle/content/imagecolors.qml fragment + \snippet particles/customparticle/content/imagecolors.qml fragment which uses it to determine the color for that particle. */ diff --git a/examples/quick/particles/emitters/doc/src/emitters.qdoc b/examples/quick/particles/emitters/doc/src/emitters.qdoc index 8eb7919000..acf8ce41c4 100644 --- a/examples/quick/particles/emitters/doc/src/emitters.qdoc +++ b/examples/quick/particles/emitters/doc/src/emitters.qdoc @@ -34,27 +34,27 @@ Each example is a small QML file emphasizing a particular type or feature. Velocity from motion gives the effect of strong particle motion through primarily moving the emitters: - \snippet quick/particles/emitters/content/velocityfrommotion.qml 0 + \snippet particles/emitters/content/velocityfrommotion.qml 0 Burst and pulse calls the burst and pulse methods on two idential emitters. - \snippet quick/particles/emitters/content/burstandpulse.qml 0 + \snippet particles/emitters/content/burstandpulse.qml 0 Note how burst takes an argument of number of particles to emit, and pulse takes an argument of number of milliseconds to emit for. This gives a slightly different behaviour, which is easy to see in this example. Custom Emitter connects to the emitParticles signal to set arbitrary values on particle data as they're emitted; - \snippet quick/particles/emitters/content/customemitter.qml 0 + \snippet particles/emitters/content/customemitter.qml 0 This is used to emit curving particles in six rotating spokes. Emit mask sets an image mask on the Emitter, to emit out of an arbitrary shape. - \snippet quick/particles/emitters/content/emitmask.qml 0 + \snippet particles/emitters/content/emitmask.qml 0 Maximum emitted emits no more than a certain number of particles at a time. This example makes it easy to see what happens when the limit is reached. Shape and Direction emits particles out of an unfilled Ellipse shape, using a TargetDirection - \snippet quick/particles/emitters/content/shapeanddirection.qml 0 + \snippet particles/emitters/content/shapeanddirection.qml 0 This sends the particles towards the center of the ellipse with proportional speed, keeping the ellipse outline as they move to the center. TrailEmitter uses that type to add smoke particles to trail the fire particles in the scene. - \snippet quick/particles/emitters/content/customemitter.qml 0 + \snippet particles/emitters/content/customemitter.qml 0 */ diff --git a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc index c8f2dc988b..4fda13746a 100644 --- a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc +++ b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc @@ -35,25 +35,25 @@ Each example is a small QML file emphasizing a particular type or feature. All at once shows off several of the features of ImageParticle at the same time. - \snippet quick/particles/imageparticle/content/allatonce.qml 0 + \snippet particles/imageparticle/content/allatonce.qml 0 Colored shows a simple ImageParticle with some color variation. - \snippet quick/particles/imageparticle/content/colored.qml 0 + \snippet particles/imageparticle/content/colored.qml 0 Color Table sets the color over life on the particles to provide a fixed rainbow effect. - \snippet quick/particles/imageparticle/content/colortable.qml 0 + \snippet particles/imageparticle/content/colortable.qml 0 Deformation spins and squishes a starfish particle. - \snippet quick/particles/imageparticle/content/deformation.qml spin - \snippet quick/particles/imageparticle/content/deformation.qml deform + \snippet particles/imageparticle/content/deformation.qml spin + \snippet particles/imageparticle/content/deformation.qml deform Rotation demonstrates the autoRotate property, so that particles rotate in the direction that they travel. Sharing demonstrates what happens when multiple ImageParticles try to render the same particle. The following ImageParticle renders the particles inside the ListView: - \snippet quick/particles/imageparticle/content/sharing.qml 0 + \snippet particles/imageparticle/content/sharing.qml 0 The following ImageParticle is placed inside the list highlight, and renders the particles above the other ImageParticle. - \snippet quick/particles/imageparticle/content/sharing.qml 1 + \snippet particles/imageparticle/content/sharing.qml 1 Note that because it sets the color and alpha in this ImageParticle, it renders the particles in a different color. Since it doesn't specify anything about the rotation, it shares the rotation with the other ImageParticle so that the flowers are rotated the same way in both. Note that you can undo rotation in another ImageParticle, you just need to explicity set rotationVariation to 0. diff --git a/examples/quick/particles/system/doc/src/system.qdoc b/examples/quick/particles/system/doc/src/system.qdoc index 2bef4c6947..99be23d9d1 100644 --- a/examples/quick/particles/system/doc/src/system.qdoc +++ b/examples/quick/particles/system/doc/src/system.qdoc @@ -35,7 +35,7 @@ Each example is a small QML file emphasizing a particular type or feature. Dynamic comparison compares using the particle system to getting a similar effect with the following code that dynamically instantiates Image types. - \snippet quick/particles/system/content/dynamiccomparison.qml fake + \snippet particles/system/content/dynamiccomparison.qml fake Note how the Image objects are not able to be randomly colorized. Start and Stop simply sets the running and paused states of a ParticleSystem. While the system does not perform any simulation when stopped or paused, a restart restarts the simulation from the beginning, while unpausing resumes the simulation from where it was. @@ -43,14 +43,14 @@ Timed group changes is an example that highlights the ParticleGroup type. While normally referring to groups with a string name is sufficient, additional effects can be done by setting properties on groups. The first group has a variable duration on it, but always transitions to the second group. - \snippet quick/particles/system/content/timedgroupchanges.qml 0 + \snippet particles/system/content/timedgroupchanges.qml 0 The second group has a TrailEmitter on it, and a fixed duration for emitting into the third group. By placing the TrailEmitter as a direct child of the ParticleGroup, it automatically selects that group to follow. - \snippet quick/particles/system/content/timedgroupchanges.qml 1 + \snippet particles/system/content/timedgroupchanges.qml 1 The third group has an Affector as a direct child, which makes the affector automatically target this group. The affector means that as soon as particles enter this group, a burst function can be called on another emitter, using the x,y positions of this particle. - \snippet quick/particles/system/content/timedgroupchanges.qml 2 + \snippet particles/system/content/timedgroupchanges.qml 2 If TrailEmitter does not suit your needs for multiple emitters, you can also dynamically create Emitters while still using the same ParticleSystem and image particle - \snippet quick/particles/system/content/dynamicemitters.qml 0 + \snippet particles/system/content/dynamicemitters.qml 0 Note that this effect, a flurry of flying rainbow spears, would be better served with TrailEmitter. It is only done with dynamic emitters in this example to show the concept more simply. Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for \l {Qt Quick} items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle. -- cgit v1.2.3