@pixi/core
Version:
Core PixiJS
39 lines (38 loc) • 1.05 kB
JavaScript
class ObjectRenderer {
/**
* @param renderer - The renderer this manager works for.
*/
constructor(renderer) {
this.renderer = renderer;
}
/** Stub method that should be used to empty the current batch by rendering objects now. */
flush() {
}
/** Generic destruction method that frees all resources. This should be called by subclasses. */
destroy() {
this.renderer = null;
}
/**
* Stub method that initializes any state required before
* rendering starts. It is different from the `prerender`
* signal, which occurs every frame, in that it is called
* whenever an object requests _this_ renderer specifically.
*/
start() {
}
/** Stops the renderer. It should free up any state and become dormant. */
stop() {
this.flush();
}
/**
* Keeps the object to render. It doesn't have to be
* rendered immediately.
* @param {PIXI.DisplayObject} _object - The object to render.
*/
render(_object) {
}
}
export {
ObjectRenderer
};
//# sourceMappingURL=ObjectRenderer.mjs.map