Class: threejs/PointOfInterestFeature

threejs/PointOfInterestFeature()

new threejs/PointOfInterestFeature()

Extends

Members

(readonly) host

Gets the host that manages the feature.

Inherited From:

(readonly) owner

Gets the engine owner object of the host.

Inherited From:

target :Object|null

Gets and sets the target object the host should look at.

Type:
  • Object | null
Overrides:

Methods

discard()

Clean up once the feature is no longer in use. Remove the feature namespace
from the host and remove reference to the host.

Inherited From:

emit(message, valueopt)

Emit feature messages from the host. Feature messages will be prefixed with
the class name of the feature.

Parameters:
Name Type Attributes Description
message string

The message to emit.

value any <optional>

Optional parameter to pass to listener callbacks.

Inherited From:

installApi()

Adds a namespace to the host with the name of the feature to contain properties
and methods from the feature that users of the host need access to.

Inherited From:

listenTo(message, callback)

Listen to a feature message from the host object.

Parameters:
Name Type Description
message string

Message to listen for.

callback function

The callback to execute when the message is received.

Inherited From:

registerBlinkLayer(layerName, optionsopt)

Start keeping track of an animation layer that owns a blink animation. Blink
animations can be of any type, but if it is of type randomAnimation then a
it will be randomized each time a blink is called.

Parameters:
Name Type Attributes Description
layerName string

Name of the layer to keep track of.

options Object <optional>

Options for the layer.

Properties
Name Type Attributes Default Description
animation string <optional>
'blink'

Name of the blink animation
on the layer.

blendTime number <optional>
PointOfInterestFeature.DEFAULT_LAYER_OPTIONS.blendTime

Default amount of time to use when manipulating the layer's weight.

easingFn function <optional>

Default easing function to use when
manipulating the layer's weight.

Inherited From:

registerLookLayer(layerName, optionsopt)

Start keeping track of an animation layer that owns a blend2d animation with
blendWeights corresponding to horizontal and vertical look angles.

Parameters:
Name Type Attributes Description
layerName string

Name of the layer to keep track of.

options Object <optional>

Options for the layer.

Properties
Name Type Attributes Default Description
animation string <optional>
'look'

Name of the animation on the
layer whose blendWeights will be driven based on the angle between the lookTracker
and the lookTarget. This animation must be of type blend2d.

maxSpeed number <optional>
25

The maximum speed at which the blend2d
blendWeights can be manipulated.

forwardAxis string <optional>
'PositiveZ'

Axis pointing from the
front of the lookReference object. Valid options are 'PositiveX', 'NegativeX',
'PositiveY', 'NegativeY', 'PositiveZ', 'NegativeZ'.

lookReference Object <optional>

3D transformation node that the lookTracker
rotation limits should be calculated relative to. Defaults to the host owner.

hasSaccade number <optional>
false

Whether or not to include
saccadic motion onto the blendWeight animation. This should only be set to
true for blend2d animations representing eye animation.

blendTime number <optional>
PointOfInterestFeature.DEFAULT_LAYER_OPTIONS.blendTime

Default amount of time to use when manipulating layer weight.

easingFn function <optional>

Default easing function to use when
manipulating layer weight.

Inherited From:

setTarget(target)

Sets a new target to look at.

Parameters:
Name Type Description
target Object | null

The new target to look at.

Inherited From:

setTargetById(target)

Finds an object given its id and sets it as the new target to look at.
Should be overloaded for each rendering engine implementation.

Parameters:
Name Type Description
target string | number

Id to search for.

Overrides:

setTargetByName(target)

Finds an object given its name and sets it as the new target to look at.
Should be overloaded for each rendering engine implementation.

Parameters:
Name Type Description
target string

Name to search for.

Overrides:

stopListening(message, callbackopt)

Stop listening to a message from the host object.

Parameters:
Name Type Attributes Description
message string

Message to stop listening for.

callback function <optional>

Optional callback to remove. If none is defined,
remove all callbacks for the message.

Inherited From:

stopListeningByRegexp(regexp, callbackopt)

Stop listening to a message matching the given regular expression from the
host object.

Parameters:
Name Type Attributes Description
regexp Regexp

The regular expression to stop listening for.

callback function <optional>

Optional callback to remove. If none is defined,
remove all callbacks for the message.

Inherited From:

stopListeningToAll()

Stop listening to all messages.

Inherited From:

update(deltaTime)

Executes each time the host is updated.

Parameters:
Name Type Description
deltaTime number

Amount of time since the last host update was
called.

Inherited From: