diff options
Diffstat (limited to 'tradeshow/iot-sensortag/resources/base/RotationPage.qml')
-rw-r--r-- | tradeshow/iot-sensortag/resources/base/RotationPage.qml | 106 |
1 files changed, 13 insertions, 93 deletions
diff --git a/tradeshow/iot-sensortag/resources/base/RotationPage.qml b/tradeshow/iot-sensortag/resources/base/RotationPage.qml index 60b2d09..6f42058 100644 --- a/tradeshow/iot-sensortag/resources/base/RotationPage.qml +++ b/tradeshow/iot-sensortag/resources/base/RotationPage.qml @@ -54,24 +54,18 @@ import QtQuick.Particles 2.0 Item { id: dialerRoot property var sensor: null - anchors.fill: parent focus: true Image { - id: outerRing - anchors.fill: parent - fillMode: Image.PreserveAspectFit - source: pathPrefix + "Gyro/ring_outer.png" - z: parent.z + 1 + id: ring + anchors.centerIn: parent + source: pathPrefix + "Gyro/gyro_outer.png" } Image { - id: largeRing + id: outerRing anchors.centerIn: parent - width: outerRing.width * 0.8 - fillMode: Image.PreserveAspectFit - source: pathPrefix + "Gyro/ring_large.png" + source: pathPrefix + "Gyro/gyro_ring3.png" rotation: sensor.rotationX - z: parent.z + 2 Behavior on rotation { RotationAnimation { easing.type: Easing.Linear @@ -81,13 +75,10 @@ Item { } } Image { - id: mediumRing + id: largeRing anchors.centerIn: parent - width: outerRing.width * 0.6 - fillMode: Image.PreserveAspectFit - source: pathPrefix + "Gyro/ring_medium.png" + source: pathPrefix + "Gyro/gyro_ring2.png" rotation: sensor.rotationY - z: parent.z + 3 Behavior on rotation { RotationAnimation { easing.type: Easing.Linear @@ -97,13 +88,10 @@ Item { } } Image { - id: centerRing + id: mediumRing anchors.centerIn: parent - width: outerRing.width * 0.4 - fillMode: Image.PreserveAspectFit - source: pathPrefix + "Gyro/ring_small.png" + source: pathPrefix + "Gyro/gyro_ring1.png" rotation: sensor.rotationZ - z: parent.z + 4 Behavior on rotation { RotationAnimation { easing.type: Easing.Linear @@ -112,77 +100,9 @@ Item { } } } - ParticleSystem { - id: particles - anchors.fill: parent - z: parent.z + 5 - ImageParticle { - source: pathPrefix + "Gyro/particle.png" - alpha: 0 - colorVariation: 0.2 - } - Emitter { - property int rateToEmit: Math.abs(sensor.gyroscopeZ_degPerSec) * 4 - id: centerEmitter - x: centerRing.x - y: centerRing.y - width: centerRing.width - height: centerRing.height - emitRate: rateToEmit > 400 ? rateToEmit : 0 - lifeSpan: 1000 - enabled: true - shape: EllipseShape { - fill: false - } - velocity: AngleDirection{ - magnitude: 100 - angleVariation: 0 - angle: 90 - } - size: particles.width / 200 - sizeVariation: 3 - } - Emitter { - property int rateToEmit: Math.abs(sensor.gyroscopeY_degPerSec) * 4 - id: midEmitter - x: mediumRing.x - y: mediumRing.y - width: mediumRing.width - height: mediumRing.height - emitRate: rateToEmit > 400 ? rateToEmit : 0 - lifeSpan: 1000 - enabled: true - shape: EllipseShape { - fill: false - } - velocity: AngleDirection{ - magnitude: 100 - angleVariation: 0 - angle: 90 - } - size: particles.width / 200 - sizeVariation: 3 - } - Emitter { - property int rateToEmit: Math.abs(sensor.gyroscopeX_degPerSec) * 4 - id: largeEmitter - x: largeRing.x - y: largeRing.y - width: largeRing.width - height: largeRing.height - emitRate: rateToEmit > 400 ? rateToEmit : 0 - lifeSpan: 1000 - enabled: true - shape: EllipseShape { - fill: false - } - velocity: AngleDirection{ - magnitude: 100 - angleVariation: 0 - angle: 90 - } - size: particles.width / 200 - sizeVariation: 3 - } + Image { + id: centerRing + anchors.centerIn: parent + source: pathPrefix + "Gyro/gyro_center.png" } } |