- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
import type { Renderer } from './Renderer';
import { deprecation } from '@pixi/utils';
/**
* Interface for systems used by the {@link PIXI.Renderer}.
* @memberof PIXI
*/
export interface ISystem
{
/** Generic destroy methods to be overridden by the subclass */
destroy(): void;
}
/**
* Types for system and pipe classes.
* @ignore
*/
export interface ISystemConstructor<R = Renderer>
{
new (renderer: R): ISystem;
}
/**
* Use the ISystem interface instead.
* @deprecated since 6.1.0
* @memberof PIXI
*/
export class System implements ISystem
{
/** Reference to the main renderer */
public renderer: Renderer;
/**
* @param renderer - Reference to Renderer
*/
constructor(renderer: Renderer)
{
// #if _DEBUG
deprecation('6.1.0', 'System class is deprecated, implemement ISystem interface instead.');
// #endif
this.renderer = renderer;
}
/** Destroy and don't use after this. */
destroy(): void
{
this.renderer = null;
}
}