Reference Source
public class | source

MetaScene

Member Summary

Public Members
public

metaModels: {String: MetaModel}

The MetaModels belonging to this MetaScene, each mapped to its MetaModel#modelId.

public

metaObjects: {String: MetaObject}

The MetaObjects belonging to this MetaScene, each mapped to its MetaObject#id.

public

The MetaObjects belonging to this MetaScene, each mapped to its MetaObject#type.

public

The Scene.

public

The Viewer.

Method Summary

Public Methods
public

createMetaModel(id: String, metaModelData: Object, options: Object): MetaModel

Creates a MetaModel in this MetaScene.

public

Removes a MetaModel from this MetaScene.

public

fire(event: String, value: Object)

Fires an event at this Viewer.

public

Gets the MetaObject#ids of the MetaObjects that have the given MetaObject#type.

public

Gets the MetaObject#ids of the MetaObjects within the given subtree.

public

off(event: *)

Unsubscribes from an event fired at this Viewer.

public

on(event: String, callback: Function)

Subscribes to an event fired at this Viewer.

Public Members

public metaModels: {String: MetaModel} source

The MetaModels belonging to this MetaScene, each mapped to its MetaModel#modelId.

public metaObjects: {String: MetaObject} source

The MetaObjects belonging to this MetaScene, each mapped to its MetaObject#id.

public metaObjectsByType: {String: MetaObject} source

The MetaObjects belonging to this MetaScene, each mapped to its MetaObject#type.

public scene: Scene source

The Scene.

Properties:

NameTypeAttributeDescription
scene *

public viewer: Viewer source

The Viewer.

Properties:

NameTypeAttributeDescription
viewer *

Public Methods

public createMetaModel(id: String, metaModelData: Object, options: Object): MetaModel source

Creates a MetaModel in this MetaScene.

Params:

NameTypeAttributeDescription
id String

ID for the new MetaModel, which will have MetaModel#id set to this value.

metaModelData Object

Data for the MetaModel - (see Model Metadata).

options Object
  • optional

Options for creating the MetaModel.

options.includeTypes Object
  • optional

When provided, only MetaObjects with types in this list.

options.includeTypes Object
  • optional

When provided, never MetaObjects with types in this list.

options.excludeTypes Object
  • optional

Return:

MetaModel

The new MetaModel.

public destroyMetaModel(id: String) source

Removes a MetaModel from this MetaScene.

Fires a "metaModelDestroyed" event with the value of the MetaModel#id.

Params:

NameTypeAttributeDescription
id String

ID of the target MetaModel.

public fire(event: String, value: Object) source

Fires an event at this Viewer.

Params:

NameTypeAttributeDescription
event String

Event name

value Object

Event parameters

public getObjectIDsByType(type: String): String[] source

Gets the MetaObject#ids of the MetaObjects that have the given MetaObject#type.

Params:

NameTypeAttributeDescription
type String

The type.

Return:

String[]

Array of MetaObject#ids.

public getObjectIDsInSubtree(id: String): String[] source

Gets the MetaObject#ids of the MetaObjects within the given subtree.

Params:

NameTypeAttributeDescription
id String

ID of the root MetaObject of the given subtree.

Return:

String[]

Array of MetaObject#ids.

public off(event: *) source

Unsubscribes from an event fired at this Viewer.

Params:

NameTypeAttributeDescription
event *

public on(event: String, callback: Function) source

Subscribes to an event fired at this Viewer.

Params:

NameTypeAttributeDescription
event String

The event

callback Function

Callback fired on the event