Skip to content

@orillusion/core


Class: TransformControllerBaseComponent

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:27

Base component for the transform gizmo controllers (translation, rotation, scale). Manages the per-axis handle objects, materials and colliders, and drives the shared pick/drag interaction loop, delegating the actual transform math to subclass overrides.

Extends

Extended by

Constructors

Constructor

new TransformControllerBaseComponent(): TransformControllerBaseComponent

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:35

Returns

TransformControllerBaseComponent

Overrides

ComponentBase.constructor

Properties

object3D

object3D: Object3D = null

Defined in: src/components/ComponentBase.ts:29

owner object3D

Inherited from

ComponentBase.object3D


isDestroyed

isDestroyed: boolean = false

Defined in: src/components/ComponentBase.ts:77

Inherited from

ComponentBase.isDestroyed

Accessors

visibleLayer

Get Signature

get visibleLayer(): number

Defined in: src/components/ComponentBase.ts:46

Composition-layer membership bitmask. The pass / camera / collector filters via

(component.visibleLayer & pass.layerMask & camera.cullingMask) !== 0

Defaults to VisibleLayer.Default (bit 0) so a fresh subclass is visible to passes whose layerMask is VisibleLayer.All (which includes bit 0). Application code can assign project-specific bits (1..31) to organise the scene into composition layers.

Returns

number

Set Signature

set visibleLayer(value): void

Defined in: src/components/ComponentBase.ts:50

Parameters
value

number

Returns

void

Inherited from

ComponentBase.visibleLayer


eventDispatcher

Get Signature

get eventDispatcher(): CEventDispatcher

Defined in: src/components/ComponentBase.ts:63

Returns

CEventDispatcher

Set Signature

set eventDispatcher(value): void

Defined in: src/components/ComponentBase.ts:68

Parameters
value

CEventDispatcher

Returns

void

Inherited from

ComponentBase.eventDispatcher


isStart

Get Signature

get isStart(): boolean

Defined in: src/components/ComponentBase.ts:79

Returns

boolean

Inherited from

ComponentBase.isStart


transform

Get Signature

get transform(): Transform

Defined in: src/components/ComponentBase.ts:89

Return the Transform component attached to the Object3D. Null before the component is attached — addComponent assigns object3D only after construction — so constructor-time callers can probe safely via this.transform?..

Returns

Transform

Inherited from

ComponentBase.transform


enable

Get Signature

get enable(): boolean

Defined in: src/components/ComponentBase.ts:113

Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.

Returns

boolean

Set Signature

set enable(value): void

Defined in: src/components/ComponentBase.ts:96

Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.

Parameters
value

boolean

Returns

void

Inherited from

ComponentBase.enable


target

Get Signature

get target(): Object3D

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:47

The object currently controlled by the owning gizmo.

Returns

Object3D


mX

Get Signature

get mX(): Object3D

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:52

The gizmo's X-axis root object.

Returns

Object3D


mY

Get Signature

get mY(): Object3D

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:57

The gizmo's Y-axis object.

Returns

Object3D


mZ

Get Signature

get mZ(): Object3D

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:62

The gizmo's Z-axis object.

Returns

Object3D


transformSpaceMode

Get Signature

get transformSpaceMode(): TransformSpaceMode

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:67

The active transform space (local or global) from the owning gizmo.

Returns

TransformSpaceMode

Methods

stop()

stop(): void

Defined in: src/components/ComponentBase.ts:163

Returns

void

Inherited from

ComponentBase.stop


onLateUpdate()?

optional onLateUpdate(view?): any

Defined in: src/components/ComponentBase.ts:167

Parameters

view?

View3D

Returns

any

Inherited from

ComponentBase.onLateUpdate


onBeforeUpdate()?

optional onBeforeUpdate(view?): any

Defined in: src/components/ComponentBase.ts:168

Parameters

view?

View3D

Returns

any

Inherited from

ComponentBase.onBeforeUpdate


onCompute()?

optional onCompute(view?, command?): any

Defined in: src/components/ComponentBase.ts:169

Parameters

view?

View3D

command?

GPUCommandEncoder

Returns

any

Inherited from

ComponentBase.onCompute


onGraphic()?

optional onGraphic(view?): any

Defined in: src/components/ComponentBase.ts:170

Parameters

view?

View3D

Returns

any

Inherited from

ComponentBase.onGraphic


onParentChange()?

optional onParentChange(lastParent?, currentParent?): any

Defined in: src/components/ComponentBase.ts:171

Parameters

lastParent?

Object3D

currentParent?

Object3D

Returns

any

Inherited from

ComponentBase.onParentChange


onAddChild()?

optional onAddChild(child): any

Defined in: src/components/ComponentBase.ts:172

Parameters

child

Object3D

Returns

any

Inherited from

ComponentBase.onAddChild


onRemoveChild()?

optional onRemoveChild(child): any

Defined in: src/components/ComponentBase.ts:173

Parameters

child

Object3D

Returns

any

Inherited from

ComponentBase.onRemoveChild


cloneTo()

cloneTo(obj): void

Defined in: src/components/ComponentBase.ts:180

clone component data to target object3D

Parameters

obj

Object3D

target object3D

Returns

void

Inherited from

ComponentBase.cloneTo


copyComponent()

copyComponent(from): this

Defined in: src/components/ComponentBase.ts:182

Parameters

from

this

Returns

this

Inherited from

ComponentBase.copyComponent


beforeDestroy()

beforeDestroy(force?): void

Defined in: src/components/ComponentBase.ts:249

before release this component, object refrences are not be set null now.

Parameters

force?

boolean

Returns

void

Inherited from

ComponentBase.beforeDestroy


destroy()

destroy(force?): void

Defined in: src/components/ComponentBase.ts:256

release this component

Parameters

force?

boolean

Returns

void

Inherited from

ComponentBase.destroy


init()

init(param?): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:72

Build the per-axis handle objects, materials and colliders.

Parameters

param?

any

Returns

void

Overrides

ComponentBase.init


start()

start(): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:107

Component lifecycle start hook.

Returns

void

Overrides

ComponentBase.start


onEnable()

onEnable(view?): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:112

Attach the handle container and align the gizmo when enabled.

Parameters

view?

View3D

Returns

void

Overrides

ComponentBase.onEnable


onDisable()

onDisable(view?): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:118

Detach the handle container when disabled.

Parameters

view?

View3D

Returns

void

Overrides

ComponentBase.onDisable


reset()

reset(): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:123

Re-align the gizmo to the target according to the current transform space.

Returns

void


onMouseDown()

onMouseDown(e): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:215

Begin a drag: pick an axis and record the start point.

Parameters

e

PointerEvent3D

Returns

void


onMouseMove()

onMouseMove(e): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:239

Highlight handles on hover, or apply the transform while dragging.

Parameters

e

PointerEvent3D

Returns

void


onMouseUp()

onMouseUp(e): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:295

End a drag and clear the active axis.

Parameters

e

PointerEvent3D

Returns

void


onUpdate()

onUpdate(view?): void

Defined in: src/util/transformUtil/TransformControllerBaseComponent.ts:304

Keep the gizmo at a constant screen size and pinned to the target each frame.

Parameters

view?

View3D

Returns

void

Overrides

ComponentBase.onUpdate