export class TextureLoader {
    type = "texture";
    canLoad(request) {
        return request.type === this.type && (/\.(?:png|jpg|jpeg|webp|avif)(?:\?.*)?$/i.test(request.url) || request.url.startsWith("data:image/"));
    }
    async load(request, context) {
        const image = await context.loadDependency(request.url, "image");
        return {
            url: request.url,
            width: image.value.width,
            height: image.value.height,
            colorSpace: "srgb",
            source: image.value.source
        };
    }
}
//# sourceMappingURL=TextureLoader.js.map