Skip to main content

@novorender/api / NullController

Class: NullController

Defined in: @novorender/src/web_app/controller/null.ts:11

Null type camera motion controller.

Remarks​

This controller is completely passive and will not overwrite/modify any camera render state.

Extends​

Accessors​

axes​

Get Signature​

get axes(): ControllerAxes;

Defined in: @novorender/src/web_app/controller/base.ts:59

The input axes

See​

ControllerInput.axes

Returns​

ControllerAxes

Inherited from​

BaseController.axes


currentFlyTo​

Get Signature​

get currentFlyTo(): undefined | Orientation;

Defined in: @novorender/src/web_app/controller/base.ts:113

The current fly-to state, if any.

Returns​

undefined | Orientation

Inherited from​

BaseController.currentFlyTo


generation​

Get Signature​

get generation(): number;

Defined in: @novorender/src/web_app/controller/base.ts:34

Camera controller state generation.

Remarks​

If the controller state changes, the generation count will be incremented once every call to renderStateChanges. This can be used to detect changes by comparing to a local generation count. The count is wrapped at 0xffffffff, so make sure you use != comparison and not < comparison.

Returns​

number

Inherited from​

BaseController.generation


hasShift​

Get Signature​

get hasShift(): boolean;

Defined in: @novorender/src/web_app/controller/base.ts:108

The input shift button state.

See​

ControllerInput.hasShift

Returns​

boolean

Inherited from​

BaseController.hasShift


height​

Get Signature​

get height(): number;

Defined in: @novorender/src/web_app/controller/base.ts:80

The input element height.

See​

ControllerInput.height

Returns​

number

Inherited from​

BaseController.height


moving​

Get Signature​

get moving(): boolean;

Defined in: @novorender/src/web_app/controller/base.ts:66

Whether the camera is currently considered moving or not.

See​

View.isIdleFrame

Returns​

boolean

Inherited from​

BaseController.moving


multiplier​

Get Signature​

get multiplier(): number;

Defined in: @novorender/src/web_app/controller/base.ts:87

The input multiplier.

See​

ControllerInput.multiplier

Returns​

number

Inherited from​

BaseController.multiplier


pointerTable​

Get Signature​

get pointerTable(): readonly TouchContactPoint[];

Defined in: @novorender/src/web_app/controller/base.ts:101

The input pointer table.

See​

ControllerInput.touchPoints

Returns​

readonly TouchContactPoint[]

Inherited from​

BaseController.pointerTable


width​

Get Signature​

get width(): number;

Defined in: @novorender/src/web_app/controller/base.ts:73

The input element width.

See​

ControllerInput.width

Returns​

number

Inherited from​

BaseController.width


zoomPos​

Get Signature​

get zoomPos(): number[];

Defined in: @novorender/src/web_app/controller/base.ts:94

The input zoom position.

See​

ControllerInput.zoomPos

Returns​

number[]

Inherited from​

BaseController.zoomPos

Constructors​

Constructor​

new NullController(input): NullController;

Defined in: @novorender/src/web_app/controller/null.ts:18

Parameters​

ParameterTypeDescription
inputControllerInputThe input source.

Returns​

NullController

Overrides​

BaseController.constructor

Methods​

animate()​

animate(elapsedTime): void;

Defined in: @novorender/src/web_app/controller/base.ts:140

Apply time sensitive changes to controller state.

Parameters​

ParameterTypeDescription
elapsedTimenumberThe # of milliseconds elapsed since the last update.

Returns​

void

Remarks​

Fly-to animations happens here, as well as motion based on keyboard pressed-state, such as the WASD keys.

Inherited from​

BaseController.animate


attach()​

attach(): void;

Defined in: @novorender/src/web_app/controller/base.ts:198

Attach this controller to the input object

Returns​

void

Inherited from​

BaseController.attach


autoFit()​

autoFit(_center, _radius): void;

Defined in: @novorender/src/web_app/controller/null.ts:34

Attempt to fit controller position such that the specified bounding sphere is brought into view.

Parameters​

ParameterType
_centerReadonlyVec3
_radiusnumber

Returns​

void

Overrides​

BaseController.autoFit


changed()​

protected changed(): void;

Defined in: @novorender/src/web_app/controller/base.ts:39

Signal changes to internal state.

Returns​

void

Inherited from​

BaseController.changed


init()​

init(params): void;

Defined in: @novorender/src/web_app/controller/null.ts:27

Initialize controller from parameters.

Parameters​

ParameterType
paramsControllerInitParams

Returns​

void

See​

serialize

Overrides​

BaseController.init


mouseButtonChanged()​

mouseButtonChanged(_event): void | Promise<void>;

Defined in: @novorender/src/web_app/controller/null.ts:61

Handler for mouse buttons events.

Parameters​

ParameterType
_eventMouseEvent

Returns​

void | Promise<void>

Overrides​

BaseController.mouseButtonChanged


moveBegin()​

moveBegin(_event): void | Promise<void>;

Defined in: @novorender/src/web_app/controller/null.ts:63

Handler for mouse/touch move events.

Parameters​

ParameterType
_eventMouseEvent | TouchEvent

Returns​

void | Promise<void>

Overrides​

BaseController.moveBegin


moveTo()​

moveTo(
_targetPosition,
_flyTime,
_rotation?): void;

Defined in: @novorender/src/web_app/controller/null.ts:64

Move controller to specified position/rotation.

Parameters​

ParameterTypeDefault value
_targetPositionReadonlyVec3undefined
_flyTimenumber1000
_rotation?ReadonlyQuatundefined

Returns​

void

Overrides​

BaseController.moveTo


renderStateChanges()​

renderStateChanges(state, elapsedTime): 
| undefined
| RecursivePartial<RenderState>;

Defined in: @novorender/src/web_app/controller/base.ts:247

Retrieve the state changes to be applied to the specified render state.

Parameters​

ParameterTypeDescription
stateRenderStateCameraThe baseline render state.
elapsedTimenumberThe time elapsed since last call, in milliseconds.

Returns​

| undefined | RecursivePartial<RenderState>

Inherited from​

BaseController.renderStateChanges


resetFlyTo()​

protected resetFlyTo(): void;

Defined in: @novorender/src/web_app/controller/base.ts:117

Returns​

void

Inherited from​

BaseController.resetFlyTo


serialize()​

serialize(): ControllerInitParams;

Defined in: @novorender/src/web_app/controller/null.ts:22

Serialize the state of this controller into init parameters.

Returns​

ControllerInitParams

See​

init

Overrides​

BaseController.serialize


setFlyTo()​

protected setFlyTo(flyTo): void;

Defined in: @novorender/src/web_app/controller/base.ts:124

Initialize a fly-to transition.

Parameters​

ParameterTypeDescription
flyToFlyToParamsThe transition parameters

Returns​

void

Inherited from​

BaseController.setFlyTo


stateChanges()​

stateChanges(_state?): Partial<RenderStateCamera>;

Defined in: @novorender/src/web_app/controller/null.ts:38

Retrieve changes to render state from derived class, if any.

Parameters​

ParameterType
_state?RenderStateCamera

Returns​

Partial<RenderStateCamera>

See​

View.modifyRenderState

Remarks​

If there are no changes, the returned object will be empty, i.e. .

Overrides​

BaseController.stateChanges


touchChanged()​

touchChanged(_event): void | Promise<void>;

Defined in: @novorender/src/web_app/controller/null.ts:62

Handler for touch events.

Parameters​

ParameterType
_eventTouchEvent

Returns​

void | Promise<void>

Overrides​

BaseController.touchChanged


update()​

update(): void;

Defined in: @novorender/src/web_app/controller/null.ts:36

Update internal controller state

Returns​

void

Overrides​

BaseController.update


zoomTo()​

zoomTo(_boundingSphere, _flyTime): void;

Defined in: @novorender/src/web_app/controller/null.ts:69

Bring the specified bounding sphere into view.

Parameters​

ParameterTypeDefault value
_boundingSphereBoundingSphereundefined
_flyTimenumber1000

Returns​

void

Remarks​

This function will retain the current camera controller rotation.

Overrides​

BaseController.zoomTo


assert()​

static assert(controller): asserts controller is NullController;

Defined in: @novorender/src/web_app/controller/null.ts:54

NullController type assert function.

Parameters​

ParameterTypeDescription
controllerBaseControllerThe controller to type assert.

Returns​

asserts controller is NullController


getDistanceFromViewPlane()​

protected static getDistanceFromViewPlane(
point,
cameraPosition,
cameraRotation): number;

Defined in: @novorender/src/web_app/controller/base.ts:281

Compute the distance to a point from the specified view plane.

Parameters​

ParameterTypeDescription
pointReadonlyVec3The point to measure distance too
cameraPositionReadonlyVec3The position of the camera/view plane.
cameraRotationReadonlyQuatThe rotation of the camera/view plane.

Returns​

number

A signed distance from the point to the view plane, i.e. positive for points in front of the plane and negative otherwise.

Inherited from​

BaseController.getDistanceFromViewPlane


is()​

static is(controller): controller is NullController;

Defined in: @novorender/src/web_app/controller/null.ts:47

NullController type guard function.

Parameters​

ParameterTypeDescription
controllerBaseControllerThe controller to type guard.

Returns​

controller is NullController

Properties​

input​

readonly input: ControllerInput;

Defined in: @novorender/src/web_app/controller/base.ts:53

The input source for this controller.

Inherited from​

BaseController.input


kind​

kind: "null";

Defined in: @novorender/src/web_app/controller/null.ts:12

The controller type id.

Overrides​

BaseController.kind


projection​

projection: undefined = undefined;

Defined in: @novorender/src/web_app/controller/null.ts:13

The camera projection kind.

See​

RenderStateCamera.kind.

Overrides​

BaseController.projection