Closed JonathanSum closed 3 years ago
loadImageCb(url, cb) { loadImage( url, img => { if (img.type === 'error') { throw Could not load image: ${url}; } else { // load image data onto input canvas this.ctx.drawImage(img, 0, 0) //console.log(image was loaded); window.setTimeout(() => { cb(); }, 0); } },
Could not load image: ${url}
image was loaded
Where is the loadImage come from?
Its provided by ndarray
ndarray
loadImageCb(url, cb) { loadImage( url, img => { if (img.type === 'error') { throw
Could not load image: ${url}
; } else { // load image data onto input canvas this.ctx.drawImage(img, 0, 0) //console.log(image was loaded
); window.setTimeout(() => { cb(); }, 0); } },Where is the loadImage come from?