phetsims / scenery

Scenery is an HTML5 scene graph.
MIT License
53 stars 12 forks source link

Using Canvas for accelerated hit testing #176

Open jonathanolson opened 10 years ago

jonathanolson commented 10 years ago

See CanvasRenderingContext2D's isPointInPath / isPointInStroke (and potentially store Path objects for this usage, if those are supported).

jonathanolson commented 10 years ago

NOTE: patchy ellipse support may mean we need to check those ourselves? Or check existence of context.ellipse before using this.

jonathanolson commented 10 years ago

We'll also want to thoroughly unit test coverage across browsers with this, since this could cause platform-specific bugs easily.