The ParticleVPlay seems not to be starting. it throws this output
“CustomParticle: Too few particles…”
How can i create a particle effect around or in the rectangle
Here is the QML code
import QtQuick 2.0
import Felgo 3.0
Item {
anchors.fill: gameWindowAnchorItem
Rectangle {
id: rectangle1
color: "#ffffff"
width: 250
height: 250
radius: 6
anchors.centerIn: parent
ParticleVPlay {
id: fireParticle
// Particle location properties
x: parent.width/2
y: parent.height/2
rotation: 90
// particle file
fileName: "../particles/fireParticle.json"
// start when finished loading
autoStart: true
}
MouseArea {
anchors.fill: parent
onClicked: {
// position the fire particle emitter (=origin) to the position of the mouse
fireParticle.x = mouseX
fireParticle.y = mouseY
// this rotates the fire particle direction 45 degrees clockwise with every click
fireParticle.rotation += 45
}
onPositionChanged: {
// while the mouse is pressed (=dragged), also change the position
fireParticle.x = mouseX
fireParticle.y = mouseY
}
}
}
}
Here is the particle json file
{ "FireParticle" : { "angle" : 0.0, "angleVariance" : 0.0, "duration" : 0.0, "emitterType" : 0.0, "finishColor" : "#000000", "finishColorAlpha" : 0.0, "finishColorVariance" : "#000000", "finishColorVarianceAlpha" : 0.0, "finishParticleSize" : 45.0, "finishParticleSizeVariance" : 10.0, "gravity" : "0.0, 0.0", "maxParticles" : 42.0, "maxRadius" : 0.0, "maxRadiusVariance" : 0.0, "minRadius" : 0.0, "minRadiusVariance" : 0.0, "particleLifespan" : 0.9000000000000000222, "particleLifespanVariance" : 0.2000000000000000111, "positionType" : 0.0, "radialAccelVariance" : 0.0, "radialAcceleration" : 0.0, "rotatePerSecond" : 0.0, "rotatePerSecondVariance" : 0.0, "rotationEnd" : 0.0, "rotationEndVariance" : 0.0, "rotationStart" : 0.0, "rotationStartVariance" : 0.0, "sourcePositionVariance" : "0.0, 0.0", "speed" : 85.0, "speedVariance" : 2.0, "startColor" : "#fae6e0", "startColorAlpha" : 0.6000000000000000222, "startColorVariance" : "#000000", "startColorVarianceAlpha" : 0.2000000000000000111, "startParticleSize" : 7.0, "startParticleSizeVariance" : 2.0, "tangentialAccelVariance" : 0.0, "tangentialAcceleration" : 0.0, "textureFileName" : "particleFire.png", "visible" : true, "x" : 0.0, "y" : 0.0 } }