Debian Codegraph @

tests/manual/shadow-map-qml/Trefoil.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
8 Entity {
9 id: root
10 property Material material
11
12 Mesh {
13 id: trefoilMesh
14 source: "qrc:///assets/obj/trefoil.obj"
15 }
16
17 Transform {
18 id: trefoilMeshTransform
19 property real userAngle: 0.0
20 rotation: fromAxisAndAngle(Qt.vector3d(0, 1, 0), userAngle)
21 }
22
23 QQ2.NumberAnimation {
24 target: trefoilMeshTransform
25
26 running: true
27 loops: QQ2.Animation.Infinite
28
29 property: "userAngle"
30 duration: 5000
31 from: 360
32 to: 0
33 }
34
35 components: [
36 trefoilMesh,
37 trefoilMeshTransform,
38 material
39 ]
40 }