Skip to content

@orillusion/core


Class: HoverCameraController ​

Defined in: src/components/controller/HoverCameraController.ts:18

Hovering camera controller

Extends ​

Constructors ​

Constructor ​

new HoverCameraController(): HoverCameraController

Defined in: src/components/controller/HoverCameraController.ts:130

Returns ​

HoverCameraController

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


camera ​

camera: Camera3D

Defined in: src/components/controller/HoverCameraController.ts:22

camera controlling


minDistance ​

minDistance: number = 0.1

Defined in: src/components/controller/HoverCameraController.ts:27

The closest distance that the mouse wheel can operate


maxDistance ​

maxDistance: number = 500

Defined in: src/components/controller/HoverCameraController.ts:32

The farthest distance that the mouse wheel can operate


rollSmooth ​

rollSmooth: number = 15.0

Defined in: src/components/controller/HoverCameraController.ts:37

Smoothing coefficient of rolling angle


dragSmooth ​

dragSmooth: number = 20

Defined in: src/components/controller/HoverCameraController.ts:42

Smoothing coefficient of dragging


wheelSmooth ​

wheelSmooth: number = 10

Defined in: src/components/controller/HoverCameraController.ts:47

Smoothing coefficient of rolling


wheelStep ​

wheelStep: number = 0.002

Defined in: src/components/controller/HoverCameraController.ts:52

Mouse scrolling step coefficient


mouseRightFactor ​

mouseRightFactor: number = 0.25

Defined in: src/components/controller/HoverCameraController.ts:57

Right mouse movement coefficient


mouseLeftFactor ​

mouseLeftFactor: number = 20

Defined in: src/components/controller/HoverCameraController.ts:62

Left mouse movement coefficient


smooth ​

smooth: boolean = true

Defined in: src/components/controller/HoverCameraController.ts:67

Whether to enable smooth mode


distance ​

distance: number = 10

Defined in: src/components/controller/HoverCameraController.ts:79

Distance between camera and target


roll ​

roll: number = 0

Defined in: src/components/controller/HoverCameraController.ts:85

Roll angle around y-axis


pitch ​

pitch: number = 0

Defined in: src/components/controller/HoverCameraController.ts:91

Pitch angle around x-axis

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


bottomClamp ​

Get Signature ​

get bottomClamp(): number

Defined in: src/components/controller/HoverCameraController.ts:109

Max angle of pitch

Returns ​

number

Set Signature ​

set bottomClamp(value): void

Defined in: src/components/controller/HoverCameraController.ts:112

Parameters ​
value ​

number

Returns ​

void


topClamp ​

Get Signature ​

get topClamp(): number

Defined in: src/components/controller/HoverCameraController.ts:118

Min angle of pitch

Returns ​

number

Set Signature ​

set topClamp(value): void

Defined in: src/components/controller/HoverCameraController.ts:121

Parameters ​
value ​

number

Returns ​

void


target ​

Get Signature ​

get target(): Vector3

Defined in: src/components/controller/HoverCameraController.ts:203

Get target position

Returns ​

Vector3

Set Signature ​

set target(target): void

Defined in: src/components/controller/HoverCameraController.ts:195

Set target position

Parameters ​
target ​

Vector3

Returns ​

void

Methods ​

init() ​

init(param?): void

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

Parameters ​

param? ​

any

Returns ​

void

Inherited from ​

ComponentBase.init


stop() ​

stop(): void

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

Returns ​

void

Inherited from ​

ComponentBase.stop


onEnable()? ​

optional onEnable(view?): any

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

Parameters ​

view? ​

View3D

Returns ​

any

Inherited from ​

ComponentBase.onEnable


onDisable()? ​

optional onDisable(view?): any

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

Parameters ​

view? ​

View3D

Returns ​

any

Inherited from ​

ComponentBase.onDisable


onUpdate()? ​

optional onUpdate(view?): any

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

Parameters ​

view? ​

View3D

Returns ​

any

Inherited from ​

ComponentBase.onUpdate


onLateUpdate()? ​

optional onLateUpdate(view?): any

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

Parameters ​

view? ​

View3D

Returns ​

any

Inherited from ​

ComponentBase.onLateUpdate


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


flowTarget() ​

flowTarget(target, offset?): void

Defined in: src/components/controller/HoverCameraController.ts:158

Parameters ​

target ​

Object3D

offset? ​

Vector3 = Vector3.ZERO

Returns ​

void


getFlowTarget() ​

getFlowTarget(): Object3D

Defined in: src/components/controller/HoverCameraController.ts:164

Returns ​

Object3D


setCamera() ​

setCamera(roll, pitch, distance, target?): void

Defined in: src/components/controller/HoverCameraController.ts:175

Initialize Camera

Parameters ​

roll ​

number

Roll angle around y-axis

pitch ​

number

Pitch angle around x-axis

distance ​

number

max distance to target

target? ​

Vector3

coordinates of the target

Returns ​

void


focusByBounds() ​

focusByBounds(obj): void

Defined in: src/components/controller/HoverCameraController.ts:187

Parameters ​

obj ​

Object3D

Returns ​

void


onBeforeUpdate() ​

onBeforeUpdate(view?): void

Defined in: src/components/controller/HoverCameraController.ts:258

Parameters ​

view? ​

View3D

Returns ​

void

Overrides ​

ComponentBase.onBeforeUpdate