MobileVRCamera Class
A mobile VR Camera which use the deviceorientation events to rotate the camera.
Constructor
MobileVRCamera
(
-
position
-
scene
Parameters:
-
position
BABYLON.Vector3The initial position.
-
scene
BABYLON.SceneThe scene to attach this camera.
Item Index
Methods
_setUIVisible
(
private
-
visible
Show or hide the menu.
Parameters:
-
visible
BooleanSet to
true
to enable the menu orfalse
to hide it.
destroy
()
Remove the component and all menus. The VR camera is removed.
getScreenOrientation
()
Number
Gets the screen orientation.
Returns:
Number:
Returns the screen orientation in degrees.
initialize
()
Initialize the component by adding menus.
onContenxtChanged
(
-
context
Hide the sub menu icon when the context is 2D, otherwise show the icon.
Parameters:
-
context
StringThe current context.
orientationIsAvailable
()
Boolean
Indicates whether the orientation system is available.
Returns:
Boolean:
Returns true
if available, otherwise it returns false
.
start.
()
Start the VR view.
stop
()
Stop the VR view.
updateRotation
()
Updates the rotation value relative to the alpha, beta and gamma values.