Skip to content
Discussion options

You must be logged in to vote

You can use a <canvasTexture> to draw a grid on the surface of the cube.

Here is an example https://codesandbox.io/s/canvas-animated-texture-10p7ws

If you don't need to change the grid, I'd recommend using a texture.

If you need a different grid on every face of the cube, I'd make a cube in something like Blender, and create a UV map. 6 doesn't divide evenly into 1024, so you'll have some dead space, but, you should be able to tell the canvas renderer exactly where to draw.

The only issue with this is that you need to upload canvas image data to the GPU per frame. That will be an issue if the data you want to render requires that the canvas is high resolution (like 2K and up). If you need…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bellem3re
Comment options

@mwmwmw
Comment options

@bellem3re
Comment options

@mwmwmw
Comment options

Answer selected by bellem3re
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants