/** * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** * This object is one that will allow you to specify custom rendering functions based on render type * * @class CustomRenderable * @extends DisplayObject * @constructor */ PIXI.CustomRenderable = function() { PIXI.DisplayObject.call( this ); this.renderable = true; }; // constructor PIXI.CustomRenderable.prototype = Object.create( PIXI.DisplayObject.prototype ); PIXI.CustomRenderable.prototype.constructor = PIXI.CustomRenderable; /** * If this object is being rendered by a CanvasRenderer it will call this callback * * @method renderCanvas * @param renderer {CanvasRenderer} The renderer instance */ PIXI.CustomRenderable.prototype.renderCanvas = function() { // override! }; /** * If this object is being rendered by a WebGLRenderer it will call this callback to initialize * * @method initWebGL * @param renderer {WebGLRenderer} The renderer instance */ PIXI.CustomRenderable.prototype.initWebGL = function() { // override! }; /** * If this object is being rendered by a WebGLRenderer it will call this callback * * @method renderWebGL * @param rendererGroup {WebGLRenderGroup} The renderer group instance * @param projectionMatrix {Matrix} The object's projection matrix */ PIXI.CustomRenderable.prototype.renderWebGL = function() { // not sure if both needed? but ya have for now! // override! };