Abstract Class: Adapter
Defined in: modules/core/src/adapter/adapter.ts:11
Create and attach devices for a specific backend.
Constructors
Constructor
new Adapter():
Adapter
Returns
Adapter
Properties
type
abstracttype:string
Defined in: modules/core/src/adapter/adapter.ts:13
Accessors
pageLoaded
Get Signature
get pageLoaded():
Promise<void>
Defined in: modules/core/src/adapter/adapter.ts:30
Page load promise Resolves when the DOM is loaded.
Note
Since are be limitations on number of load event listeners,
it is recommended avoid calling this accessor until actually needed.
I.e. we don't call it unless you know that you will be looking up a string in the DOM.
Returns
Promise<void>
Methods
attach()
abstractattach(handle,props):Promise<Device>
Defined in: modules/core/src/adapter/adapter.ts:21
Attach a Device to a valid handle for this backend (GPUDevice, WebGL2RenderingContext etc)
Parameters
handle
unknown
props
Returns
Promise<Device>
create()
abstractcreate(props):Promise<Device>
Defined in: modules/core/src/adapter/adapter.ts:19
Create a new device for this backend
Parameters
props
Returns
Promise<Device>
isDeviceHandle()
abstractisDeviceHandle(handle):boolean
Defined in: modules/core/src/adapter/adapter.ts:17
Check if the given handle is a valid device handle for this backend
Parameters
handle
unknown
Returns
boolean
isSupported()
abstractisSupported():boolean
Defined in: modules/core/src/adapter/adapter.ts:15
Check if this backend is supported
Returns
boolean