If you want to extract the image from the canvas as a data URL, you can do so with the following code:
const canvas = document.getElementById("canvas");
const dataURL = canvas.toDataURL();
Once you use drawImage on the canvas, the image data will already be stored within it.
These data URLs can then be used as textures in Three.js.
const texture = THREE.ImageUtils.loadTexture(dataURL);
Update
For debugging purposes, you can also try the following approach:
const texture = THREE.ImageUtils.loadTexture(dataURL, undefined, function(texture){
// onLoad handler, returns the img
console.log(texture);
},
function(event){
// onError handler, returns the error event
console.log(event);
});