summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/shadow-map-qml/Trefoil.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/shadow-map-qml/Trefoil.qml')
-rw-r--r--examples/qt3d/shadow-map-qml/Trefoil.qml18
1 files changed, 11 insertions, 7 deletions
diff --git a/examples/qt3d/shadow-map-qml/Trefoil.qml b/examples/qt3d/shadow-map-qml/Trefoil.qml
index 68a334ef8..4691adbd3 100644
--- a/examples/qt3d/shadow-map-qml/Trefoil.qml
+++ b/examples/qt3d/shadow-map-qml/Trefoil.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
+import QtQuick 2.1 as QQ2
import Qt3D.Core 2.0
import Qt3D.Render 2.0
-import QtQuick 2.1 as QQ2
Entity {
id: root
@@ -49,20 +49,24 @@ Entity {
Transform {
id: trefoilMeshTransform
-
- Rotate {
- id: trefoilMeshRotation
- axis: Qt.vector3d(0, 1, 0)
+ property real userAngle: 0.0
+ matrix: {
+ var m = Qt.matrix4x4(1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ m.rotate(userAngle, Qt.vector3d(0, 1, 0));
+ return m;
}
}
QQ2.NumberAnimation {
- target: trefoilMeshRotation
+ target: trefoilMeshTransform
running: true
loops: QQ2.Animation.Infinite
- property: "angle"
+ property: "userAngle"
duration: 5000
from: 360
to: 0