UNPKG

typegpu

Version:

A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.

11 lines (10 loc) 279 B
import { getLayoutInfo } from "./schemaMemoryLayout.js"; export function sizeOf(schema) { return getLayoutInfo(schema, 'size'); } /** * Returns the size (in bytes) of data represented by the `schema`. */ export function PUBLIC_sizeOf(schema) { return sizeOf(schema); }