| 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.4 as QQ2 |
| 5 |
import Qt3D.Core 2.0 |
| 6 |
import Qt3D.Render 2.0 |
| 7 |
import Qt3D.Extras 2.0 |
| 8 |
|
| 9 |
Entity { |
| 10 |
components: [ mesh, material, transform ] |
| 11 |
|
| 12 |
SphereMesh { |
| 13 |
id: mesh |
| 14 |
radius: 3 |
| 15 |
} |
| 16 |
|
| 17 |
Transform { |
| 18 |
id: transform |
| 19 |
scale: 3 |
| 20 |
} |
| 21 |
|
| 22 |
QQ2.ColorAnimation { |
| 23 |
target: material |
| 24 |
property: "diffuse" |
| 25 |
from: "yellow" |
| 26 |
to: "orange" |
| 27 |
duration: 1500 |
| 28 |
loops: QQ2.Animation.Infinite |
| 29 |
running: true |
| 30 |
} |
| 31 |
|
| 32 |
QQ2.NumberAnimation { |
| 33 |
target: transform |
| 34 |
property: "scale" |
| 35 |
duration: 1500 |
| 36 |
loops: QQ2.Animation.Infinite |
| 37 |
running: true |
| 38 |
easing.type: QQ2.Easing.InOutQuad |
| 39 |
from: 1 |
| 40 |
to: 1.5 |
| 41 |
} |
| 42 |
} |