jeromeetienne/threex — Issue #19: Dom event when entities are within 'bounding box'
Author: willemmulder
Created: 2012-02-10 16:17:28+00:00
State: open

Bonjour!

I'm currently creating an RTS and was thinking on how to implement bounding box selection. What would be very cool to have is a function 'onWithinBoundingBox' on any object, which is triggered when the user selects an area on the screen and the object is within that area.

So: user selects an area (i.e. mouseDown, move, mouseUp) on the screen, all objects within that area get the 'onWithinBoundingBox' event triggered. When the user clicks somewhere else, the objects get the 'onOutisdeBoundingBox' event triggered.

Would that be hard to make?