import RepresentationComponent from 'ngl/src/component/representation-component.js'
RepresentationComponent
Extends:
Component wrapping a Representation object
Constructor Summary
Public Constructor | ||
public |
constructor(stage: Stage, repr: Representation, params: RepresentationParameters, parent: Component) 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 |
dispose() |
|
public |
|
|
public |
Get representation parameters |
|
public |
getType() |
|
public |
|
|
public |
setColor(value: String | Color | Hex): RepresentationComponent Set color |
|
public |
Set representation parameters |
|
public |
|
|
public |
setSelection(string: String): RepresentationComponent Set selection |
|
public |
setVisibility(value: Boolean): RepresentationComponent Set the visibility of the component, takes parent visibility into account |
|
public |
Toggle visibility of the component, takes parent visibility into account |
|
public |
update(what: Object): RepresentationComponent 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 |
addRepresentation(type: String, object: Object, params: RepresentationParameters): RepresentationComponent Add a new representation to the component |
|
public |
Automatically center and zoom the component |
|
public |
dispose() |
|
public |
eachAnnotation(callback: Function): undefined Iterator over each annotation and executing the callback |
|
public |
eachRepresentation(callback: Function): undefined Iterator over each representation and executing the callback |
|
public |
|
|
public abstract |
|
|
public |
|
|
public |
|
|
public |
getZoom() |
|
public |
|
|
public |
Remove all annotations from the component |
|
public |
Removes all representation components |
|
public |
removeAnnotation(annotation: Annotation): undefined Remove the give annotation from the component |
|
public |
Removes a representation component |
|
public |
setName() |
|
public |
setPosition(p: Vector3 | Array): Component Set position transform |
|
public |
setRotation(r: Quaternion | Euler | Array): Component Set rotation transform |
|
public |
Set scale transform |
|
public |
|
|
public |
setTransform(m: Matrix4): Component Set general transform. |
|
public |
setVisibility(value: Boolean): Component 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#constructorParams:
Name | Type | Attribute | Description |
stage | Stage | stage object the component belongs to |
|
repr | Representation | representation object to wrap |
|
params | RepresentationParameters |
|
component parameters |
parent | Component |
|
parent component |
Public Members
public parent source
public repr source
public signals: RepresentationComponentSignals source
Events emitted by the component
Override:
Component#signalsPublic Methods
public build() source
public disposeRepresentation() source
public getType() source
public getVisibility() source
public setColor(value: String | Color | Hex): RepresentationComponent source
Set color
public setParameters(params: RepresentationParameters): RepresentationComponent source
Set representation parameters
Params:
Name | Type | Attribute | Description |
params | RepresentationParameters | parameter object |
public setRepresentation() source
public setSelection(string: String): RepresentationComponent source
Set selection
Params:
Name | Type | Attribute | Description |
string | String | selection string |
public setVisibility(value: Boolean): RepresentationComponent source
Set the visibility of the component, takes parent visibility into account
Override:
Component#setVisibilityParams:
Name | Type | Attribute | Description |
value | Boolean | visibility flag |
public toggleVisibility(): RepresentationComponent source
Toggle visibility of the component, takes parent visibility into account