Closed fardeem closed 11 years ago
Sure, the delay is simply being set by a debounce
function right now. If that was changed to throttle
, then the filters would be applied in realtime. The only reason I went with debounce was that the effect didn't look as good on HiDPI screens due to longer render times.
busy = false # Are we currently rendering?
changed = false # Tracks unrendered changes
# Triggers the render, throttled to every 400ms max
render = _.throttle ->
if busy
changed = true
return
else
changed = false
busy = true
caman.revert()
for own filter, value of filters
value = parseFloat value, 10
continue if value is 0
caman[filter](value)
caman.render ->
busy = false
render() if changed
, 400
Is this something I can configure somehow without mucking with the library code? I want to do the same thing. I'm using the javascript code - not the coffee script
In the example page, Caman waits for the dragging to be finished. Is there some way that I can apply filters realtime?