How to SET canvas size Declarative? #630
Replies: 3 comments 11 replies
-
the size is always the size of its parent container, it's responsive by default. if the relative or absolute parent is 100%/100% it fills the screen, if the parent is fixed, it's fixed. |
Beta Was this translation helpful? Give feedback.
-
not in: display: flex
align-items: center
justify-content: center ^__^ So please tell me if I manually set the canvas size in css, the inner world of THREE.js will adjust to this? How to resize the inner world of three.js? I can just use CSS to stretch and shrink the canvas, three.js will react to this? For example, if I set the canvas width to 50% and then change the width of the parent, does three.js adapt to the resized canvas? |
Beta Was this translation helpful? Give feedback.
-
Hi there, My Canvas currently has a width & height of 1353x150px and I don't know where it comes from because I'm not using any fixed unit in my CSS. I have The Canvas stays at 150px height and is cutting off my content inside. Can you help me with this problem? The height doesn't seem to be responsive like you said:
Here's my App.js
|
Beta Was this translation helpful? Give feedback.
-
Hi, 👋
How to SET canvas size Declarative?
Is the correct way? this is not in the documentation just
And how to declarative resize canvas?
Beta Was this translation helpful? Give feedback.
All reactions