Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/3dview/SceneEntity.qml
Show All 28 Lines | |||||
29 | 29 | | |||
30 | Entity { | 30 | Entity { | ||
31 | id: sceneRoot | 31 | id: sceneRoot | ||
32 | property string currentFile | 32 | property string currentFile | ||
33 | 33 | | |||
34 | Camera { | 34 | Camera { | ||
35 | id: camera | 35 | id: camera | ||
36 | fieldOfView: 45 | 36 | fieldOfView: 45 | ||
37 | position: Qt.vector3d( 10.0, -10.0, 35.0 ) | 37 | position: lineMesh.center.plus(Qt.vector3d(0.0, -20.0, 20.0)) | ||
38 | upVector: Qt.vector3d( 0.0, 0.85, 0.75 ) | 38 | upVector: Qt.vector3d(0.0, 1.0, 0.0) | ||
39 | viewCenter: Qt.vector3d( 10.0, 10.0, 0.0 ) | 39 | viewCenter: lineMesh.center | ||
patrickelectric: ha ! much better. | |||||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | FirstPersonCameraController { camera: camera } | 42 | FirstPersonCameraController { camera: camera } | ||
43 | 43 | | |||
44 | components: [ | 44 | components: [ | ||
45 | RenderSettings { | 45 | RenderSettings { | ||
46 | activeFrameGraph: ForwardRenderer { | 46 | activeFrameGraph: ForwardRenderer { | ||
47 | camera: camera | 47 | camera: camera | ||
Show All 10 Lines | 53 | Entity { | |||
58 | ] | 58 | ] | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | Entity { | 61 | Entity { | ||
62 | id: lineEntity | 62 | id: lineEntity | ||
63 | components: [ | 63 | components: [ | ||
64 | PhongMaterial { ambient: "darkGreen" }, | 64 | PhongMaterial { ambient: "darkGreen" }, | ||
65 | LineMesh { | 65 | LineMesh { | ||
66 | id: lineMesh | ||||
66 | readonly property string currentFile: sceneRoot.currentFile | 67 | readonly property string currentFile: sceneRoot.currentFile | ||
67 | onCurrentFileChanged: readAndRun(currentFile) | 68 | onCurrentFileChanged: readAndRun(currentFile) | ||
68 | } | 69 | } | ||
69 | ] | 70 | ] | ||
70 | } | 71 | } | ||
71 | } | 72 | } |
ha ! much better.