Debian Codegraph @

tests/auto/extras/qtext2dentity/qtext2dentity.qml

raw
1 // Copyright (C) 2019 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import Qt3D.Core 2.0
5 import Qt3D.Render 2.0
6 import Qt3D.Input 2.0
7 import Qt3D.Extras 2.9
8
9 Entity {
10 id: sceneRoot
11 property alias text2DEntity: text
12 Camera {
13 id: camera
14 projectionType: CameraLens.PerspectiveProjection
15 fieldOfView: 45
16 aspectRatio: 16/9
17 nearPlane : 0.1
18 farPlane : 1000.0
19 position: Qt.vector3d( 0.0, 0.0, 140.0 )
20 upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
21 viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
22 }
23
24 OrbitCameraController {
25 camera: camera
26 }
27
28 components: [
29 RenderSettings {
30 activeFrameGraph: ForwardRenderer {
31 clearColor: Qt.rgba(1, 1, 1, 1)
32 camera: camera
33 }
34 },
35 // Event Source will be set by the Qt3DQuickWindow
36 InputSettings { }
37 ]
38
39 Text2DEntity {
40 id: text
41 text: "foo"
42 width: 200
43 height: 40
44 color: "darkgrey"
45 }
46 }