IAdapter

interface IAdapter

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

Summary


Properties from IAdapter

(width: number, height: number) => HTMLCanvasElement
createCanvas

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

() => string
getBaseUrl

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

() => { userAgent : string }
getNavigator

Returns a partial implementation of the browsers window.navigator

() => typeof WebGLRenderingContext
getWebGLRenderingContext

Returns a webgl rendering context.

Public Properties


createCanvas adapter.ts:10
createCanvas: (width: number, height: number) => HTMLCanvasElement

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

getBaseUrl adapter.ts:16
getBaseUrl: () => string

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

getNavigator adapter.ts:14
getNavigator: () => { userAgent : string }

Returns a partial implementation of the browsers window.navigator

getWebGLRenderingContext adapter.ts:12
getWebGLRenderingContext: () => typeof WebGLRenderingContext

Returns a webgl rendering context.


Powered by webdoc!