Skip to content

Commit

Permalink
Add empty S2.FX.Base#update function to allow for ad-hoc effects usin…
Browse files Browse the repository at this point in the history
…g before/afterUpdate
  • Loading branch information
madrobby committed Feb 2, 2010
1 parent 5054ad8 commit 62c9232
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,3 +1,5 @@
* Add empty S2.FX.Base#update function to allow for ad-hoc effects using before/afterUpdate

*2.0.0 alpha 5* (November 23, 2009)

* Add UI Themeroller-compatible UI components
Expand Down
12 changes: 11 additions & 1 deletion src/effects/base.js
Expand Up @@ -259,7 +259,17 @@ S2.FX.Base = Class.create({
**/
inspect: function() {
return '#<S2.FX:' + [this.state, this.startsAt, this.endsAt].inspect() + '>';
}
},

/**
* S2.FX.Base#update() -> undefined
*
* The update method is called for each frame to be rendered. The implementation
* in S2.Fx.Base simply does nothing, and is intended to be overwritten by
* subclasses. It is provided for cases where S2.FX.Base is instantiated directly
* for ad-hoc effects using the beforeUpdate and afterUpdate callbacks.
**/
update: Prototype.emptyFunction
});

/**
Expand Down

0 comments on commit 62c9232

Please sign in to comment.