diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/3dstudioruntime2/simpleqml/main.qml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/3dstudioruntime2/simpleqml/main.qml b/examples/3dstudioruntime2/simpleqml/main.qml index 0447ed4..fd465fc 100644 --- a/examples/3dstudioruntime2/simpleqml/main.qml +++ b/examples/3dstudioruntime2/simpleqml/main.qml @@ -153,6 +153,13 @@ Rectangle { // beyond my modest skills, apparently. onClicked: s3dpres.fireEvent("Scene.Layer.Camera", "customCameraEvent") // in actionevent.uip this will change the sphere's color } + Button { + text: "Toggle camera" + onClicked: { + var v = s3dpres.getAttribute("Scene.Layer.Camera", "eyeball") + s3dpres.setAttribute("Scene.Layer.Camera", "eyeball", !v) + } + } } Text { |