Skip to content
DanimalsTCGYT edited this page Aug 4, 2024 · 5 revisions

You can use the camera in osl, and access it using data uris or using the built in system provided.

Getting data from the camera

camera "start" // start the camera, this must be run first camera "get" "image" log data // logs the image from the camera as a data uri camera "get" "width" log data camera "get" "height" log data // log the dimensions of the camera itself

Using back or front camera

camera "use_front" // sets the system to use the front camera camera "get" "hasbackcam" log data // logs true or false if the device has a back camera

Rendering the camera

image "camera" // the easiest method, (and the fastest) and is mostly handled by the system, this is recommended
uuid = ouidNew() mainloop: image "load" data uuid image uuid // slower but you have more control over the loading process

originOS Wiki

Wiki Views:
:views

OSL | RSH | ICN

Clone this wiki locally