painbrush
1.0.21.1.0
dist/src/layer/make-rectangle.js−
dist/src/layer/make-rectangle.jsDeleted−28
Index: package/dist/src/layer/make-rectangle.js
===================================================================
--- package/dist/src/layer/make-rectangle.js
+++ package/dist/src/layer/make-rectangle.js
@@ -1,28 +0,0 @@
-import { COLOR_BLACK } from "../color/utils.js";
-import { solidFillBrush, alphaBrush, } from "../color/brush.js";
-/**
-This makes a rectangle with any fill.
-Useful for the initial canvas
-*/
-export const makeRectangleLayer = ({ x: width, y: height }, brush = solidFillBrush(COLOR_BLACK)) => {
- let data = [];
- const meta = {
- width,
- id: Math.random(),
- height,
- };
- for (let index = 0; index < width * height * 3; index = index + 3) {
- const color = brush(index, meta);
- data.push(color[0]);
- data.push(color[1]);
- data.push(color[2]);
- }
- return {
- ...meta,
- data,
- };
-};
-/**
- * Utility method to make a blank rectangle, makes a great bg
- */
-export const makeBlankLayer = (coords) => makeRectangleLayer(coords, alphaBrush());