summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/controls/Logo.qml
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-05-24 12:09:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-05-24 12:10:02 +0100
commit77d294db076dac19e8b549b445ffede9f7260c84 (patch)
tree828ee7a6862ec5c0bd24f97cb540625a2c647376 /examples/qt3d/controls/Logo.qml
parent59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff)
parent939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff)
Merge branch 'dev' into wip/animationwip/animation
Diffstat (limited to 'examples/qt3d/controls/Logo.qml')
-rw-r--r--examples/qt3d/controls/Logo.qml14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/qt3d/controls/Logo.qml b/examples/qt3d/controls/Logo.qml
index a686e29bd..2eb9abd1a 100644
--- a/examples/qt3d/controls/Logo.qml
+++ b/examples/qt3d/controls/Logo.qml
@@ -56,6 +56,18 @@ import Qt3D.Extras 2.0
Entity {
id: sceneRoot
+ readonly property double cameraZ: camera.position.z
+
+ function viewAll() {
+ camera.viewAll()
+ }
+ function viewLogo() {
+ camera.viewEntity(logoEntity)
+ }
+ function setPositionZ(z) {
+ camera.position = Qt.vector3d( 0.0, 0.0, z )
+ }
+
Camera {
id: camera
projectionType: CameraLens.PerspectiveProjection
@@ -63,7 +75,7 @@ Entity {
aspectRatio: 4/3
nearPlane : 0.1
farPlane : 1000.0
- position: Qt.vector3d( 0.0, 0.0, viewCenter_z.value )
+ position: Qt.vector3d( 0.0, 0.0, 7.5 )
upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
}