diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/3dstudioruntime2/simpleqml/main.qml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/3dstudioruntime2/simpleqml/main.qml b/examples/3dstudioruntime2/simpleqml/main.qml index 70a1a73..a79c183 100644 --- a/examples/3dstudioruntime2/simpleqml/main.qml +++ b/examples/3dstudioruntime2/simpleqml/main.qml @@ -90,6 +90,14 @@ Rectangle { onCurrentSlideIndexChanged: console.log("Current slide index for 'Scene': " + currentSlideIndex) onCurrentSlideNameChanged: console.log("Current slide name for 'Scene': " + currentSlideName) } + + // Exercise Element a bit. This is no different from using the + // functions on Presentations, just avoids the need to specify the + // name/path repeatedly. + Element { + id: barrelRef + elementPath: "Barrel" // or Scene.Layer.Barrel but as long as it's unique the name's good enough + } } ignoredEvents: mouseEvCb.checked ? Studio3D.EnableAllEvents : (Studio3D.IgnoreMouseEvents | Studio3D.IgnoreWheelEvents) onRunningChanged: console.log("running: " + s3d.running) @@ -114,6 +122,13 @@ Rectangle { } } + Timer { + interval: 2000 + running: true + repeat: true + onTriggered: console.log("Barrel rotation is " + barrelRef.getAttribute("rotation")) + } + NumberAnimation on opacity { id: opacityAnimation from: 1 |