Skip to main content

Class: Arm

Hierarchy

  • Group

    Arm

Constructors

constructor

new Arm(options?): Arm

Parameters

NameType
optionsPartial<ArmOptions>

Returns

Arm

Overrides

THREE.Group.constructor

Properties

emitSwingEvent

emitSwingEvent: () => void

Type declaration

▸ (): void

Returns

void


options

options: ArmOptions

Methods

connect

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

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

Parameters

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

Returns

fn

▸ (): void

Returns

void


doSwing

doSwing(): void

Perform an arm swing by playing the swing animation and sending an event to the network.

Returns

void


setArmObject

setArmObject(object, animate, customType?): void

Set a new object for the arm. If animate is true, the transition will be animated.

Parameters

NameTypeDescription
objectObject3D<Object3DEventMap>New object for the arm
animatebooleanWhether to animate the transition
customType?string-

Returns

void


update

update(): void

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

Returns

void