Scrawl-canvas v8 - Canvas test 030

Polyline entity functionality

Note that the Polyline entity is experimental!
Breaking changes may occur at short notice while the code continues to be developed

The interplay between using absolute/relative coordinates and artefacts as pins, mapping to pins, pivoting the entire line to an artefact, and other artefacts using line pins as their pivot values (plus handles, offsets, dragging, etc) ... can be a bit confusing. This demo represents (current) expected behaviour.

The Polyline is draggable in this demo, as are the green and red pins:

Tension
-0.5 - 1.5
Coordinates
Closed
Pivot to
Map to pins
Use as path
Flip reverse
Flip upend
Roll
Scale

Test purpose

Polyline-specific tests:

Natural and constant speed animation along a path:

Known issue: when the 'useAsPath' flag is set to false, the Block pins do not position themselves as expected when the Polyline entity is rolled, flipped or scaled. If this functionality is required on a Polyline, always set its 'useAsPath' flag to true.

Annotated code