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

ScriptComponent

Extends:

Component → ScriptComponent

Component wrapping a Script object

Constructor Summary

Public Constructor
public

constructor(stage: Stage, script: Script, params: ComponentParameters)

Member Summary

Public Members
public
public
public get

Method Summary

Public Methods
public
public
public

getBox()

public
public
public
public

run()

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, script: Script, params: ComponentParameters) source

Override:

Component#constructor

Params:

NameTypeAttributeDescription
stage Stage

stage object the component belongs to

script Script

script object to wrap

params ComponentParameters

component parameters

Public Members

public script source

public status source

Override:

Component#status

public get type source

Override:

Component#type

Public Methods

public addRepresentation() source

Add a new representation to the component

Override:

Component#addRepresentation

public dispose() source

Override:

Component#dispose

public getBox() source

Override:

Component#getBox

public getCenter() source

Override:

Component#getCenter

public getZoom() source

Override:

Component#getZoom

public removeRepresentation() source

Removes a representation component

Override:

Component#removeRepresentation

public run() source

public setVisibility() source

Set the visibility of the component, including added representations

Override:

Component#setVisibility