diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-01-26 16:45:00 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-01-27 21:14:54 +0000 |
commit | 2b66b38004d30a6ef607565e1cbeb559ed83213b (patch) | |
tree | e2179cfdcb558b00e5235a74e5aafa1ff878b73d /tests/manual/animation-keyframe-simple/main.qml | |
parent | 744c51c33e4da37bb70528f5398e56e5faf5c504 (diff) |
Add job to process running clip animators
Introduces more logic to QNode::sceneChangeEvent to set
properties being animated without every QNode subclass
needing to override it. We can like do a follow up commit
that removes some such overrides.
Change-Id: I2a96e0929b2fbd39ca3866908fee11c842bede42
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/manual/animation-keyframe-simple/main.qml')
-rw-r--r-- | tests/manual/animation-keyframe-simple/main.qml | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/manual/animation-keyframe-simple/main.qml b/tests/manual/animation-keyframe-simple/main.qml index e53772434..38b898b93 100644 --- a/tests/manual/animation-keyframe-simple/main.qml +++ b/tests/manual/animation-keyframe-simple/main.qml @@ -20,6 +20,11 @@ DefaultSceneEntity { id: cube components: [ + Transform { + id: cubeTransform + + onTranslationChanged: console.log("t = " + translation) + }, CuboidMesh { }, PhongMaterial { @@ -28,14 +33,16 @@ DefaultSceneEntity { diffuse: "blue" shininess: 50 }, - Transform { - id: cubeTransform + ObjectPicker { + onClicked: animator.running = true }, ClipAnimator { - running: true + id: animator + + onRunningChanged: console.log("running = " + running) + clip: AnimationClip { source: "cubeanimation.json" - onDurationChanged: console.log("duration = " + duration) } @@ -52,13 +59,12 @@ DefaultSceneEntity { ] } } - ] } camera: Camera { - position: Qt.vector3d(10, 10, 10) - viewCenter: Qt.vector3d(0, 0, 0) + position: Qt.vector3d(10, 3, 15) + viewCenter: Qt.vector3d(2.5, 1, 0) } OrbitCameraController { |