UNPKG

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">

19 lines (16 loc) 667 B
import { ExtensionType } from '../../../../../extensions/Extensions.mjs'; import { TextureSource } from './TextureSource.mjs'; "use strict"; class ImageSource extends 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 = ExtensionType.TextureSource; export { ImageSource }; //# sourceMappingURL=ImageSource.mjs.map