summaryrefslogtreecommitdiffstats
path: root/examples/wireframe/TrefoilKnot.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wireframe/TrefoilKnot.qml')
-rw-r--r--examples/wireframe/TrefoilKnot.qml21
1 files changed, 10 insertions, 11 deletions
diff --git a/examples/wireframe/TrefoilKnot.qml b/examples/wireframe/TrefoilKnot.qml
index c3b6acb70..84a0aa373 100644
--- a/examples/wireframe/TrefoilKnot.qml
+++ b/examples/wireframe/TrefoilKnot.qml
@@ -41,27 +41,26 @@
import Qt3D 2.0
import Qt3D.Render 2.0
-import QtQuick 2.1 as QQ2
Entity {
id: root
- property real x: 0.0
- property real y: 0.0
- property real z: 0.0
- property real scale: 1.0
- property real theta: 0.0
- property real phi: 0.0
+ property alias x: translation.dx
+ property alias y: translation.dy
+ property alias z: translation.dz
+ property alias scale: scaleTransform.scale
+ property alias theta: thetaRotation.angle
+ property alias phi: phiRotation.angle
property Material material
components: [ transform, mesh, root.material ]
Transform {
id: transform
- Translate { dx: root.x; dy: root.y; dz: root.z }
- Scale { scale: root.scale }
- Rotate{ angle: root.theta; axis: Qt.vector3d(1.0, 0.0, 0.0) }
- Rotate{ angle: root.phi; axis: Qt.vector3d(0.0, 1.0, 0.0) }
+ Translate { id: translation }
+ Scale { id: scaleTransform }
+ Rotate{ id: thetaRotation; axis: Qt.vector3d( 1.0, 0.0, 0.0 ) }
+ Rotate{ id: phiRotation; axis: Qt.vector3d( 0.0, 1.0, 0.0 ) }
}
Mesh {