("intersectionenter", (IntersectionEvent) => void): this;

Emitted when the object is first intersected by a raycaster.



Handler Function

When the intersectionenter event is fired, attached handler functions are called with a single argument, an IntersectionEvent.


symbol.nodes.Plane.on("intersectionenter", (e) => {
    // Runs when intersectionenter occurs on the Plane node
    // The argument e contains useful info about this event:

    // Stores the distance from the raycaster to this object in the raycaster's coordinate system
    var raycasterDistance = e.distance;

    // Stores the raycaster colliding with this object
    var raycaster = e.raycaster;

    // Stores the localPosition of the collision point [x,y,z] in the object's local coordinate system
    var localPosition = e.localPosition;
zapcode branded_zapcode i