Class: Interaction
Defined in: src/interaction/Interaction.ts:100
Owns all logical target, hover, capture, completion, and cancellation state.
Constructors
Constructor
new Interaction(
dependencies):Interaction
Defined in: src/interaction/Interaction.ts:138
Parameters
dependencies
InteractionDependencies
Returns
Interaction
Methods
cancelObject()
cancelObject(
object,reason):void
Defined in: src/interaction/Interaction.ts:303
Cancels captures that belong to an object before its Script is disposed.
Parameters
object
reason
SelectionEndReason = 'removed'
Returns
void
clear()
clear():
void
Defined in: src/interaction/Interaction.ts:266
Returns
void
getIntersectionAt()
getIntersectionAt(
object,controller?):Intersection<Object3D<Object3DEventMap>> |null
Defined in: src/interaction/Interaction.ts:380
Parameters
object
controller?
Returns
Intersection<Object3D<Object3DEventMap>> | null
getResolvedRay()
getResolvedRay(
controller):ResolvedRay|undefined
Defined in: src/interaction/Interaction.ts:353
Parameters
controller
Returns
ResolvedRay | undefined
getSourceSnapshot()
getSourceSnapshot(
controller):InteractionSourceState|undefined
Defined in: src/interaction/Interaction.ts:347
Parameters
controller
Returns
InteractionSourceState | undefined
isHovered()
isHovered(
object):boolean
Defined in: src/interaction/Interaction.ts:371
Parameters
object
Returns
boolean
isManipulating()
isManipulating(
object):boolean
Defined in: src/interaction/Interaction.ts:494
Parameters
object
Returns
boolean
isPointingAt()
isPointingAt(
object):boolean
Defined in: src/interaction/Interaction.ts:357
Parameters
object
Returns
boolean
isSelectingAt()
isSelectingAt(
object):boolean
Defined in: src/interaction/Interaction.ts:364
Parameters
object
Returns
boolean
queueScaleIntent()
queueScaleIntent(
controller,factor):boolean
Defined in: src/interaction/Interaction.ts:499
Explicit zoom also reaches a UI control's manipulable ancestor.
Parameters
controller
factor
number
Returns
boolean
queueWheelIntent()
queueWheelIntent(
controller,delta):boolean
Defined in: src/interaction/Interaction.ts:509
Routes a normalized wheel delta using the next frame's resolved target.
Parameters
controller
delta
number
Returns
boolean
registerHitSurface()
registerHitSurface(
physical,logical,options?): () =>void
Defined in: src/interaction/Interaction.ts:280
Parameters
physical
logical
options?
Returns
():
void
Returns
void
removeSource()
removeSource(
controller,reason):void
Defined in: src/interaction/Interaction.ts:328
Parameters
controller
reason
SelectionEndReason = 'source-lost'
Returns
void
setLongSelectDuration()
setLongSelectDuration(
seconds):void
Defined in: src/interaction/Interaction.ts:163
Parameters
seconds
number
Returns
void
setRaycastMode()
setRaycastMode(
mode):void
Defined in: src/interaction/Interaction.ts:172
Parameters
mode
Returns
void
setSelectionFocusHandler()
setSelectionFocusHandler(
handler?):void
Defined in: src/interaction/Interaction.ts:293
Installs the UI runtime's focus policy without owning a second input path. The handler runs when any source starts a selection, before object callbacks, with the pressed surface or undefined for empty space.
Parameters
handler?
(target?) => void
Returns
void
syncTouchCandidates()
syncTouchCandidates(
candidates):void
Defined in: src/interaction/Interaction.ts:298
Refreshes bounded direct-touch candidates found by the lifecycle pass.
Parameters
candidates
Iterable<Object3D<Object3DEventMap>>
Returns
void
update()
update(
frame,deltaSeconds):void
Defined in: src/interaction/Interaction.ts:177
Replaces all sampled physical interaction state for one engine frame.
Parameters
frame
InteractionFrameInput
deltaSeconds
number = 0
Returns
void
writeCursorPointsAt()
writeCursorPointsAt(
object,first,second,present,selecting?):void
Defined in: src/interaction/Interaction.ts:409
Writes up to two internal cursor points on object, one slot per
pointer, and whether each slot has one in present. A pointer keeps its
slot while another leaves, and free slots fill in controller order. A
pointer that holds a capture on object keeps its slot and last point on
it while its ray is elsewhere. When selecting is given, also writes
whether each slot's controller is selecting the object, as isSelectingAt
reports for all controllers.
Parameters
object
first
second
present
boolean[]
selecting?
boolean[]
Returns
void