MCPcopy Create free account
hub / github.com/HashLips/generative-art-opensource / loadLayerImg

Function loadLayerImg

index.js:73–78  ·  view source on GitHub ↗
(_layer)

Source from the content-addressed store, hash-verified

71// loads an image from the layer path
72// returns the image in a format usable by canvas
73const loadLayerImg = async (_layer) => {
74 return new Promise(async (resolve) => {
75 const image = await loadImage(`${_layer.selectedElement.path}`);
76 resolve({ layer: _layer, loadedImage: image });
77 });
78};
79
80const drawElement = (_element) => {
81 ctx.drawImage(

Callers 1

startCreatingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected