Skip to main content

Class: Hud

Hierarchy

  • Group

    Hud

Constructors

constructor

new Hud(options?): Hud

Parameters

NameType
optionsPartial<HudOptions>

Returns

Hud

Overrides

THREE.Group.constructor

Properties

options

options: HudOptions

Methods

connect

connect(inputs, namespace?): () => void

Connect the HUD to the given input manager. This will allow the HUD to listen to left and right clicks to play HUD animations. This function returns a function that when called unbinds the HUD's keyboard inputs.

Parameters

NameTypeDefault valueDescription
inputsInputs<any>undefinedThe Inputs instance to bind the HUD's keyboard inputs to.
namespacestring"*"The namespace to bind the HUD's keyboard inputs to.

Returns

fn

▸ (): void

Returns

void


setMesh

setMesh(mesh, animate): void

Set a new mesh for the HUD. If animate is true, the transition will be animated.

Parameters

NameTypeDescription
meshObject3D<Object3DEventMap>New mesh for the HUD
animatebooleanWhether to animate the transition

Returns

void


update

update(delta): void

Update the arm's animation. Note that when a hud is attached to a control, update is called automatically within the control's update loop.

Parameters

NameType
deltanumber

Returns

void