This is a demo of creating custom block fields. In this case the field is used to define a turtle.
All of the custom field implementation is in field_turtle.js, including comments on each required function.
Click on the blocks' comment icons to learn what they are demonstrating. Use the buttons below to see how the fields react to changes.