Examples: Layer Manipulation

How to work with layers.

    Info

    This example demonstrates basic use of layers: Three layers are created and placed on the canvas. Then each layer has one item added.

    Rearrange the layers by dragging them in the box above.

    The checkboxes toggle each layer's visibility.

    This example uses the LayerHash's setOrder method to apply the new order each time the layers are rearranged.

    After every action (toggle, setOrder) the canvas is cleared and drawn again.

    Of course there are many other methods to work with the position of the layers, like promote, demote, swap, replace etc.

    Source

    1. Basic Setup
    2. Layer Manipulation
    3. Basic Animation
    4. Interactivity
    5. Keyboard Control
    6. Advanced Animation