Debian Codegraph @

tests/manual/wave/Wave.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 Qt3D.Core 2.16
5 import Qt3D.Render 2.16
6 import Qt3D.Extras 2.15
7
8 Entity {
9 id: root
10
11 property real x: 0.0
12 property real y: 0.0
13 property real z: 0.0
14 property real scale: 1.0
15 property real theta: 0.0
16 property real phi: 0.0
17 property color tint: Qt.rgba( 0.0, 0.0, 0.0, 1.0 )
18 property real intensity: 0.3
19 property alias wireframe: material.wireframe
20 property Layer layer: null
21
22 components: [ transform, mesh, material, layer ]
23
24 Transform {
25 id: transform
26 translation: Qt.vector3d(root.x, root.y, root.z);
27 rotation: fromEulerAngles(root.theta, root.phi, 0)
28 scale: root.scale
29 }
30
31 WaveMaterial {
32 id: material
33 ambient: Qt.rgba( root.tint.r, root.tint.g, root.tint.b, 1.0 ) // Set color tint
34 diffuse: Qt.rgba( root.intensity, root.intensity, root.intensity, 1.0 ) // Set how bright the wave is
35 }
36
37 PlaneMesh {
38 id: mesh
39 width: 25.0
40 height: 5.0
41 meshResolution: Qt.size( 125, 50 )
42 }
43 }