ReadonlycurrentThe 3D node whose listeners are running, or null outside the 3D dispatch
The 3D counterpart of currentTarget: while target3D stays on the event's target, this moves
from node to node, so an ancestor's listener reads the ancestor. The View's own listeners read
null.
Readonlyhit3What the pointer is over: the hit View3D#raycast would return for event.global, or
null when the ray hits nothing
It ignores which node is being told, so a pointerupoutside on the pressed node reports where
the pointer was released, such as on a drop target, and a pointerout reports the node the
pointer moved onto. It is null on the pointerout as the pointer leaves the View and on a
release outside the View.
ground.on('pointertap', (e) => {
if (e.hit3D) marker.position.copyFrom(e.hit3D.point); // drop a marker where the ray landed
});
// Only per-triangle volumes carry surface data
wall.hitVolume = 'geometry';
wall.on('pointertap', (e) => {
if (e.hit3D && e.hit3D.normal.y > 0.9) console.log('floor, not wall');
});
Readonlytarget3The 3D node this event is about, or null when it belongs to the View, as on a click on empty
space
The View's own listeners see the View as event.target, while target3D still names the node.
A pixi.js
FederatedWheelEventwith the 3D fieldsExample