FORGE. Scene

new Scene(viewer)

A FORGE.Scene is an object that represents a scene of a FORGE.Story.
Parameters:
Name Type Description
viewer FORGE.Viewer FORGE.Viewer reference.
Source:

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) background :string

Get the background of the scene.
Type:
  • string
Source:

(readonly) booted :boolean

Get the booted status of the scene.
Type:
  • boolean
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

(readonly) config :SceneConfig

Get the group config object.
Type:
  • SceneConfig
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

(readonly) description :string

Get the description of this scene.
Type:
  • string
Source:

(readonly, nullable) groups :Array.<FORGE.Group>

Get the Array of FORGE.Group to which this scene belongs to.
Type:
Source:

(readonly, nullable) groupsUid :Array.<FORGE.Group>

Get the Array of groups uids to which this scene belongs to.
Type:
Source:

(readonly) media :FORGE.Media

Get the scene media.
Type:
Source:

(readonly) name :string

Get the name of this scene.
Type:
  • string
Source:

(readonly) onConfigLoadComplete :FORGE.EventDispatcher

Get the onConfigLoadComplete FORGE.EventDispatcher.
Type:
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

(readonly) onLoadComplete :FORGE.EventDispatcher

Get the onLoadComplete FORGE.EventDispatcher.
Type:
Source:

(readonly) onLoadRequest :FORGE.EventDispatcher

Get the onLoadRequest FORGE.EventDispatcher.
Type:
Source:

(readonly) onLoadStart :FORGE.EventDispatcher

Get the onLoadStart FORGE.EventDispatcher.
Type:
Source:

(readonly) onMediaCreate :FORGE.EventDispatcher

Get the onMediaCreate FORGE.EventDispatcher.
Type:
Source:

(readonly) onUnloadComplete :FORGE.EventDispatcher

Get the onUnloadComplete FORGE.EventDispatcher.
Type:
Source:

(readonly) onUnloadStart :FORGE.EventDispatcher

Get the onUnloadStart FORGE.EventDispatcher.
Type:
Source:

(readonly) slug :string

Get the slug name of this scene.
Type:
  • string
Source:

(readonly) sync :Array.<string>

Get the sync array.
Type:
  • Array.<string>
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) thumbnails :Array

Get the thumbnails Array.
Type:
  • Array
Source:
To Do:
  • Define what is a thumbnail array, maybe with a thumbnail object descriptor

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

(readonly) viewCount :number

Get the count of how many times this group has been viewed.
Type:
  • number
Source:

(readonly) viewed :boolean

Know if this scene has been viewed at least one time.
Type:
  • boolean
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

addConfig(config)

Add a scene configuration object.
Parameters:
Name Type Description
config SceneConfig The scene configuration object to add.
Source:

destroy()

Destroy method
Overrides:
Source:

hasGroup(value) → {boolean}

Know if a FORGE.Group is related to this scene?
Parameters:
Name Type Description
value FORGE.Group | string Either the FORGE.Group itself or its index or its uid.
Source:
Returns:
Returns true if the FORGE.Group is related to this scene, false if not.
Type
boolean

hasGroups() → {boolean}

Know if this scene is related to any FORGE.Group.
Source:
Returns:
Returns true if this scene is related to at least a FORGE.Group, false if not.
Type
boolean

hasSoundSource() → {boolean}

Know if the scene has sound source?
Source:
Returns:
Returns true if the scene has a sound source, false if not.
Type
boolean

hasSoundTarget(uid) → {boolean}

Know if the scene has sound target as source?
Parameters:
Name Type Description
uid string The target source UID to verify.
Source:
Returns:
Returns true if the scene has a sound source target, false if not.
Type
boolean

isAmbisonic() → {boolean}

Know if an ambisonic sound is attached to the scene?
Source:
Returns:
Returns true if the scene has an ambisonic sound source, false if not.
Type
boolean

load()

Load just emmit a load request. The story will trigger the loadStart.
Source:

loadStart(time)

Create the media and start to load.
Parameters:
Name Type Description
time number The time of the media (if video)
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

unload()

Unload the scene.
Source:
To Do:
  • cleanup if useless

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. Scene

Members
Methods