MCPcopy
hub / github.com/HashLips/hashlips_art_engine / startCreating

Function startCreating

utils/pixelate.js:68–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66};
67
68const startCreating = async () => {
69 const images = getImages(inputDir);
70 if (images == null) {
71 console.log("Please generate collection first.");
72 return;
73 }
74 let loadedImageObjects = [];
75 images.forEach((imgObject) => {
76 loadedImageObjects.push(loadImgData(imgObject));
77 });
78 await Promise.all(loadedImageObjects).then((loadedImageObjectArray) => {
79 loadedImageObjectArray.forEach((loadedImageObject) => {
80 draw(loadedImageObject);
81 saveImage(loadedImageObject);
82 console.log(`Pixelated image: ${loadedImageObject.imgObject.filename}`);
83 });
84 });
85};
86
87buildSetup();
88startCreating();

Callers 1

pixelate.jsFile · 0.70

Calls 4

getImagesFunction · 0.70
loadImgDataFunction · 0.70
drawFunction · 0.70
saveImageFunction · 0.70

Tested by

no test coverage detected