简体   繁体   中英

How can we use a equirectangular image for WebXR using three.js?

I am creating a web app using Three.js in which I have to use equirectangular images for Pano tours. I want to add a feature to switch between normal mode to VR mode as React360 and AFrame does. I don't want to use React360 and AFrame as my application is already using Three.js.

I checked the three.js example but none of the examples is using the equirectangular image for VR. Is there a way to convert equirectangular image to CubeMap, So, that I can use it to switch between normal and VR Mode?

Is there a way to convert equirectangular image to CubeBox

Assuming you refer with "CubeBox" to the cube map format, you can perform the conversion with WebGLCubeRenderTarget.fromEquirectangularTexture() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM