Writing and erasing modes are available with CLICKING method (when clicking the pencil above and below at the center of the pencil ).
It is a kind of masked animation. I did not use any physics engines. The Magic Pencil works with mouse interaction.
In respect of mouse speed (x and y speed), the pencil is animated when the mouse hits. The animation is rolling and rotating. When the mouse hits close point at center of the pencil, it rolls with little rotating. However, when the mouse hits remote point at center of the pencil, it rotates with little rolling.
If the mouse click the pencil above zero point, writing mode will be active. Otherwise, erasing mode will be active.
Easy to modify;
• You can modify pencil graphics (completely vector).
• Also, drawing colors are changeable (dynamic colors from the array).
• Min and max writing size is also changeable.
• Also, drawing board’s dimensions and coordinates are modifiable.