npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gov.nasa.jpl.honeycomb/interaction-manager

v0.0.6

Published

Class to handle and resolve user click and drag interactions in three.js

Downloads

3

Readme

interaction-manager

Class to handle and resolve user click and drag interactions.

Use

import { WebGLRenderer } from 'three';
import { InteractionManager } from '@gov.nasa.jpl.honeycomb/interaction-manager';

const renderer = new WebGLRenderer();
const interactionManager = new InteractionManager( renderer );

// TODO: listen to events, lock interctions, etc

API

InteractionManagerEvent

type

type : String

The event name.

target

target : Object3D | null

The current target the event is being dispatched on.

originalTarget

originalTarget : Object3D

The target that the raycast originally hit and event dispatched on.

bubbling

bubbling : Boolean

Whether the event bubbles.

interactionaManager

interactionaManager : InteractionManager

Reference to the interactionManager that dispatched the event.

stopPropagation

stopPropagation : Function

Stop the bubbling of the event up the tree.

hit

hit : Object

The raycast hit information returned from three.js' Raycaster

mouseEvent

mouseEvent : Event

The original mouse event that trigged this event.

InteractionManager

Class for managing and dispatching mouse events in a three.js scene. Events are dispatched up the objects parents if relevant until "event.stopPropagation" is called. If an event is not handled by any handler as the event bubbles then it is dispatched on the InteractionManager itself.

extends EventDispatcher

Events

mouse-enter

Fired whenever the pointer moves over an object.

mouse-move

Fired whenever the pointer moves on an object.

mouse-exit

Fired whenever the points leaves an object.

mouse-up

Fired whenever a mouse up event occurs.

mouse-down

Fired whenever a mouse down event occurs.

click

Fired whenever the pointer is clicked.

key-down

Fired whenever a keydown event occurs.

locked

Fired whenever the InteractionManager is locked using {@link #InteractionManager#lock lock}.

unlocked

Fired whenever the InteractionManager is unlocked using {@link #InteractionManager#unlock unlock}.

event-handled

Fired whenever stopPropagation is called to denote the event has been handled by a handler.

enabled

enabled : Boolean = true

Whether the manager is watching and dispatching events.

camera

camera : Camera = null

The camera used to perform raycasts

objects

objects : Array<Object3D> = null

The list of objects to raycast against when mouse events are dispatched. This must be populated manually.

constructor

constructor( renderer : WebGLRenderer ) : void

Takes the renderer with associated canvas that interaction event should be listed for on.

getLock

getLock(  ) : any

Returns the object currently tracked lock on the manager indicating that a specific object has control over interactions.

lock

lock( key : any ) : Boolean

Sets the interaction manager lock and dispatches a locked event if a lock was not already set. Returns true if the lock was set, false otherwise.

unlock

unlock( key : any ) : Boolean

Unlocks the interaction manager if the given object is currently being used to lock interactions. Dispatches an unlocked event if the lock was successfully unlocked. Returns true if the manager was unlocked, false otherwise.

handleEvent

handleEvent(  ) : void

Triggers that an event was handed and prevents it from bubbling up the object tree any further. Dispatches and event-handled event.

getIntersection

getIntersection( objects : Array<Object3D>, recursive : Boolean = true ) : Object3D

Returns the first object that was hit by the ray from the given list of object using the last mouse position.

getIntersections

getIntersections( objects : Array<Object3D>, recursive : Boolean = true ) : Object3D

Returns the hit results that were found by the ray from the given list of object using the last mouse position.