shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$sources$BufferImageSource = function(global, require, module, exports) { global = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions"); require = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$sources$TextureSource"); "use strict"; class BufferImageSource extends require.TextureSource { constructor(options) { const buffer = options.resource || new Float32Array(options.width * options.height * 4); let format = options.format; format || (format = buffer instanceof Float32Array ? "rgba32float" : buffer instanceof Int32Array ? "rgba32uint" : buffer instanceof Uint32Array ? "rgba32uint" : buffer instanceof Int16Array ? "rgba16uint" : buffer instanceof Uint16Array ? "rgba16uint" : "bgra8unorm"); super({...options, resource:buffer, format}); this.uploadMethodId = "buffer"; } static test(resource) { return resource instanceof Int8Array || resource instanceof Uint8Array || resource instanceof Uint8ClampedArray || resource instanceof Int16Array || resource instanceof Uint16Array || resource instanceof Int32Array || resource instanceof Uint32Array || resource instanceof Float32Array; } } BufferImageSource.extension = global.ExtensionType.TextureSource; exports.BufferImageSource = BufferImageSource; }; //# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$sources$BufferImageSource.js.map