I am trying to put this image - https://hdfreefoto.files.wordpress.com/2014/09/bright-milky-way-over-the-lake-at-night.jpg - as a panorama background in my three.js scene .
I have the following code:
var sphere = new THREE.SphereGeometry(200, 200, 32);
sphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));
var sphereMaterial = new THREE.MeshBasicMaterial();
sphereMaterial.map = THREE.ImageUtils.loadTexture(<path to above image>);
var sphereMesh = new THREE.Mesh(sphere, sphereMaterial);
scene.add(sphereMesh);
However
When I look at the cardboard and rotate 360 โโdegrees, I donโt see the background rotate 360 โโdegrees (but less than that). How to align?
When I look on my laptop, I can rotate the image, but it does not seem to fit the screen size
Is there any guide on how to perfectly match this three.js panorama background image?
source
share