|Views Total:||78 views|
|Official Page:||Go to website|
|Last Update:||May 1, 2023|
How to use it:
2. Specify the element in which the shapes will be generated.
// the whole body let element = document.body;
3. Set the number of shapes to generate.
let numberOfShapes = 5;
4. Determine whether to rotate shapes.
let rotation = true;
5. Specify the mode: 1 or 2.
- the shapes are generated in black color but have a colored rectangle shape with them on the corner
- the shapes are generated and colored from the colorList without any rectangles
let mode = 2; let colorList = [ // colors here ];
6. Generate the shapes.
generateShapes(element, colorList, numberOfShapes, mode, rotation);
- validating the last edit of changing the way we pass parameters and added more validation into it