thomasboyt / coquette-inspect

A Chrome DevTools extension for inspecting games made with the Coquette framework
28 stars 14 forks source link

Inspect entity at cursor #23

Closed thomasboyt closed 9 years ago

thomasboyt commented 9 years ago

This one's pretty out there, but I think it's doable, if prone to breaking in intense ways:

Any entity in Coquette's collision detection framework should have this.size{x,y} and this.center{x,y} properties that could be used to determine whether two x,y coordinates lie within an entity. In fact, Coquette even has a super awesome method built in for this, used like this in the spinning shapes demo.

The debugger could have an "inspect at cursor" toggle, almost exactly like the inspect element button in the DOM inspector, that would allow you to click an entity and open its particular tree.