NGL@0.10.4 Home Manual Reference Source GalleryRepository
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

Events emitted by the component

public get

Component type

Method Summary

Public Methods
public

Get representation parameters

public

Set color

public

Set representation parameters

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

Inherited Summary

From class Component
public

Events emitted by the component

public

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

Add an anotation object

public

Add a new representation to the component

public

autoView(duration: Integer): undefined

Automatically center and zoom the component

public
public abstract
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

Set position transform

public

Set rotation transform

public

Set scale transform

public

Set general transform.

public

Set the visibility of the component, including added representations

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 signals: RepresentationComponentSignals source

Events emitted by the component

Override:

Component#signals

public get type: String source

Component type

Public Methods

public getParameters(): RepresentationParameters source

Get representation parameters

Return:

RepresentationParameters

parameter object

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 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