Const
Readonly
class CustomResource extends PIXI.Resource {
// MUST have source, options constructor signature
// for auto-detected resources to be created.
constructor(source, options) {
super();
}
upload(renderer, baseTexture, glTexture) {
// Upload with GL
return true;
}
// Used to auto-detect resource
static test(source, extension) {
return extension === 'xyz' || source instanceof SomeClass;
}
}
// Install the new resource type
PIXI.INSTALLED.push(CustomResource);
PIXI
Generated using TypeDoc
Collection of installed resource types, class must extend PIXI.Resource.