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

component center position

public get

component rotation

public

signals: {changed: Signal}

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 get position: Vector3 source

component center position

public get rotation: Quaternion source

component rotation

public signals: {changed: Signal} 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