MCPcopy
hub / github.com/ChartGPU/ChartGPU / create

Method create

src/core/GPUContext.ts:507–511  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 15

createChartGPUFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
createChartFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
createChartFunction · 0.80

Calls 1

initializeMethod · 0.95

Tested by

no test coverage detected