Debian Codegraph @

tests/manual/wave/main.qml

raw
1 // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import QtQuick 2.1 as QQ2
5 import Qt3D.Core 2.0
6 import Qt3D.Render 2.0
7 import Qt3D.Input 2.0
8 import Qt3D.Extras 2.0
9
10 Entity {
11 id: root
12
13 KeyboardDevice { id: keyboard1 }
14
15 KeyboardHandler {
16 id: input
17 sourceDevice: keyboard1
18 focus: true
19
20 onTabPressed: {
21 background.animateColors = !background.animateColors
22 }
23
24 onSpacePressed: {
25 wave.wireframe = !wave.wireframe
26 }
27 }
28
29 RenderSettings {
30 id: renderSettings
31 activeFrameGraph: WaveForwardRenderer {
32 camera: mainCamera
33 }
34 }
35
36 components: [ renderSettings, input, inputSettings ]
37
38 // Event Source will be set by the Qt3DQuickWindow
39 InputSettings { id: inputSettings }
40
41 BasicCamera {
42 id: mainCamera
43 position: Qt.vector3d( 0.0, 10.0, 25.0 )
44 }
45
46 FirstPersonCameraController { camera: mainCamera }
47
48 Background {
49 id: background
50 layer: renderSettings.activeFrameGraph.backgroundLayer
51 }
52
53 Wave {
54 id: wave
55 layer: renderSettings.activeFrameGraph.waveLayer
56 }
57 }