summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/assimp/main.qml
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-11-11 11:29:15 +0000
committerPaul Lemire <paul.lemire@kdab.com>2015-11-20 16:34:14 +0000
commitba3e89e4b609d19b0607d2cb1cdf13b83f6cd984 (patch)
tree017a00ab9308fc635e59bc050c00a32207079587 /examples/qt3d/assimp/main.qml
parent3d1727dc60e9c9a72160e785243a7be7a68fc60e (diff)
Adapt examples to use no args form of Qt.matrix4x4()
Change-Id: If289d74601e2244d4175ba6b1ea3eb95df0bd50b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/assimp/main.qml')
-rw-r--r--examples/qt3d/assimp/main.qml11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/qt3d/assimp/main.qml b/examples/qt3d/assimp/main.qml
index 5210d2041..02a3aca2a 100644
--- a/examples/qt3d/assimp/main.qml
+++ b/examples/qt3d/assimp/main.qml
@@ -111,7 +111,11 @@ Entity
Entity {
components: [
Transform {
- Rotate {angle : 90; axis : Qt.vector3d(0, 1, 0)}
+ matrix: {
+ var m = Qt.matrix4x4();
+ m.rotate(90, Qt.vector3d(0, 1, 0));
+ return m;
+ }
},
SceneLoader {
id: sceneLoader
@@ -163,10 +167,7 @@ Entity
var constantTranslation = Qt.vector3d(origTranslation.x, origTranslation.y, origTranslation.z);
t.matrix = Qt.binding(function() {
- var m = Qt.matrix4x4(1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1);
+ var m = Qt.matrix4x4();
m.rotate(suzanneAnim.userAngle, suzanneAnim.axis);
m.translate(constantTranslation);
m.rotate(90, Qt.vector3d(1, 0, 0));