There needs to be a better inheritance pattern for creation of drawing primitives, not unlike the hierarchy within the CreateJS framework.
From the MDN page on Object.create there is a simple example for one-class inheritance model. They also suggest mixins for multiple inheritances, similar to jQuery's object extend.
function MyClass() {
SuperClass.call(this);
OtherSuperClass.call(this);
}
MyClass.prototype = Object.create(SuperClass.prototype); // inherit
mixin(MyClass.prototype, OtherSuperClass.prototype); // mixin
MyClass.prototype.myMethod = function() {
// do a thing
};
There needs to be a better inheritance pattern for creation of drawing primitives, not unlike the hierarchy within the CreateJS framework.
From the MDN page on Object.create there is a simple example for one-class inheritance model. They also suggest mixins for multiple inheritances, similar to jQuery's object extend.