I would like to propose overloading frames to support an addition signature. I would like the first argument to be the time, and the second to be the frame function... For example:
stage.frames('5s', function() {
// The frame...
});
This would make scheduling dynamic frames much cleaner, currently if you want to dynamically schedule a frame in the future you have to create it as an object literal, for example:
function frame(time, fn) {
var frame = {};
frame[time] = fn;
stage.frames(frame);
}
Thoughts on support this kind of signature directly in Bonsai?
Thb, it's not entirely clear to me why frames is supposed to add frames at all :) I would see it as a setter. Instead I would propose sth like addFrame(number or string, fn). /cc @davidaurelio
I would like to propose overloading frames to support an addition signature. I would like the first argument to be the time, and the second to be the frame function... For example:
This would make scheduling dynamic frames much cleaner, currently if you want to dynamically schedule a frame in the future you have to create it as an object literal, for example:
Thoughts on support this kind of signature directly in Bonsai?
M