src/core/engines/ogl/ogl.js
/**
     * @private
     * Event handler for interactive objects.
     *
     * Handles currently taps on 3D objects.
     * Handles temporarily also taps on floor.
     *
     * @param event  Event      Javascript event object
     */
@private
Event handler for interactive objects.

Handles currently taps on 3D objects.
Handles temporarily also taps on floor.

@param event  Event      Javascript event object
@private Event handler for interactive objects . Handles currently taps on 3D objects . Handles temporarily also taps on floor . @param event Event Javascript event object
_handleEvent(event) {
        const mouse = new Vec2();
        mouse.set(2.0 * (event.x / renderer.width) - 1.0, 2.0 * (1.0 - event.y / renderer.height) - 1.0)
        const raycast = new Raycast(gl);
        raycast.castMouse(camera, mouse);
        const eventMeshes = Object.values(eventHandlers).map(handler => handler.model);
        const hits = raycast.intersectBounds(eventMeshes);
        hits.forEach((hit) => {
            eventHandlers[hit.id].handler();
        })
        if (hits.length === 0 && experimentTapHandler) {
            experimentTapHandler(event);
        }
    }
_handleEvent ( event ) { const mouse = new Vec2 ( ) ; mouse . set ( 2.0 * ( event . x / renderer . width ) - 1.0 , 2.0 * ( 1.0 - event . y / renderer . height ) - 1.0 ) const raycast = new Raycast ( gl ) ; raycast . castMouse ( camera , mouse ) ; const eventMeshes = Object . values ( eventHandlers ) . map ( handler => handler . model ) ; const hits = raycast . intersectBounds ( eventMeshes ) ; hits . forEach ( ( hit ) => { eventHandlers [ hit . id ] . handler ( ) ; } ) if ( hits . length === 0 && experimentTapHandler ) { experimentTapHandler ( event ) ; } }
@private
 Event handler for interactive objects.
@private Event handler for interactive objects .