(_imgObject)
| 38 | }; |
| 39 | |
| 40 | const loadImgData = async (_imgObject) => { |
| 41 | try { |
| 42 | const image = await loadImage(`${_imgObject.path}`); |
| 43 | return { |
| 44 | imgObject: _imgObject, |
| 45 | loadedImage: image, |
| 46 | }; |
| 47 | } catch (error) { |
| 48 | console.error("Error loading image:", error); |
| 49 | } |
| 50 | }; |
| 51 | |
| 52 | const draw = (_imgObject) => { |
| 53 | let size = pixelFormat.ratio; |