Scripts
User can redefine of shape’s default behaviors including rendering, outlining and defining connection points. The followings are supported script types of a shape:
render
outline
connection-points
render
The script bound to render
should code how to draw the shape. The below code is to draw a triagle inside a box.
You can use the shape’s default rendering behavor. The below code is draw the cross mark over the rectangle’s default rendering.
outline
The script bound to outline
should express a vector of points that constitutes the outline of the shape. The below is to define the outline of a triangle.
connection-points
The script bound to connection-points
should express a vector of points that constitutes the connection points of the shape. The below code is to define three connection points on each vertex of a triangle.