exported the generateRandomImage function :)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# generative-art
|
||||
# layered-generative-art
|
||||
An easy-to-use library to generate random images from a set of layers.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -3,6 +3,7 @@ import dts from "bun-plugin-dts";
|
||||
await Bun.build({
|
||||
entrypoints: ["./src/index.ts"],
|
||||
outdir: "./dist",
|
||||
target: "node",
|
||||
minify: true,
|
||||
plugins: [dts()],
|
||||
});
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"module": "index.ts",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist"
|
||||
"dist/*.js",
|
||||
"dist/*.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"generative",
|
||||
@@ -25,6 +26,10 @@
|
||||
"url": "git+https://github.com/4-0-9/layered-generative-art.git"
|
||||
},
|
||||
"bugs": "https://github.com/4-0-9/layered-generative-art/issues",
|
||||
"scripts": {
|
||||
"build": "bun run build.mjs",
|
||||
"publish": "bun run build && npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"sharp": "^0.33.2"
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@ import { type Layer, type TraitOption } from './layers';
|
||||
* @param orderedLayers - The layers to choose from in ascending order
|
||||
* @returns A buffer containing the newly generated image
|
||||
*/
|
||||
async function generateRandomImage(baseShapePath: string, orderedLayers: Layer[]): Promise<GenerativeArtOutput> {
|
||||
export async function generateRandomImage(baseShapePath: string, orderedLayers: Layer[]): Promise<GenerativeArtOutput> {
|
||||
const layers: OverlayOptions[] = [];
|
||||
const choices: Record<string, string> = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user