Skip to content

Instantly share code, notes, and snippets.

@arlando
Created January 13, 2014 01:56
Show Gist options
  • Save arlando/8393437 to your computer and use it in GitHub Desktop.
Save arlando/8393437 to your computer and use it in GitHub Desktop.
KineticJS Notes
//Inheritance Pattern
(function() {
Kinetic.MyCircle = function(config) {
this._initMyCircle(config);
};
Kinetic.MyCircle.prototype = {
_initMyCircle: function(config) {
Kinetic.Circle.call(this, config);
},
myFunc : function(){
}
};
Kinetic.Util.extend(Kinetic.MyCircle, Kinetic.Circle);
})();
//Do not clear layer before redrawing it ... took me 10 minutes to find out how to do this!
var layer = new Kinetic.Layer({
clearBeforeDraw: false
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment