API Docs for: 2.7.3
Show:

MobileVRCamera Class

Extends BABYLON.OculusCamera
Module: Component
Parent Module: Wanaplan

A mobile VR Camera which use the deviceorientation events to rotate the camera.

Constructor

MobileVRCamera

(
  • position
  • scene
)

Parameters:

  • position BABYLON.Vector3

    The initial position.

  • scene BABYLON.Scene

    The scene to attach this camera.

Methods

_onToggleView

(
  • event
)
private

Provided by the Wanaplan module.

Toggle the view mode.

Parameters:

  • event Event

    The event object.

_setUIVisible

(
  • visible
)
private

Provided by the Wanaplan module.

Show or hide the menu.

Parameters:

  • visible Boolean

    Set to true to enable the menu or false to hide it.

destroy

()

Provided by the Wanaplan module.

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

()

Provided by the Wanaplan module.

Initialize the component by adding menus.

onContenxtChanged

(
  • context
)

Provided by the Wanaplan module.

Hide the sub menu icon when the context is 2D, otherwise show the icon.

Parameters:

  • context String

    The current context.

orientationIsAvailable

() Boolean

Indicates whether the orientation system is available.

Returns:

Boolean:

Returns true if available, otherwise it returns false.

start.

()

Provided by the Wanaplan module.

Start the VR view.

stop

()

Provided by the Wanaplan module.

Stop the VR view.

updateRotation

()

Updates the rotation value relative to the alpha, beta and gamma values.