UNPKG

1.05 kBJavaScriptView Raw
1class ObjectRenderer {
2 /**
3 * @param renderer - The renderer this manager works for.
4 */
5 constructor(renderer) {
6 this.renderer = renderer;
7 }
8 /** Stub method that should be used to empty the current batch by rendering objects now. */
9 flush() {
10 }
11 /** Generic destruction method that frees all resources. This should be called by subclasses. */
12 destroy() {
13 this.renderer = null;
14 }
15 /**
16 * Stub method that initializes any state required before
17 * rendering starts. It is different from the `prerender`
18 * signal, which occurs every frame, in that it is called
19 * whenever an object requests _this_ renderer specifically.
20 */
21 start() {
22 }
23 /** Stops the renderer. It should free up any state and become dormant. */
24 stop() {
25 this.flush();
26 }
27 /**
28 * Keeps the object to render. It doesn't have to be
29 * rendered immediately.
30 * @param {PIXI.DisplayObject} _object - The object to render.
31 */
32 render(_object) {
33 }
34}
35export {
36 ObjectRenderer
37};
38//# sourceMappingURL=ObjectRenderer.mjs.map