MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / constructor

Method constructor

src/core/GPUContext.ts:470–472  ·  view source on GitHub ↗

* Creates a new 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)

Source from the content-addressed store, hash-verified

468 * @param options - Optional configuration for device pixel ratio, alpha mode, and power preference
469 */
470 constructor(canvas?: SupportedCanvas, options?: GPUContextOptions) {
471 this._state = createGPUContext(canvas, options);
472 }
473
474 /**
475 * Initializes the WebGPU context by requesting an adapter and device.

Callers

nothing calls this directly

Calls 1

createGPUContextFunction · 0.85

Tested by

no test coverage detected