I am trying to update a THREE.Texture ".image" property with an HTML5 canvas object. This works on Chromium (MacOSX) on my laptop. However, iPhone Safari and iPhone Chrome both does not work. What could be the root cause and how to fix this?
Using Web Inspector in Safari, I get this error message:
WebGL: INVALID_VALUE: texImage2D: no canvas.
I made sure the canvas is completely drawn before being updated, using the below code to update the material:
material.map.image = loaded_canvas[curr_id]; // loaded_canvas stores canvas that has been completed loaded already, drawn by Image() objects.
material.map.needsUpdate = true;
Here is how material is used:
var geometry = new THREE.SphereGeometry(100.0, 32, 32);
var material = new THREE.MeshBasicMaterial({
map: THREE.ImageUtils.loadTexture(image_path),
side: THREE.BackSide,
});
Strangely, if I use THREE.ImageUtils.loadTexture to load an image, it works fine. However, my use case is that I have to use an canvas object (multiple images on a canvas).
Thanks.

This is is probably fixed from this commit on d3-x3d, Fix #14 texImage2D: no canvas. which is related to this (already closed) issue, INVALID_VALUE: texImage2D: no canvas.
If the problem still persists, this is possibly related to the limitations of each browser on their maximum supported canvas dimensions/area.
Please refer to this answer from another post to look for the said limitations per browser.
Unfortunately there's no given figures for Safari from the upvoted answer, but you may look for the comments under it like:
Or look into the other answers of the post like this
Another possible factor is the client side's graphics card.