| 1 |
// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
import Qt3D.Core 2.10 |
| 5 |
import Qt3D.Render 2.10 |
| 6 |
import Qt3D.Input 2.0 |
| 7 |
import Qt3D.Extras 2.10 |
| 8 |
|
| 9 |
Entity { |
| 10 |
id: root |
| 11 |
|
| 12 |
components: [ |
| 13 |
RenderSettings { |
| 14 |
activeFrameGraph: ForwardRenderer { |
| 15 |
camera: mainCamera |
| 16 |
} |
| 17 |
}, |
| 18 |
// Event Source will be set by the Qt3DQuickWindow |
| 19 |
InputSettings { } |
| 20 |
] |
| 21 |
|
| 22 |
Camera { |
| 23 |
id: mainCamera |
| 24 |
position: Qt.vector3d(2.5, 0.8, 5) |
| 25 |
viewCenter: Qt.vector3d(2.5, 0.8, 0) |
| 26 |
fieldOfView: 60 |
| 27 |
} |
| 28 |
|
| 29 |
OrbitCameraController { |
| 30 |
camera: mainCamera |
| 31 |
linearSpeed: 10 |
| 32 |
lookSpeed: 180 |
| 33 |
} |
| 34 |
|
| 35 |
Entity { |
| 36 |
components: [ |
| 37 |
PointLight { |
| 38 |
enabled: parent.enabled |
| 39 |
color: "black" |
| 40 |
intensity: 0 |
| 41 |
}, |
| 42 |
EnvironmentLight { |
| 43 |
enabled: parent.enabled |
| 44 |
|
| 45 |
irradiance: TextureLoader { |
| 46 |
source: "qrc:/assets/envmaps/cedar-bridge/cedar_bridge_irradiance.dds" |
| 47 |
wrapMode { |
| 48 |
x: WrapMode.ClampToEdge |
| 49 |
y: WrapMode.ClampToEdge |
| 50 |
} |
| 51 |
generateMipMaps: false |
| 52 |
} |
| 53 |
specular: TextureLoader { |
| 54 |
source: "qrc:/assets/envmaps/cedar-bridge/cedar_bridge_specular.dds" |
| 55 |
wrapMode { |
| 56 |
x: WrapMode.ClampToEdge |
| 57 |
y: WrapMode.ClampToEdge |
| 58 |
} |
| 59 |
generateMipMaps: false |
| 60 |
} |
| 61 |
} |
| 62 |
] |
| 63 |
|
| 64 |
SkyboxEntity { |
| 65 |
baseName: "qrc:/assets/envmaps/cedar-bridge/cedar_bridge_irradiance" |
| 66 |
extension: ".dds" |
| 67 |
} |
| 68 |
} |
| 69 |
} |