Hi, how would you create a cube that only spins/moves left or right(can only be rotated on the xz plane)?
Also, is there a wy to set a default position of the cube(ie. cube is tilted slightly downward, or cube is faced straight ahead) for when the web page has loaded?
The answer to both those questions is yes. Unfortunately I don't have an answer as to how to do it right this second, but I would like to revisit this soon and figure that out myself. Until then my best guess would be css .cube classes and playing around with the transform, rotate, translate. Hope that helps!
(I am not 100% positive on this) but I believe itβs just limitations with react-3D-cube unfortunately. I believe you can use three.js. If not unfortunately the only other way I know of is getting funky with css transform 3dtransfrom, and 3drotate properties. I hope this helps a little bit!
Since their is no documentation provided by the author on npm package. I dont think this package supports any such feature but you can always modify the original code to get things done your way.
Thanks a lot :)
Always!
Hi, how would you create a cube that only spins/moves left or right(can only be rotated on the xz plane)?
Also, is there a wy to set a default position of the cube(ie. cube is tilted slightly downward, or cube is faced straight ahead) for when the web page has loaded?
The answer to both those questions is yes. Unfortunately I don't have an answer as to how to do it right this second, but I would like to revisit this soon and figure that out myself. Until then my best guess would be css
.cube
classes and playing around with the transform, rotate, translate. Hope that helps!Hi, Thank you for your response! However, I am not able to rotate the cube on mobile devices, do you know anything about this?
(I am not 100% positive on this) but I believe itβs just limitations with react-3D-cube unfortunately. I believe you can use three.js. If not unfortunately the only other way I know of is getting funky with css transform 3dtransfrom, and 3drotate properties. I hope this helps a little bit!
Since their is no documentation provided by the author on npm package. I dont think this package supports any such feature but you can always modify the original code to get things done your way.
My opinion is to check out documentation of motion js and then take a look at line 230 in cube.tsx π
github.com/pjb0811/react-3d-cube/b...
Thank you for coming through!!!