Skip to content
Advertisement

Threejs canvas size based on container

How can I calculate canvas size based on its container? To avoid scrolling.

If I set the size based on window the canvas is too big.

Advertisement

Answer

Well,that’s not difficult.Set your render’s size will work.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement