| 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.Animation 2.10 |
| 8 |
import Qt3D.Extras 2.10 |
| 9 |
import QtQuick 2.9 |
| 10 |
|
| 11 |
DefaultSceneEntity { |
| 12 |
id: scene |
| 13 |
|
| 14 |
SkinnedPbrEffect { |
| 15 |
id: skinnedPbrEffect |
| 16 |
} |
| 17 |
|
| 18 |
Timer { |
| 19 |
interval: 2000 |
| 20 |
running: true |
| 21 |
repeat: false |
| 22 |
onTriggered: { |
| 23 |
animator.running = true |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
SkinnedEntity { |
| 28 |
id: riggedSimple |
| 29 |
effect: skinnedPbrEffect |
| 30 |
source: "qrc:/assets/gltf/2.0/RiggedSimple/RiggedSimple.gltf" |
| 31 |
baseColor: "blue" |
| 32 |
transform.scale: 0.05 |
| 33 |
|
| 34 |
components: [ |
| 35 |
ClipAnimator { |
| 36 |
id: animator |
| 37 |
running: true |
| 38 |
loops: Animation.Infinite |
| 39 |
clip: AnimationClipLoader { |
| 40 |
source: "qrc:/assets/gltf/2.0/RiggedSimple/RiggedSimple.gltf?animationIndex=1" |
| 41 |
} |
| 42 |
channelMapper: ChannelMapper { |
| 43 |
mappings: [ |
| 44 |
SkeletonMapping{ skeleton: riggedSimple.skeleton } |
| 45 |
] |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
] |
| 50 |
} |
| 51 |
} |