summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/scene3d
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/scene3d')
-rw-r--r--examples/qt3d/scene3d/AnimatedEntity.qml15
-rw-r--r--examples/qt3d/scene3d/main.qml6
2 files changed, 5 insertions, 16 deletions
diff --git a/examples/qt3d/scene3d/AnimatedEntity.qml b/examples/qt3d/scene3d/AnimatedEntity.qml
index ba7cf4ff1..c09f48d7a 100644
--- a/examples/qt3d/scene3d/AnimatedEntity.qml
+++ b/examples/qt3d/scene3d/AnimatedEntity.qml
@@ -47,7 +47,6 @@ Entity {
id: camera
projectionType: CameraLens.PerspectiveProjection
fieldOfView: 45
- aspectRatio: 16/9
nearPlane : 0.1
farPlane : 1000.0
position: Qt.vector3d( 0.0, 0.0, 40.0 )
@@ -59,19 +58,9 @@ Entity {
components: [
FrameGraph {
- activeFrameGraph: Viewport {
- id: viewport
- rect: Qt.rect(0.0, 0.0, 1.0, 1.0) // From Top Left
+ activeFrameGraph: ForwardRenderer {
+ camera: camera
clearColor: "transparent"
-
- CameraSelector {
- id : cameraSelector
- camera: camera
-
- ClearBuffer {
- buffers : ClearBuffer.ColorDepthBuffer
- }
- }
}
}
]
diff --git a/examples/qt3d/scene3d/main.qml b/examples/qt3d/scene3d/main.qml
index 6419309a8..9e5dbd0bd 100644
--- a/examples/qt3d/scene3d/main.qml
+++ b/examples/qt3d/scene3d/main.qml
@@ -64,9 +64,8 @@ Item {
Rectangle {
id: scene
- width: Math.min(parent.width, parent.height) - 100
- height: width
- anchors.centerIn: parent
+ anchors.fill: parent
+ anchors.margins: 50
color: "darkRed"
transform: Rotation {
@@ -84,6 +83,7 @@ Item {
anchors.margins: 10
focus: true
aspects: "input"
+ cameraAspectRatioMode: Scene3D.AutomaticAspectRatio
AnimatedEntity {}
}