I’m trying to build a web app which takes photos using webcam or mobile camera depending on the device. I have already made a button which changes the constraints.facingmode so the user can use both cameras ( “environment”, “user” ) if device supports it. The problem is that when I enable flashlight support as well, by creating a button and
Tag: camera
Three.js Zoom-to-Fit with offset
I’m trying to come up with a zoom-to-fit function that ensures that a list of points are perfectly fit into the drawing area, while also adding configurable offsets on all sides of the image. I.e. zoom-to-fit an area of the frame rather than the whole viewer area: (note that the offsets in this image are not accurate) I’m using a