简体   繁体   中英

How do I flip a Three.js texture vertically?

I'm trying to display some panoramic images in my "Street View"-like application with Three.js .

I used the panorama example from the official webpage of Three.js as a base for the display of the images and it works OK. The problem is that my input images are flipped vertically . By vertical flip I mean the effect shown in this image .

So my question is if I can, somehow, flip the textures loaded from the images or the sphere geometry I apply the textures to, in order to view the images as it should be.

Thank you.

Luckily the vertical case is "natively" supported. Try with this:

texture.flipY = false;

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