Skip to content

Question/help about responsive canvas / locking object on canvas regardless of window size #822

Answered by drcmda
stejul asked this question in Q&A
Discussion options

You must be logged in to vote

well its all just math. useThree gives you viewport and size. size is the window width/height. viewport is the same but in three units, as in viewport.width fills the entire width of the canvas. three doesnt work like the dom, three is centred. 0/0 is in the middle. that's why you need to compensate.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stejul
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
Converted from issue

This discussion was converted from issue #822 on November 19, 2020 21:44.