question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CubeTexture orientation

See original GitHub issue

In my app, I would like to rotate the CubeTexture that defines the scene background and the environment map reflections by 180° along the vertical y-axis. My rotation is defined by the VRML and X3D specifications about the background fields.

I tried to modify several parameters like the mapping, flipY and rotation Texture fields. However I didn’t found any good way to do so.

  • Is there some obvious way to do so that I missed?
  • Any chance to see this coming in three.js?
  • If I would like to implement it, what parameters would you like to see (for example Texture.flipX and CubeTexture.flipZ)? Would you be interested in this feature?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:12
  • Comments:33 (10 by maintainers)

github_iconTop GitHub Comments

20reactions
mrdoobcommented, Apr 26, 2019

You mean being able to rotate scene.background? If so… yes, definitely interested.

We probably need a new API though…

scene.background = new THREE.Background( cubeTexture );`
scene.background.rotation.y = Math.PI / 2;
6reactions
Mugen87commented, Jan 21, 2020

@mrdoob I think we should implement this feature. There is another request in the forum:

https://discourse.threejs.org/t/rotate-a-scenes-background-skybox-texture/12199

I doubt that a single additional matrix/vector multiplication per fragment will noticeably affect the performance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CubeTexture - Babylon.js Documentation
Class for creating a cube texture [API] ... Returns CubeTexture. the cube texture ... Gets texture matrix rotation angle around Y axis radians....
Read more >
Rotate cubetexture in Three.js - Questions
Say I want to rotate the cubeTexture itself 180 degrees. I know I can do this by rotating the camera but I want...
Read more >
Rotate cubetexture in Three.js - Stack Overflow
Say I want to rotate the cubeTexture itself 180 degrees. I know I can do this by rotating the camera but I want...
Read more >
Cubemap Texture - OpenGL Wiki
1 Creation. 1.1 Upload and orientation · 2 Texture Access · 3 Layered Rendering · 4 Seamless cubemap · 5 Cubemap array textures....
Read more >
Oriented nucleation, oriented growth and twinning in cube ...
This result suggested a combined oriented nucleation/oriented growth model for the formation of cube texture in which is assumed that a successful cube ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found