UNPKG

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