summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/keyboardinput-qml/SphereEntity.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/keyboardinput-qml/SphereEntity.qml')
-rw-r--r--examples/qt3d/keyboardinput-qml/SphereEntity.qml17
1 files changed, 5 insertions, 12 deletions
diff --git a/examples/qt3d/keyboardinput-qml/SphereEntity.qml b/examples/qt3d/keyboardinput-qml/SphereEntity.qml
index 4ed05dcd8..3f445cc2f 100644
--- a/examples/qt3d/keyboardinput-qml/SphereEntity.qml
+++ b/examples/qt3d/keyboardinput-qml/SphereEntity.qml
@@ -41,10 +41,7 @@ import QtQuick 2.3 as QQ2
Entity {
id: root
-
- property alias x: translate.dx
- property alias y: translate.dy
- property alias z: translate.dz
+ property alias position: transform.translation
property alias color: material.diffuse
property alias input: input
@@ -54,17 +51,13 @@ Entity {
Transform {
id: transform
+ scale: root.input.focus ? 2 : 1
- Scale {
- scale: root.input.focus ? 2 : 1
-
- QQ2.Behavior on scale {
- QQ2.NumberAnimation {
- duration: 250
- }
+ QQ2.Behavior on scale {
+ QQ2.NumberAnimation {
+ duration: 250
}
}
- Translate { id: translate }
}
KeyboardInput { id: input }