pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
21 lines (17 loc) • 710 B
JavaScript
;
var Extensions = require('../../../../../extensions/Extensions.js');
var TextureSource = require('./TextureSource.js');
;
class ImageSource extends TextureSource.TextureSource {
constructor(options) {
super(options);
this.uploadMethodId = "image";
this.autoGarbageCollect = true;
}
static test(resource) {
return globalThis.HTMLImageElement && resource instanceof HTMLImageElement || typeof ImageBitmap !== "undefined" && resource instanceof ImageBitmap || globalThis.VideoFrame && resource instanceof VideoFrame;
}
}
ImageSource.extension = Extensions.ExtensionType.TextureSource;
exports.ImageSource = ImageSource;
//# sourceMappingURL=ImageSource.js.map