| 1 |
/**************************************************************************** |
| 2 |
** |
| 3 |
** Copyright (C) 2017 The Qt Company Ltd. |
| 4 |
** Contact: https://www.qt.io/licensing/ |
| 5 |
** |
| 6 |
** This file is part of the documentation of the Qt Toolkit. |
| 7 |
** |
| 8 |
** $QT_BEGIN_LICENSE:FDL$ |
| 9 |
** Commercial License Usage |
| 10 |
** Licensees holding valid commercial Qt licenses may use this file in |
| 11 |
** accordance with the commercial license agreement provided with the |
| 12 |
** Software or, alternatively, in accordance with the terms contained in |
| 13 |
** a written agreement between you and The Qt Company. For licensing terms |
| 14 |
** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 |
** information use the contact form at https://www.qt.io/contact-us. |
| 16 |
** |
| 17 |
** GNU Free Documentation License Usage |
| 18 |
** Alternatively, this file may be used under the terms of the GNU Free |
| 19 |
** Documentation License version 1.3 as published by the Free Software |
| 20 |
** Foundation and appearing in the file included in the packaging of |
| 21 |
** this file. Please review the following information to ensure |
| 22 |
** the GNU Free Documentation License version 1.3 requirements |
| 23 |
** will be met: https://www.gnu.org/licenses/fdl-1.3.html. |
| 24 |
** $QT_END_LICENSE$ |
| 25 |
** |
| 26 |
****************************************************************************/ |
| 27 |
|
| 28 |
/*! |
| 29 |
\title Qt Quick Particles Examples - Image Particles |
| 30 |
\example particles/imageparticle |
| 31 |
\brief This is a collection of examples using Affectors in the QML particle system. |
| 32 |
\image qml-imageparticle-example.png |
| 33 |
|
| 34 |
This is a collection of small QML examples relating to using Affectors in the particle system. |
| 35 |
Each example is a small QML file emphasizing a particular type or feature. |
| 36 |
|
| 37 |
All at once shows off several of the features of ImageParticle at the same time. |
| 38 |
\snippet particles/imageparticle/content/allatonce.qml 0 |
| 39 |
|
| 40 |
Colored shows a simple ImageParticle with some color variation. |
| 41 |
\snippet particles/imageparticle/content/colored.qml 0 |
| 42 |
|
| 43 |
Color Table sets the color over life on the particles to provide a fixed rainbow effect. |
| 44 |
\snippet particles/imageparticle/content/colortable.qml 0 |
| 45 |
|
| 46 |
Deformation spins and squishes a starfish particle. |
| 47 |
\snippet particles/imageparticle/content/deformation.qml spin |
| 48 |
\snippet particles/imageparticle/content/deformation.qml deform |
| 49 |
|
| 50 |
Rotation demonstrates the autoRotate property, so that particles rotate in the direction that they travel. |
| 51 |
|
| 52 |
Sharing demonstrates what happens when multiple ImageParticles try to render the same particle. |
| 53 |
The following ImageParticle renders the particles inside the ListView: |
| 54 |
\snippet particles/imageparticle/content/sharing.qml 0 |
| 55 |
The following ImageParticle is placed inside the list highlight, and renders the particles above the other ImageParticle. |
| 56 |
\snippet particles/imageparticle/content/sharing.qml 1 |
| 57 |
Note that because it sets the color and alpha in this ImageParticle, it renders the particles in a different color. |
| 58 |
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. |
| 59 |
Note that you can undo rotation in another ImageParticle, you just need to explicitly set rotationVariation to 0. |
| 60 |
|
| 61 |
Sprites demonstrates using an image particle to render animated sprites instead of static images for each particle. |
| 62 |
*/ |