Element transformer¶
If you have the VastPark Player installed, download the example IMML file below and open the demo in the VastPark Player.
Overview¶
Demonstrates the element transformer plugin that can be used to manipulate elements during runtime. Supports position, rotation and size manipulations.
Instructions¶

- Click box 1 to toggle position mode
- Click box 2 to toggle rotation mode
- Click box 3 to toggle size/scale mode
- Click box 4 or the spheres to transform them according to the mode.
Walkthrough¶
The Element transformer is a plugin that can be used to change the dimensions, position and rotation of elements in IMML. How it differs from altering those properties in IMML is that the elements can be changed in real time by the user with the mouse.
1 <Script Name="OnMouseDown" Language="Lua">
2 function main(obj, args)
3 elementtransformer:clear()
4 scene:getelement('ElementTransformer'):addelement(obj)
5 end
6 </Script>
This Snippet of code adds the target element to the Element transformer plugin. In order for the element transformer to manipulate elements, they must be added to the element transformer plugin. In this case the object being clicked is added to the element transformer which then allows the user to manipulate it according to the mode and their mouse movements.
Note: To release an element from the Element Transformer, this releases all elements added to the element transformer.
1 elementtransformer:clear()