diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-07-04 08:52:19 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2014-07-05 19:05:52 +0200 |
commit | 64440f53b68acea15fa4a612f59cbf560514c4cc (patch) | |
tree | c608afc8522740c2a59092f050e69ddc1873aaae /examples | |
parent | f9e136d875b2f716d26f109820c7d990d650ae86 (diff) |
Force root object of aspects to be an Entity
This will have two benefits :
* Reduce confusion for users who might not know when to use a Node or an
Entity
* Simplify the backend which otherwise is forced to check for Nodes and Entity
when only Entity matter
Change-Id: I5877a48934806ab4a2292396fda5e33098e0bb71
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/assimp/main.qml | 58 | ||||
-rw-r--r-- | examples/gltf/main.qml | 2 | ||||
-rw-r--r-- | examples/multiviewport/main.qml | 2 | ||||
-rw-r--r-- | examples/simple-qml/main.qml | 2 |
4 files changed, 29 insertions, 35 deletions
diff --git a/examples/assimp/main.qml b/examples/assimp/main.qml index a51cf78e1..22ef28997 100644 --- a/examples/assimp/main.qml +++ b/examples/assimp/main.qml @@ -43,40 +43,34 @@ import Qt3D 2.0 import Qt3D.Render 2.0 import QtQuick 2.1 as QQ2 -Node +Entity { - id: root - objectName: "root" - - Entity - { - components: FrameGraph { - activeFrameGraph: Viewport { - rect: Qt.rect(0, 0, 1, 1) - CameraSelector { - camera: Entity { - id : camera - components : [ - Transform { - LookAt { - position: Qt.vector3d( 0.0, 0.0, -20.0 ) - upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) - viewCenter: Qt.vector3d( 0.0, 0.0, 10.0 ) - } - Rotate { - angle : -30 - axis : Qt.vector3d(0, 1, 0) - } - }, - CameraLens { - projectionType: CameraLens.PerspectiveProjection - fieldOfView: 60 - aspectRatio: 16/9 - nearPlane : 0.01 - farPlane : 1000.0 + components: FrameGraph { + activeFrameGraph: Viewport { + rect: Qt.rect(0, 0, 1, 1) + CameraSelector { + camera: Entity { + id : camera + components : [ + Transform { + LookAt { + position: Qt.vector3d( 0.0, 0.0, -20.0 ) + upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) + viewCenter: Qt.vector3d( 0.0, 0.0, 10.0 ) + } + Rotate { + angle : -30 + axis : Qt.vector3d(0, 1, 0) } - ] - } + }, + CameraLens { + projectionType: CameraLens.PerspectiveProjection + fieldOfView: 60 + aspectRatio: 16/9 + nearPlane : 0.01 + farPlane : 1000.0 + } + ] } } } diff --git a/examples/gltf/main.qml b/examples/gltf/main.qml index d9697acef..857465565 100644 --- a/examples/gltf/main.qml +++ b/examples/gltf/main.qml @@ -49,7 +49,7 @@ import Qt3D.Render 2.0 // QtQuick 2.1 all over the place. import QtQuick 2.1 as QQ2 -Node { +Entity { id: root objectName: "root" diff --git a/examples/multiviewport/main.qml b/examples/multiviewport/main.qml index 02c45216c..c709456be 100644 --- a/examples/multiviewport/main.qml +++ b/examples/multiviewport/main.qml @@ -44,7 +44,7 @@ import Qt3D 2.0 import Qt3D.Render 2.0 -Node { +Entity { id : rootNode CameraLens { diff --git a/examples/simple-qml/main.qml b/examples/simple-qml/main.qml index 5a8c8688f..ec3223672 100644 --- a/examples/simple-qml/main.qml +++ b/examples/simple-qml/main.qml @@ -50,7 +50,7 @@ import Qt3D.Render 2.0 // QtQuick 2.1 all over the place. import QtQuick 2.1 as QQ2 -Node { +Entity { id: root objectName: "root" |