Debian Codegraph @

tests/manual/rigged-simple/SkinnedEntity.qml

raw
1 // Copyright (C) 2018 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 property Effect effect: skinnedPbrEffect
13 property url source: ""
14 property alias createJointsEnabled: skeleton.createJointsEnabled
15 property alias transform: transform
16 property color baseColor: "red"
17 property alias rootJoint: skeleton.rootJoint
18 property alias skeleton: skeleton
19
20 components: [
21 Transform {
22 id: transform
23 rotationX: -90
24 },
25 Mesh {
26 source: root.source
27 },
28 Armature {
29 skeleton: SkeletonLoader {
30 id: skeleton
31 source: root.source
32 onStatusChanged: console.log("skeleton loader status: " + skeleton.status)
33 onJointCountChanged: console.log("skeleton has " + skeleton.jointCount + " joints")
34 }
35 },
36 Material {
37 effect: root.effect
38
39 parameters: [
40 Parameter { name: "baseColor"; value: root.baseColor }
41 ]
42 }
43 ]
44 }