presenter: tweak the particles so they can be seen on white background

This commit is contained in:
Aleix Pol 2019-07-20 10:06:26 +02:00
parent 0d26b037c4
commit 2ef3c0ce54
2 changed files with 33 additions and 11 deletions

View file

@ -38,7 +38,14 @@ Item {
y: root.height * root.yPos - height/2 y: root.height * root.yPos - height/2
ImageParticle { ImageParticle {
groups: ["center", "edge"] groups: ["center"]
anchors.fill: parent
source: "qrc:///particleresources/glowdot.png"
colorVariation: 0.1
color: "#FF9999FF"
}
ImageParticle {
groups: ["edge"]
anchors.fill: parent anchors.fill: parent
source: "qrc:///particleresources/glowdot.png" source: "qrc:///particleresources/glowdot.png"
colorVariation: 0.1 colorVariation: 0.1
@ -48,9 +55,9 @@ Item {
Emitter { Emitter {
anchors.fill: parent anchors.fill: parent
group: "center" group: "center"
emitRate: 400 emitRate: 900
lifeSpan: 200 lifeSpan: 200
size: 20 size: 20 * Window.screen.devicePixelRatio
sizeVariation: 2 sizeVariation: 2
endSize: 0 endSize: 0
//! [0] //! [0]
@ -68,11 +75,11 @@ Item {
anchors.fill: parent anchors.fill: parent
group: "edge" group: "edge"
startTime: 200 startTime: 200
emitRate: 200 emitRate: 2000
lifeSpan: 20 lifeSpan: 20
size: 28 size: 28 * Window.screen.devicePixelRatio
sizeVariation: 2 sizeVariation: 2 * Window.screen.devicePixelRatio
endSize: 16 endSize: 16 * Window.screen.devicePixelRatio
shape: EllipseShape {fill: false} shape: EllipseShape {fill: false}
velocity: TargetDirection { velocity: TargetDirection {
targetX: particles.width/2 targetX: particles.width/2
@ -82,8 +89,8 @@ Item {
magnitudeVariation: 0.1 magnitudeVariation: 0.1
} }
acceleration: TargetDirection { acceleration: TargetDirection {
targetX: particles.width/2 targetX: particles.width
targetY: particles.height/2 targetY: particles.height
targetVariation: 200 targetVariation: 200
proportionalMagnitude: true proportionalMagnitude: true
magnitude: 0.1 magnitude: 0.1

View file

@ -1,8 +1,8 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Layouts 1.10
Rectangle Item
{ {
color: "red"
width: 500 width: 500
height: 500 height: 500
@ -12,6 +12,21 @@ Rectangle
hoverEnabled: true hoverEnabled: true
} }
RowLayout {
id: layout
anchors.fill: parent
spacing: 0
Repeater {
id: rep
model: [ "white", "yellow", "red", "blue", "gray", "black" ]
delegate: Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: modelData
}
}
}
Presenter { Presenter {
anchors.fill: parent anchors.fill: parent