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