iamralpht.github.io icon indicating copy to clipboard operation
iamralpht.github.io copied to clipboard

Update Cassowary Version

Open slightlyoff opened this issue 10 years ago • 6 comments

Hey,

This project is amazing! I made some changes to cassowary.js that make it ~2x faster in Chrome; updating should be straightforward.

Latest built version here: https://github.com/slightlyoff/cassowary.js/blob/master/bin/c.js

slightlyoff avatar Sep 03 '15 19:09 slightlyoff

There is also a fast alternative impl. https://github.com/nucleic/kiwi/tree/feature-js?files=1

mcbain avatar Oct 12 '15 08:10 mcbain

Apologies for the slow reply. Map is a pretty big win for Cassowary :).

Oddly enough I've been thinking about using a simpler solver for Slalom -- I haven't encountered any situations where I have cycles in the constraints (I think the kind of positioning I'm doing ends up being much simpler than general purpose view layout) but I have run into a few situations where I wish I had non-linear relationships.

I'm planning on writing a simpler "spreadsheet" solver that just sorts a list of constraints into a DAG and then evaluates it. It would bail on any cycles, but I could then have non-linear functions and therefore express more UIs (hopefully I'd finally be able to do the Chrome Mobile tab switcher UI with multiple touch points, and do pan-rotate-scale too...).

The other alternative if that doesn't work out and I still really want non-linear relationships is constraint relaxation, but I'm scared off by the runtime cost currently :(.

iamralpht avatar Oct 28 '15 11:10 iamralpht

@iamralpht sounds pretty cool. Saw somewhere that you work for Tesla Inc now. Will this be also open source?!

mcbain avatar Oct 28 '15 13:10 mcbain

@iamralpht btw. Since Famous Inc. seems to be dead, the community seek currently for an alternative for javascript rendering engine. I mentioned your work there - http://forums.infamous.io., since simply draw boxes on the screen very fast is not enough to create a responsive user-interface :)

mcbain avatar Oct 28 '15 13:10 mcbain

@mcbain Huh, I didn't realize famous had pivoted; hope it works out for them. My original plan was to make a UI design tool that ran on tablets and let you draw boxes quickly and express the (motion) constraints between them using your fingers rather than a lot of code. I figured Slalom was the part that didn't exist the most so that was what I worked on first. I did a few hours work on a tool to draw UI using gestures, here: https://github.com/iamralpht/drawgui It's obviously not useful yet though. Didn't get to hooking up motion constraints which is the fun UI engineering challenge :).

For Slalom to progress it needs to demonstrate building reusable components instead of one-off demos. It's not there yet, and the Box abstraction in particular is holding it back... Maybe it gets paired back to just the solver and motion constraints, and then can be integrated more easily with React.Animated or whatever other component system folks want to use.

iamralpht avatar Oct 28 '15 14:10 iamralpht

Has there been any news on any of this? It's really interesting.

erikkaplun avatar Mar 26 '16 11:03 erikkaplun