1j01 / tracky-mouse

Mouse control via head tracking, as a cross platform desktop app and JS library. eViacam alternative.
https://trackymouse.js.org/
MIT License
25 stars 4 forks source link

Webcam view doesn't shrink unless the whole window shrinks #9

Closed 1j01 closed 2 months ago

1j01 commented 1 year ago

The UI layout uses vw/vh units which are percentages of the viewport size of the whole web page. This doesn't work for the embedding use case of the JS library.

The layout is also relying on the current sizes of things outside the webcam view to define how the webcam view shrinks, which is fragile.

ResizeObserver could be used to make the layout more robust.