-
Hi guys, I'm trying to run code locally on my machine based off of an example I was given by someone in this community on a previous thread: However when I run this code locally I'll sometimes warnings that prevent the cube from rendering properly: When it should look like this: Any pointers as to why this might be happening? A hunch that i have is that it might have something to do with the textureRef.current.needsUpdate on line 94. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The error says "destination error bad dimensions" From the error and looking at the cube, I can tell you need to set the canvas size to something that is a power of 2. Ensuring that the canvas texture has the same In the original code, There is a constant set for the texture size. Line 13: and the canvas size is set in a useEffect in Starts on Line 95
|
Beta Was this translation helpful? Give feedback.
The error says "destination error bad dimensions"
From the error and looking at the cube, I can tell you need to set the canvas size to something that is a power of 2.
Ensuring that the canvas texture has the same
width
andheight
should fix the error.In the original code,
There is a constant set for the texture size.
Line 13:
const canvasSize = 512;
and the canvas size is set in a useEffect in
GridBox
Starts on Line 95