const { LazyCanvas, NgonLayer } = require('@hitomihiumi/lazy-canvas')let ngon = new NgonLayer().setRadius(50).setSides(6).setColor('#fff')const lazy = new LazyCanvas().addLayers(ngon)//... Copy
const { LazyCanvas, NgonLayer } = require('@hitomihiumi/lazy-canvas')let ngon = new NgonLayer().setRadius(50).setSides(6).setColor('#fff')const lazy = new LazyCanvas().addLayers(ngon)//...
Optional
The alpha value of the layer
The color of the figure
Whether the figure should be filled or not
The global composite operation of the layer
The outline of the figure
The radius of the figure
The angle of rotation the layer
The degree of shadow blur
The shadow color for the layer
The X-axis offset of the shadow relative to the layer
The Y-axis offset of the shadow relative to the layer
The number of sides the figure should have
The stroke of the figure
The x position of the layer
The y position of the layer
Example