Hi,
I am relatively new to 3D objects drawing, my goal is to draw freehand on a panoramic image inside a sphere. So far I have managed to render panoramic view by texture wrapping inside a sphere. Now I want to draw on the image, can you point me the right direction? I believe I have to use layers but the problem is how do i render second material inside the sphere.
The fiddle you linked does not seem to work, nevertheless - if you want to draw on a texture, regardless of how you’d be mapping it on an object, try using UV raycasting (source)
Hi,
The Texture loader is not able to load image from online. Line 71-79
const myUrl = ‘https://drive.google.com/file/d/1iFt0xSiTGrxbZrWCwYSyilYUEotwLt_z/view?usp=sharing’
const textureLoader = new THREE.TextureLoader();
textureLoader.crossOrigin = "Anonymous"
const myTexture = textureLoader.load(myUrl)
sphereMaterial.map = myTexture;
const sphereMesh = new THREE.Mesh(sphere, sphereMaterial);
scene.add(sphereMesh);
The url you’re sharing is not an image url - it leads to Google Drive. You need to pass a direct image url - one that ends with .png
, .jpg
etc. (or at least one that returns a file, not a webpage.)
Thank you,I fixed it on fiddle
Now coming back to the actual issue, How can I draw over it ?