$.state.save( )

Saves the current configuration of shape, colour, and text

    Examples

    
    
    function update() {
        //first rectangle
        $.colour.fill = "red";
        $.shape.strokeWidth=3;
        $.shape.rectangle(50,50,50,50);
    
        $.state.save();
        //second rectangle
        $.colour.fill = "blue"; 
        $.shape.strokeWidth=5;
        $.shape.rectangle(100,100,50,50);
        $.state.load();
    
        //third rectangle
        $.shape.rectangle(150,150,50,50);
    }