NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import RepresentationComponent from 'ngl/src/component/representation-component.js'
public class | source

RepresentationComponent

Extends:

Component → RepresentationComponent

Component wrapping a Representation object

Constructor Summary

Public Constructor
public

Create representation component

Member Summary

Public Members
public
public
public

Events emitted by the component

public get

Component type

public

Method Summary

Public Methods
public

build()

public
public
public

Get representation parameters

public
public
public

Set color

public

Set representation parameters

public
public

Set selection

public

Set the visibility of the component, takes parent visibility into account

public

Toggle visibility of the component, takes parent visibility into account

public

Set selection

public

Inherited Summary

From class Component
public get
public
public
public
public
public
public
public
public
public

Events emitted by the component

public
public
public
public
public
public
public

addAnnotation(position: Vector3, content: String | Element, params: Object): Annotation

Add an anotation object

public
public

Add a new representation to the component

public

autoView(duration: Integer): undefined

Automatically center and zoom the component

public
public

Iterator over each annotation and executing the callback

public

Iterator over each representation and executing the callback

public
public abstract
public
public
public
public
public

Remove all annotations from the component

public

Removes all representation components

public

Remove the give annotation from the component

public

Removes a representation component

public
public

Set position transform

public

Set rotation transform

public

Set scale transform

public
public

Set general transform.

public

Set the visibility of the component, including added representations

public
public

Public Constructors

public constructor(stage: Stage, repr: Representation, params: RepresentationParameters, parent: Component) source

Create representation component

Override:

Component#constructor

Params:

NameTypeAttributeDescription
stage Stage

stage object the component belongs to

repr Representation

representation object to wrap

params RepresentationParameters
  • optional

component parameters

parent Component
  • optional

parent component

Public Members

public parent source

public repr source

public signals: RepresentationComponentSignals source

Events emitted by the component

Override:

Component#signals

public get type: String source

Component type

Override:

Component#type

public visible source

Override:

Component#visible

Public Methods

public build() source

public dispose() source

Override:

Component#dispose

public disposeRepresentation() source

public getParameters(): RepresentationParameters source

Get representation parameters

Return:

RepresentationParameters

parameter object

public getType() source

public getVisibility() source

public setColor(value: String | Color | Hex): RepresentationComponent source

Set color

Params:

NameTypeAttributeDescription
value String | Color | Hex

color value

Return:

RepresentationComponent

this object

public setParameters(params: RepresentationParameters): RepresentationComponent source

Set representation parameters

Params:

NameTypeAttributeDescription
params RepresentationParameters

parameter object

Return:

RepresentationComponent

this object

public setRepresentation() source

public setSelection(string: String): RepresentationComponent source

Set selection

Params:

NameTypeAttributeDescription
string String

selection string

Return:

RepresentationComponent

this object

public setVisibility(value: Boolean): RepresentationComponent source

Set the visibility of the component, takes parent visibility into account

Override:

Component#setVisibility

Params:

NameTypeAttributeDescription
value Boolean

visibility flag

Return:

RepresentationComponent

this object

public toggleVisibility(): RepresentationComponent source

Toggle visibility of the component, takes parent visibility into account

Return:

RepresentationComponent

this object

public update(what: Object): RepresentationComponent source

Set selection

Params:

NameTypeAttributeDescription
what Object

flags indicating what attributes to update

what.position Boolean

update position attribute

what.color Boolean

update color attribute

what.radius Boolean

update radius attribute

Return:

RepresentationComponent

this object

public updateVisibility() source