Debian Codegraph @

tests/manual/phong-cubes/CubeEntity.qml

raw
1 // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import QtQuick 2.0 as Quick
5 import Qt3D.Core 2.0
6 import Qt3D.Render 2.0
7 import Qt3D.Extras 2.0
8
9 Entity {
10 id: root
11 property vector3d position: Qt.vector3d()
12 property Material material
13
14 components: [mesh, material, transform]
15
16 CuboidMesh {
17 id: mesh
18 xExtent: 0.5
19 yExtent: xExtent
20 zExtent: xExtent
21 }
22
23 Transform {
24 id: transform
25 translation: root.position
26 rotationZ: 45
27
28 Quick.NumberAnimation on rotationY {
29 from: 0; to: 360
30 loops: Quick.Animation.Infinite
31 duration: 5000
32 }
33 }
34 }