* Static factory method to create and initialize a GPUContext instance. * * @param canvas - Optional canvas element (HTMLCanvasElement or OffscreenCanvas) to configure for WebGPU rendering * @param options - Optional configuration for device pixel ratio, alpha mode, and power preference
(canvas?: SupportedCanvas, options?: GPUContextOptions)
| 505 | * ``` |
| 506 | */ |
| 507 | static async create(canvas?: SupportedCanvas, options?: GPUContextOptions): Promise<GPUContext> { |
| 508 | const context = new GPUContext(canvas, options); |
| 509 | await context.initialize(); |
| 510 | return context; |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Gets the current texture from the canvas context. |
no test coverage detected