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.
The 3D fields a View3D adds to the pointer and wheel events it passes into its scene
They sit on pixi's own event object, so 2D listeners that run after the View passes the event on, such as the View's plain listeners and bubbling ones on its 2D ancestors, can read them too.
Remarks
hit3Dand its vectors, as they doglobal.on*handlers and*capturelisteners run before it passes the event on, so there the fields can benull. Read them in a plain listener,view3d.on('pointertap', …).globalpointermove,globalmousemoveandglobaltouchmove,composedPath()returns the 3D chain,[view3d.root, …, target], in an array the View can empty after the event. Copy it to keep it.null. The exception is a 2D node'spointeroverandmouseoverwhen the pointer moves straight off the View onto it:target3Dstill names the 3D node it left.Example