summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/scene3d-loader/AnimatedEntity.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/scene3d-loader/AnimatedEntity.qml')
-rw-r--r--examples/qt3d/scene3d-loader/AnimatedEntity.qml22
1 files changed, 4 insertions, 18 deletions
diff --git a/examples/qt3d/scene3d-loader/AnimatedEntity.qml b/examples/qt3d/scene3d-loader/AnimatedEntity.qml
index 5431db8ea..ec7cd7fc8 100644
--- a/examples/qt3d/scene3d-loader/AnimatedEntity.qml
+++ b/examples/qt3d/scene3d-loader/AnimatedEntity.qml
@@ -92,15 +92,8 @@ Entity {
Transform {
id: torusTransform
- matrix: {
- var m = Qt.matrix4x4(1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1);
- m.rotate(45, Qt.vector3d(1, 0, 0))
- m.scale(Qt.vector3d(1.5, 1, 0.5));
- return m;
- }
+ scale3D: Qt.vector3d(1.5, 1, 0.5)
+ rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45)
}
Entity {
@@ -116,15 +109,8 @@ Entity {
Transform {
id: sphereTransform
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.translate(Qt.vector3d(20, 0, 0));
- m.rotate(userAngle, Qt.vector3d(0, 1, 0))
- return m;
- }
+ translation: Qt.vector3d(20, 0, 0)
+ rotation: fromAxisAndAngle(Qt.vector3d(0, 1, 0), userAngle)
}
QQ2.NumberAnimation {