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

ComponentControls

Component controls

Constructor Summary

Public Constructor
public

constructor(component: Component)

Member Summary

Public Members
public
public get

component center position

public get

component rotation

public

signals: {changed: Signal}

public
public

Method Summary

Public Methods
public

Trigger render and emit changed event

public

spin(axis: Vector3 | Array, angle: Number): undefined

spin component on axis

Public Constructors

public constructor(component: Component) source

Params:

NameTypeAttributeDescription
component Component

the component object

Public Members

public component source

public get position: Vector3 source

component center position

public get rotation: Quaternion source

component rotation

public signals: {changed: Signal} source

public stage source

public viewer source

Public Methods

public changed(): undefined source

Trigger render and emit changed event

Return:

undefined

Emit:

ComponentControls.signals.changed

public spin(axis: Vector3 | Array, angle: Number): undefined source

spin component on axis

Params:

NameTypeAttributeDescription
axis Vector3 | Array

rotation axis

angle Number

amount to spin

Return:

undefined