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:
Create some sets of coordinate Arrays (absolute values, relative values, artefacts)
Create a Polyline entity from the first set of coordinates
Check that the tension attribute updates correctly (Polyline bendiness will change)
Check that the Polyline can be dragged, whatever the setting of the closed flag
Check that the Polyline can be pivoted, including to the mouse cursor
Check that the Block entitys remain attached to the Polyline in all situations
Check that the Polyline responds as expected when we change its pins Array
Check that when the Polyline is set to the Wheel coordinates Array, it responds when those Wheels are dragged into new positions
Check that the Polyline can be scaled, flipped and rolled.
Natural and constant speed animation along a path:
Check that the green and yellow 'ball' Wheels correctly follow the Polyline path at all times when 'useAsPath' flag is set, and does not break the demo when the flag is not set.
Confirm that the yellow 'balls' correctly move at a constant speed when animating along the Polyline 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.