There are a great algodoo undocumented feature - layer.
To create a layer, use the command
- CODE: SELECT ALL
Scene.addLayer {visible: = true; color: = [1, 1, 1, 1]; id: = 2; dynamic: = false};
To put a geom on some layer, you need to specify layer id when you create it:
- CODE: SELECT ALL
Scene.addbox {layer: = 2; ...}
or to draw interactively, set active layer by entering command
- CODE: SELECT ALL
scene.selectLayer(2)
Changing the properties of the layer can be done via the same command -
scene.addLayervisibility - to show layer or not
color - a factor for all the colors in the layer (eg [1,1,1,0.5] will do a translucent
dynamic - whether physics cheat on this layer, or it just a "picture"
All that could be very handy if you want to make few locations or just a picture with no performance impact and so on.
Dream of Algodoo as game development engine...
No hay comentarios:
Publicar un comentario