WanaPlan

API Docs for: 2.7.0
Show:

MobileVRCamera

Extends BABYLON.OculusCamera
Module: Component
Parent Module: Wanaplan

Summary

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

Constructor

MobileVRCamera

Syntax

MobileVRCamera

(
  • position
  • scene
)

Summary

Parameters:

  • position BABYLON.Vector3

    The initial position.

  • scene BABYLON.Scene

    The scene to attach this camera.

Methods

_onToggleView

Provided by the Wanaplan module.

Syntax

_onToggleView

(
  • event
)
private

Summary

Toggle the view mode.

Parameters:

  • event Event

    The event object.

_setUIVisible

Provided by the Wanaplan module.

Syntax

_setUIVisible

(
  • visible
)
private

Summary

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.

Syntax

destroy

()

Summary

Remove the component and all menus. The VR camera is removed.

getScreenOrientation

Syntax

getScreenOrientation

() Number

Summary

Gets the screen orientation.

Returns:

Number:

Returns the screen orientation in degrees.

initialize

Provided by the Wanaplan module.

Syntax

initialize

()

Summary

Initialize the component by adding menus.

onContenxtChanged

Provided by the Wanaplan module.

Syntax

onContenxtChanged

(
  • context
)

Summary

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

Parameters:

  • context String

    The current context.

orientationIsAvailable

Syntax

orientationIsAvailable

() Boolean

Summary

Indicates whether the orientation system is available.

Returns:

Boolean:

Returns true if available, otherwise it returns false.

start.

Provided by the Wanaplan module.

Syntax

start.

()

Summary

Start the VR view.

stop

Provided by the Wanaplan module.

Syntax

stop

()

Summary

Stop the VR view.

updateRotation

Syntax

updateRotation

()

Summary

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