Animation object: gradient along a line
Drag the pins to change the shape of the line. The canvas is resizable.
Test purpose
- Create a set of draggable pin entitys, and a Polyline entity that uses the pins for positioning data, to create a line that can be shaped by the user
- Create a color object which can be used to generate a range of colors between two defined colors
- Create a template Wheel entity that we can use to colorise the line
- Create an Animation object which will undertake a Display cycle to clear the canvas; then stamp the template entity along the length of the line, varying it's fillStyle color to reflect its progress along the line; then compose and display the final canvas output
- Check that the color correctly alters along the length of the line, and updates as the user changes the shape of the line
Touch test: not required
Annotated code