Nunu Class

Module: Runtime

nunuStudio MIT license (http://opensource.org/licenses/MIT)

Class used to store nunuStudio development version and timestamp.

Contains methods to check browser feature support.

Methods

developmentMode

() Boolean

Check if nunu if running in development mode.

Returns:

Boolean:

True if running as development mode.

getVRDisplays

(
  • getDisplay
)

Used to get the first VR display available, the display is returned as argument of the getDisplay function.

Parameters:

  • getDisplay Function

    Function used to get the display, receives the display as argument.

isFullscreen

() Boolean

Check if there is some element on fullscreen mode.

Returns true even the fullscreen element is not related with the app.

Returns:

Boolean:

True if there is some element in fullscreen mode.

runningOnDesktop

() Boolean

Check if nunu is running inside NWJS.

Returns:

Boolean:

True if running inside NWJS

setFullscreen

(
  • enable
  • element
)

Set an element into fullscreen mode or exit out of fullscreen mode.

Use isFullscreen to check if the application is running in fullscreen mode already.

Parameters:

  • enable Boolean

    If true the application will enter fullscreen mode, if false it will exit.

  • element DOM

    DOM element to put into fullscreen.

webAudioAvailable

() Boolean

Check if host supports WebAudio.

Returns:

Boolean:

True if WebAudio is available.

webglAvailable

() Boolean

Check if host supports WebGL, only checks for WebGL 1.0 support.

Returns:

Boolean:

True if WebGL is available.

webvrAvailable

() Boolean

Check if host supports WebVR and if there is a VR display available.

Returns:

Boolean:

True is WebVR is available.

Attributes

NAME

String

nunuStudio

Default: "nunuStudio"

TIMESTAMP

String

Stores the nunu runtime dev timestamp.

VERSION

String

Stores the nunu runtime version.