Options
All
  • Public
  • Public/Protected
  • All
Menu

Metadata corresponding to a Scene.

Hierarchy

  • MetaScene

Index

Constructors

Properties

metaModels: {}

The MetaModels belonging to this MetaScene, each mapped to its {@link MetaModel.modelId}.

Type declaration

metaObjects: {}

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

Type declaration

metaObjectsByType: {}

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

Type declaration

propertySets: {}

The PropertySets belonging to this MetaScene, each mapped to its PropertySet.id.

Type declaration

scene: Scene

The Scene.

property

scene

viewer: Viewer

The Viewer.

property

viewer

Methods

  • createMetaModel(modelId: string, metaModelData: any, options?: { excludeTypes?: string[]; globalizeObjectIds?: boolean; includeTypes?: string[] }): MetaModel
  • Creates a MetaModel in this MetaScene.

    The MetaModel will contain a hierarchy of MetaObjects, created from the meta objects in metaModelData.

    The meta object hierarchy in metaModelData is expected to be non-cyclic, with a single root. If the meta objects are cyclic, then this method will log an error and attempt to recover by creating a dummy root MetaObject of type "Model" and connecting all other MetaObjects as its direct children. If the meta objects contain multiple roots, then this method similarly attempts to recover by creating a dummy root MetaObject of type "Model" and connecting all the root MetaObjects as its children.

    Parameters

    • modelId: string

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

    • metaModelData: any

      Data for the MetaModel.

    • Optional options: { excludeTypes?: string[]; globalizeObjectIds?: boolean; includeTypes?: string[] }
      • Optional excludeTypes?: string[]
      • Optional globalizeObjectIds?: boolean
      • Optional includeTypes?: string[]

    Returns MetaModel

    The new MetaModel.

  • destroyMetaModel(id: string): void
  • fire(event: string, value: any): void
  • getObjectIDsByType(type: string): string[]
  • getObjectIDsInSubtree(id: string, includeTypes?: string[], excludeTypes?: string[]): string[]
  • off(event: any): void
  • on(event: string, callback: () => void): void
  • Subscribes to an event fired at this Viewer.

    Parameters

    • event: string

      The event

    • callback: () => void

      Callback fired on the event

        • (): void
        • Returns void

    Returns void

  • withMetaObjectsInSubtree(id: string, callback: () => void): void

Generated using TypeDoc