Closed bebraw closed 11 years ago
This looks sweet. I'm currently on vacation but will check this out in full on Monday.
Ok. No probs.
There is probably potential for tweaking. For instance if you use some vector library already, you might want to hook up the code with that etc. Now it's just a bunch of custom ops. :)
@bebraw Great work I like it! @meltingice I would be happy if you can merge that request.
@meltingice Will you merge this request?
@confile I'm guessing he is busy right now. For now you can try and test the dist version available at my branch. It contains both the multi control point patch and this one.
@bebraw okay which branch is it?
@bebraw @meltingice There seems to be a bug in the latest commit see here: https://github.com/meltingice/CamanJS/issues/122
@bebraw could support some kind of documentation for the new hermite curve?
@confile The API docs should explain it. There is also an example around at examples/browser/curves.html
.
@bebraw yes of course but you should add it here too: http://camanjs.com/guides/#BuiltIn
good job by the way! Thank you!
@confile I think @meltingice will do that once he releases a new version. :)
The hermite curve variant guarantees that the curve passes through given control points. This is the method that applications such as Photoshop and GIMP use for tone mapping. Consequently it will be easier to port effects from those environments to CamanJS.
The new curve variant may be passed as an optional parameter to the curves effect. It defaults to bezier when one is not provided.
Note that this is based on #114. I suggest you merge that first and this after. That way you avoid possible conflicts.
If you want to check out the original algorithm, check out Unity wiki page on the topic.
Here's a little demo image: