Optional
Not necessary if using SSR painter like svg-ssr
添加元素
Clear all objects and the canvas.
Stop and clear all animation immediately
Change configuration of layer
Dispose self.
Find hovered element
Perform all refresh
Get container height
Get container width
Unbind event
Event name
Handler function
Rest
Mark and repaint the canvas in the next frame of browser
Refresh hover in next frame
Refresh hover immediately
Repaint the canvas immediately
删除元素
Resize the canvas. Should be invoked when container size is changed
Set background color
Set default cursor
Force to set dark mode
Set sleep after still for frames. Disable auto sleep when it's 0.
Trigger event manually
Event object
Wake up animation loop. But not render.
Not necessary if using SSR painter like svg-ssr