javascript - How do I flip a Three.js texture vertically? - Stack Overflow

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

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.

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.

Share Improve this question edited Aug 26, 2014 at 21:46 WestLangley 105k11 gold badges287 silver badges283 bronze badges asked Aug 26, 2014 at 19:49 lukasgedlukasged 1981 silver badge12 bronze badges 1
  • You can flip/rotate the images inside the application by modifying the texture coordinates. But the easiest method would be to flip the images outside your application, namely in the image editor program. – gaitat Commented Aug 26, 2014 at 19:56
Add a ment  | 

1 Answer 1

Reset to default 8

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

texture.flipY = false;

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742399815a4436684.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信