mirror of
https://github.com/visgl/luma.gl.git
synced 2026-01-18 14:03:42 +00:00
912 B
912 B
Adapter
An Adapter is a factory for Device instances for a specific backend (e.g. WebGPU or WebGL).
Each GPU backend exports a singleton adapter instance.
Methods on adapters are normally not called directly, they are imported and passed to
methods like [luma.createDevice] that select the appropriate adapter before calling it.
Members
type
type: string;
Methods
isSupported()
Checks if this adapter is supported in the current environment/browser.
adapter.isSupported(): boolean;
create()
Creates a device for this adapter's backend.
create(props: DeviceProps): Promise<Device>;
attach()
Attaches a device to a GPU device handle from this backend.
attach?(handle: unknown): Promise<Device>;
}