Open dominictarr opened 11 years ago
I'm ok for vec2 I'll take a look later today (or feel free to send PR yourself)
I added you as x11 and ntk github/npm collaborator. For simple changes like adding new request/event feel free to commit directly, bump version and publish
okay, cool - I like to do pull requests anyway, just so that everyone knows what is happening.
do you do IRC? I hang out in #stackvm in freenode.
I'm often on #polyhack - I'll join stackvm as well
One thing I'd like to suggest, is to use https://github.com/tmpvar/vec2.js to represent point & sizes instead of just
x, y, width, height
properties.Then all the code about intersections, layouts, dragging&dropping, animation etc, becomes a great deal more modular, and decoupled from the fact that it's for a window manager, or whatever.
(for example, the layout code that I used in tiles I originally used in the browser. it's only coupled to geometry, and geometry is timeless. https://github.com/dominictarr/vec2-layout/blob/master/grid.js
I'm using it like this https://github.com/dominictarr/tiles/blob/master/xorg.js#L70-L77
With a
bounds = new Vec2()
for thex, y
coords, andbounds.size = new Vec2()
for the width and height. I've been considering changing it towin.pos = new Vec2(); win.size = new Vec2()
but on the other hand, it's more self contained with just one property.