I’m relatively new to vtk.js but I’m trying to implement a simple skybox. That wasn’t working so I created a cube, which works when applying a texture created from a canvas. However, I’m trying to apply images but only two sides of the cube render an image. The skybox doesn’t seem to render at all with images or a simple canvas. I’m somewhat lost down the rabbit hole missing something simple and would appreciate some direction. I created a code pen that should be a 6-sided textured cube in a skybox but is rendered as a two sided textured cube and no skybox here.
Thank you! I had not seen the DeviceOrientationToCamera example. The setGenerate3DTextureCoordinates(true); is a big help. It seems that since my image is just a plain 2D jpeg images it looks like I need to perform some kind of transformation by a combination of drawing to a canvas, creating an ImageData and using setDirection or possibly using Transform and MatrixBuilder. Is that somewhat the direction? Is there a preferred method given a plain 2D jpeg image?
The example DeviceOrientationToCamera does not seem to use setDirection
. All that is required is 3D Texture coordinates AND 6 textures to add to a cube.