@bvdmitri/web360 / Viewer
Interface: Viewer
Defined in: web360/src/viewer.ts:34
Draws views of an equirectangular video on a canvas, for looking around in a 360 video.
Remarks
draw shows source as view sees it, filling the canvas at its current width and height; the caller sizes the canvas (to its box times the device pixel ratio, say) and calls draw when the frame or the view changes, such as on each requestVideoFrameCallback and each drag. A <video> must have a frame to show (readyState of 2 or more). It plays nothing and keeps no state but the GPU's: the clock and the input are the page's. destroy releases the GPU device.
Methods
destroy()
destroy():
void
Defined in: web360/src/viewer.ts:36
Returns
void
draw()
draw(
source,view):Promise<void>
Defined in: web360/src/viewer.ts:35
Parameters
source
view
Returns
Promise<void>