{
const canvasWidth = 720
const canvasHeight = 480
const center = [0.5 * canvasWidth, 0.5 * canvasHeight]
const canvas = DOM.canvas(canvasWidth, canvasHeight)
const p = new paper.PaperScope();
p.setup(canvas)
const background = new p.Path.Rectangle({
point: [0, 0],
size: [canvasWidth, canvasHeight],
fillColor: "#2b8941"
});
const polygon = new p.Path.RegularPolygon({
center: [360, 240],
sides: sides,
radius: radius,
fillColor: '#9254de',
strokeColor: 'blcak'
})
polygon.onFrame = function (event) {
this.rotate(rotate);
this.fillColor.hue -= 1
};
return canvas
}