pixi.js
    Preparing search index...

    Interface AdapterAdvanced

    This interface describes all the DOM dependent calls that Pixi makes throughout its codebase. Implementations of this interface can be used to make sure Pixi will work in any environment, such as browser, Web Workers, and Node.js.

    interface Adapter {
        createCanvas: (width?: number, height?: number) => ICanvas;
        fetch: (url: RequestInfo, options?: RequestInit) => Promise<Response>;
        getBaseUrl: () => string;
        getCanvasRenderingContext2D: () => { prototype: ICanvasRenderingContext2D };
        getFontFaceSet: () => FontFaceSet;
        getNavigator: () => { gpu: GPU; userAgent: string };
        getWebGLRenderingContext: () => new () => WebGLRenderingContext;
        parseXML: (xml: string) => Document;
    }
    Index

    Properties

    createCanvas: (width?: number, height?: number) => ICanvas

    Returns a canvas object that can be used to create a webgl context.

    fetch: (url: RequestInfo, options?: RequestInit) => Promise<Response>

    Returns a Response object that has been fetched from the given URL.

    getBaseUrl: () => string

    Returns the current base URL For browser environments this is either the document.baseURI or window.location.href

    getCanvasRenderingContext2D: () => { prototype: ICanvasRenderingContext2D }

    Returns a 2D rendering context.

    getFontFaceSet: () => FontFaceSet

    Return the font face set if available

    getNavigator: () => { gpu: GPU; userAgent: string }

    Returns a partial implementation of the browsers window.navigator

    getWebGLRenderingContext: () => new () => WebGLRenderingContext

    Returns a WebGL rendering context.

    parseXML: (xml: string) => Document

    Returns Document object that has been parsed from the given XML string.