Skip to content

Commit

Permalink
docs: fix errors in docs/developer-guide/installing.md (#2311)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsvkmt authored Jan 5, 2025
1 parent 56afdf9 commit 96efacf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/developer-guide/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ yarn add @luma.gl/webgpu

```typescript
import {luma} from '@luma.gl/core';
import {webgl2Adapter} '@luma.gl/webgpu';
import {webgpuAdapter} from '@luma.gl/webgpu';

const device = await luma.createDevice({type: 'webgpu', adapters: [webgl2Adapter], createCanvasContext: ...});
const device = await luma.createDevice({type: 'webgpu', adapters: [webgpuAdapter], createCanvasContext: ...});
```

It is possible to register more than one device adapter to create an application
that can work in both WebGL and WebGPU environments.

```typescript
import {luma} from '@luma.gl/core';
import {webgl2Adapter} '@luma.gl/webgpu';
import {webgpuAdapter} '@luma.gl/webgl';
import {webgpuAdapter} from '@luma.gl/webgpu';
import {webgl2Adapter} from '@luma.gl/webgl';

const webgpuDevice = luma.createDevice({type: 'best-available', adapters: [webgl2Adapter, webgpuAdapter], createCanvasContext: ...});
```
Expand Down

0 comments on commit 96efacf

Please sign in to comment.