Warning, /education/gcompris/src/core/ParticleSystemStar.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - ParticleSystemStar.qml
0002  *
0003  * SPDX-FileCopyrightText: 2014 Bruno Coudoin <bruno.coudoin@gcompris.net>
0004  *
0005  * Authors:
0006  *   Bruno Coudoin <bruno.coudoin@gcompris.net>
0007  *
0008  *   SPDX-License-Identifier: GPL-3.0-or-later
0009  */
0010 import QtQuick 2.12
0011 import QtQuick.Particles 2.12
0012 import GCompris 1.0
0013 
0014 /**
0015  * A ParticleSystem component using star image particles.
0016  * @ingroup components
0017  *
0018  * Used for click effects.
0019  *
0020  * Because of problems on some Android devices leading to crashes must be
0021  * used via the wrapper @ref ParticleSystemStarLoader.
0022  *
0023  * @inherit QtQuick.ParticleSystem
0024  * @sa ParticleSystemStarLoader
0025  */
0026 ParticleSystem {
0027     id: particles
0028     anchors.fill: parent
0029     running: false
0030 
0031     /// @cond INTERNAL_DOCS
0032 
0033     property alias emitter: clickedEmitter
0034     property alias clip: imageParticle.clip
0035     /// @endcond
0036 
0037     Emitter {
0038         id: clickedEmitter
0039         anchors.fill: parent
0040         emitRate: 20
0041         lifeSpan: 800
0042         lifeSpanVariation: 400
0043         sizeVariation: 12
0044         size: 24 * ApplicationInfo.ratio
0045         system: particles
0046         velocity: PointDirection {xVariation: 100; yVariation: 100;}
0047         acceleration: PointDirection {xVariation: 50; yVariation: 50;}
0048         velocityFromMovement: 50
0049         enabled: false
0050     }
0051     ImageParticle {
0052         id: imageParticle
0053         source: "qrc:/gcompris/src/core/resource/star.png"
0054         anchors.fill: parent
0055         color: "white"
0056         blueVariation: 0.5
0057         greenVariation: 0.5
0058         redVariation: 0.5
0059         clip: true
0060         smooth: false
0061         autoRotation: true
0062     }
0063 }