MainloopWebVr Op

MainloopWebVr

This op is deprecated!

It will not receive any updates

experimental webvr rendering / currently not being developed due to XR update


Very experimental op.
Web VR is currently not supported in chrome.
It is supported with Mozilla firefox so we recommend working in that browser when developing for VR.
Will also work on mobile. IOS and android. Make sure to go to your view patch screen and then "open in new window" to be able to press the Vr button.
Can be combined with the screen orientation op to create mobile VR experiences.

NoVR Mainloop is the same as the normal mainloop.
VR Mainloop will render twice, once for each eye, check the example file that uses the the "eye" port output for a basic setup in VR.


Edit Documentation

Full Name
  • Ops.Deprecated.Gl.Vr.MainloopWebVr
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorJavascript Libraries
  • WebVr Polyfill (A JavaScript implementation of the WebVR spec, e.g. use webvr on phones which browsers don't support it)



 

INPUT PORTS


Start VR (Trigger)

Start VR mainLoop

Stop VR (Trigger)

Stop VR mainLoop

Scale Resolution (Number)

Scales resolution when Resize canvas is enabled, handy for slower hardware

Resize Canvas (Number:boolean )

When true gets reported resolution from VR headset and sets canvas size to match

use gamepads (Number:boolean )

Enables gamepads / still has to be implemented

OUTPUT PORTS


VR Mainloop (Trigger)

Trigger out twice, once for each eye per frame. Only works when Start VR is enabled

NoVR Mainloop (Trigger)

Trigger out when VR isn't isn't enabled

width (Number)

Resolution width, will change when resize canvas is on

height (Number)

Resolution height, will change when resize canvas is on

Supported (Number)

Will report true if a VR compatible headset/device is plugged in

Controller support (Number)

Will report true if a VR compatible gamepad/s are plugged in

Controllers amount (Number)

Amount of controllers connected

VR Display (Number)

the name of the connected headset

FPS (Number)

Frames per second

Eye (Number)

0 is the left eye, 1 is the right eye use with the ifTrueThen op to render twice

Gamepad object Left (Object)

Left Gamepad object out , will later work with the VR gamepad op

Gamepad object Right (Object)

Right Gamepad object out , will later work with the VR gamepad op

single trigger out (Trigger)

One trigger out regardless of mode

Left PMatrix (Array)

Left projection Matrix

Started VR (boolean Number)

Outputs true when VR has started


Patches using MainloopWebVr

  • Examples
  • Public
  • My Patches

Changelog


Ops.Gl.Vr.MainloopWebVr renamed to Ops.Deprecated.Gl.Vr.MainloopWebVruser avatarpandur - 2022-06-23 08:26