Creating an Animated Shape using RenderKit

This is an extended example of the RenderKit Component being used as a base for a Custom Component. The RenderKit has a number of special attributes and features which make it ideal for situations where you need to get lower level access to the Umajin system than other base components give you. It has custom properties and can animate every frame using the on_tick event – see more features in the RenderKit language reference.

This example uses getData and setData to manage storing data locally for each instance of this component and draws a SIN wave on the RenderKit canvas.

Note: using the on_tick event incorrectly can cause major performance issues if time consuming procedures are run within it, so use this event carefully.