import { Renderer } from "../Renderer.js";
export class AdvancedRenderer {
    renderer;
    constructor(renderer) {
        this.renderer = renderer;
    }
    static async create(options = {}) {
        return new AdvancedRenderer(await Renderer.create(options));
    }
    get device() {
        return this.renderer.device;
    }
    resize(width, height) {
        this.renderer.resize(width, height);
    }
    resizeToDisplay(options = {}) {
        return this.renderer.resizeToDisplay(options);
    }
    startAnimationLoop(callback) {
        return this.renderer.startAnimationLoop((timeMs) => callback(timeMs, this));
    }
    render(sourceOrInput, camera) {
        return isRendererInput(sourceOrInput)
            ? this.renderer.render(sourceOrInput)
            : this.renderer.render(sourceOrInput, camera);
    }
    renderAsync(sourceOrInput, camera) {
        return isRendererInput(sourceOrInput)
            ? this.renderer.renderAsync(sourceOrInput)
            : this.renderer.renderAsync(sourceOrInput, camera);
    }
    captureFrame(source, camera) {
        return this.renderer.captureFrame(source, camera);
    }
    getDiagnostics() {
        return this.renderer.getDiagnostics();
    }
    dispose() {
        this.renderer.dispose();
    }
}
function isRendererInput(value) {
    return typeof value === "object" && value !== null && "source" in value;
}
//# sourceMappingURL=AdvancedRenderer.js.map