NGimbal / sdfui

Drafting with signed distance fields
https://www.alignaec.com
GNU General Public License v3.0
27 stars 0 forks source link

Selection by click + box #56

Open NGimbal opened 4 years ago

NGimbal commented 4 years ago

Render select object bounding box is just going to be a shader that loops over points in pt texture, each point (rgba) represents rect like in rect shader, draws rectangle, thin line sharp corners, blue, decorates with indicators for handles. Probably like open circles at corners and edges maybe. depending on implementation.

Might want a second rbush for transform handles? to represent these points for selection / transformation? Or maybe just add to existing Rbush and retain a reference to the bounding box points in existence? That could get crazy?

NGimbal commented 4 years ago

Also question w/ regards to how fill vs stroke selection is handled? Good ui might be, if((strokeDistance + epsilon) < fillDistance) { sel(stroke) } else { sel(fill) }