You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I like spine.js, I think there's a larger community around backbone... my concern with the underscore library is valid (name clashing with _() in Studio, for instance), but I figured out a workaround today, so I think we should use it (backbone).
Basically, we'd need to load it at the beginning of the scripts, like so:
That script block can be replaced with a file only containing that one line. If we'd like to actually use underscore outside of backbone, we can alias it to something else, like so:
window.underscore = _.noConflict();
or
window.U = _.noConflict();
Then, we'd be able to use underscore (if we wanted), like so: U([1,2,3]).map(function(){}) or U.map([1,2,3], function(){});
While I like spine.js, I think there's a larger community around backbone... my concern with the underscore library is valid (name clashing with
_()
in Studio, for instance), but I figured out a workaround today, so I think we should use it (backbone).Basically, we'd need to load it at the beginning of the scripts, like so:
That script block can be replaced with a file only containing that one line. If we'd like to actually use underscore outside of backbone, we can alias it to something else, like so:
or
Then, we'd be able to use underscore (if we wanted), like so:
U([1,2,3]).map(function(){})
orU.map([1,2,3], function(){});
Still, I prefer sugar.js to underscore. (:
Also, underscore's functions are available within backbone's collections:
http://documentcloud.github.com/backbone/#Collection-Underscore-Methods
I therefore think we should consider backbone for Cardboard.
The text was updated successfully, but these errors were encountered: