import { randomSeed } from "../random"; import nanoid from "nanoid"; export function newElement( type: string, x: number, y: number, strokeColor: string, backgroundColor: string, fillStyle: string, strokeWidth: number, roughness: number, opacity: number, width = 0, height = 0 ) { const element = { id: nanoid(), type, x, y, width, height, strokeColor, backgroundColor, fillStyle, strokeWidth, roughness, opacity, isSelected: false, seed: randomSeed() }; return element; }