summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-03-23 15:48:54 +0100
committerPaul Lemire <paul.lemire@kdab.com>2015-04-27 10:09:20 +0000
commit2e34ef2d053cfa0c152442a758dda6296902c7c8 (patch)
treec415b937176f41fc05cc0262b41df1e38eb0a91f /examples
parent636a27e482f7085b25086250408f2d9dc4edbc5f (diff)
Examples: fixed to work with QAbstractTransform as QObject
Also fixed QTransform to copy proper transformation matrix to work when loaded in the backend and sent to the frontend. Change-Id: Iec417fd49092b5e3d7971784327ff4bbfb75549b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qt3d/deferred-renderer-qml/main.qml24
-rw-r--r--examples/qt3d/enabled-qml/main.qml81
-rw-r--r--examples/qt3d/loader-qml/main.qml20
-rw-r--r--examples/qt3d/scene3d/AnimatedEntity.qml20
-rw-r--r--examples/qt3d/simple-qml/main.qml21
5 files changed, 84 insertions, 82 deletions
diff --git a/examples/qt3d/deferred-renderer-qml/main.qml b/examples/qt3d/deferred-renderer-qml/main.qml
index c30c57fd4..d70619baa 100644
--- a/examples/qt3d/deferred-renderer-qml/main.qml
+++ b/examples/qt3d/deferred-renderer-qml/main.qml
@@ -138,14 +138,14 @@ Entity {
property Transform transform : Transform {
Translate{ dx: -10; dy: 0; dz : 5
id: sphere1Translate
- QQ2.SequentialAnimation {
- loops: QQ2.Animation.Infinite
- running: false
- QQ2.NumberAnimation {target: sphere1Translate; property: "dx"; to: 6; duration: 2000 }
- QQ2.NumberAnimation {target: sphere1Translate; property: "dx"; to: -10; duration: 2000 }
- }
}
}
+ QQ2.SequentialAnimation {
+ loops: QQ2.Animation.Infinite
+ running: false
+ QQ2.NumberAnimation {target: sphere1Translate; property: "dx"; to: 6; duration: 2000 }
+ QQ2.NumberAnimation {target: sphere1Translate; property: "dx"; to: -10; duration: 2000 }
+ }
property PointLight light : PointLight {
color : "green"
@@ -201,14 +201,14 @@ Entity {
property Transform transform : Transform {
Translate{ id: light3Translate; dx: 2; dy: 2; dz : 7
- QQ2.SequentialAnimation {
- loops: QQ2.Animation.Infinite
- running: true
- QQ2.NumberAnimation {target: light3Translate; property: "dy"; to: 6; duration: 1000; easing.type: QQ2.Easing.InOutQuad }
- QQ2.NumberAnimation {target: light3Translate; property: "dy"; to: -6; duration: 1000; easing.type: QQ2.Easing.InOutQuint }
- }
}
}
+ QQ2.SequentialAnimation {
+ loops: QQ2.Animation.Infinite
+ running: true
+ QQ2.NumberAnimation {target: light3Translate; property: "dy"; to: 6; duration: 1000; easing.type: QQ2.Easing.InOutQuad }
+ QQ2.NumberAnimation {target: light3Translate; property: "dy"; to: -6; duration: 1000; easing.type: QQ2.Easing.InOutQuint }
+ }
components: [
sphereMesh,
diff --git a/examples/qt3d/enabled-qml/main.qml b/examples/qt3d/enabled-qml/main.qml
index 9342ba6c9..031759556 100644
--- a/examples/qt3d/enabled-qml/main.qml
+++ b/examples/qt3d/enabled-qml/main.qml
@@ -127,49 +127,50 @@ Entity {
Translate {
id: translate
+ }
+ }
- QQ2.SequentialAnimation {
- running: true
- loops: QQ2.Animation.Infinite
- QQ2.NumberAnimation {
- target: translate; property: "dx"
- from: 0; to: 5;
- duration: 550
- easing.type: QQ2.Easing.InOutQuad
- }
- QQ2.NumberAnimation {
- target: translate; property: "dy"
- from: 0; to: 5;
- duration: 650
- easing.type: QQ2.Easing.InOutQuad
- }
- QQ2.NumberAnimation {
- target: translate; property: "dz"
- from: 0; to: 5;
- duration: 350
- easing.type: QQ2.Easing.InOutQuad
- }
- QQ2.NumberAnimation {
- target: translate; property: "dx"
- from: 5; to: 0;
- duration: 550
- easing.type: QQ2.Easing.InOutQuad
- }
- QQ2.NumberAnimation {
- target: translate; property: "dy"
- from: 5; to: 0;
- duration: 350
- easing.type: QQ2.Easing.InOutQuad
- }
- QQ2.NumberAnimation {
- target: translate; property: "dz"
- from: 5; to: 0;
- duration: 650
- easing.type: QQ2.Easing.InOutQuad
- }
- }
+ QQ2.SequentialAnimation {
+ running: true
+ loops: QQ2.Animation.Infinite
+ QQ2.NumberAnimation {
+ target: translate; property: "dx"
+ from: 0; to: 5;
+ duration: 550
+ easing.type: QQ2.Easing.InOutQuad
+ }
+ QQ2.NumberAnimation {
+ target: translate; property: "dy"
+ from: 0; to: 5;
+ duration: 650
+ easing.type: QQ2.Easing.InOutQuad
+ }
+ QQ2.NumberAnimation {
+ target: translate; property: "dz"
+ from: 0; to: 5;
+ duration: 350
+ easing.type: QQ2.Easing.InOutQuad
+ }
+ QQ2.NumberAnimation {
+ target: translate; property: "dx"
+ from: 5; to: 0;
+ duration: 550
+ easing.type: QQ2.Easing.InOutQuad
+ }
+ QQ2.NumberAnimation {
+ target: translate; property: "dy"
+ from: 5; to: 0;
+ duration: 350
+ easing.type: QQ2.Easing.InOutQuad
+ }
+ QQ2.NumberAnimation {
+ target: translate; property: "dz"
+ from: 5; to: 0;
+ duration: 650
+ easing.type: QQ2.Easing.InOutQuad
}
}
+
components: [sphereMesh, material, layer, transform]
}
diff --git a/examples/qt3d/loader-qml/main.qml b/examples/qt3d/loader-qml/main.qml
index 9857a5eaa..fa3e8ff5a 100644
--- a/examples/qt3d/loader-qml/main.qml
+++ b/examples/qt3d/loader-qml/main.qml
@@ -118,16 +118,16 @@ Entity {
Rotate {
id: sphereRotation
axis: Qt.vector3d(0, 1, 0)
- QQ2.NumberAnimation {
- target: sphereRotation
- property: "angle"
- duration: 10000
- from: 0
- to: 360
-
- loops: QQ2.Animation.Infinite
- running: true
- }
}
}
+ QQ2.NumberAnimation {
+ target: sphereRotation
+ property: "angle"
+ duration: 10000
+ from: 0
+ to: 360
+
+ loops: QQ2.Animation.Infinite
+ running: true
+ }
}
diff --git a/examples/qt3d/scene3d/AnimatedEntity.qml b/examples/qt3d/scene3d/AnimatedEntity.qml
index 8c44fde0d..72d9787d6 100644
--- a/examples/qt3d/scene3d/AnimatedEntity.qml
+++ b/examples/qt3d/scene3d/AnimatedEntity.qml
@@ -118,18 +118,18 @@ Entity {
Rotate {
id: sphereRotation
axis: Qt.vector3d(0, 1, 0)
- QQ2.NumberAnimation {
- target: sphereRotation
- property: "angle"
- duration: 10000
- from: 0
- to: 360
-
- loops: QQ2.Animation.Infinite
- running: true
- }
}
}
+ QQ2.NumberAnimation {
+ target: sphereRotation
+ property: "angle"
+ duration: 10000
+ from: 0
+ to: 360
+
+ loops: QQ2.Animation.Infinite
+ running: true
+ }
Entity {
id: sphereEntity
diff --git a/examples/qt3d/simple-qml/main.qml b/examples/qt3d/simple-qml/main.qml
index 7896766c5..c82bafaa3 100644
--- a/examples/qt3d/simple-qml/main.qml
+++ b/examples/qt3d/simple-qml/main.qml
@@ -106,19 +106,20 @@ Entity {
Rotate {
id: sphereRotation
axis: Qt.vector3d(0, 1, 0)
- QQ2.NumberAnimation {
- target: sphereRotation
- property: "angle"
- duration: 10000
- from: 0
- to: 360
-
- loops: QQ2.Animation.Infinite
- running: true
- }
}
}
+ QQ2.NumberAnimation {
+ target: sphereRotation
+ property: "angle"
+ duration: 10000
+ from: 0
+ to: 360
+
+ loops: QQ2.Animation.Infinite
+ running: true
+ }
+
Entity {
id: sphereEntity
components: [ sphereMesh, material, sphereTransform ]