typegpu 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/errors.ts","../src/gpuMode.ts","../src/data/vectorImpl.ts","../src/data/vector.ts","../src/data/matrix.ts"],"sourcesContent":["import type { TgpuBuffer } from './core/buffer/buffer';\nimport type { TgpuSlot } from './core/slot/slotTypes';\nimport type { TgpuVertexLayout } from './core/vertexLayout/vertexLayout';\nimport type { AnyData, Disarray } from './data/dataTypes';\nimport type { WgslArray } from './data/wgslTypes';\nimport type { TgpuBindGroupLayout } from './tgpuBindGroupLayout';\n\nconst prefix = 'Invariant failed';\n\n/**\n * Inspired by: https://github.com/alexreardon/tiny-invariant/blob/master/src/tiny-invariant.ts\n */\nexport function invariant(\n condition: unknown,\n message?: string | (() => string),\n): asserts condition {\n if (condition) {\n // Condition passed\n return;\n }\n\n // In production we strip the message but still throw\n if (process.env.NODE_ENV === 'production') {\n throw new Error(prefix);\n }\n\n // When not in production we allow the message to pass through\n // *This block will be removed in production builds*\n\n const provided = typeof message === 'function' ? message() : message;\n\n // Options:\n // 1. message provided: `${prefix}: ${provided}`\n // 2. message not provided: prefix\n const value = provided ? `${prefix}: ${provided}` : prefix;\n throw new Error(value);\n}\n\n/**\n * An error that happens during resolution of WGSL code.\n * Contains a trace of all ancestor resolvables in\n * which this error originated.\n *\n * @category Errors\n */\nexport class ResolutionError extends Error {\n constructor(\n public readonly cause: unknown,\n public readonly trace: unknown[],\n ) {\n let entries = trace.map((ancestor) => `- ${ancestor}`);\n\n // Showing only the root and leaf nodes.\n if (entries.length > 20) {\n entries = [...entries.slice(0, 11), '...', ...entries.slice(-10)];\n }\n\n super(`Resolution of the following tree failed: \\n${entries.join('\\n')}`);\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, ResolutionError.prototype);\n }\n\n appendToTrace(ancestor: unknown): ResolutionError {\n const newTrace = [ancestor, ...this.trace];\n\n return new ResolutionError(this.cause, newTrace);\n }\n}\n\n/**\n * @category Errors\n */\nexport class MissingSlotValueError extends Error {\n constructor(public readonly slot: TgpuSlot<unknown>) {\n super(`Missing value for '${slot}'`);\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, MissingSlotValueError.prototype);\n }\n}\n\n/**\n * @category Errors\n */\nexport class NotUniformError extends Error {\n constructor(value: TgpuBuffer<AnyData>) {\n super(\n `Buffer '${value.label ?? '<unnamed>'}' is not bindable as a uniform. Use .$usage('uniform') to allow it.`,\n );\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, NotUniformError.prototype);\n }\n}\n\nexport class MissingLinksError extends Error {\n constructor(fnLabel: string | undefined, externalNames: string[]) {\n super(\n `The function '${fnLabel ?? '<unnamed>'}' is missing links to the following external values: ${externalNames}.`,\n );\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, MissingLinksError.prototype);\n }\n}\n\nexport class MissingBindGroupsError extends Error {\n constructor(layouts: Iterable<TgpuBindGroupLayout>) {\n super(\n `Missing bind groups for layouts: '${[...layouts].map((layout) => layout.label ?? '<unnamed>').join(', ')}'. Please provide it using pipeline.with(layout, bindGroup).(...)`,\n );\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, MissingBindGroupsError.prototype);\n }\n}\n\nexport class MissingVertexBuffersError extends Error {\n constructor(layouts: Iterable<TgpuVertexLayout<WgslArray | Disarray>>) {\n super(\n `Missing vertex buffers for layouts: '${[...layouts].map((layout) => layout.label ?? '<unnamed>').join(', ')}'. Please provide it using pipeline.with(layout, buffer).(...)`,\n );\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, MissingVertexBuffersError.prototype);\n }\n}\n","import { invariant } from './errors';\nimport type { ResolutionCtx } from './types';\n\nlet resolutionCtx: ResolutionCtx | null = null;\n\nconst CPUMode = Symbol('CPU');\nconst GPUMode = Symbol('GPU');\n\nexport const RuntimeMode = {\n CPU: CPUMode,\n GPU: GPUMode,\n} as const;\n\nconst resolutionModeStack: (typeof CPUMode | typeof GPUMode)[] = [];\n\nexport function provideCtx<T>(ctx: ResolutionCtx, callback: () => T): T {\n invariant(resolutionCtx === null, 'Cannot nest context providers');\n\n resolutionCtx = ctx;\n try {\n return callback();\n } finally {\n resolutionCtx = null;\n }\n}\n\nexport function getResolutionCtx(): ResolutionCtx | null {\n return resolutionCtx;\n}\n\nexport function pushMode(mode: typeof CPUMode | typeof GPUMode) {\n resolutionModeStack.push(mode);\n}\n\nexport function popMode(expected?: typeof CPUMode | typeof GPUMode) {\n const mode = resolutionModeStack.pop();\n if (expected !== undefined) {\n invariant(mode === expected, 'Unexpected mode');\n }\n}\n\nexport const inGPUMode = () =>\n resolutionModeStack.length > 0 &&\n resolutionModeStack[resolutionModeStack.length - 1] === RuntimeMode.GPU;\n","import type { SelfResolvable } from '../types';\nimport type { VecKind } from './wgslTypes';\n\n// biome-ignore format: swizzles should not expand\nexport abstract class VecBase extends Array implements SelfResolvable {\n abstract get kind(): VecKind;\n\n abstract get _Vec2(): new (\n x: number,\n y: number,\n ) => Vec2;\n abstract get _Vec3(): new (\n x: number,\n y: number,\n z: number,\n ) => Vec3;\n abstract get _Vec4(): new (\n x: number,\n y: number,\n z: number,\n w: number,\n ) => Vec4;\n\n '~resolve'(): string {\n return `${this.kind}(${this.join(', ')})`;\n }\n\n toString() {\n return this['~resolve']();\n }\n\n get xx() { return new this._Vec2(this[0], this[0]); }\n get xy() { return new this._Vec2(this[0], this[1]); }\n get xz() { return new this._Vec2(this[0], this[2]); }\n get xw() { return new this._Vec2(this[0], this[3]); }\n get yx() { return new this._Vec2(this[1], this[0]); }\n get yy() { return new this._Vec2(this[1], this[1]); }\n get yz() { return new this._Vec2(this[1], this[2]); }\n get yw() { return new this._Vec2(this[1], this[3]); }\n get zx() { return new this._Vec2(this[2], this[0]); }\n get zy() { return new this._Vec2(this[2], this[1]); }\n get zz() { return new this._Vec2(this[2], this[2]); }\n get zw() { return new this._Vec2(this[2], this[3]); }\n get wx() { return new this._Vec2(this[3], this[0]); }\n get wy() { return new this._Vec2(this[3], this[1]); }\n get wz() { return new this._Vec2(this[3], this[2]); }\n get ww() { return new this._Vec2(this[3], this[3]); }\n get xxx() { return new this._Vec3(this[0], this[0], this[0]); }\n get xxy() { return new this._Vec3(this[0], this[0], this[1]); }\n get xxz() { return new this._Vec3(this[0], this[0], this[2]); }\n get xxw() { return new this._Vec3(this[0], this[0], this[3]); }\n get xyx() { return new this._Vec3(this[0], this[1], this[0]); }\n get xyy() { return new this._Vec3(this[0], this[1], this[1]); }\n get xyz() { return new this._Vec3(this[0], this[1], this[2]); }\n get xyw() { return new this._Vec3(this[0], this[1], this[3]); }\n get xzx() { return new this._Vec3(this[0], this[2], this[0]); }\n get xzy() { return new this._Vec3(this[0], this[2], this[1]); }\n get xzz() { return new this._Vec3(this[0], this[2], this[2]); }\n get xzw() { return new this._Vec3(this[0], this[2], this[3]); }\n get xwx() { return new this._Vec3(this[0], this[3], this[0]); }\n get xwy() { return new this._Vec3(this[0], this[3], this[1]); }\n get xwz() { return new this._Vec3(this[0], this[3], this[2]); }\n get xww() { return new this._Vec3(this[0], this[3], this[3]); }\n get yxx() { return new this._Vec3(this[1], this[0], this[0]); }\n get yxy() { return new this._Vec3(this[1], this[0], this[1]); }\n get yxz() { return new this._Vec3(this[1], this[0], this[2]); }\n get yxw() { return new this._Vec3(this[1], this[0], this[3]); }\n get yyx() { return new this._Vec3(this[1], this[1], this[0]); }\n get yyy() { return new this._Vec3(this[1], this[1], this[1]); }\n get yyz() { return new this._Vec3(this[1], this[1], this[2]); }\n get yyw() { return new this._Vec3(this[1], this[1], this[3]); }\n get yzx() { return new this._Vec3(this[1], this[2], this[0]); }\n get yzy() { return new this._Vec3(this[1], this[2], this[1]); }\n get yzz() { return new this._Vec3(this[1], this[2], this[2]); }\n get yzw() { return new this._Vec3(this[1], this[2], this[3]); }\n get ywx() { return new this._Vec3(this[1], this[3], this[0]); }\n get ywy() { return new this._Vec3(this[1], this[3], this[1]); }\n get ywz() { return new this._Vec3(this[1], this[3], this[2]); }\n get yww() { return new this._Vec3(this[1], this[3], this[3]); }\n get zxx() { return new this._Vec3(this[2], this[0], this[0]); }\n get zxy() { return new this._Vec3(this[2], this[0], this[1]); }\n get zxz() { return new this._Vec3(this[2], this[0], this[2]); }\n get zxw() { return new this._Vec3(this[2], this[0], this[3]); }\n get zyx() { return new this._Vec3(this[2], this[1], this[0]); }\n get zyy() { return new this._Vec3(this[2], this[1], this[1]); }\n get zyz() { return new this._Vec3(this[2], this[1], this[2]); }\n get zyw() { return new this._Vec3(this[2], this[1], this[3]); }\n get zzx() { return new this._Vec3(this[2], this[2], this[0]); }\n get zzy() { return new this._Vec3(this[2], this[2], this[1]); }\n get zzz() { return new this._Vec3(this[2], this[2], this[2]); }\n get zzw() { return new this._Vec3(this[2], this[2], this[3]); }\n get zwx() { return new this._Vec3(this[2], this[3], this[0]); }\n get zwy() { return new this._Vec3(this[2], this[3], this[1]); }\n get zwz() { return new this._Vec3(this[2], this[3], this[2]); }\n get zww() { return new this._Vec3(this[2], this[3], this[3]); }\n get wxx() { return new this._Vec3(this[3], this[0], this[0]); }\n get wxy() { return new this._Vec3(this[3], this[0], this[1]); }\n get wxz() { return new this._Vec3(this[3], this[0], this[2]); }\n get wxw() { return new this._Vec3(this[3], this[0], this[3]); }\n get wyx() { return new this._Vec3(this[3], this[1], this[0]); }\n get wyy() { return new this._Vec3(this[3], this[1], this[1]); }\n get wyz() { return new this._Vec3(this[3], this[1], this[2]); }\n get wyw() { return new this._Vec3(this[3], this[1], this[3]); }\n get wzx() { return new this._Vec3(this[3], this[2], this[0]); }\n get wzy() { return new this._Vec3(this[3], this[2], this[1]); }\n get wzz() { return new this._Vec3(this[3], this[2], this[2]); }\n get wzw() { return new this._Vec3(this[3], this[2], this[3]); }\n get wwx() { return new this._Vec3(this[3], this[3], this[0]); }\n get wwy() { return new this._Vec3(this[3], this[3], this[1]); }\n get wwz() { return new this._Vec3(this[3], this[3], this[2]); }\n get www() { return new this._Vec3(this[3], this[3], this[3]); }\n get xxxx() { return new this._Vec4(this[0], this[0], this[0], this[0]); }\n get xxxy() { return new this._Vec4(this[0], this[0], this[0], this[1]); }\n get xxxz() { return new this._Vec4(this[0], this[0], this[0], this[2]); }\n get xxxw() { return new this._Vec4(this[0], this[0], this[0], this[3]); }\n get xxyx() { return new this._Vec4(this[0], this[0], this[1], this[0]); }\n get xxyy() { return new this._Vec4(this[0], this[0], this[1], this[1]); }\n get xxyz() { return new this._Vec4(this[0], this[0], this[1], this[2]); }\n get xxyw() { return new this._Vec4(this[0], this[0], this[1], this[3]); }\n get xxzx() { return new this._Vec4(this[0], this[0], this[2], this[0]); }\n get xxzy() { return new this._Vec4(this[0], this[0], this[2], this[1]); }\n get xxzz() { return new this._Vec4(this[0], this[0], this[2], this[2]); }\n get xxzw() { return new this._Vec4(this[0], this[0], this[2], this[3]); }\n get xxwx() { return new this._Vec4(this[0], this[0], this[3], this[0]); }\n get xxwy() { return new this._Vec4(this[0], this[0], this[3], this[1]); }\n get xxwz() { return new this._Vec4(this[0], this[0], this[3], this[2]); }\n get xxww() { return new this._Vec4(this[0], this[0], this[3], this[3]); }\n get xyxx() { return new this._Vec4(this[0], this[1], this[0], this[0]); }\n get xyxy() { return new this._Vec4(this[0], this[1], this[0], this[1]); }\n get xyxz() { return new this._Vec4(this[0], this[1], this[0], this[2]); }\n get xyxw() { return new this._Vec4(this[0], this[1], this[0], this[3]); }\n get xyyx() { return new this._Vec4(this[0], this[1], this[1], this[0]); }\n get xyyy() { return new this._Vec4(this[0], this[1], this[1], this[1]); }\n get xyyz() { return new this._Vec4(this[0], this[1], this[1], this[2]); }\n get xyyw() { return new this._Vec4(this[0], this[1], this[1], this[3]); }\n get xyzx() { return new this._Vec4(this[0], this[1], this[2], this[0]); }\n get xyzy() { return new this._Vec4(this[0], this[1], this[2], this[1]); }\n get xyzz() { return new this._Vec4(this[0], this[1], this[2], this[2]); }\n get xyzw() { return new this._Vec4(this[0], this[1], this[2], this[3]); }\n get xywx() { return new this._Vec4(this[0], this[1], this[3], this[0]); }\n get xywy() { return new this._Vec4(this[0], this[1], this[3], this[1]); }\n get xywz() { return new this._Vec4(this[0], this[1], this[3], this[2]); }\n get xyww() { return new this._Vec4(this[0], this[1], this[3], this[3]); }\n get xzxx() { return new this._Vec4(this[0], this[2], this[0], this[0]); }\n get xzxy() { return new this._Vec4(this[0], this[2], this[0], this[1]); }\n get xzxz() { return new this._Vec4(this[0], this[2], this[0], this[2]); }\n get xzxw() { return new this._Vec4(this[0], this[2], this[0], this[3]); }\n get xzyx() { return new this._Vec4(this[0], this[2], this[1], this[0]); }\n get xzyy() { return new this._Vec4(this[0], this[2], this[1], this[1]); }\n get xzyz() { return new this._Vec4(this[0], this[2], this[1], this[2]); }\n get xzyw() { return new this._Vec4(this[0], this[2], this[1], this[3]); }\n get xzzx() { return new this._Vec4(this[0], this[2], this[2], this[0]); }\n get xzzy() { return new this._Vec4(this[0], this[2], this[2], this[1]); }\n get xzzz() { return new this._Vec4(this[0], this[2], this[2], this[2]); }\n get xzzw() { return new this._Vec4(this[0], this[2], this[2], this[3]); }\n get xzwx() { return new this._Vec4(this[0], this[2], this[3], this[0]); }\n get xzwy() { return new this._Vec4(this[0], this[2], this[3], this[1]); }\n get xzwz() { return new this._Vec4(this[0], this[2], this[3], this[2]); }\n get xzww() { return new this._Vec4(this[0], this[2], this[3], this[3]); }\n get xwxx() { return new this._Vec4(this[0], this[3], this[0], this[0]); }\n get xwxy() { return new this._Vec4(this[0], this[3], this[0], this[1]); }\n get xwxz() { return new this._Vec4(this[0], this[3], this[0], this[2]); }\n get xwxw() { return new this._Vec4(this[0], this[3], this[0], this[3]); }\n get xwyx() { return new this._Vec4(this[0], this[3], this[1], this[0]); }\n get xwyy() { return new this._Vec4(this[0], this[3], this[1], this[1]); }\n get xwyz() { return new this._Vec4(this[0], this[3], this[1], this[2]); }\n get xwyw() { return new this._Vec4(this[0], this[3], this[1], this[3]); }\n get xwzx() { return new this._Vec4(this[0], this[3], this[2], this[0]); }\n get xwzy() { return new this._Vec4(this[0], this[3], this[2], this[1]); }\n get xwzz() { return new this._Vec4(this[0], this[3], this[2], this[2]); }\n get xwzw() { return new this._Vec4(this[0], this[3], this[2], this[3]); }\n get xwwx() { return new this._Vec4(this[0], this[3], this[3], this[0]); }\n get xwwy() { return new this._Vec4(this[0], this[3], this[3], this[1]); }\n get xwwz() { return new this._Vec4(this[0], this[3], this[3], this[2]); }\n get xwww() { return new this._Vec4(this[0], this[3], this[3], this[3]); }\n get yxxx() { return new this._Vec4(this[1], this[0], this[0], this[0]); }\n get yxxy() { return new this._Vec4(this[1], this[0], this[0], this[1]); }\n get yxxz() { return new this._Vec4(this[1], this[0], this[0], this[2]); }\n get yxxw() { return new this._Vec4(this[1], this[0], this[0], this[3]); }\n get yxyx() { return new this._Vec4(this[1], this[0], this[1], this[0]); }\n get yxyy() { return new this._Vec4(this[1], this[0], this[1], this[1]); }\n get yxyz() { return new this._Vec4(this[1], this[0], this[1], this[2]); }\n get yxyw() { return new this._Vec4(this[1], this[0], this[1], this[3]); }\n get yxzx() { return new this._Vec4(this[1], this[0], this[2], this[0]); }\n get yxzy() { return new this._Vec4(this[1], this[0], this[2], this[1]); }\n get yxzz() { return new this._Vec4(this[1], this[0], this[2], this[2]); }\n get yxzw() { return new this._Vec4(this[1], this[0], this[2], this[3]); }\n get yxwx() { return new this._Vec4(this[1], this[0], this[3], this[0]); }\n get yxwy() { return new this._Vec4(this[1], this[0], this[3], this[1]); }\n get yxwz() { return new this._Vec4(this[1], this[0], this[3], this[2]); }\n get yxww() { return new this._Vec4(this[1], this[0], this[3], this[3]); }\n get yyxx() { return new this._Vec4(this[1], this[1], this[0], this[0]); }\n get yyxy() { return new this._Vec4(this[1], this[1], this[0], this[1]); }\n get yyxz() { return new this._Vec4(this[1], this[1], this[0], this[2]); }\n get yyxw() { return new this._Vec4(this[1], this[1], this[0], this[3]); }\n get yyyx() { return new this._Vec4(this[1], this[1], this[1], this[0]); }\n get yyyy() { return new this._Vec4(this[1], this[1], this[1], this[1]); }\n get yyyz() { return new this._Vec4(this[1], this[1], this[1], this[2]); }\n get yyyw() { return new this._Vec4(this[1], this[1], this[1], this[3]); }\n get yyzx() { return new this._Vec4(this[1], this[1], this[2], this[0]); }\n get yyzy() { return new this._Vec4(this[1], this[1], this[2], this[1]); }\n get yyzz() { return new this._Vec4(this[1], this[1], this[2], this[2]); }\n get yyzw() { return new this._Vec4(this[1], this[1], this[2], this[3]); }\n get yywx() { return new this._Vec4(this[1], this[1], this[3], this[0]); }\n get yywy() { return new this._Vec4(this[1], this[1], this[3], this[1]); }\n get yywz() { return new this._Vec4(this[1], this[1], this[3], this[2]); }\n get yyww() { return new this._Vec4(this[1], this[1], this[3], this[3]); }\n get yzxx() { return new this._Vec4(this[1], this[2], this[0], this[0]); }\n get yzxy() { return new this._Vec4(this[1], this[2], this[0], this[1]); }\n get yzxz() { return new this._Vec4(this[1], this[2], this[0], this[2]); }\n get yzxw() { return new this._Vec4(this[1], this[2], this[0], this[3]); }\n get yzyx() { return new this._Vec4(this[1], this[2], this[1], this[0]); }\n get yzyy() { return new this._Vec4(this[1], this[2], this[1], this[1]); }\n get yzyz() { return new this._Vec4(this[1], this[2], this[1], this[2]); }\n get yzyw() { return new this._Vec4(this[1], this[2], this[1], this[3]); }\n get yzzx() { return new this._Vec4(this[1], this[2], this[2], this[0]); }\n get yzzy() { return new this._Vec4(this[1], this[2], this[2], this[1]); }\n get yzzz() { return new this._Vec4(this[1], this[2], this[2], this[2]); }\n get yzzw() { return new this._Vec4(this[1], this[2], this[2], this[3]); }\n get yzwx() { return new this._Vec4(this[1], this[2], this[3], this[0]); }\n get yzwy() { return new this._Vec4(this[1], this[2], this[3], this[1]); }\n get yzwz() { return new this._Vec4(this[1], this[2], this[3], this[2]); }\n get yzww() { return new this._Vec4(this[1], this[2], this[3], this[3]); }\n get ywxx() { return new this._Vec4(this[1], this[3], this[0], this[0]); }\n get ywxy() { return new this._Vec4(this[1], this[3], this[0], this[1]); }\n get ywxz() { return new this._Vec4(this[1], this[3], this[0], this[2]); }\n get ywxw() { return new this._Vec4(this[1], this[3], this[0], this[3]); }\n get ywyx() { return new this._Vec4(this[1], this[3], this[1], this[0]); }\n get ywyy() { return new this._Vec4(this[1], this[3], this[1], this[1]); }\n get ywyz() { return new this._Vec4(this[1], this[3], this[1], this[2]); }\n get ywyw() { return new this._Vec4(this[1], this[3], this[1], this[3]); }\n get ywzx() { return new this._Vec4(this[1], this[3], this[2], this[0]); }\n get ywzy() { return new this._Vec4(this[1], this[3], this[2], this[1]); }\n get ywzz() { return new this._Vec4(this[1], this[3], this[2], this[2]); }\n get ywzw() { return new this._Vec4(this[1], this[3], this[2], this[3]); }\n get ywwx() { return new this._Vec4(this[1], this[3], this[3], this[0]); }\n get ywwy() { return new this._Vec4(this[1], this[3], this[3], this[1]); }\n get ywwz() { return new this._Vec4(this[1], this[3], this[3], this[2]); }\n get ywww() { return new this._Vec4(this[1], this[3], this[3], this[3]); }\n get zxxx() { return new this._Vec4(this[2], this[0], this[0], this[0]); }\n get zxxy() { return new this._Vec4(this[2], this[0], this[0], this[1]); }\n get zxxz() { return new this._Vec4(this[2], this[0], this[0], this[2]); }\n get zxxw() { return new this._Vec4(this[2], this[0], this[0], this[3]); }\n get zxyx() { return new this._Vec4(this[2], this[0], this[1], this[0]); }\n get zxyy() { return new this._Vec4(this[2], this[0], this[1], this[1]); }\n get zxyz() { return new this._Vec4(this[2], this[0], this[1], this[2]); }\n get zxyw() { return new this._Vec4(this[2], this[0], this[1], this[3]); }\n get zxzx() { return new this._Vec4(this[2], this[0], this[2], this[0]); }\n get zxzy() { return new this._Vec4(this[2], this[0], this[2], this[1]); }\n get zxzz() { return new this._Vec4(this[2], this[0], this[2], this[2]); }\n get zxzw() { return new this._Vec4(this[2], this[0], this[2], this[3]); }\n get zxwx() { return new this._Vec4(this[2], this[0], this[3], this[0]); }\n get zxwy() { return new this._Vec4(this[2], this[0], this[3], this[1]); }\n get zxwz() { return new this._Vec4(this[2], this[0], this[3], this[2]); }\n get zxww() { return new this._Vec4(this[2], this[0], this[3], this[3]); }\n get zyxx() { return new this._Vec4(this[2], this[1], this[0], this[0]); }\n get zyxy() { return new this._Vec4(this[2], this[1], this[0], this[1]); }\n get zyxz() { return new this._Vec4(this[2], this[1], this[0], this[2]); }\n get zyxw() { return new this._Vec4(this[2], this[1], this[0], this[3]); }\n get zyyx() { return new this._Vec4(this[2], this[1], this[1], this[0]); }\n get zyyy() { return new this._Vec4(this[2], this[1], this[1], this[1]); }\n get zyyz() { return new this._Vec4(this[2], this[1], this[1], this[2]); }\n get zyyw() { return new this._Vec4(this[2], this[1], this[1], this[3]); }\n get zyzx() { return new this._Vec4(this[2], this[1], this[2], this[0]); }\n get zyzy() { return new this._Vec4(this[2], this[1], this[2], this[1]); }\n get zyzz() { return new this._Vec4(this[2], this[1], this[2], this[2]); }\n get zyzw() { return new this._Vec4(this[2], this[1], this[2], this[3]); }\n get zywx() { return new this._Vec4(this[2], this[1], this[3], this[0]); }\n get zywy() { return new this._Vec4(this[2], this[1], this[3], this[1]); }\n get zywz() { return new this._Vec4(this[2], this[1], this[3], this[2]); }\n get zyww() { return new this._Vec4(this[2], this[1], this[3], this[3]); }\n get zzxx() { return new this._Vec4(this[2], this[2], this[0], this[0]); }\n get zzxy() { return new this._Vec4(this[2], this[2], this[0], this[1]); }\n get zzxz() { return new this._Vec4(this[2], this[2], this[0], this[2]); }\n get zzxw() { return new this._Vec4(this[2], this[2], this[0], this[3]); }\n get zzyx() { return new this._Vec4(this[2], this[2], this[1], this[0]); }\n get zzyy() { return new this._Vec4(this[2], this[2], this[1], this[1]); }\n get zzyz() { return new this._Vec4(this[2], this[2], this[1], this[2]); }\n get zzyw() { return new this._Vec4(this[2], this[2], this[1], this[3]); }\n get zzzx() { return new this._Vec4(this[2], this[2], this[2], this[0]); }\n get zzzy() { return new this._Vec4(this[2], this[2], this[2], this[1]); }\n get zzzz() { return new this._Vec4(this[2], this[2], this[2], this[2]); }\n get zzzw() { return new this._Vec4(this[2], this[2], this[2], this[3]); }\n get zzwx() { return new this._Vec4(this[2], this[2], this[3], this[0]); }\n get zzwy() { return new this._Vec4(this[2], this[2], this[3], this[1]); }\n get zzwz() { return new this._Vec4(this[2], this[2], this[3], this[2]); }\n get zzww() { return new this._Vec4(this[2], this[2], this[3], this[3]); }\n get zwxx() { return new this._Vec4(this[2], this[3], this[0], this[0]); }\n get zwxy() { return new this._Vec4(this[2], this[3], this[0], this[1]); }\n get zwxz() { return new this._Vec4(this[2], this[3], this[0], this[2]); }\n get zwxw() { return new this._Vec4(this[2], this[3], this[0], this[3]); }\n get zwyx() { return new this._Vec4(this[2], this[3], this[1], this[0]); }\n get zwyy() { return new this._Vec4(this[2], this[3], this[1], this[1]); }\n get zwyz() { return new this._Vec4(this[2], this[3], this[1], this[2]); }\n get zwyw() { return new this._Vec4(this[2], this[3], this[1], this[3]); }\n get zwzx() { return new this._Vec4(this[2], this[3], this[2], this[0]); }\n get zwzy() { return new this._Vec4(this[2], this[3], this[2], this[1]); }\n get zwzz() { return new this._Vec4(this[2], this[3], this[2], this[2]); }\n get zwzw() { return new this._Vec4(this[2], this[3], this[2], this[3]); }\n get zwwx() { return new this._Vec4(this[2], this[3], this[3], this[0]); }\n get zwwy() { return new this._Vec4(this[2], this[3], this[3], this[1]); }\n get zwwz() { return new this._Vec4(this[2], this[3], this[3], this[2]); }\n get zwww() { return new this._Vec4(this[2], this[3], this[3], this[3]); }\n get wxxx() { return new this._Vec4(this[3], this[0], this[0], this[0]); }\n get wxxy() { return new this._Vec4(this[3], this[0], this[0], this[1]); }\n get wxxz() { return new this._Vec4(this[3], this[0], this[0], this[2]); }\n get wxxw() { return new this._Vec4(this[3], this[0], this[0], this[3]); }\n get wxyx() { return new this._Vec4(this[3], this[0], this[1], this[0]); }\n get wxyy() { return new this._Vec4(this[3], this[0], this[1], this[1]); }\n get wxyz() { return new this._Vec4(this[3], this[0], this[1], this[2]); }\n get wxyw() { return new this._Vec4(this[3], this[0], this[1], this[3]); }\n get wxzx() { return new this._Vec4(this[3], this[0], this[2], this[0]); }\n get wxzy() { return new this._Vec4(this[3], this[0], this[2], this[1]); }\n get wxzz() { return new this._Vec4(this[3], this[0], this[2], this[2]); }\n get wxzw() { return new this._Vec4(this[3], this[0], this[2], this[3]); }\n get wxwx() { return new this._Vec4(this[3], this[0], this[3], this[0]); }\n get wxwy() { return new this._Vec4(this[3], this[0], this[3], this[1]); }\n get wxwz() { return new this._Vec4(this[3], this[0], this[3], this[2]); }\n get wxww() { return new this._Vec4(this[3], this[0], this[3], this[3]); }\n get wyxx() { return new this._Vec4(this[3], this[1], this[0], this[0]); }\n get wyxy() { return new this._Vec4(this[3], this[1], this[0], this[1]); }\n get wyxz() { return new this._Vec4(this[3], this[1], this[0], this[2]); }\n get wyxw() { return new this._Vec4(this[3], this[1], this[0], this[3]); }\n get wyyx() { return new this._Vec4(this[3], this[1], this[1], this[0]); }\n get wyyy() { return new this._Vec4(this[3], this[1], this[1], this[1]); }\n get wyyz() { return new this._Vec4(this[3], this[1], this[1], this[2]); }\n get wyyw() { return new this._Vec4(this[3], this[1], this[1], this[3]); }\n get wyzx() { return new this._Vec4(this[3], this[1], this[2], this[0]); }\n get wyzy() { return new this._Vec4(this[3], this[1], this[2], this[1]); }\n get wyzz() { return new this._Vec4(this[3], this[1], this[2], this[2]); }\n get wyzw() { return new this._Vec4(this[3], this[1], this[2], this[3]); }\n get wywx() { return new this._Vec4(this[3], this[1], this[3], this[0]); }\n get wywy() { return new this._Vec4(this[3], this[1], this[3], this[1]); }\n get wywz() { return new this._Vec4(this[3], this[1], this[3], this[2]); }\n get wyww() { return new this._Vec4(this[3], this[1], this[3], this[3]); }\n get wzxx() { return new this._Vec4(this[3], this[2], this[0], this[0]); }\n get wzxy() { return new this._Vec4(this[3], this[2], this[0], this[1]); }\n get wzxz() { return new this._Vec4(this[3], this[2], this[0], this[2]); }\n get wzxw() { return new this._Vec4(this[3], this[2], this[0], this[3]); }\n get wzyx() { return new this._Vec4(this[3], this[2], this[1], this[0]); }\n get wzyy() { return new this._Vec4(this[3], this[2], this[1], this[1]); }\n get wzyz() { return new this._Vec4(this[3], this[2], this[1], this[2]); }\n get wzyw() { return new this._Vec4(this[3], this[2], this[1], this[3]); }\n get wzzx() { return new this._Vec4(this[3], this[2], this[2], this[0]); }\n get wzzy() { return new this._Vec4(this[3], this[2], this[2], this[1]); }\n get wzzz() { return new this._Vec4(this[3], this[2], this[2], this[2]); }\n get wzzw() { return new this._Vec4(this[3], this[2], this[2], this[3]); }\n get wzwx() { return new this._Vec4(this[3], this[2], this[3], this[0]); }\n get wzwy() { return new this._Vec4(this[3], this[2], this[3], this[1]); }\n get wzwz() { return new this._Vec4(this[3], this[2], this[3], this[2]); }\n get wzww() { return new this._Vec4(this[3], this[2], this[3], this[3]); }\n get wwxx() { return new this._Vec4(this[3], this[3], this[0], this[0]); }\n get wwxy() { return new this._Vec4(this[3], this[3], this[0], this[1]); }\n get wwxz() { return new this._Vec4(this[3], this[3], this[0], this[2]); }\n get wwxw() { return new this._Vec4(this[3], this[3], this[0], this[3]); }\n get wwyx() { return new this._Vec4(this[3], this[3], this[1], this[0]); }\n get wwyy() { return new this._Vec4(this[3], this[3], this[1], this[1]); }\n get wwyz() { return new this._Vec4(this[3], this[3], this[1], this[2]); }\n get wwyw() { return new this._Vec4(this[3], this[3], this[1], this[3]); }\n get wwzx() { return new this._Vec4(this[3], this[3], this[2], this[0]); }\n get wwzy() { return new this._Vec4(this[3], this[3], this[2], this[1]); }\n get wwzz() { return new this._Vec4(this[3], this[3], this[2], this[2]); }\n get wwzw() { return new this._Vec4(this[3], this[3], this[2], this[3]); }\n get wwwx() { return new this._Vec4(this[3], this[3], this[3], this[0]); }\n get wwwy() { return new this._Vec4(this[3], this[3], this[3], this[1]); }\n get wwwz() { return new this._Vec4(this[3], this[3], this[3], this[2]); }\n get wwww() { return new this._Vec4(this[3], this[3], this[3], this[3]); }\n}\n\ntype Tuple2 = [number, number];\ntype Tuple3 = [number, number, number];\ntype Tuple4 = [number, number, number, number];\n\nabstract class Vec2 extends VecBase implements Tuple2 {\n declare readonly length = 2;\n\n 0: number;\n 1: number;\n\n constructor(x?: number, y?: number) {\n super(2);\n this[0] = x ?? 0;\n this[1] = y ?? x ?? 0;\n }\n\n get x() {\n return this[0];\n }\n\n get y() {\n return this[1];\n }\n\n set x(value: number) {\n this[0] = value;\n }\n\n set y(value: number) {\n this[1] = value;\n }\n}\n\nabstract class Vec3 extends VecBase implements Tuple3 {\n declare readonly length = 3;\n\n 0: number;\n 1: number;\n 2: number;\n\n constructor(x?: number, y?: number, z?: number) {\n super(3);\n this[0] = x ?? 0;\n this[1] = y ?? x ?? 0;\n this[2] = z ?? x ?? 0;\n }\n\n get x() {\n return this[0];\n }\n\n get y() {\n return this[1];\n }\n\n get z() {\n return this[2];\n }\n\n set x(value: number) {\n this[0] = value;\n }\n\n set y(value: number) {\n this[1] = value;\n }\n\n set z(value: number) {\n this[2] = value;\n }\n}\n\nabstract class Vec4 extends VecBase implements Tuple4 {\n declare readonly length = 4;\n\n 0: number;\n 1: number;\n 2: number;\n 3: number;\n\n constructor(x?: number, y?: number, z?: number, w?: number) {\n super(4);\n this[0] = x ?? 0;\n this[1] = y ?? x ?? 0;\n this[2] = z ?? x ?? 0;\n this[3] = w ?? x ?? 0;\n }\n\n get x() {\n return this[0];\n }\n\n get y() {\n return this[1];\n }\n\n get z() {\n return this[2];\n }\n\n get w() {\n return this[3];\n }\n\n set x(value: number) {\n this[0] = value;\n }\n\n set y(value: number) {\n this[1] = value;\n }\n\n set z(value: number) {\n this[2] = value;\n }\n\n set w(value: number) {\n this[3] = value;\n }\n}\n\nexport class Vec2fImpl extends Vec2 {\n get kind() {\n return 'vec2f' as const;\n }\n\n get _Vec2() {\n return Vec2fImpl;\n }\n get _Vec3() {\n return Vec3fImpl;\n }\n get _Vec4() {\n return Vec4fImpl;\n }\n}\n\nexport class Vec2hImpl extends Vec2 {\n get kind() {\n return 'vec2h' as const;\n }\n\n get _Vec2() {\n return Vec2hImpl;\n }\n get _Vec3() {\n return Vec3hImpl;\n }\n get _Vec4() {\n return Vec4hImpl;\n }\n}\n\nexport class Vec2iImpl extends Vec2 {\n get kind() {\n return 'vec2i' as const;\n }\n\n get _Vec2() {\n return Vec2iImpl;\n }\n get _Vec3() {\n return Vec3iImpl;\n }\n get _Vec4() {\n return Vec4iImpl;\n }\n}\n\nexport class Vec2uImpl extends Vec2 {\n get kind() {\n return 'vec2u' as const;\n }\n\n get _Vec2() {\n return Vec2uImpl;\n }\n get _Vec3() {\n return Vec3uImpl;\n }\n get _Vec4() {\n return Vec4uImpl;\n }\n}\n\nexport class Vec3fImpl extends Vec3 {\n get kind() {\n return 'vec3f' as const;\n }\n\n get _Vec2() {\n return Vec2fImpl;\n }\n get _Vec3() {\n return Vec3fImpl;\n }\n get _Vec4() {\n return Vec4fImpl;\n }\n}\n\nexport class Vec3hImpl extends Vec3 {\n get kind() {\n return 'vec3h' as const;\n }\n\n get _Vec2() {\n return Vec2hImpl;\n }\n get _Vec3() {\n return Vec3hImpl;\n }\n get _Vec4() {\n return Vec4hImpl;\n }\n}\n\nexport class Vec3iImpl extends Vec3 {\n get kind() {\n return 'vec3i' as const;\n }\n\n get _Vec2() {\n return Vec2iImpl;\n }\n get _Vec3() {\n return Vec3iImpl;\n }\n get _Vec4() {\n return Vec4iImpl;\n }\n}\n\nexport class Vec3uImpl extends Vec3 {\n get kind() {\n return 'vec3u' as const;\n }\n\n get _Vec2() {\n return Vec2uImpl;\n }\n get _Vec3() {\n return Vec3uImpl;\n }\n get _Vec4() {\n return Vec4uImpl;\n }\n}\n\nexport class Vec4fImpl extends Vec4 {\n get kind() {\n return 'vec4f' as const;\n }\n\n get _Vec2() {\n return Vec2fImpl;\n }\n get _Vec3() {\n return Vec3fImpl;\n }\n get _Vec4() {\n return Vec4fImpl;\n }\n}\n\nexport class Vec4hImpl extends Vec4 {\n get kind() {\n return 'vec4h' as const;\n }\n\n get _Vec2() {\n return Vec2hImpl;\n }\n get _Vec3() {\n return Vec3hImpl;\n }\n get _Vec4() {\n return Vec4hImpl;\n }\n}\n\nexport class Vec4iImpl extends Vec4 {\n get kind() {\n return 'vec4i' as const;\n }\n\n get _Vec2() {\n return Vec2iImpl;\n }\n get _Vec3() {\n return Vec3iImpl;\n }\n get _Vec4() {\n return Vec4iImpl;\n }\n}\n\nexport class Vec4uImpl extends Vec4 {\n get kind() {\n return 'vec4u' as const;\n }\n\n get _Vec2() {\n return Vec2uImpl;\n }\n get _Vec3() {\n return Vec3uImpl;\n }\n get _Vec4() {\n return Vec4uImpl;\n }\n}\n","import { inGPUMode } from '../gpuMode';\nimport {\n Vec2fImpl,\n Vec2hImpl,\n Vec2iImpl,\n Vec2uImpl,\n Vec3fImpl,\n Vec3hImpl,\n Vec3iImpl,\n Vec3uImpl,\n Vec4fImpl,\n Vec4hImpl,\n Vec4iImpl,\n Vec4uImpl,\n type VecBase,\n} from './vectorImpl';\nimport type {\n AnyVecInstance,\n Vec2f,\n Vec2h,\n Vec2i,\n Vec2u,\n Vec3f,\n Vec3h,\n Vec3i,\n Vec3u,\n Vec4f,\n Vec4h,\n Vec4i,\n Vec4u,\n} from './wgslTypes';\n\n// --------------\n// Implementation\n// --------------\n\ntype VecSchemaBase<TValue> = {\n readonly type: string;\n readonly '~repr': TValue;\n};\n\nfunction makeVecSchema<TValue>(\n VecImpl: new (...args: number[]) => VecBase,\n): VecSchemaBase<TValue> & ((...args: (number | AnyVecInstance)[]) => TValue) {\n const { kind: type, length: componentCount } = new VecImpl();\n\n const construct = (...args: (number | AnyVecInstance)[]): TValue => {\n if (inGPUMode()) {\n return `${type}(${args.join(', ')})` as unknown as TValue;\n }\n\n const values = new Array(args.length);\n\n let j = 0;\n for (const arg of args) {\n if (typeof arg === 'number') {\n values[j++] = arg;\n } else {\n for (let c = 0; c < arg.length; ++c) {\n values[j++] = arg[c];\n }\n }\n }\n\n if (values.length <= 1 || values.length === componentCount) {\n return new VecImpl(...values) as TValue;\n }\n\n throw new Error(\n `'${type}' constructor called with invalid number of arguments.`,\n );\n };\n\n return Object.assign(construct, { type, '~repr': undefined as TValue });\n}\n\n// ----------\n// Public API\n// ----------\n\n/**\n *\n * Schema representing vec2f - a vector with 2 elements of type f32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec2f(); // (0.0, 0.0)\n * const vector = d.vec2f(1); // (1.0, 1.0)\n * const vector = d.vec2f(0.5, 0.1); // (0.5, 0.1)\n *\n * @example\n * const buffer = root.createBuffer(d.vec2f, d.vec2f(0, 1)); // buffer holding a d.vec2f value, with an initial value of vec2f(0, 1);\n */\nexport const vec2f = makeVecSchema(Vec2fImpl) as Vec2f;\n\n/**\n *\n * Schema representing vec2h - a vector with 2 elements of type f16.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec2h(); // (0.0, 0.0)\n * const vector = d.vec2h(1); // (1.0, 1.0)\n * const vector = d.vec2h(0.5, 0.1); // (0.5, 0.1)\n *\n * @example\n * const buffer = root.createBuffer(d.vec2h, d.vec2h(0, 1)); // buffer holding a d.vec2h value, with an initial value of vec2h(0, 1);\n */\nexport const vec2h = makeVecSchema(Vec2hImpl) as Vec2h;\n\n/**\n *\n * Schema representing vec2i - a vector with 2 elements of type i32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec2i(); // (0, 0)\n * const vector = d.vec2i(1); // (1, 1)\n * const vector = d.vec2i(-1, 1); // (-1, 1)\n *\n * @example\n * const buffer = root.createBuffer(d.vec2i, d.vec2i(0, 1)); // buffer holding a d.vec2i value, with an initial value of vec2i(0, 1);\n */\nexport const vec2i = makeVecSchema(Vec2iImpl) as Vec2i;\n\n/**\n *\n * Schema representing vec2u - a vector with 2 elements of type u32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec2u(); // (0, 0)\n * const vector = d.vec2u(1); // (1, 1)\n * const vector = d.vec2u(1, 2); // (1, 2)\n *\n * @example\n * const buffer = root.createBuffer(d.vec2u, d.vec2u(0, 1)); // buffer holding a d.vec2u value, with an initial value of vec2u(0, 1);\n */\nexport const vec2u = makeVecSchema(Vec2uImpl) as Vec2u;\n\n/**\n *\n * Schema representing vec3f - a vector with 3 elements of type f32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec3f(); // (0.0, 0.0, 0.0)\n * const vector = d.vec3f(1); // (1.0, 1.0, 1.0)\n * const vector = d.vec3f(1, 2, 3.5); // (1.0, 2.0, 3.5)\n *\n * @example\n * const buffer = root.createBuffer(d.vec3f, d.vec3f(0, 1, 2)); // buffer holding a d.vec3f value, with an initial value of vec3f(0, 1, 2);\n */\nexport const vec3f = makeVecSchema(Vec3fImpl) as Vec3f;\n\n/**\n *\n * Schema representing vec3h - a vector with 3 elements of type f16.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec3h(); // (0.0, 0.0, 0.0)\n * const vector = d.vec3h(1); // (1.0, 1.0, 1.0)\n * const vector = d.vec3h(1, 2, 3.5); // (1.0, 2.0, 3.5)\n *\n * @example\n * const buffer = root.createBuffer(d.vec3h, d.vec3h(0, 1, 2)); // buffer holding a d.vec3h value, with an initial value of vec3h(0, 1, 2);\n */\nexport const vec3h = makeVecSchema(Vec3hImpl) as Vec3h;\n\n/**\n *\n * Schema representing vec3i - a vector with 3 elements of type i32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec3i(); // (0, 0, 0)\n * const vector = d.vec3i(1); // (1, 1, 1)\n * const vector = d.vec3i(1, 2, -3); // (1, 2, -3)\n *\n * @example\n * const buffer = root.createBuffer(d.vec3i, d.vec3i(0, 1, 2)); // buffer holding a d.vec3i value, with an initial value of vec3i(0, 1, 2);\n */\nexport const vec3i = makeVecSchema(Vec3iImpl) as Vec3i;\n\n/**\n *\n * Schema representing vec3u - a vector with 3 elements of type u32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec3u(); // (0, 0, 0)\n * const vector = d.vec3u(1); // (1, 1, 1)\n * const vector = d.vec3u(1, 2, 3); // (1, 2, 3)\n *\n * @example\n * const buffer = root.createBuffer(d.vec3u, d.vec3u(0, 1, 2)); // buffer holding a d.vec3u value, with an initial value of vec3u(0, 1, 2);\n */\nexport const vec3u = makeVecSchema(Vec3uImpl) as Vec3u;\n\n/**\n *\n * Schema representing vec4f - a vector with 4 elements of type f32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec4f(); // (0.0, 0.0, 0.0, 0.0)\n * const vector = d.vec4f(1); // (1.0, 1.0, 1.0, 1.0)\n * const vector = d.vec4f(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)\n *\n * @example\n * const buffer = root.createBuffer(d.vec4f, d.vec4f(0, 1, 2, 3)); // buffer holding a d.vec4f value, with an initial value of vec4f(0, 1, 2, 3);\n */\nexport const vec4f = makeVecSchema(Vec4fImpl) as Vec4f;\n\n/**\n *\n * Schema representing vec4h - a vector with 4 elements of type f16.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec4h(); // (0.0, 0.0, 0.0, 0.0)\n * const vector = d.vec4h(1); // (1.0, 1.0, 1.0, 1.0)\n * const vector = d.vec4h(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)\n *\n * @example\n * const buffer = root.createBuffer(d.vec4h, d.vec4h(0, 1, 2, 3)); // buffer holding a d.vec4h value, with an initial value of vec4h(0, 1, 2, 3);\n */\nexport const vec4h = makeVecSchema(Vec4hImpl) as Vec4h;\n\n/**\n *\n * Schema representing vec4i - a vector with 4 elements of type i32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec4i(); // (0, 0, 0, 0)\n * const vector = d.vec4i(1); // (1, 1, 1, 1)\n * const vector = d.vec4i(1, 2, 3, -4); // (1, 2, 3, -4)\n *\n * @example\n * const buffer = root.createBuffer(d.vec4i, d.vec4i(0, 1, 2, 3)); // buffer holding a d.vec4i value, with an initial value of vec4i(0, 1, 2, 3);\n */\nexport const vec4i = makeVecSchema(Vec4iImpl) as Vec4i;\n\n/**\n *\n * Schema representing vec4u - a vector with 4 elements of type u32.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec4u(); // (0, 0, 0, 0)\n * const vector = d.vec4u(1); // (1, 1, 1, 1)\n * const vector = d.vec4u(1, 2, 3, 4); // (1, 2, 3, 4)\n *\n * @example\n * const buffer = root.createBuffer(d.vec4u, d.vec4u(0, 1, 2, 3)); // buffer holding a d.vec4u value, with an initial value of vec4u(0, 1, 2, 3);\n */\nexport const vec4u = makeVecSchema(Vec4uImpl) as Vec4u;\n","import { inGPUMode } from '../gpuMode';\nimport type { SelfResolvable } from '../types';\nimport { vec2f, vec3f, vec4f } from './vector';\nimport type {\n Mat2x2f,\n Mat3x3f,\n Mat4x4f,\n VecKind,\n m2x2f,\n m3x3f,\n m4x4f,\n mat2x2,\n mat3x3,\n mat4x4,\n matBase,\n v2f,\n v3f,\n v4f,\n} from './wgslTypes';\n\n// --------------\n// Implementation\n// --------------\n\ntype vBase = {\n kind: VecKind;\n length: number;\n [n: number]: number;\n};\n\ninterface MatSchemaOptions<TType extends string, ValueType> {\n type: TType;\n rows: number;\n columns: number;\n makeFromElements(...elements: number[]): ValueType;\n}\n\ntype MatConstructor<\n ValueType extends matBase<ColumnType>,\n ColumnType extends vBase,\n> = (...args: (number | ColumnType)[]) => ValueType;\n\nfunction createMatSchema<\n TType extends string,\n ValueType extends matBase<ColumnType>,\n ColumnType extends vBase,\n>(\n options: MatSchemaOptions<TType, ValueType>,\n): { type: TType; '~repr': ValueType } & MatConstructor<ValueType, ColumnType> {\n const MatSchema = {\n /** Type-token, not available at runtime */\n '~repr': undefined as unknown as ValueType,\n type: options.type,\n label: options.type,\n };\n\n const construct = (...args: (number | ColumnType)[]): ValueType => {\n if (inGPUMode()) {\n return `${MatSchema.type}(${args.join(', ')})` as unknown as ValueType;\n }\n\n const elements: number[] = [];\n\n for (const arg of args) {\n if (typeof arg === 'number') {\n elements.push(arg);\n } else {\n for (let i = 0; i < arg.length; ++i) {\n elements.push(arg[i] as number);\n }\n }\n }\n\n // Fill the rest with zeros\n for (let i = elements.length; i < options.columns * options.rows; ++i) {\n elements.push(0);\n }\n\n return options.makeFromElements(...elements);\n };\n\n return Object.assign(construct, MatSchema) as unknown as {\n type: TType;\n '~repr': ValueType;\n } & MatConstructor<ValueType, ColumnType>;\n}\n\nabstract class mat2x2Impl<TColumn extends v2f>\n implements mat2x2<TColumn>, SelfResolvable\n{\n public readonly columns: readonly [TColumn, TColumn];\n public readonly length = 4;\n public abstract readonly kind: string;\n [n: number]: number;\n\n constructor(...elements: number[]) {\n this.columns = [\n this.makeColumn(elements[0] as number, elements[1] as number),\n this.makeColumn(elements[2] as number, elements[3] as number),\n ];\n }\n\n abstract makeColumn(e0: number, e1: number): TColumn;\n\n get [0]() {\n return this.columns[0].x;\n }\n\n get [1]() {\n return this.columns[0].y;\n }\n\n get [2]() {\n return this.columns[1].x;\n }\n\n get [3]() {\n return this.columns[1].y;\n }\n\n set [0](value: number) {\n this.columns[0].x = value;\n }\n\n set [1](value: number) {\n this.columns[0].y = value;\n }\n\n set [2](value: number) {\n this.columns[1].x = value;\n }\n\n set [3](value: number) {\n this.columns[1].y = value;\n }\n\n '~resolve'(): string {\n return `${this.kind}(${Array.from({ length: this.length })\n .map((_, i) => this[i])\n .join(', ')})`;\n }\n}\n\nclass mat2x2fImpl extends mat2x2Impl<v2f> implements m2x2f {\n public readonly kind = 'mat2x2f';\n\n makeColumn(e0: number, e1: number): v2f {\n return vec2f(e0, e1);\n }\n}\n\nabstract class mat3x3Impl<TColumn extends v3f>\n implements mat3x3<TColumn>, SelfResolvable\n{\n public readonly columns: readonly [TColumn, TColumn, TColumn];\n public readonly length = 12;\n public abstract readonly kind: string;\n [n: number]: number;\n\n constructor(...elements: number[]) {\n this.columns = [\n this.makeColumn(\n elements[0] as number,\n elements[1] as number,\n elements[2] as number,\n ),\n this.makeColumn(\n elements[3] as number,\n elements[4] as number,\n elements[5] as number,\n ),\n this.makeColumn(\n elements[6] as number,\n elements[7] as number,\n elements[8] as number,\n ),\n ];\n }\n\n abstract makeColumn(x: number, y: number, z: number): TColumn;\n\n get [0]() {\n return this.columns[0].x;\n }\n\n get [1]() {\n return this.columns[0].y;\n }\n\n get [2]() {\n return this.columns[0].z;\n }\n\n get [3]() {\n return 0;\n }\n\n get [4]() {\n return this.columns[1].x;\n }\n\n get [5]() {\n return this.columns[1].y;\n }\n\n get [6]() {\n return this.columns[1].z;\n }\n\n get [7]() {\n return 0;\n }\n\n get [8]() {\n return this.columns[2].x;\n }\n\n get [9]() {\n return this.columns[2].y;\n }\n\n get [10]() {\n return this.columns[2].z;\n }\n\n get [11]() {\n return 0;\n }\n\n set [0](value: number) {\n this.columns[0].x = value;\n }\n\n set [1](value: number) {\n this.columns[0].y = value;\n }\n\n set [2](value: number) {\n this.columns[0].z = value;\n }\n\n set [3](_: number) {}\n\n set [4](value: number) {\n this.columns[1].x = value;\n }\n\n set [5](value: number) {\n this.columns[1].y = value;\n }\n\n set [6](value: number) {\n this.columns[1].z = value;\n }\n\n set [7](_: number) {}\n\n set [8](value: number) {\n this.columns[2].x = value;\n }\n\n set [9](value: number) {\n this.columns[2].y = value;\n }\n\n set [10](value: number) {\n this.columns[2].z = value;\n }\n\n set [11](_: number) {}\n\n '~resolve'(): string {\n return `${this.kind}(${this[0]}, ${this[1]}, ${this[2]}, ${this[4]}, ${this[5]}, ${this[6]}, ${this[8]}, ${this[9]}, ${this[10]})`;\n }\n}\n\nclass mat3x3fImpl extends mat3x3Impl<v3f> implements m3x3f {\n public readonly kind = 'mat3x3f';\n makeColumn(x: number, y: number, z: number): v3f {\n return vec3f(x, y, z);\n }\n}\n\nabstract class mat4x4Impl<TColumn extends v4f>\n implements mat4x4<TColumn>, SelfResolvable\n{\n public readonly columns: readonly [TColumn, TColumn, TColumn, TColumn];\n public abstract readonly kind: string;\n\n constructor(...elements: number[]) {\n this.columns = [\n this.makeColumn(\n elements[0] as number,\n elements[1] as number,\n elements[2] as number,\n elements[3] as number,\n ),\n this.makeColumn(\n elements[4] as number,\n elements[5] as number,\n elements[6] as number,\n elements[7] as number,\n ),\n this.makeColumn(\n elements[8] as number,\n elements[9] as number,\n elements[10] as number,\n elements[11] as number,\n ),\n this.makeColumn(\n elements[12] as number,\n elements[13] as number,\n elements[14] as number,\n elements[15] as number,\n ),\n ];\n }\n\n abstract makeColumn(x: number, y: number, z: number, w: number): TColumn;\n\n public readonly length = 16;\n [n: number]: number;\n\n get [0]() {\n return this.columns[0].x;\n }\n\n get [1]() {\n return this.columns[0].y;\n }\n\n get [2]() {\n return this.columns[0].z;\n }\n\n get [3]() {\n return this.columns[0].w;\n }\n\n get [4]() {\n return this.columns[1].x;\n }\n\n get [5]() {\n return this.columns[1].y;\n }\n\n get [6]() {\n return this.columns[1].z;\n }\n\n get [7]() {\n return this.columns[1].w;\n }\n\n get [8]() {\n return this.columns[2].x;\n }\n\n get [9]() {\n return this.columns[2].y;\n }\n\n get [10]() {\n return this.columns[2].z;\n }\n\n get [11]() {\n return this.columns[2].w;\n }\n\n get [12]() {\n return this.columns[3].x;\n }\n\n get [13]() {\n return this.columns[3].y;\n }\n\n get [14]() {\n return this.columns[3].z;\n }\n\n get [15]() {\n return this.columns[3].w;\n }\n\n set [0](value: number) {\n this.columns[0].x = value;\n }\n\n set [1](value: number) {\n this.columns[0].y = value;\n }\n\n set [2](value: number) {\n this.columns[0].z = value;\n }\n\n set [3](value: number) {\n this.columns[0].w = value;\n }\n\n set [4](value: number) {\n this.columns[1].x = value;\n }\n\n set [5](value: number) {\n this.columns[1].y = value;\n }\n\n set [6](value: number) {\n this.columns[1].z = value;\n }\n\n set [7](value: number) {\n this.columns[1].w = value;\n }\n\n set [8](value: number) {\n this.columns[2].x = value;\n }\n\n set [9](value: number) {\n this.columns[2].y = value;\n }\n\n set [10](value: number) {\n this.columns[2].z = value;\n }\n\n set [11](value: number) {\n this.columns[2].w = value;\n }\n\n set [12](value: number) {\n this.columns[3].x = value;\n }\n\n set [13](value: number) {\n this.columns[3].y = value;\n }\n\n set [14](value: number) {\n this.columns[3].z = value;\n }\n\n set [15](value: number) {\n this.columns[3].w = value;\n }\n\n '~resolve'(): string {\n return `${this.kind}(${Array.from({ length: this.length })\n .map((_, i) => this[i])\n .join(', ')})`;\n }\n}\n\nclass mat4x4fImpl extends mat4x4Impl<v4f> implements m4x4f {\n public readonly kind = 'mat4x4f';\n\n makeColumn(x: number, y: number, z: number, w: number): v4f {\n return vec4f(x, y, z, w);\n }\n}\n\n// ----------\n// Public API\n// ----------\n\n/**\n *\n * Schema representing mat2x2f - a matrix with 2 rows and 2 columns, with elements of type f32.\n * Also a constructor function for this matrix type.\n *\n * @example\n * const zero2x2 = mat2x2f(); // filled with zeros\n *\n * @example\n * const mat = mat2x2f(0, 1, 2, 3);\n * mat.columns[0] // vec2f(0, 1)\n * mat.columns[1] // vec2f(2, 3)\n *\n * @example\n * const mat = mat2x2f(\n * vec2f(0, 1), // column 0\n * vec2f(1, 2), // column 1\n * );\n *\n * @example\n * const buffer = root.createBuffer(d.mat2x2f, d.mat2x2f(0, 1, 2, 3)); // buffer holding a d.mat2x2f value, with an initial value of ((0, 1), (2, 3))\n */\nexport const mat2x2f = createMatSchema<'mat2x2f', m2x2f, v2f>({\n type: 'mat2x2f',\n rows: 2,\n columns: 2,\n makeFromElements: (...elements: number[]) => new mat2x2fImpl(...elements),\n}) as Mat2x2f;\n\n/**\n *\n * Schema representing mat3x3f - a matrix with 3 rows and 3 columns, with elements of type f32.\n * Also a constructor function for this matrix type.\n *\n * @example\n * const zero3x3 = mat3x3f(); // filled with zeros\n *\n * @example\n * const mat = mat3x3f(0, 1, 2, 3, 4, 5, 6, 7, 8);\n * mat.columns[0] // vec3f(0, 1, 2)\n * mat.columns[1] // vec3f(3, 4, 5)\n * mat.columns[2] // vec3f(6, 7, 8)\n *\n * @example\n * const mat = mat3x3f(\n * vec3f(0, 1, 2), // column 0\n * vec3f(2, 3, 4), // column 1\n * vec3f(5, 6, 7), // column 2\n * );\n *\n * @example\n * const buffer = root.createBuffer(d.mat3x3f, d.mat3x3f()); // buffer holding a d.mat3x3f value, with an initial value of mat3x3f filled with zeros\n */\nexport const mat3x3f = createMatSchema<'mat3x3f', m3x3f, v3f>({\n type: 'mat3x3f',\n rows: 3,\n columns: 3,\n makeFromElements: (...elements: number[]) => new mat3x3fImpl(...elements),\n}) as Mat3x3f;\n\n/**\n *\n * Schema representing mat4x4f - a matrix with 4 rows and 4 columns, with elements of type f32.\n * Also a constructor function for this matrix type.\n *\n * @example\n * const zero4x4 = mat4x4f(); // filled with zeros\n *\n * @example\n * const mat = mat3x3f(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);\n * mat.columns[0] // vec4f(0, 1, 2, 3)\n * mat.columns[1] // vec4f(4, 5, 6, 7)\n * mat.columns[2] // vec4f(8, 9, 10, 11)\n * mat.columns[3] // vec4f(12, 13, 14, 15)\n *\n * @example\n * const mat = mat3x3f(\n * vec4f(0, 1, 2, 3), // column 0\n * vec4f(4, 5, 6, 7), // column 1\n * vec4f(8, 9, 10, 11), // column 2\n * vec4f(12, 13, 14, 15), // column 3\n * );\n *\n * @example\n * const buffer = root.createBuffer(d.mat4x4f, d.mat4x4f()); // buffer holding a d.mat4x4f value, with an initial value of mat4x4f filled with zeros\n */\nexport const mat4x4f = createMatSchema<'mat4x4f', m4x4f, v4f>({\n type: 'mat4x4f',\n rows: 4,\n columns: 4,\n makeFromElements: (...elements: number[]) => new mat4x4fImpl(...elements),\n}) as Mat4x4f;\n\nexport function matToArray(mat: m2x2f | m3x3f | m4x4f): number[] {\n if (mat.kind === 'mat3x3f') {\n return [\n mat[0],\n mat[1],\n mat[2],\n mat[4],\n mat[5],\n mat[6],\n mat[8],\n mat[9],\n mat[10],\n ] as number[];\n }\n\n return Array.from({ length: mat.length }).map((_, idx) => mat[idx] as number);\n}\n"],"mappings":"ieAOA,IA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/D,OAAIA,EAAI,OAAS,UACR,CACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,CAAC,EACLA,EAAI,EAAE,CACR,EAGK,MAAM,KAAK,CAAE,OAAQA,EAAI,MAAO,CAAC,EAAE,IAAI,CAACnB,EAAGoB,IAAQD,EAAIC,CAAG,CAAW,CAC9E","names":["prefix","invariant","condition","message","ResolutionError","_ResolutionError","cause","trace","entries","ancestor","newTrace","MissingSlotValueError","_MissingSlotValueError","slot","NotUniformError","_NotUniformError","value","_a","MissingLinksError","_MissingLinksError","fnLabel","externalNames","MissingBindGroupsError","_MissingBindGroupsError","layouts","layout","MissingVertexBuffersError","_MissingVertexBuffersError","resolutionCtx","CPUMode","GPUMode","RuntimeMode","resolutionModeStack","provideCtx","ctx","callback","invariant","getResolutionCtx","pushMode","mode","popMode","expected","inGPUMode","VecBase","Vec2","x","y","_a","__publicField","value","Vec3","z","_b","Vec4","w","_c","Vec2fImpl","_Vec2fImpl","Vec3fImpl","Vec4fImpl","Vec2hImpl","_Vec2hImpl","Vec3hImpl","Vec4hImpl","Vec2iImpl","_Vec2iImpl","Vec3iImpl","Vec4iImpl","Vec2uImpl","_Vec2uImpl","Vec3uImpl","Vec4uImpl","_Vec3fImpl","_Vec3hImpl","_Vec3iImpl","_Vec3uImpl","_Vec4fImpl","_Vec4hImpl","_Vec4iImpl","_Vec4uImpl","makeVecSchema","VecImpl","type","componentCount","args","inGPUMode","values","j","arg","c","vec2f","Vec2fImpl","vec2h","Vec2hImpl","vec2i","Vec2iImpl","vec2u","Vec2uImpl","vec3f","Vec3fImpl","vec3h","Vec3hImpl","vec3i","Vec3iImpl","vec3u","Vec3uImpl","vec4f","Vec4fImpl","vec4h","Vec4hImpl","vec4i","Vec4iImpl","vec4u","Vec4uImpl","createMatSchema","options","MatSchema","args","inGPUMode","elements","arg","i","mat2x2Impl","__publicField","value","_","mat2x2fImpl","e0","e1","vec2f","mat3x3Impl","mat3x3fImpl","x","y","z","vec3f","mat4x4Impl","mat4x4fImpl","w","vec4f","mat2x2f","mat3x3f","mat4x4f","matToArray","mat","idx"]}
package/chunk-JSF3RDCP.js DELETED
@@ -1,2 +0,0 @@
1
- import{A as B,B as F,c as o,p as I,q as T,s as D,t as V,u as O,w as N,x as f,y as s}from"./chunk-7S2KQX6O.js";import W from"typed-binary";var Ge={type:"abstractInt"},je={type:"abstractFloat"},ne={type:"bool"},re=e=>I()?`u32(${e})`:typeof e=="boolean"?e?1:0:Number.isInteger(e)?((e<0||e>4294967295)&&console.warn(`u32 value ${e} overflowed`),(e&4294967295)>>>0):Math.max(0,Math.min(4294967295,Math.floor(e))),y=Object.assign(re,{type:"u32"}),oe=e=>{if(I())return`i32(${e})`;if(typeof e=="boolean")return e?1:0;if(Number.isInteger(e))return(e<-2147483648||e>2147483647)&&console.warn(`i32 value ${e} overflowed`),(e|0)&4294967295;let t=e<0?Math.ceil(e):Math.floor(e);return Math.max(-2147483648,Math.min(2147483647,t))},h=Object.assign(oe,{type:"i32"}),ae=e=>{if(I())return`f32(${e})`;if(typeof e=="boolean")return e?1:0;let t=new Float32Array(1);return t[0]=e,t[0]},l=Object.assign(ae,{type:"f32"}),ie=e=>{if(I())return`f16(${e})`;if(typeof e=="boolean")return e?1:0;let t=new ArrayBuffer(2);return W.f16.write(new W.BufferWriter(t),e),W.f16.read(new W.BufferReader(t))},ye=Object.assign(ie,{type:"f16"});var se=["bool","f32","f16","i32","u32","vec2f","vec2h","vec2i","vec2u","vec3f","vec3h","vec3i","vec3u","vec4f","vec4h","vec4i","vec4u","mat2x2f","mat3x3f","mat4x4f","struct","array","ptr","atomic","decorated","abstractInt","abstractFloat"];function P(e){return se.includes(e==null?void 0:e.type)}function S(e){return(e==null?void 0:e.type)==="array"}function k(e){return(e==null?void 0:e.type)==="struct"}function le(e){return(e==null?void 0:e.type)==="ptr"}function xe(e){return(e==null?void 0:e.type)==="atomic"}function L(e){return(e==null?void 0:e.type)==="@align"}function _(e){return(e==null?void 0:e.type)==="@size"}function R(e){return(e==null?void 0:e.type)==="@location"}function ue(e){return(e==null?void 0:e.type)==="@interpolate"}function $(e){return(e==null?void 0:e.type)==="@builtin"}function d(e){return(e==null?void 0:e.type)==="decorated"}function ce(e){let t=r=>r;return Object.setPrototypeOf(t,de),t.propTypes=e,t}var de={type:"struct",_label:void 0,get label(){return this._label},$name(e){return this._label=e,this},toString(){var e;return`struct:${(e=this.label)!=null?e:"<unnamed>"}`}};var b=(e,t)=>{let r=t-1,a=~r;return e&r?(e&a)+t:e};var Q=["uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10-10-10-2","unorm8x4-bgra"],qe={f32:"float32",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",f16:"float16",vec2h:"float16x2",vec4h:"float16x4",u32:"uint32",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",i32:"sint32",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4"};var me=["unstruct","disarray","loose-decorated",...Q];function U(e){return me.includes(e==null?void 0:e.type)}function w(e){return(e==null?void 0:e.type)==="disarray"}function v(e){return(e==null?void 0:e.type)==="unstruct"}function c(e){return(e==null?void 0:e.type)==="loose-decorated"}function z(e){var t,r;return(r=(t=e.attribs)==null?void 0:t.find(L))==null?void 0:r.value}function X(e){var t,r;return(r=(t=e.attribs)==null?void 0:t.find(_))==null?void 0:r.value}function Ye(e){var t,r;return(r=(t=e.attribs)==null?void 0:t.find(R))==null?void 0:r.value}function Te(e){return P(e)||U(e)}var n=class{constructor(t){this.type=t;o(this,"~repr")}},fe={uint8:y,uint8x2:V,uint8x4:F,sint8:h,sint8x2:D,sint8x4:B,unorm8:l,unorm8x2:T,unorm8x4:s,snorm8:l,snorm8x2:T,snorm8x4:s,uint16:y,uint16x2:V,uint16x4:F,sint16:h,sint16x2:D,sint16x4:B,unorm16:l,unorm16x2:T,unorm16x4:s,snorm16:l,snorm16x2:T,snorm16x4:s,float16:l,float16x2:T,float16x4:s,float32:l,float32x2:T,float32x3:O,float32x4:s,uint32:y,uint32x2:V,uint32x3:f,uint32x4:F,sint32:h,sint32x2:D,sint32x3:N,sint32x4:B,"unorm10-10-10-2":s,"unorm8x4-bgra":s},Y=Object.keys(fe),nt=new n("uint8"),rt=new n("uint8x2"),ot=new n("uint8x4"),at=new n("sint8"),it=new n("sint8x2"),yt=new n("sint8x4"),st=new n("unorm8"),lt=new n("unorm8x2"),xt=new n("unorm8x4"),ut=new n("snorm8"),pt=new n("snorm8x2"),ct=new n("snorm8x4"),dt=new n("uint16"),mt=new n("uint16x2"),Tt=new n("uint16x4"),ft=new n("sint16"),bt=new n("sint16x2"),wt=new n("sint16x4"),vt=new n("unorm16"),zt=new n("unorm16x2"),gt=new n("unorm16x4"),At=new n("snorm16"),It=new n("snorm16x2"),Dt=new n("snorm16x4"),Vt=new n("float16"),Bt=new n("float16x2"),Ft=new n("float16x4"),ht=new n("float32"),Pt=new n("float32x2"),St=new n("float32x3"),kt=new n("float32x4"),Lt=new n("uint32"),_t=new n("uint32x2"),Wt=new n("uint32x3"),Ut=new n("uint32x4"),Ct=new n("sint32"),Mt=new n("sint32x2"),Et=new n("sint32x3"),Ot=new n("sint32x4"),Nt=new n("unorm10-10-10-2"),Rt=new n("unorm8x4-bgra");var be={bool:4,f32:4,f16:2,i32:4,u32:4,vec2f:8,vec2h:4,vec2i:8,vec2u:8,vec3f:16,vec3h:8,vec3i:16,vec3u:16,vec4f:16,vec4h:8,vec4i:16,vec4u:16,mat2x2f:8,mat3x3f:16,mat4x4f:16,atomic:4};function we(e){var a,p,A;let t=e==null?void 0:e.type,r=be[t];if(r!==void 0)return r;if(k(e))return Object.values(e.propTypes).map(x).reduce((m,q)=>m>q?m:q);if(S(e))return x(e.elementType);if(v(e)){let m=Object.values(e.propTypes)[0];return m&&(a=z(m))!=null?a:1}if(w(e))return(p=z(e.elementType))!=null?p:1;if(d(e)||c(e))return(A=z(e))!=null?A:x(e.inner);if(Y.includes(t))return 1;throw new Error(`Cannot determine alignment of data: ${JSON.stringify(e)}`)}function ve(e){var t,r;if(v(e)){let a=Object.values(e.propTypes)[0];return a?g(a):1}return w(e)?g(e.elementType):c(e)?(t=z(e))!=null?t:g(e.inner):(r=z(e))!=null?r:1}var Z=new WeakMap,ee=new WeakMap;function x(e){let t=Z.get(e);return t===void 0&&(t=we(e),Z.set(e,t)),t}function g(e){let t=ee.get(e);return t===void 0&&(t=ve(e),ee.set(e,t)),t}function ze(e){return x(e)}var ge={bool:4,f32:4,f16:2,i32:4,u32:4,vec2f:8,vec2h:4,vec2i:8,vec2u:8,vec3f:12,vec3h:6,vec3i:12,vec3u:12,vec4f:16,vec4h:8,vec4i:16,vec4u:16,mat2x2f:16,mat3x3f:48,mat4x4f:64,uint8:1,uint8x2:2,uint8x4:4,sint8:1,sint8x2:2,sint8x4:4,unorm8:1,unorm8x2:2,unorm8x4:4,snorm8:1,snorm8x2:2,snorm8x4:4,uint16:2,uint16x2:4,uint16x4:8,sint16:2,sint16x2:4,sint16x4:8,unorm16:2,unorm16x2:4,unorm16x4:8,snorm16:2,snorm16x2:4,snorm16x4:8,float16:2,float16x2:4,float16x4:8,float32:4,float32x2:8,float32x3:12,float32x4:16,uint32:4,uint32x2:8,uint32x3:12,uint32x4:16,sint32:4,sint32x2:8,sint32x3:12,sint32x4:16,"unorm10-10-10-2":4,"unorm8x4-bgra":4,atomic:4};function Ae(e){let t=0;for(let r of Object.values(e.propTypes)){if(Number.isNaN(t))throw new Error("Only the last property of a struct can be unbounded");if(t=b(t,x(r)),t+=u(r),Number.isNaN(t)&&r.type!=="array")throw new Error("Cannot nest unbounded struct within another struct")}return b(t,x(e))}function Ie(e){let t=0;for(let r of Object.values(e.propTypes)){let a=g(r);t=b(t,a),t+=u(r)}return t}function De(e){var r;let t=ge[e==null?void 0:e.type];if(t!==void 0)return t;if(k(e))return Ae(e);if(v(e))return Ie(e);if(S(e)){if(e.elementCount===0)return Number.NaN;let a=x(e.elementType);return b(u(e.elementType),a)*e.elementCount}if(w(e)){let a=g(e.elementType);return b(u(e.elementType),a)*e.elementCount}if(d(e)||c(e))return(r=X(e))!=null?r:u(e.inner);throw new Error(`Cannot determine size of data: ${e}`)}var te=new WeakMap;function u(e){let t=te.get(e);return t===void 0&&(t=De(e),te.set(e,t)),t}function Ve(e){return u(e)}function j(e,t){return new G(e,t)}var G=class{constructor(t,r){this.elementType=t;this.elementCount=r;o(this,"type","array");o(this,"~repr");o(this,"~gpuRepr");o(this,"~reprPartial");o(this,"~memIdent");if(Number.isNaN(u(t)))throw new Error("Cannot nest runtime sized arrays.");if(!Number.isInteger(r)||r<0)throw new Error(`Cannot create array schema with invalid element count: ${r}.`)}toString(){return`arrayOf(${this.elementType})`}};function Be(e){return{type:"ptr",inner:e,addressSpace:"function",access:"read-write"}}function Fe(e){return{type:"ptr",inner:e,addressSpace:"private",access:"read-write"}}function he(e){return{type:"ptr",inner:e,addressSpace:"workgroup",access:"read-write"}}function Pe(e,t="read"){return{type:"ptr",inner:e,addressSpace:"storage",access:t}}function Se(e){return{type:"ptr",inner:e,addressSpace:"uniform",access:"read"}}function ke(e){return{type:"ptr",inner:e,addressSpace:"handle",access:"read"}}function Le(e,t){return new K(e,t)}var K=class{constructor(t,r){this.elementType=t;this.elementCount=r;o(this,"type","disarray");o(this,"~repr");o(this,"~reprPartial");if(!Number.isInteger(r)||r<0)throw new Error(`Cannot create disarray schema with invalid element count: ${r}.`)}};function _e(e){return new H(e)}var H=class{constructor(t){this.propTypes=t;o(this,"_label");o(this,"type","unstruct");o(this,"~repr");o(this,"~reprPartial")}get label(){return this._label}$name(t){return this._label=t,this}};function We(e){return new J(e)}var J=class{constructor(t){this.inner=t;o(this,"type","atomic");o(this,"~repr");o(this,"~memIdent");o(this,"~gpuRepr")}};function i(e,t){return d(e)?new M(e.inner,[t,...e.attribs]):c(e)?new E(e.inner,[t,...e.attribs]):U(e)?new E(e,[t]):new M(e,[t])}function Ue(e,t){return i(t,{type:"@align",value:e})}function Ce(e,t){return i(t,{type:"@size",value:e})}function Me(e,t){return i(t,{type:"@location",value:e})}function Ee(e,t){return i(t,{type:"@interpolate",value:e})}function Oe(e){return(d(e)||c(e))&&e.attribs.find($)!==void 0}function mn(e){return!d(e)&&!c(e)?"":e.attribs.map(t=>`${t.type}(${t.value}) `).join("")}var C=class{constructor(t,r){this.inner=t;this.attribs=r;o(this,"~repr");var A,m;let a=(A=r.find(L))==null?void 0:A.value,p=(m=r.find(_))==null?void 0:m.value;if(a!==void 0){if(a<=0)throw new Error(`Custom data alignment must be a positive number, got: ${a}.`);if(Math.log2(a)%1!==0)throw new Error(`Alignment has to be a power of 2, got: ${a}.`);if(P(this.inner)&&a%x(this.inner)!==0)throw new Error(`Custom alignment has to be a multiple of the standard data alignment. Got: ${a}, expected multiple of: ${x(this.inner)}.`)}if(p!==void 0){if(p<u(this.inner))throw new Error(`Custom data size cannot be smaller then the standard data size. Got: ${p}, expected at least: ${u(this.inner)}.`);if(p<=0)throw new Error(`Custom data size must be a positive number. Got: ${p}.`)}}},M=class extends C{constructor(){super(...arguments);o(this,"type","decorated");o(this,"~gpuRepr");o(this,"~reprPartial");o(this,"~memIdent")}},E=class extends C{constructor(){super(...arguments);o(this,"type","loose-decorated")}};var Ne={vertexIndex:i(y,{type:"@builtin",value:"vertex_index"}),instanceIndex:i(y,{type:"@builtin",value:"instance_index"}),position:i(s,{type:"@builtin",value:"position"}),clipDistances:i(j(y,8),{type:"@builtin",value:"clip_distances"}),frontFacing:i(l,{type:"@builtin",value:"front_facing"}),fragDepth:i(l,{type:"@builtin",value:"frag_depth"}),sampleIndex:i(y,{type:"@builtin",value:"sample_index"}),sampleMask:i(y,{type:"@builtin",value:"sample_mask"}),localInvocationId:i(f,{type:"@builtin",value:"local_invocation_id"}),localInvocationIndex:i(y,{type:"@builtin",value:"local_invocation_index"}),globalInvocationId:i(f,{type:"@builtin",value:"global_invocation_id"}),workgroupId:i(f,{type:"@builtin",value:"workgroup_id"}),numWorkgroups:i(f,{type:"@builtin",value:"num_workgroups"}),subgroupInvocationId:i(y,{type:"@builtin",value:"subgroup_invocation_id"}),subgroupSize:i(y,{type:"@builtin",value:"subgroup_size"})};export{P as a,S as b,k as c,le as d,xe as e,L as f,_ as g,R as h,ue as i,$ as j,d as k,Q as l,qe as m,U as n,w as o,v as p,c as q,Ye as r,Te as s,Ge as t,je as u,ne as v,y as w,h as x,l as y,ye as z,ce as A,b as B,fe as C,Y as D,nt as E,rt as F,ot as G,at as H,it as I,yt as J,st as K,lt as L,xt as M,ut as N,pt as O,ct as P,dt as Q,mt as R,Tt as S,ft as T,bt as U,wt as V,vt as W,zt as X,gt as Y,At as Z,It as _,Dt as $,Vt as aa,Bt as ba,Ft as ca,ht as da,Pt as ea,St as fa,kt as ga,Lt as ha,_t as ia,Wt as ja,Ut as ka,Ct as la,Mt as ma,Et as na,Ot as oa,Nt as pa,Rt as qa,x as ra,g as sa,ze as ta,u as ua,Ve as va,j as wa,Be as xa,Fe as ya,he as za,Pe as Aa,Se as Ba,ke as Ca,Le as Da,_e as Ea,We as Fa,i as Ga,Ue as Ha,Ce as Ia,Me as Ja,Ee as Ka,Oe as La,mn as Ma,Ne as Na};
2
- //# sourceMappingURL=chunk-JSF3RDCP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/data/numeric.ts","../src/data/wgslTypes.ts","../src/data/struct.ts","../src/mathUtils.ts","../src/shared/vertexFormat.ts","../src/data/dataTypes.ts","../src/data/vertexFormatData.ts","../src/data/alignmentOf.ts","../src/data/sizeOf.ts","../src/data/array.ts","../src/data/ptr.ts","../src/data/disarray.ts","../src/data/unstruct.ts","../src/data/atomic.ts","../src/data/attributes.ts","../src/builtin.ts"],"sourcesContent":["import bin from 'typed-binary';\nimport { inGPUMode } from '../gpuMode';\nimport type {\n AbstractFloat,\n AbstractInt,\n Bool,\n F16,\n F32,\n I32,\n U32,\n} from './wgslTypes';\n\nexport const abstractInt = {\n type: 'abstractInt',\n} as AbstractInt;\n\nexport const abstractFloat = {\n type: 'abstractFloat',\n} as AbstractFloat;\n\n/**\n * A schema that represents a boolean value. (equivalent to `bool` in WGSL)\n */\nexport const bool: Bool = {\n type: 'bool',\n} as Bool;\n\nconst u32Cast = (v: number | boolean) => {\n if (inGPUMode()) {\n return `u32(${v})` as unknown as number;\n }\n\n if (typeof v === 'boolean') {\n return v ? 1 : 0;\n }\n if (Number.isInteger(v)) {\n if (v < 0 || v > 0xffffffff) {\n console.warn(`u32 value ${v} overflowed`);\n }\n const value = v & 0xffffffff;\n return value >>> 0;\n }\n return Math.max(0, Math.min(0xffffffff, Math.floor(v)));\n};\n\n/**\n * A schema that represents an unsigned 32-bit integer value. (equivalent to `u32` in WGSL)\n *\n * Can also be called to cast a value to an u32 in accordance with WGSL casting rules.\n *\n * @example\n * const value = u32(3.14); // 3\n * @example\n * const value = u32(-1); // 4294967295\n * @example\n * const value = u32(-3.1); // 0\n */\nexport const u32: U32 = Object.assign(u32Cast, {\n type: 'u32',\n}) as U32;\n\nconst i32Cast = (v: number | boolean) => {\n if (inGPUMode()) {\n return `i32(${v})` as unknown as number;\n }\n\n if (typeof v === 'boolean') {\n return v ? 1 : 0;\n }\n if (Number.isInteger(v)) {\n if (v < -0x80000000 || v > 0x7fffffff) {\n console.warn(`i32 value ${v} overflowed`);\n }\n const value = v | 0;\n return value & 0xffffffff;\n }\n // round towards zero\n const value = v < 0 ? Math.ceil(v) : Math.floor(v);\n return Math.max(-0x80000000, Math.min(0x7fffffff, value));\n};\n\n/**\n * A schema that represents a signed 32-bit integer value. (equivalent to `i32` in WGSL)\n *\n * Can also be called to cast a value to an i32 in accordance with WGSL casting rules.\n *\n * @example\n * const value = i32(3.14); // 3\n * @example\n * const value = i32(-3.9); // -3\n * @example\n * const value = i32(10000000000) // 1410065408\n */\nexport const i32: I32 = Object.assign(i32Cast, {\n type: 'i32',\n}) as I32;\n\nconst f32Cast = (v: number | boolean) => {\n if (inGPUMode()) {\n return `f32(${v})` as unknown as number;\n }\n if (typeof v === 'boolean') {\n return v ? 1 : 0;\n }\n const arr = new Float32Array(1);\n arr[0] = v;\n return arr[0];\n};\n\n/**\n * A schema that represents a 32-bit float value. (equivalent to `f32` in WGSL)\n *\n * Can also be called to cast a value to an f32.\n *\n * @example\n * const value = f32(true); // 1\n */\nexport const f32: F32 = Object.assign(f32Cast, {\n type: 'f32',\n}) as F32;\n\nconst f16Cast = (v: number | boolean) => {\n if (inGPUMode()) {\n // TODO: make usage of f16() in GPU mode check for feature availability and throw if not available\n return `f16(${v})` as unknown as number;\n }\n if (typeof v === 'boolean') {\n return v ? 1 : 0;\n }\n const arr = new ArrayBuffer(2);\n bin.f16.write(new bin.BufferWriter(arr), v);\n return bin.f16.read(new bin.BufferReader(arr));\n};\n\n/**\n * A schema that represents a 16-bit float value. (equivalent to `f16` in WGSL)\n *\n * Can also be called to cast a value to an f16.\n *\n * @example\n * const value = f16(true); // 1\n * @example\n * const value = f16(21877.5); // 21872\n */\nexport const f16: F16 = Object.assign(f16Cast, {\n type: 'f16',\n}) as F16;\n","import type {\n Infer,\n InferGPU,\n InferPartial,\n MemIdentity,\n} from '../shared/repr';\nimport type { AnyWgslStruct, WgslStruct } from './struct';\n\ntype DecoratedLocation<T extends BaseData> = Decorated<T, Location<number>[]>;\n\nexport interface NumberArrayView {\n readonly length: number;\n [n: number]: number;\n}\n\nexport interface BaseData {\n type: string;\n /** Type-token, not available at runtime */\n readonly '~repr': unknown;\n}\n\n// #region Instance Types\n\n/**\n * Represents a 64-bit integer.\n */\nexport interface AbstractInt {\n readonly type: 'abstractInt';\n readonly '~repr': number;\n}\n\n/**\n * Represents a 64-bit IEEE 754 floating point number.\n */\nexport interface AbstractFloat {\n readonly type: 'abstractFloat';\n readonly '~repr': number;\n}\n\ninterface Swizzle2<T2, T3, T4> {\n readonly xx: T2;\n readonly xy: T2;\n readonly yx: T2;\n readonly yy: T2;\n\n readonly xxx: T3;\n readonly xxy: T3;\n readonly xyx: T3;\n readonly xyy: T3;\n readonly yxx: T3;\n readonly yxy: T3;\n readonly yyx: T3;\n readonly yyy: T3;\n\n readonly xxxx: T4;\n readonly xxxy: T4;\n readonly xxyx: T4;\n readonly xxyy: T4;\n readonly xyxx: T4;\n readonly xyxy: T4;\n readonly xyyx: T4;\n readonly xyyy: T4;\n readonly yxxx: T4;\n readonly yxxy: T4;\n readonly yxyx: T4;\n readonly yxyy: T4;\n readonly yyxx: T4;\n readonly yyxy: T4;\n readonly yyyx: T4;\n readonly yyyy: T4;\n}\n\ninterface Swizzle3<T2, T3, T4> extends Swizzle2<T2, T3, T4> {\n readonly xz: T2;\n readonly yz: T2;\n readonly zx: T2;\n readonly zy: T2;\n readonly zz: T2;\n\n readonly xxz: T3;\n readonly xyz: T3;\n readonly xzx: T3;\n readonly xzy: T3;\n readonly xzz: T3;\n readonly yxz: T3;\n readonly yyz: T3;\n readonly yzx: T3;\n readonly yzy: T3;\n readonly yzz: T3;\n readonly zxx: T3;\n readonly zxy: T3;\n readonly zxz: T3;\n readonly zyx: T3;\n readonly zyy: T3;\n readonly zyz: T3;\n readonly zzx: T3;\n readonly zzy: T3;\n readonly zzz: T3;\n\n readonly xxxz: T4;\n readonly xxyz: T4;\n readonly xxzx: T4;\n readonly xxzy: T4;\n readonly xxzz: T4;\n readonly xyxz: T4;\n readonly xyyz: T4;\n readonly xyzx: T4;\n readonly xyzy: T4;\n readonly xyzz: T4;\n readonly xzxx: T4;\n readonly xzxy: T4;\n readonly xzxz: T4;\n readonly xzyx: T4;\n readonly xzyy: T4;\n readonly xzyz: T4;\n readonly xzzx: T4;\n readonly xzzy: T4;\n readonly xzzz: T4;\n readonly yxxz: T4;\n readonly yxyz: T4;\n readonly yxzx: T4;\n readonly yxzy: T4;\n readonly yxzz: T4;\n readonly yyxz: T4;\n readonly yyyz: T4;\n readonly yyzx: T4;\n readonly yyzy: T4;\n readonly yyzz: T4;\n readonly yzxx: T4;\n readonly yzxy: T4;\n readonly yzxz: T4;\n readonly yzyx: T4;\n readonly yzyy: T4;\n readonly yzyz: T4;\n readonly yzzx: T4;\n readonly yzzy: T4;\n readonly yzzz: T4;\n readonly zxxx: T4;\n readonly zxxy: T4;\n readonly zxxz: T4;\n readonly zxyx: T4;\n readonly zxyy: T4;\n readonly zxyz: T4;\n readonly zxzx: T4;\n readonly zxzy: T4;\n readonly zxzz: T4;\n readonly zyxx: T4;\n readonly zyxy: T4;\n readonly zyxz: T4;\n readonly zyyx: T4;\n readonly zyyy: T4;\n readonly zyyz: T4;\n readonly zyzx: T4;\n readonly zyzy: T4;\n readonly zyzz: T4;\n readonly zzxx: T4;\n readonly zzxy: T4;\n readonly zzxz: T4;\n readonly zzyx: T4;\n readonly zzyy: T4;\n readonly zzyz: T4;\n readonly zzzx: T4;\n readonly zzzy: T4;\n readonly zzzz: T4;\n}\n\ninterface Swizzle4<T2, T3, T4> extends Swizzle3<T2, T3, T4> {\n readonly yw: T2;\n readonly zw: T2;\n readonly wx: T2;\n readonly wy: T2;\n readonly wz: T2;\n readonly ww: T2;\n\n readonly xxw: T3;\n readonly xyw: T3;\n readonly xzw: T3;\n readonly xwx: T3;\n readonly xwy: T3;\n readonly xwz: T3;\n readonly xww: T3;\n readonly yxw: T3;\n readonly yyw: T3;\n readonly yzw: T3;\n readonly ywx: T3;\n readonly ywy: T3;\n readonly ywz: T3;\n readonly yww: T3;\n readonly zxw: T3;\n readonly zyw: T3;\n readonly zzw: T3;\n readonly zwx: T3;\n readonly zwy: T3;\n readonly zwz: T3;\n readonly zww: T3;\n readonly wxx: T3;\n readonly wxz: T3;\n readonly wxy: T3;\n readonly wyy: T3;\n readonly wyz: T3;\n readonly wzz: T3;\n readonly wwx: T3;\n readonly wwy: T3;\n readonly wwz: T3;\n readonly www: T3;\n\n readonly xxxw: T4;\n readonly xxyw: T4;\n readonly xxzw: T4;\n readonly xxwx: T4;\n readonly xxwy: T4;\n readonly xxwz: T4;\n readonly xxww: T4;\n readonly xyxw: T4;\n readonly xyyw: T4;\n readonly xyzw: T4;\n readonly xywx: T4;\n readonly xywy: T4;\n readonly xywz: T4;\n readonly xyww: T4;\n readonly xzxw: T4;\n readonly xzyw: T4;\n readonly xzzw: T4;\n readonly xzwx: T4;\n readonly xzwy: T4;\n readonly xzwz: T4;\n readonly xzww: T4;\n readonly xwxx: T4;\n readonly xwxy: T4;\n readonly xwxz: T4;\n readonly xwyy: T4;\n readonly xwyz: T4;\n readonly xwzz: T4;\n readonly xwwx: T4;\n readonly xwwy: T4;\n readonly xwwz: T4;\n readonly xwww: T4;\n readonly yxxw: T4;\n readonly yxyw: T4;\n readonly yxzw: T4;\n readonly yxwx: T4;\n readonly yxwy: T4;\n readonly yxwz: T4;\n readonly yxww: T4;\n readonly yyxw: T4;\n readonly yyyw: T4;\n readonly yyzw: T4;\n readonly yywx: T4;\n readonly yywy: T4;\n readonly yywz: T4;\n readonly yyww: T4;\n readonly yzxw: T4;\n readonly yzyw: T4;\n readonly yzzw: T4;\n readonly yzwx: T4;\n readonly yzwy: T4;\n readonly yzwz: T4;\n readonly yzww: T4;\n readonly ywxx: T4;\n readonly ywxy: T4;\n readonly ywxz: T4;\n readonly ywxw: T4;\n readonly ywyy: T4;\n readonly ywyz: T4;\n readonly ywzz: T4;\n readonly ywwx: T4;\n readonly ywwy: T4;\n readonly ywwz: T4;\n readonly ywww: T4;\n readonly zxxw: T4;\n readonly zxyw: T4;\n readonly zxzw: T4;\n readonly zxwx: T4;\n readonly zxwy: T4;\n readonly zxwz: T4;\n readonly zxww: T4;\n readonly zyxw: T4;\n readonly zyyw: T4;\n readonly zyzw: T4;\n readonly zywx: T4;\n readonly zywy: T4;\n readonly zywz: T4;\n readonly zyww: T4;\n readonly zzxw: T4;\n readonly zzyw: T4;\n readonly zzzw: T4;\n readonly zzwx: T4;\n readonly zzwy: T4;\n readonly zzwz: T4;\n readonly zzww: T4;\n readonly zwxx: T4;\n readonly zwxy: T4;\n readonly zwxz: T4;\n readonly zwxw: T4;\n readonly zwyy: T4;\n readonly zwyz: T4;\n readonly zwzz: T4;\n readonly zwwx: T4;\n readonly zwwy: T4;\n readonly zwwz: T4;\n readonly zwww: T4;\n readonly wxxx: T4;\n readonly wxxy: T4;\n readonly wxxz: T4;\n readonly wxxw: T4;\n readonly wxyx: T4;\n readonly wxyy: T4;\n readonly wxyz: T4;\n readonly wxyw: T4;\n readonly wxzx: T4;\n readonly wxzy: T4;\n readonly wxzz: T4;\n readonly wxzw: T4;\n readonly wxwx: T4;\n readonly wxwy: T4;\n readonly wxwz: T4;\n readonly wxww: T4;\n readonly wyxx: T4;\n readonly wyxy: T4;\n readonly wyxz: T4;\n readonly wyxw: T4;\n readonly wyyy: T4;\n readonly wyyz: T4;\n readonly wyzw: T4;\n readonly wywx: T4;\n readonly wywy: T4;\n readonly wywz: T4;\n readonly wyww: T4;\n readonly wzxx: T4;\n readonly wzxy: T4;\n readonly wzxz: T4;\n readonly wzxw: T4;\n readonly wzyy: T4;\n readonly wzyz: T4;\n readonly wzzy: T4;\n readonly wzzw: T4;\n readonly wzwx: T4;\n readonly wzwy: T4;\n readonly wzwz: T4;\n readonly wzww: T4;\n readonly wwxx: T4;\n readonly wwxy: T4;\n readonly wwxz: T4;\n readonly wwxw: T4;\n readonly wwyy: T4;\n readonly wwyz: T4;\n readonly wwzz: T4;\n readonly wwwx: T4;\n readonly wwwy: T4;\n readonly wwwz: T4;\n readonly wwww: T4;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec2f or vec2<f32>.\n * A vector with 2 elements of type f32\n */\nexport interface v2f extends NumberArrayView, Swizzle2<v2f, v3f, v4f> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec2f';\n x: number;\n y: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec2h or vec2<f16>.\n * A vector with 2 elements of type f16\n */\nexport interface v2h extends NumberArrayView, Swizzle2<v2h, v3h, v4h> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec2h';\n x: number;\n y: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec2i or vec2<i32>.\n * A vector with 2 elements of type i32\n */\nexport interface v2i extends NumberArrayView, Swizzle2<v2i, v3i, v4i> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec2i';\n x: number;\n y: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec2u or vec2<u32>.\n * A vector with 2 elements of type u32\n */\nexport interface v2u extends NumberArrayView, Swizzle2<v2u, v3u, v4u> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec2u';\n x: number;\n y: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec3f or vec3<f32>.\n * A vector with 3 elements of type f32\n */\nexport interface v3f extends NumberArrayView, Swizzle3<v2f, v3f, v4f> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec3f';\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec3h or vec3<f16>.\n * A vector with 3 elements of type f16\n */\nexport interface v3h extends NumberArrayView, Swizzle3<v2h, v3h, v4h> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec3h';\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec3i or vec3<i32>.\n * A vector with 3 elements of type i32\n */\nexport interface v3i extends NumberArrayView, Swizzle3<v2i, v3i, v4i> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec3i';\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec3u or vec3<u32>.\n * A vector with 3 elements of type u32\n */\nexport interface v3u extends NumberArrayView, Swizzle3<v2u, v3u, v4u> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec3u';\n x: number;\n y: number;\n z: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec4f or vec4<f32>.\n * A vector with 4 elements of type f32\n */\nexport interface v4f extends NumberArrayView, Swizzle4<v2f, v3f, v4f> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec4f';\n x: number;\n y: number;\n z: number;\n w: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec4h or vec4<f16>.\n * A vector with 4 elements of type f16\n */\nexport interface v4h extends NumberArrayView, Swizzle4<v2h, v3h, v4h> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec4h';\n x: number;\n y: number;\n z: number;\n w: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec4i or vec4<i32>.\n * A vector with 4 elements of type i32\n */\nexport interface v4i extends NumberArrayView, Swizzle4<v2i, v3i, v4i> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec4i';\n x: number;\n y: number;\n z: number;\n w: number;\n}\n\n/**\n * Interface representing its WGSL vector type counterpart: vec4u or vec4<u32>.\n * A vector with 4 elements of type u32\n */\nexport interface v4u extends NumberArrayView, Swizzle4<v2u, v3u, v4u> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec4u';\n x: number;\n y: number;\n z: number;\n w: number;\n}\n\nexport type AnyVecInstance =\n | v2f\n | v2h\n | v2i\n | v2u\n | v3f\n | v3h\n | v3i\n | v3u\n | v4f\n | v4h\n | v4i\n | v4u;\n\nexport type AnyVec2Instance = v2f | v2h | v2i | v2u;\nexport type AnyVec3Instance = v3f | v3h | v3i | v3u;\nexport type AnyVec4Instance = v4f | v4h | v4i | v4u;\n\nexport type VecKind = AnyVecInstance['kind'];\n\nexport interface matBase<TColumn> extends NumberArrayView {\n readonly columns: readonly TColumn[];\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat2x2\n * A matrix with 2 rows and 2 columns, with elements of type `TColumn`\n */\nexport interface mat2x2<TColumn> extends matBase<TColumn> {\n readonly length: 4;\n readonly kind: string;\n [n: number]: number;\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat2x2f or mat2x2<f32>\n * A matrix with 2 rows and 2 columns, with elements of type d.f32\n */\nexport interface m2x2f extends mat2x2<v2f> {\n readonly kind: 'mat2x2f';\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat3x3\n * A matrix with 3 rows and 3 columns, with elements of type `TColumn`\n */\nexport interface mat3x3<TColumn> extends matBase<TColumn> {\n readonly length: 12;\n readonly kind: string;\n [n: number]: number;\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat3x3f or mat3x3<f32>\n * A matrix with 3 rows and 3 columns, with elements of type d.f32\n */\nexport interface m3x3f extends mat3x3<v3f> {\n readonly kind: 'mat3x3f';\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat4x4\n * A matrix with 4 rows and 4 columns, with elements of type `TColumn`\n */\nexport interface mat4x4<TColumn> extends matBase<TColumn> {\n readonly length: 16;\n readonly kind: string;\n [n: number]: number;\n}\n\n/**\n * Interface representing its WGSL matrix type counterpart: mat4x4f or mat4x4<f32>\n * A matrix with 4 rows and 4 columns, with elements of type d.f32\n */\nexport interface m4x4f extends mat4x4<v4f> {\n readonly kind: 'mat4x4f';\n}\n\nexport type AnyMatInstance = m2x2f | m3x3f | m4x4f;\n\nexport type vBaseForMat<T extends AnyMatInstance> = T extends m2x2f\n ? v2f\n : T extends m3x3f\n ? v3f\n : v4f;\n\n// #endregion\n\n// #region WGSL Schema Types\n\n/**\n * Boolean schema representing a single WGSL bool value.\n * Cannot be used inside buffers as it is not host-shareable.\n */\nexport interface Bool {\n readonly type: 'bool';\n readonly '~repr': boolean;\n}\n\n/**\n * 32-bit float schema representing a single WGSL f32 value.\n */\nexport interface F32 {\n readonly type: 'f32';\n /** Type-token, not available at runtime */\n readonly '~repr': number;\n\n (v: number | boolean): number;\n}\n\n/**\n * 16-bit float schema representing a single WGSL f16 value.\n */\nexport interface F16 {\n readonly type: 'f16';\n /** Type-token, not available at runtime */\n readonly '~repr': number;\n\n (v: number | boolean): number;\n}\n\n/**\n * Signed 32-bit integer schema representing a single WGSL i32 value.\n */\nexport interface I32 {\n readonly type: 'i32';\n /** Type-token, not available at runtime */\n readonly '~repr': number;\n readonly '~memIdent': I32 | Atomic<I32> | DecoratedLocation<I32>;\n\n (v: number | boolean): number;\n}\n\n/**\n * Unsigned 32-bit integer schema representing a single WGSL u32 value.\n */\nexport interface U32 {\n readonly type: 'u32';\n /** Type-token, not available at runtime */\n readonly '~repr': number;\n readonly '~memIdent': U32 | Atomic<U32> | DecoratedLocation<U32>;\n\n (v: number | boolean): number;\n}\n\n/**\n * Type of the `d.vec2f` object/function: vector data type schema/constructor\n */\nexport interface Vec2f {\n readonly type: 'vec2f';\n /** Type-token, not available at runtime */\n readonly '~repr': v2f;\n\n (x: number, y: number): v2f;\n (xy: number): v2f;\n (): v2f;\n (v: AnyVec2Instance): v2f;\n}\n\n/**\n * Type of the `d.vec2h` object/function: vector data type schema/constructor\n */\nexport interface Vec2h {\n readonly type: 'vec2h';\n /** Type-token, not available at runtime */\n readonly '~repr': v2h;\n\n (x: number, y: number): v2h;\n (xy: number): v2h;\n (): v2h;\n (v: AnyVec2Instance): v2h;\n}\n\n/**\n * Type of the `d.vec2i` object/function: vector data type schema/constructor\n */\nexport interface Vec2i {\n readonly type: 'vec2i';\n /** Type-token, not available at runtime */\n readonly '~repr': v2i;\n\n (x: number, y: number): v2i;\n (xy: number): v2i;\n (): v2i;\n (v: AnyVec2Instance): v2i;\n}\n\n/**\n * Type of the `d.vec2u` object/function: vector data type schema/constructor\n */\nexport interface Vec2u {\n readonly type: 'vec2u';\n /** Type-token, not available at runtime */\n readonly '~repr': v2u;\n\n (x: number, y: number): v2u;\n (xy: number): v2u;\n (): v2u;\n (v: AnyVec2Instance): v2u;\n}\n\n/**\n * Type of the `d.vec3f` object/function: vector data type schema/constructor\n */\nexport interface Vec3f {\n readonly type: 'vec3f';\n /** Type-token, not available at runtime */\n readonly '~repr': v3f;\n\n (x: number, y: number, z: number): v3f;\n (xyz: number): v3f;\n (): v3f;\n (v: AnyVec3Instance): v3f;\n (v0: AnyVec2Instance, z: number): v3f;\n (x: number, v0: AnyVec2Instance): v3f;\n}\n\n/**\n * Type of the `d.vec3h` object/function: vector data type schema/constructor\n */\nexport interface Vec3h {\n readonly type: 'vec3h';\n /** Type-token, not available at runtime */\n readonly '~repr': v3h;\n\n (x: number, y: number, z: number): v3h;\n (xyz: number): v3h;\n (): v3h;\n (v: AnyVec3Instance): v3h;\n (v0: AnyVec2Instance, z: number): v3h;\n (x: number, v0: AnyVec2Instance): v3h;\n}\n\n/**\n * Type of the `d.vec3i` object/function: vector data type schema/constructor\n */\nexport interface Vec3i {\n readonly type: 'vec3i';\n /** Type-token, not available at runtime */\n readonly '~repr': v3i;\n\n (x: number, y: number, z: number): v3i;\n (xyz: number): v3i;\n (): v3i;\n (v: AnyVec3Instance): v3i;\n (v0: AnyVec2Instance, z: number): v3i;\n (x: number, v0: AnyVec2Instance): v3i;\n}\n\n/**\n * Type of the `d.vec3u` object/function: vector data type schema/constructor\n */\nexport interface Vec3u {\n readonly type: 'vec3u';\n /** Type-token, not available at runtime */\n readonly '~repr': v3u;\n\n (x: number, y: number, z: number): v3u;\n (xyz: number): v3u;\n (): v3u;\n (v: AnyVec3Instance): v3u;\n (v0: AnyVec2Instance, z: number): v3u;\n (x: number, v0: AnyVec2Instance): v3u;\n}\n\n/**\n * Type of the `d.vec4f` object/function: vector data type schema/constructor\n */\nexport interface Vec4f {\n readonly type: 'vec4f';\n /** Type-token, not available at runtime */\n readonly '~repr': v4f;\n\n (x: number, y: number, z: number, w: number): v4f;\n (xyzw: number): v4f;\n (): v4f;\n (v: AnyVec4Instance): v4f;\n (v0: AnyVec3Instance, w: number): v4f;\n (x: number, v0: AnyVec3Instance): v4f;\n (v0: AnyVec2Instance, v1: AnyVec2Instance): v4f;\n (v0: AnyVec2Instance, z: number, w: number): v4f;\n (x: number, v0: AnyVec2Instance, z: number): v4f;\n (x: number, y: number, v0: AnyVec2Instance): v4f;\n}\n\n/**\n * Type of the `d.vec4h` object/function: vector data type schema/constructor\n */\nexport interface Vec4h {\n readonly type: 'vec4h';\n /** Type-token, not available at runtime */\n readonly '~repr': v4h;\n\n (x: number, y: number, z: number, w: number): v4h;\n (xyzw: number): v4h;\n (): v4h;\n (v: AnyVec4Instance): v4h;\n (v0: AnyVec3Instance, w: number): v4h;\n (x: number, v0: AnyVec3Instance): v4h;\n (v0: AnyVec2Instance, v1: AnyVec2Instance): v4h;\n (v0: AnyVec2Instance, z: number, w: number): v4h;\n (x: number, v0: AnyVec2Instance, z: number): v4h;\n (x: number, y: number, v0: AnyVec2Instance): v4h;\n}\n\n/**\n * Type of the `d.vec4i` object/function: vector data type schema/constructor\n */\nexport interface Vec4i {\n readonly type: 'vec4i';\n /** Type-token, not available at runtime */\n readonly '~repr': v4i;\n\n (x: number, y: number, z: number, w: number): v4i;\n (xyzw: number): v4i;\n (): v4i;\n (v: AnyVec4Instance): v4i;\n (v0: AnyVec3Instance, w: number): v4i;\n (x: number, v0: AnyVec3Instance): v4i;\n (v0: AnyVec2Instance, v1: AnyVec2Instance): v4i;\n (v0: AnyVec2Instance, z: number, w: number): v4i;\n (x: number, v0: AnyVec2Instance, z: number): v4i;\n (x: number, y: number, v0: AnyVec2Instance): v4i;\n}\n\n/**\n * Type of the `d.vec4u` object/function: vector data type schema/constructor\n */\nexport interface Vec4u {\n readonly type: 'vec4u';\n /** Type-token, not available at runtime */\n readonly '~repr': v4u;\n\n (x: number, y: number, z: number, w: number): v4u;\n (xyzw: number): v4u;\n (): v4u;\n (v: AnyVec4Instance): v4u;\n (v0: AnyVec3Instance, w: number): v4u;\n (x: number, v0: AnyVec3Instance): v4u;\n (v0: AnyVec2Instance, v1: AnyVec2Instance): v4u;\n (v0: AnyVec2Instance, z: number, w: number): v4u;\n (x: number, v0: AnyVec2Instance, z: number): v4u;\n (x: number, y: number, v0: AnyVec2Instance): v4u;\n}\n\n/**\n * Type of the `d.mat2x2f` object/function: matrix data type schema/constructor\n */\nexport interface Mat2x2f {\n readonly type: 'mat2x2f';\n /** Type-token, not available at runtime */\n readonly '~repr': m2x2f;\n\n (...elements: number[]): m2x2f;\n (...columns: v2f[]): m2x2f;\n (): m2x2f;\n}\n\n/**\n * Type of the `d.mat3x3f` object/function: matrix data type schema/constructor\n */\nexport interface Mat3x3f {\n readonly type: 'mat3x3f';\n /** Type-token, not available at runtime */\n readonly '~repr': m3x3f;\n\n (...elements: number[]): m3x3f;\n (...columns: v3f[]): m3x3f;\n (): m3x3f;\n}\n\n/**\n * Type of the `d.mat4x4f` object/function: matrix data type schema/constructor\n */\nexport interface Mat4x4f {\n readonly type: 'mat4x4f';\n /** Type-token, not available at runtime */\n readonly '~repr': m4x4f;\n\n (...elements: number[]): m4x4f;\n (...columns: v4f[]): m4x4f;\n (): m4x4f;\n}\n\n/**\n * Array schema constructed via `d.arrayOf` function.\n *\n * Responsible for handling reading and writing array values\n * between binary and JS representation. Takes into account\n * the `byteAlignment` requirement of its elementType.\n */\nexport interface WgslArray<TElement extends BaseData = BaseData> {\n readonly type: 'array';\n readonly elementCount: number;\n readonly elementType: TElement;\n /** Type-token, not available at runtime */\n readonly '~repr': Infer<TElement>[];\n readonly '~gpuRepr': InferGPU<TElement>[];\n readonly '~reprPartial': { idx: number; value: InferPartial<TElement> }[];\n readonly '~memIdent': WgslArray<MemIdentity<TElement>>;\n}\n\nexport type AddressSpace =\n | 'uniform'\n | 'storage'\n | 'workgroup'\n | 'private'\n | 'function'\n | 'handle';\nexport type Access = 'read' | 'write' | 'read-write';\n\nexport interface Ptr<\n TAddr extends AddressSpace = AddressSpace,\n TInner extends BaseData = BaseData, // can also be sampler or texture (╯'□')╯︵ ┻━┻\n TAccess extends Access = Access,\n> {\n readonly type: 'ptr';\n readonly inner: TInner;\n readonly addressSpace: TAddr;\n readonly access: TAccess;\n /** Type-token, not available at runtime */\n readonly '~repr': Infer<TInner>;\n}\n\n/**\n * Schema representing the `atomic<...>` WGSL data type.\n */\nexport interface Atomic<TInner extends U32 | I32 = U32 | I32> {\n readonly type: 'atomic';\n readonly inner: TInner;\n /** Type-token, not available at runtime */\n readonly '~repr': Infer<TInner>;\n readonly '~gpuRepr': TInner extends U32 ? atomicU32 : atomicI32;\n readonly '~memIdent': MemIdentity<TInner>;\n}\n\nexport interface atomicU32 {\n type: 'atomicU32';\n}\n\nexport interface atomicI32 {\n type: 'atomicI32';\n}\n\nexport interface Align<T extends number> {\n readonly type: '@align';\n readonly value: T;\n}\n\nexport interface Size<T extends number> {\n readonly type: '@size';\n readonly value: T;\n}\n\nexport interface Location<T extends number> {\n readonly type: '@location';\n readonly value: T;\n}\n\nexport type PerspectiveOrLinearInterpolationType =\n `${'perspective' | 'linear'}${'' | ', center' | ', centroid' | ', sample'}`;\nexport type FlatInterpolationType = `flat${'' | ', first' | ', either'}`;\nexport type InterpolationType =\n | PerspectiveOrLinearInterpolationType\n | FlatInterpolationType;\n\nexport interface Interpolate<T extends InterpolationType> {\n readonly type: '@interpolate';\n readonly value: T;\n}\n\nexport interface Builtin<T extends string> {\n readonly type: '@builtin';\n readonly value: T;\n}\n\nexport interface Decorated<\n TInner extends BaseData = BaseData,\n TAttribs extends unknown[] = unknown[],\n> {\n readonly type: 'decorated';\n readonly inner: TInner;\n readonly attribs: TAttribs;\n /** Type-token, not available at runtime */\n readonly '~repr': Infer<TInner>;\n readonly '~gpuRepr': InferGPU<TInner>;\n readonly '~reprPartial': InferPartial<TInner>;\n readonly '~memIdent': TAttribs extends Location<number>[]\n ? MemIdentity<TInner> | Decorated<MemIdentity<TInner>, TAttribs>\n : Decorated<MemIdentity<TInner>, TAttribs>;\n}\n\nexport const wgslTypeLiterals = [\n 'bool',\n 'f32',\n 'f16',\n 'i32',\n 'u32',\n 'vec2f',\n 'vec2h',\n 'vec2i',\n 'vec2u',\n 'vec3f',\n 'vec3h',\n 'vec3i',\n 'vec3u',\n 'vec4f',\n 'vec4h',\n 'vec4i',\n 'vec4u',\n 'mat2x2f',\n 'mat3x3f',\n 'mat4x4f',\n 'struct',\n 'array',\n 'ptr',\n 'atomic',\n 'decorated',\n 'abstractInt',\n 'abstractFloat',\n] as const;\n\nexport type WgslTypeLiteral = (typeof wgslTypeLiterals)[number];\n\nexport type PerspectiveOrLinearInterpolatableData =\n | F32\n | F16\n | Vec2f\n | Vec2h\n | Vec3f\n | Vec3h\n | Vec4f\n | Vec4h;\n\nexport type FlatInterpolatableData =\n | PerspectiveOrLinearInterpolatableData\n | I32\n | U32\n | Vec2i\n | Vec2u\n | Vec3i\n | Vec3u\n | Vec4i\n | Vec4u;\n\nexport type AnyWgslData =\n | Bool\n | F32\n | F16\n | I32\n | U32\n | Vec2f\n | Vec2h\n | Vec2i\n | Vec2u\n | Vec3f\n | Vec3h\n | Vec3i\n | Vec3u\n | Vec4f\n | Vec4h\n | Vec4i\n | Vec4u\n | Mat2x2f\n | Mat3x3f\n | Mat4x4f\n | AnyWgslStruct\n | WgslArray\n | Ptr\n | Atomic\n | Decorated\n | AbstractInt\n | AbstractFloat;\n\n// #endregion\n\nexport function isWgslData(value: unknown): value is AnyWgslData {\n return wgslTypeLiterals.includes((value as AnyWgslData)?.type);\n}\n\n/**\n * Checks whether passed in value is an array schema,\n * as opposed to, e.g., a disarray schema.\n *\n * Array schemas can be used to describe uniform and storage buffers,\n * whereas disarray schemas cannot.\n *\n * @example\n * isWgslArray(d.arrayOf(d.u32, 4)) // true\n * isWgslArray(d.disarray(d.u32, 4)) // false\n * isWgslArray(d.vec3f) // false\n */\nexport function isWgslArray<T extends WgslArray>(\n schema: T | unknown,\n): schema is T {\n return (schema as T)?.type === 'array';\n}\n\n/**\n * Checks whether passed in value is a struct schema,\n * as opposed to, e.g., an unstruct schema.\n *\n * Struct schemas can be used to describe uniform and storage buffers,\n * whereas unstruct schemas cannot.\n *\n * @example\n * isWgslStruct(d.struct({ a: d.u32 })) // true\n * isWgslStruct(d.unstruct({ a: d.u32 })) // false\n * isWgslStruct(d.vec3f) // false\n */\nexport function isWgslStruct<T extends WgslStruct>(\n schema: T | unknown,\n): schema is T {\n return (schema as T)?.type === 'struct';\n}\n\n/**\n * Checks whether passed in value is a pointer ('function' scope) schema.\n *\n * @example\n * isPtrFn(d.ptrFn(d.f32)) // true\n * isPtrFn(d.f32) // false\n */\nexport function isPtr<T extends Ptr>(schema: T | unknown): schema is T {\n return (schema as T)?.type === 'ptr';\n}\n\n/**\n * Checks whether the passed in value is an atomic schema.\n *\n * @example\n * isAtomic(d.atomic(d.u32)) // true\n * isAtomic(d.u32) // false\n */\nexport function isAtomic<T extends Atomic<U32 | I32>>(\n schema: T | unknown,\n): schema is T {\n return (schema as T)?.type === 'atomic';\n}\n\nexport function isAlignAttrib<T extends Align<number>>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === '@align';\n}\n\nexport function isSizeAttrib<T extends Size<number>>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === '@size';\n}\n\nexport function isLocationAttrib<T extends Location<number>>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === '@location';\n}\n\nexport function isInterpolateAttrib<T extends Interpolate<InterpolationType>>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === '@interpolate';\n}\n\nexport function isBuiltinAttrib<T extends Builtin<string>>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === '@builtin';\n}\n\nexport function isDecorated<T extends Decorated>(\n value: unknown | T,\n): value is T {\n return (value as T)?.type === 'decorated';\n}\n\nexport function isAbstractFloat(value: unknown): value is AbstractFloat {\n return (value as AbstractFloat).type === 'abstractFloat';\n}\n\nexport function isAbstractInt(value: unknown): value is AbstractInt {\n return (value as AbstractInt).type === 'abstractInt';\n}\n","import type { TgpuNamable } from '../namable';\nimport type {\n InferGPURecord,\n InferPartialRecord,\n InferRecord,\n MemIdentityRecord,\n} from '../shared/repr';\nimport type { Prettify } from '../shared/utilityTypes';\nimport type { AnyWgslData, BaseData } from './wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\n/**\n * Struct schema constructed via `d.struct` function.\n *\n * Responsible for handling reading and writing struct values\n * between binary and JS representation. Takes into account\n * the `byteAlignment` requirement of its members.\n */\nexport interface WgslStruct<\n TProps extends Record<string, BaseData> = Record<string, BaseData>,\n> extends TgpuNamable {\n (props: InferRecord<TProps>): InferRecord<TProps>;\n readonly type: 'struct';\n readonly label?: string | undefined;\n readonly propTypes: TProps;\n /** Type-token, not available at runtime */\n readonly '~repr': Prettify<InferRecord<TProps>>;\n /** Type-token, not available at runtime */\n readonly '~gpuRepr': InferGPURecord<TProps>;\n /** Type-token, not available at runtime */\n readonly '~memIdent': WgslStruct<MemIdentityRecord<TProps>>;\n /** Type-token, not available at runtime */\n readonly '~reprPartial': Prettify<Partial<InferPartialRecord<TProps>>>;\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: <we need the type to be broader than WgslStruct<Record<string, BaseWgslData>>\nexport type AnyWgslStruct = WgslStruct<any>;\n\n/**\n * Creates a struct schema that can be used to construct GPU buffers.\n * Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).\n * The order of members matches the passed in properties object.\n *\n * @example\n * const CircleStruct = d.struct({ radius: d.f32, pos: d.vec3f });\n *\n * @param props Record with `string` keys and `TgpuData` values,\n * each entry describing one struct member.\n */\nexport function struct<TProps extends Record<string, AnyWgslData>>(\n props: TProps,\n): WgslStruct<Prettify<TProps>> {\n const struct = <T>(props: T) => props;\n Object.setPrototypeOf(struct, WgslStructImpl);\n struct.propTypes = props;\n\n return struct as unknown as WgslStruct<Prettify<TProps>>;\n}\n\n// --------------\n// Implementation\n// --------------\n\nconst WgslStructImpl = {\n type: 'struct',\n _label: undefined as string | undefined,\n\n get label(): string | undefined {\n return this._label;\n },\n\n $name(label: string) {\n this._label = label;\n return this;\n },\n\n toString(): string {\n return `struct:${this.label ?? '<unnamed>'}`;\n },\n};\n","/**\n * @param value\n * @param modulo has to be power of 2\n */\nexport const roundUp = (value: number, modulo: number) => {\n const bitMask = modulo - 1;\n const invBitMask = ~bitMask;\n return (value & bitMask) === 0 ? value : (value & invBitMask) + modulo;\n};\n","export const vertexFormats = [\n 'uint8',\n 'uint8x2',\n 'uint8x4',\n 'sint8',\n 'sint8x2',\n 'sint8x4',\n 'unorm8',\n 'unorm8x2',\n 'unorm8x4',\n 'snorm8',\n 'snorm8x2',\n 'snorm8x4',\n 'uint16',\n 'uint16x2',\n 'uint16x4',\n 'sint16',\n 'sint16x2',\n 'sint16x4',\n 'unorm16',\n 'unorm16x2',\n 'unorm16x4',\n 'snorm16',\n 'snorm16x2',\n 'snorm16x4',\n 'float16',\n 'float16x2',\n 'float16x4',\n 'float32',\n 'float32x2',\n 'float32x3',\n 'float32x4',\n 'uint32',\n 'uint32x2',\n 'uint32x3',\n 'uint32x4',\n 'sint32',\n 'sint32x2',\n 'sint32x3',\n 'sint32x4',\n 'unorm10-10-10-2',\n 'unorm8x4-bgra',\n] as const;\n\nexport type VertexFormat = (typeof vertexFormats)[number];\n\nexport const kindToDefaultFormatMap = {\n f32: 'float32',\n vec2f: 'float32x2',\n vec3f: 'float32x3',\n vec4f: 'float32x4',\n f16: 'float16',\n vec2h: 'float16x2',\n // vec3h has no direct equivalent in the spec\n vec4h: 'float16x4',\n u32: 'uint32',\n vec2u: 'uint32x2',\n vec3u: 'uint32x3',\n vec4u: 'uint32x4',\n i32: 'sint32',\n vec2i: 'sint32x2',\n vec3i: 'sint32x3',\n vec4i: 'sint32x4',\n} as const;\n\nexport type KindToDefaultFormatMap = typeof kindToDefaultFormatMap;\n\nexport interface TgpuVertexAttrib<TFormat extends VertexFormat = VertexFormat> {\n readonly format: TFormat;\n readonly offset: number;\n}\n\nexport type AnyVertexAttribs =\n | Record<string, TgpuVertexAttrib>\n | TgpuVertexAttrib;\n\n/**\n * All vertex attribute formats that can be interpreted as\n * an single or multi component u32 in a shader.\n * https://www.w3.org/TR/webgpu/#vertex-formats\n */\ntype U32CompatibleFormats =\n | TgpuVertexAttrib<'uint8'>\n | TgpuVertexAttrib<'uint8x2'>\n | TgpuVertexAttrib<'uint8x4'>\n | TgpuVertexAttrib<'uint16'>\n | TgpuVertexAttrib<'uint16x2'>\n | TgpuVertexAttrib<'uint16x4'>\n | TgpuVertexAttrib<'uint32'>\n | TgpuVertexAttrib<'uint32x2'>\n | TgpuVertexAttrib<'uint32x3'>\n | TgpuVertexAttrib<'uint32x4'>;\n\n/**\n * All vertex attribute formats that can be interpreted as\n * an single or multi component i32 in a shader.\n * https://www.w3.org/TR/webgpu/#vertex-formats\n */\ntype I32CompatibleFormats =\n | TgpuVertexAttrib<'sint8'>\n | TgpuVertexAttrib<'sint8x2'>\n | TgpuVertexAttrib<'sint8x4'>\n | TgpuVertexAttrib<'sint16'>\n | TgpuVertexAttrib<'sint16x2'>\n | TgpuVertexAttrib<'sint16x4'>\n | TgpuVertexAttrib<'sint32'>\n | TgpuVertexAttrib<'sint32x2'>\n | TgpuVertexAttrib<'sint32x3'>\n | TgpuVertexAttrib<'sint32x4'>;\n\n/**\n * All vertex attribute formats that can be interpreted as\n * an single or multi component f32 in a shader.\n * https://www.w3.org/TR/webgpu/#vertex-formats\n */\ntype F32CompatibleFormats =\n | TgpuVertexAttrib<'unorm8'>\n | TgpuVertexAttrib<'unorm8x2'>\n | TgpuVertexAttrib<'unorm8x4'>\n | TgpuVertexAttrib<'snorm8'>\n | TgpuVertexAttrib<'snorm8x2'>\n | TgpuVertexAttrib<'snorm8x4'>\n | TgpuVertexAttrib<'unorm16'>\n | TgpuVertexAttrib<'unorm16x2'>\n | TgpuVertexAttrib<'unorm16x4'>\n | TgpuVertexAttrib<'snorm16'>\n | TgpuVertexAttrib<'snorm16x2'>\n | TgpuVertexAttrib<'snorm16x4'>\n | TgpuVertexAttrib<'float16'>\n | TgpuVertexAttrib<'float16x2'>\n | TgpuVertexAttrib<'float16x4'>\n | TgpuVertexAttrib<'float32'>\n | TgpuVertexAttrib<'float32x2'>\n | TgpuVertexAttrib<'float32x3'>\n | TgpuVertexAttrib<'float32x4'>\n | TgpuVertexAttrib<'unorm10-10-10-2'>\n | TgpuVertexAttrib<'unorm8x4-bgra'>;\n\n/**\n * All vertex attribute formats that can be interpreted as\n * a single or multi component f16 in a shader. (same as f32 on the shader side)\n * https://www.w3.org/TR/webgpu/#vertex-formats\n */\ntype F16CompatibleFormats = F32CompatibleFormats;\n\nexport type KindToAcceptedAttribMap = {\n u32: U32CompatibleFormats;\n vec2u: U32CompatibleFormats;\n vec3u: U32CompatibleFormats;\n vec4u: U32CompatibleFormats;\n\n i32: I32CompatibleFormats;\n vec2i: I32CompatibleFormats;\n vec3i: I32CompatibleFormats;\n vec4i: I32CompatibleFormats;\n\n f16: F16CompatibleFormats;\n vec2h: F16CompatibleFormats;\n vec3h: F16CompatibleFormats;\n vec4h: F16CompatibleFormats;\n\n f32: F32CompatibleFormats;\n vec2f: F32CompatibleFormats;\n vec3f: F32CompatibleFormats;\n vec4f: F32CompatibleFormats;\n};\n","import type { TgpuNamable } from '../namable.js';\nimport type {\n Infer,\n InferPartial,\n InferPartialRecord,\n InferRecord,\n} from '../shared/repr.js';\nimport type { Prettify } from '../shared/utilityTypes.js';\nimport { vertexFormats } from '../shared/vertexFormat.js';\nimport type { PackedData } from './vertexFormatData.js';\nimport * as wgsl from './wgslTypes.js';\n\n/**\n * Array schema constructed via `d.disarrayOf` function.\n *\n * Useful for defining vertex buffers.\n * Elements in the schema are not aligned in respect to their `byteAlignment`,\n * unless they are explicitly decorated with the custom align attribute\n * via `d.align` function.\n */\nexport interface Disarray<TElement extends wgsl.BaseData = wgsl.BaseData> {\n readonly type: 'disarray';\n readonly elementCount: number;\n readonly elementType: TElement;\n readonly '~repr': Infer<TElement>[];\n readonly '~reprPartial': { idx: number; value: InferPartial<TElement> }[];\n}\n\n/**\n * Struct schema constructed via `d.unstruct` function.\n *\n * Useful for defining vertex buffers, as the standard layout restrictions do not apply.\n * Members are not aligned in respect to their `byteAlignment`,\n * unless they are explicitly decorated with the custom align attribute\n * via `d.align` function.\n */\nexport interface Unstruct<\n TProps extends Record<string, wgsl.BaseData> = Record<string, wgsl.BaseData>,\n> extends TgpuNamable {\n readonly label?: string | undefined;\n readonly type: 'unstruct';\n readonly propTypes: TProps;\n readonly '~repr': Prettify<InferRecord<TProps>>;\n readonly '~reprPartial': Prettify<Partial<InferPartialRecord<TProps>>>;\n}\n\nexport interface LooseDecorated<\n TInner extends wgsl.BaseData = wgsl.BaseData,\n TAttribs extends unknown[] = unknown[],\n> {\n readonly type: 'loose-decorated';\n readonly inner: TInner;\n readonly attribs: TAttribs;\n readonly '~repr': Infer<TInner>;\n}\n\nconst looseTypeLiterals = [\n 'unstruct',\n 'disarray',\n 'loose-decorated',\n ...vertexFormats,\n] as const;\n\nexport type LooseTypeLiteral = (typeof looseTypeLiterals)[number];\n\nexport type AnyLooseData = Disarray | Unstruct | LooseDecorated | PackedData;\n\nexport function isLooseData(data: unknown): data is AnyLooseData {\n return looseTypeLiterals.includes((data as AnyLooseData)?.type);\n}\n\n/**\n * Checks whether the passed in value is a disarray schema,\n * as opposed to, e.g., a regular array schema.\n *\n * Array schemas can be used to describe uniform and storage buffers,\n * whereas disarray schemas cannot. Disarrays are useful for\n * defining vertex buffers instead.\n *\n * @example\n * isDisarray(d.arrayOf(d.u32, 4)) // false\n * isDisarray(d.disarrayOf(d.u32, 4)) // true\n * isDisarray(d.vec3f) // false\n */\nexport function isDisarray<T extends Disarray>(\n schema: T | unknown,\n): schema is T {\n return (schema as Disarray)?.type === 'disarray';\n}\n\n/**\n * Checks whether passed in value is a unstruct schema,\n * as opposed to, e.g., a struct schema.\n *\n * Struct schemas can be used to describe uniform and storage buffers,\n * whereas unstruct schemas cannot. Unstructs are useful for\n * defining vertex buffers instead.\n *\n * @example\n * isUnstruct(d.struct({ a: d.u32 })) // false\n * isUnstruct(d.unstruct({ a: d.u32 })) // true\n * isUnstruct(d.vec3f) // false\n */\nexport function isUnstruct<T extends Unstruct>(\n schema: T | unknown,\n): schema is T {\n return (schema as T)?.type === 'unstruct';\n}\n\nexport function isLooseDecorated<T extends LooseDecorated>(\n value: T | unknown,\n): value is T {\n return (value as T)?.type === 'loose-decorated';\n}\n\nexport function getCustomAlignment(data: wgsl.BaseData): number | undefined {\n return (data as unknown as wgsl.Decorated | LooseDecorated).attribs?.find(\n wgsl.isAlignAttrib,\n )?.value;\n}\n\nexport function getCustomSize(data: wgsl.BaseData): number | undefined {\n return (data as unknown as wgsl.Decorated | LooseDecorated).attribs?.find(\n wgsl.isSizeAttrib,\n )?.value;\n}\n\nexport function getCustomLocation(data: wgsl.BaseData): number | undefined {\n return (data as unknown as wgsl.Decorated | LooseDecorated).attribs?.find(\n wgsl.isLocationAttrib,\n )?.value;\n}\n\nexport function isData(value: unknown): value is AnyData {\n return wgsl.isWgslData(value) || isLooseData(value);\n}\n\nexport type AnyData = wgsl.AnyWgslData | AnyLooseData;\nexport type AnyConcreteData = Exclude<\n AnyData,\n wgsl.AbstractInt | wgsl.AbstractFloat\n>;\n","import type { Infer } from '../shared/repr';\nimport type { VertexFormat } from '../shared/vertexFormat';\nimport { f32, i32, u32 } from './numeric';\nimport {\n vec2f,\n vec2i,\n vec2u,\n vec3f,\n vec3i,\n vec3u,\n vec4f,\n vec4i,\n vec4u,\n} from './vector';\n\nexport type FormatToWGSLType<T extends VertexFormat> =\n (typeof formatToWGSLType)[T];\n\nexport interface TgpuVertexFormatData<T extends VertexFormat> {\n readonly '~repr': Infer<FormatToWGSLType<T>>;\n readonly type: T;\n}\n\nclass TgpuVertexFormatDataImpl<T extends VertexFormat>\n implements TgpuVertexFormatData<T>\n{\n /** Used as a type-token for the `Infer<T>` functionality. */\n public readonly '~repr'!: Infer<FormatToWGSLType<T>>;\n\n constructor(public readonly type: T) {}\n}\n\nexport const formatToWGSLType = {\n uint8: u32,\n uint8x2: vec2u,\n uint8x4: vec4u,\n sint8: i32,\n sint8x2: vec2i,\n sint8x4: vec4i,\n unorm8: f32,\n unorm8x2: vec2f,\n unorm8x4: vec4f,\n snorm8: f32,\n snorm8x2: vec2f,\n snorm8x4: vec4f,\n uint16: u32,\n uint16x2: vec2u,\n uint16x4: vec4u,\n sint16: i32,\n sint16x2: vec2i,\n sint16x4: vec4i,\n unorm16: f32,\n unorm16x2: vec2f,\n unorm16x4: vec4f,\n snorm16: f32,\n snorm16x2: vec2f,\n snorm16x4: vec4f,\n float16: f32,\n float16x2: vec2f,\n float16x4: vec4f,\n float32: f32,\n float32x2: vec2f,\n float32x3: vec3f,\n float32x4: vec4f,\n uint32: u32,\n uint32x2: vec2u,\n uint32x3: vec3u,\n uint32x4: vec4u,\n sint32: i32,\n sint32x2: vec2i,\n sint32x3: vec3i,\n sint32x4: vec4i,\n 'unorm10-10-10-2': vec4f,\n 'unorm8x4-bgra': vec4f,\n} as const;\n\nexport const packedFormats = Object.keys(formatToWGSLType);\n\nexport type uint8 = TgpuVertexFormatData<'uint8'>;\nexport const uint8 = new TgpuVertexFormatDataImpl('uint8') as uint8;\n\nexport type uint8x2 = TgpuVertexFormatData<'uint8x2'>;\nexport const uint8x2 = new TgpuVertexFormatDataImpl('uint8x2') as uint8x2;\n\nexport type uint8x4 = TgpuVertexFormatData<'uint8x4'>;\nexport const uint8x4 = new TgpuVertexFormatDataImpl('uint8x4') as uint8x4;\n\nexport type sint8 = TgpuVertexFormatData<'sint8'>;\nexport const sint8 = new TgpuVertexFormatDataImpl('sint8') as sint8;\n\nexport type sint8x2 = TgpuVertexFormatData<'sint8x2'>;\nexport const sint8x2 = new TgpuVertexFormatDataImpl('sint8x2') as sint8x2;\n\nexport type sint8x4 = TgpuVertexFormatData<'sint8x4'>;\nexport const sint8x4 = new TgpuVertexFormatDataImpl('sint8x4') as sint8x4;\n\nexport type unorm8 = TgpuVertexFormatData<'unorm8'>;\nexport const unorm8 = new TgpuVertexFormatDataImpl('unorm8') as unorm8;\n\nexport type unorm8x2 = TgpuVertexFormatData<'unorm8x2'>;\nexport const unorm8x2 = new TgpuVertexFormatDataImpl('unorm8x2') as unorm8x2;\n\nexport type unorm8x4 = TgpuVertexFormatData<'unorm8x4'>;\nexport const unorm8x4 = new TgpuVertexFormatDataImpl('unorm8x4') as unorm8x4;\n\nexport type snorm8 = TgpuVertexFormatData<'snorm8'>;\nexport const snorm8 = new TgpuVertexFormatDataImpl('snorm8') as snorm8;\n\nexport type snorm8x2 = TgpuVertexFormatData<'snorm8x2'>;\nexport const snorm8x2 = new TgpuVertexFormatDataImpl('snorm8x2') as snorm8x2;\n\nexport type snorm8x4 = TgpuVertexFormatData<'snorm8x4'>;\nexport const snorm8x4 = new TgpuVertexFormatDataImpl('snorm8x4') as snorm8x4;\n\nexport type uint16 = TgpuVertexFormatData<'uint16'>;\nexport const uint16 = new TgpuVertexFormatDataImpl('uint16') as uint16;\n\nexport type uint16x2 = TgpuVertexFormatData<'uint16x2'>;\nexport const uint16x2 = new TgpuVertexFormatDataImpl('uint16x2') as uint16x2;\n\nexport type uint16x4 = TgpuVertexFormatData<'uint16x4'>;\nexport const uint16x4 = new TgpuVertexFormatDataImpl('uint16x4') as uint16x4;\n\nexport type sint16 = TgpuVertexFormatData<'sint16'>;\nexport const sint16 = new TgpuVertexFormatDataImpl('sint16') as sint16;\n\nexport type sint16x2 = TgpuVertexFormatData<'sint16x2'>;\nexport const sint16x2 = new TgpuVertexFormatDataImpl('sint16x2') as sint16x2;\n\nexport type sint16x4 = TgpuVertexFormatData<'sint16x4'>;\nexport const sint16x4 = new TgpuVertexFormatDataImpl('sint16x4') as sint16x4;\n\nexport type unorm16 = TgpuVertexFormatData<'unorm16'>;\nexport const unorm16 = new TgpuVertexFormatDataImpl('unorm16') as unorm16;\n\nexport type unorm16x2 = TgpuVertexFormatData<'unorm16x2'>;\nexport const unorm16x2 = new TgpuVertexFormatDataImpl('unorm16x2') as unorm16x2;\n\nexport type unorm16x4 = TgpuVertexFormatData<'unorm16x4'>;\nexport const unorm16x4 = new TgpuVertexFormatDataImpl('unorm16x4') as unorm16x4;\n\nexport type snorm16 = TgpuVertexFormatData<'snorm16'>;\nexport const snorm16 = new TgpuVertexFormatDataImpl('snorm16') as snorm16;\n\nexport type snorm16x2 = TgpuVertexFormatData<'snorm16x2'>;\nexport const snorm16x2 = new TgpuVertexFormatDataImpl('snorm16x2') as snorm16x2;\n\nexport type snorm16x4 = TgpuVertexFormatData<'snorm16x4'>;\nexport const snorm16x4 = new TgpuVertexFormatDataImpl('snorm16x4') as snorm16x4;\n\nexport type float16 = TgpuVertexFormatData<'float16'>;\nexport const float16 = new TgpuVertexFormatDataImpl('float16') as float16;\n\nexport type float16x2 = TgpuVertexFormatData<'float16x2'>;\nexport const float16x2 = new TgpuVertexFormatDataImpl('float16x2') as float16x2;\n\nexport type float16x4 = TgpuVertexFormatData<'float16x4'>;\nexport const float16x4 = new TgpuVertexFormatDataImpl('float16x4') as float16x4;\n\nexport type float32 = TgpuVertexFormatData<'float32'>;\nexport const float32 = new TgpuVertexFormatDataImpl('float32') as float32;\n\nexport type float32x2 = TgpuVertexFormatData<'float32x2'>;\nexport const float32x2 = new TgpuVertexFormatDataImpl('float32x2') as float32x2;\n\nexport type float32x3 = TgpuVertexFormatData<'float32x3'>;\nexport const float32x3 = new TgpuVertexFormatDataImpl('float32x3') as float32x3;\n\nexport type float32x4 = TgpuVertexFormatData<'float32x4'>;\nexport const float32x4 = new TgpuVertexFormatDataImpl('float32x4') as float32x4;\n\nexport type uint32 = TgpuVertexFormatData<'uint32'>;\nexport const uint32 = new TgpuVertexFormatDataImpl('uint32') as uint32;\n\nexport type uint32x2 = TgpuVertexFormatData<'uint32x2'>;\nexport const uint32x2 = new TgpuVertexFormatDataImpl('uint32x2') as uint32x2;\n\nexport type uint32x3 = TgpuVertexFormatData<'uint32x3'>;\nexport const uint32x3 = new TgpuVertexFormatDataImpl('uint32x3') as uint32x3;\n\nexport type uint32x4 = TgpuVertexFormatData<'uint32x4'>;\nexport const uint32x4 = new TgpuVertexFormatDataImpl('uint32x4') as uint32x4;\n\nexport type sint32 = TgpuVertexFormatData<'sint32'>;\nexport const sint32 = new TgpuVertexFormatDataImpl('sint32') as sint32;\n\nexport type sint32x2 = TgpuVertexFormatData<'sint32x2'>;\nexport const sint32x2 = new TgpuVertexFormatDataImpl('sint32x2') as sint32x2;\n\nexport type sint32x3 = TgpuVertexFormatData<'sint32x3'>;\nexport const sint32x3 = new TgpuVertexFormatDataImpl('sint32x3') as sint32x3;\n\nexport type sint32x4 = TgpuVertexFormatData<'sint32x4'>;\nexport const sint32x4 = new TgpuVertexFormatDataImpl('sint32x4') as sint32x4;\n\nexport type unorm10_10_10_2 = TgpuVertexFormatData<'unorm10-10-10-2'>;\nexport const unorm10_10_10_2 = new TgpuVertexFormatDataImpl(\n 'unorm10-10-10-2',\n) as unorm10_10_10_2;\n\nexport type unorm8x4_bgra = TgpuVertexFormatData<'unorm8x4-bgra'>;\nexport const unorm8x4_bgra = new TgpuVertexFormatDataImpl(\n 'unorm8x4-bgra',\n) as unorm8x4_bgra;\n\nexport type PackedData =\n | uint8\n | uint8x2\n | uint8x4\n | sint8\n | sint8x2\n | sint8x4\n | unorm8\n | unorm8x2\n | unorm8x4\n | snorm8\n | snorm8x2\n | snorm8x4\n | uint16\n | uint16x2\n | uint16x4\n | sint16\n | sint16x2\n | sint16x4\n | unorm16\n | unorm16x2\n | unorm16x4\n | snorm16\n | snorm16x2\n | snorm16x4\n | float16\n | float16x2\n | float16x4\n | float32\n | float32x2\n | float32x3\n | float32x4\n | uint32\n | uint32x2\n | uint32x3\n | uint32x4\n | sint32\n | sint32x2\n | sint32x3\n | sint32x4\n | unorm10_10_10_2\n | unorm8x4_bgra;\n","import {\n type AnyData,\n getCustomAlignment,\n isDisarray,\n isLooseDecorated,\n isUnstruct,\n} from './dataTypes';\nimport { packedFormats } from './vertexFormatData';\nimport {\n type BaseData,\n isDecorated,\n isWgslArray,\n isWgslStruct,\n} from './wgslTypes';\n\nconst knownAlignmentMap: Record<string, number> = {\n bool: 4,\n f32: 4,\n f16: 2,\n i32: 4,\n u32: 4,\n vec2f: 8,\n vec2h: 4,\n vec2i: 8,\n vec2u: 8,\n vec3f: 16,\n vec3h: 8,\n vec3i: 16,\n vec3u: 16,\n vec4f: 16,\n vec4h: 8,\n vec4i: 16,\n vec4u: 16,\n mat2x2f: 8,\n mat3x3f: 16,\n mat4x4f: 16,\n atomic: 4,\n};\n\nfunction computeAlignment(data: object): number {\n const dataType = (data as BaseData)?.type;\n const knownAlignment = knownAlignmentMap[dataType];\n if (knownAlignment !== undefined) {\n return knownAlignment;\n }\n\n if (isWgslStruct(data)) {\n return Object.values(data.propTypes)\n .map(alignmentOf)\n .reduce((a, b) => (a > b ? a : b));\n }\n\n if (isWgslArray(data)) {\n return alignmentOf(data.elementType);\n }\n\n if (isUnstruct(data)) {\n // A loose struct is aligned to its first property.\n const firstProp = Object.values(data.propTypes)[0];\n return firstProp ? (getCustomAlignment(firstProp) ?? 1) : 1;\n }\n\n if (isDisarray(data)) {\n return getCustomAlignment(data.elementType) ?? 1;\n }\n\n if (isDecorated(data) || isLooseDecorated(data)) {\n return getCustomAlignment(data) ?? alignmentOf(data.inner);\n }\n\n if (packedFormats.includes(dataType)) {\n return 1;\n }\n\n throw new Error(\n `Cannot determine alignment of data: ${JSON.stringify(data)}`,\n );\n}\n\nfunction computeCustomAlignment(data: BaseData): number {\n if (isUnstruct(data)) {\n // A loose struct is aligned to its first property.\n const firstProp = Object.values(data.propTypes)[0];\n return firstProp ? customAlignmentOf(firstProp) : 1;\n }\n\n if (isDisarray(data)) {\n return customAlignmentOf(data.elementType);\n }\n\n if (isLooseDecorated(data)) {\n return getCustomAlignment(data) ?? customAlignmentOf(data.inner);\n }\n\n return getCustomAlignment(data) ?? 1;\n}\n\n/**\n * Since alignments can be inferred from data types, they are not stored on them.\n * Instead, this weak map acts as an extended property of those data types.\n */\nconst cachedAlignments = new WeakMap<object, number>();\n\nconst cachedCustomAlignments = new WeakMap<object, number>();\n\nexport function alignmentOf(data: BaseData): number {\n let alignment = cachedAlignments.get(data);\n if (alignment === undefined) {\n alignment = computeAlignment(data);\n cachedAlignments.set(data, alignment);\n }\n\n return alignment;\n}\n\nexport function customAlignmentOf(data: BaseData): number {\n let alignment = cachedCustomAlignments.get(data);\n if (alignment === undefined) {\n alignment = computeCustomAlignment(data);\n cachedCustomAlignments.set(data, alignment);\n }\n\n return alignment;\n}\n\n/**\n * Returns the alignment (in bytes) of data represented by the `schema`.\n */\nexport function PUBLIC_alignmentOf(schema: AnyData): number {\n return alignmentOf(schema);\n}\n","import { roundUp } from '../mathUtils';\nimport { alignmentOf, customAlignmentOf } from './alignmentOf';\nimport type { AnyData, LooseTypeLiteral, Unstruct } from './dataTypes';\nimport {\n getCustomSize,\n isDisarray,\n isLooseDecorated,\n isUnstruct,\n} from './dataTypes';\nimport type { WgslStruct } from './struct';\nimport type { BaseData, WgslTypeLiteral } from './wgslTypes';\nimport { isDecorated, isWgslArray, isWgslStruct } from './wgslTypes';\n\nconst knownSizesMap: Record<string, number> = {\n bool: 4,\n f32: 4,\n f16: 2,\n i32: 4,\n u32: 4,\n vec2f: 8,\n vec2h: 4,\n vec2i: 8,\n vec2u: 8,\n vec3f: 12,\n vec3h: 6,\n vec3i: 12,\n vec3u: 12,\n vec4f: 16,\n vec4h: 8,\n vec4i: 16,\n vec4u: 16,\n mat2x2f: 16,\n mat3x3f: 48,\n mat4x4f: 64,\n uint8: 1,\n uint8x2: 2,\n uint8x4: 4,\n sint8: 1,\n sint8x2: 2,\n sint8x4: 4,\n unorm8: 1,\n unorm8x2: 2,\n unorm8x4: 4,\n snorm8: 1,\n snorm8x2: 2,\n snorm8x4: 4,\n uint16: 2,\n uint16x2: 4,\n uint16x4: 8,\n sint16: 2,\n sint16x2: 4,\n sint16x4: 8,\n unorm16: 2,\n unorm16x2: 4,\n unorm16x4: 8,\n snorm16: 2,\n snorm16x2: 4,\n snorm16x4: 8,\n float16: 2,\n float16x2: 4,\n float16x4: 8,\n float32: 4,\n float32x2: 8,\n float32x3: 12,\n float32x4: 16,\n uint32: 4,\n uint32x2: 8,\n uint32x3: 12,\n uint32x4: 16,\n sint32: 4,\n sint32x2: 8,\n sint32x3: 12,\n sint32x4: 16,\n 'unorm10-10-10-2': 4,\n 'unorm8x4-bgra': 4,\n atomic: 4,\n} satisfies Partial<Record<WgslTypeLiteral | LooseTypeLiteral, number>>;\n\nfunction sizeOfStruct(struct: WgslStruct) {\n let size = 0;\n for (const property of Object.values(struct.propTypes)) {\n if (Number.isNaN(size)) {\n throw new Error('Only the last property of a struct can be unbounded');\n }\n\n size = roundUp(size, alignmentOf(property));\n size += sizeOf(property);\n\n if (Number.isNaN(size) && property.type !== 'array') {\n throw new Error('Cannot nest unbounded struct within another struct');\n }\n }\n\n return roundUp(size, alignmentOf(struct));\n}\n\nfunction sizeOfUnstruct(data: Unstruct) {\n let size = 0;\n\n for (const property of Object.values(data.propTypes)) {\n const alignment = customAlignmentOf(property);\n size = roundUp(size, alignment);\n size += sizeOf(property);\n }\n\n return size;\n}\n\nfunction computeSize(data: object): number {\n const knownSize = knownSizesMap[(data as BaseData)?.type];\n\n if (knownSize !== undefined) {\n return knownSize;\n }\n\n if (isWgslStruct(data)) {\n return sizeOfStruct(data);\n }\n\n if (isUnstruct(data)) {\n return sizeOfUnstruct(data);\n }\n\n if (isWgslArray(data)) {\n if (data.elementCount === 0) {\n return Number.NaN;\n }\n\n const alignment = alignmentOf(data.elementType);\n const stride = roundUp(sizeOf(data.elementType), alignment);\n return stride * data.elementCount;\n }\n\n if (isDisarray(data)) {\n const alignment = customAlignmentOf(data.elementType);\n const stride = roundUp(sizeOf(data.elementType), alignment);\n return stride * data.elementCount;\n }\n\n if (isDecorated(data) || isLooseDecorated(data)) {\n return getCustomSize(data) ?? sizeOf(data.inner);\n }\n\n throw new Error(`Cannot determine size of data: ${data}`);\n}\n\n/**\n * Since sizes can be inferred from data types, they are not stored on them.\n * Instead, this weak map acts as an extended property of those data types.\n */\nconst cachedSizes = new WeakMap<BaseData, number>();\n\nexport function sizeOf(schema: BaseData): number {\n let size = cachedSizes.get(schema);\n\n if (size === undefined) {\n size = computeSize(schema);\n cachedSizes.set(schema, size);\n }\n\n return size;\n}\n\n/**\n * Returns the size (in bytes) of data represented by the `schema`.\n */\nexport function PUBLIC_sizeOf(schema: AnyData): number {\n return sizeOf(schema);\n}\n","import type {\n Infer,\n InferGPU,\n InferPartial,\n MemIdentity,\n} from '../shared/repr';\nimport { sizeOf } from './sizeOf';\nimport type { AnyWgslData, BaseData, WgslArray } from './wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\n/**\n * Creates an array schema that can be used to construct gpu buffers.\n * Describes arrays with fixed-size length, storing elements of the same type.\n *\n * @example\n * const LENGTH = 3;\n * const array = d.arrayOf(d.u32, LENGTH);\n *\n * @param elementType The type of elements in the array.\n * @param elementCount The number of elements in the array.\n */\nexport function arrayOf<TElement extends AnyWgslData>(\n elementType: TElement,\n elementCount: number,\n): WgslArray<TElement> {\n return new WgslArrayImpl(elementType, elementCount);\n}\n\n// --------------\n// Implementation\n// --------------\n\nclass WgslArrayImpl<TElement extends BaseData> implements WgslArray<TElement> {\n public readonly type = 'array';\n /** Type-token, not available at runtime */\n public readonly '~repr'!: Infer<TElement>[];\n /** Type-token, not available at runtime */\n public readonly '~gpuRepr'!: InferGPU<TElement>[];\n /** Type-token, not available at runtime */\n public readonly '~reprPartial'!: {\n idx: number;\n value: InferPartial<TElement>;\n }[];\n /** Type-token, not available at runtime */\n public readonly '~memIdent'!: WgslArray<MemIdentity<TElement>>;\n\n constructor(\n public readonly elementType: TElement,\n public readonly elementCount: number,\n ) {\n if (Number.isNaN(sizeOf(elementType))) {\n throw new Error('Cannot nest runtime sized arrays.');\n }\n\n if (!Number.isInteger(elementCount) || elementCount < 0) {\n throw new Error(\n `Cannot create array schema with invalid element count: ${elementCount}.`,\n );\n }\n }\n\n toString() {\n return `arrayOf(${this.elementType})`;\n }\n}\n","import type { AnyData } from './dataTypes';\nimport type { Ptr } from './wgslTypes';\n\nexport function ptrFn<T extends AnyData>(\n inner: T,\n): Ptr<'function', T, 'read-write'> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'function',\n access: 'read-write',\n } as Ptr<'function', T, 'read-write'>;\n}\n\nexport function ptrPrivate<T extends AnyData>(\n inner: T,\n): Ptr<'private', T, 'read-write'> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'private',\n access: 'read-write',\n } as Ptr<'private', T, 'read-write'>;\n}\n\nexport function ptrWorkgroup<T extends AnyData>(\n inner: T,\n): Ptr<'workgroup', T, 'read-write'> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'workgroup',\n access: 'read-write',\n } as Ptr<'workgroup', T, 'read-write'>;\n}\n\nexport function ptrStorage<\n T extends AnyData,\n TAccess extends 'read' | 'read-write' = 'read',\n>(inner: T, access: TAccess = 'read' as TAccess): Ptr<'storage', T, TAccess> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'storage',\n access,\n } as Ptr<'storage', T, TAccess>;\n}\n\nexport function ptrUniform<T extends AnyData>(\n inner: T,\n): Ptr<'uniform', T, 'read'> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'uniform',\n access: 'read',\n } as Ptr<'uniform', T, 'read'>;\n}\n\nexport function ptrHandle<T extends AnyData>(\n inner: T,\n): Ptr<'handle', T, 'read'> {\n return {\n type: 'ptr',\n inner,\n addressSpace: 'handle',\n access: 'read',\n } as Ptr<'handle', T, 'read'>;\n}\n","import type { Infer, InferPartial } from '../shared/repr';\nimport type { AnyData, Disarray } from './dataTypes';\n\n// ----------\n// Public API\n// ----------\n\n/**\n * Creates an array schema that can be used to construct vertex buffers.\n * Describes arrays with fixed-size length, storing elements of the same type.\n *\n * Elements in the schema are not aligned in respect to their `byteAlignment`,\n * unless they are explicitly decorated with the custom align attribute\n * via `d.align` function.\n *\n * @example\n * const disarray = d.disarrayOf(d.vec3f, 3); // packed array of vec3f\n *\n * @example\n * const disarray = d.disarrayOf(d.align(16, d.vec3f), 3);\n *\n * @param elementType The type of elements in the array.\n * @param count The number of elements in the array.\n */\nexport function disarrayOf<TElement extends AnyData>(\n elementType: TElement,\n count: number,\n): Disarray<TElement> {\n return new DisarrayImpl(elementType, count);\n}\n\n// --------------\n// Implementation\n// --------------\n\nclass DisarrayImpl<TElement extends AnyData> implements Disarray<TElement> {\n public readonly type = 'disarray';\n /** Type-token, not available at runtime */\n public readonly '~repr'!: Infer<TElement>[];\n /** Type-token, not available at runtime */\n public readonly '~reprPartial'!: {\n idx: number;\n value: InferPartial<TElement>;\n }[];\n\n constructor(\n public readonly elementType: TElement,\n public readonly elementCount: number,\n ) {\n if (!Number.isInteger(elementCount) || elementCount < 0) {\n throw new Error(\n `Cannot create disarray schema with invalid element count: ${elementCount}.`,\n );\n }\n }\n}\n","import type { InferPartialRecord, InferRecord } from '../shared/repr';\nimport type { Unstruct } from './dataTypes';\nimport type { BaseData } from './wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\n/**\n * Creates a loose struct schema that can be used to construct vertex buffers.\n * Describes structs with members of both loose and non-loose types.\n *\n * The order of members matches the passed in properties object.\n * Members are not aligned in respect to their `byteAlignment`,\n * unless they are explicitly decorated with the custom align attribute\n * via `d.align` function.\n *\n * @example\n * const CircleStruct = d.unstruct({ radius: d.f32, pos: d.vec3f }); // packed struct with no padding\n *\n * @example\n * const CircleStruct = d.unstruct({ radius: d.f32, pos: d.align(16, d.vec3f) });\n *\n * @param properties Record with `string` keys and `TgpuData` or `TgpuLooseData` values,\n * each entry describing one struct member.\n */\nexport function unstruct<TProps extends Record<string, BaseData>>(\n properties: TProps,\n): Unstruct<TProps> {\n return new UnstructImpl(properties as TProps);\n}\n\n// --------------\n// Implementation\n// --------------\n\nclass UnstructImpl<TProps extends Record<string, BaseData>>\n implements Unstruct<TProps>\n{\n private _label: string | undefined;\n\n public readonly type = 'unstruct';\n /** Type-token, not available at runtime */\n public readonly '~repr'!: InferRecord<TProps>;\n /** Type-token, not available at runtime */\n public readonly '~reprPartial'!: Partial<InferPartialRecord<TProps>>;\n\n constructor(public readonly propTypes: TProps) {}\n\n get label() {\n return this._label;\n }\n\n $name(label: string) {\n this._label = label;\n return this;\n }\n}\n","import type { Infer, MemIdentity } from '../shared/repr';\nimport type { Atomic, I32, U32, atomicI32, atomicU32 } from './wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\n/**\n * Marks a concrete integer scalar type schema (u32 or i32) as a WGSL atomic.\n *\n * @example\n * const atomicU32 = d.atomic(d.u32);\n * const atomicI32 = d.atomic(d.i32);\n *\n * @param data Underlying type schema.\n */\nexport function atomic<TSchema extends U32 | I32>(\n data: TSchema,\n): Atomic<TSchema> {\n return new AtomicImpl(data);\n}\n\n// --------------\n// Implementation\n// --------------\n\nclass AtomicImpl<TSchema extends U32 | I32> implements Atomic<TSchema> {\n public readonly type = 'atomic';\n /** Type-token, not available at runtime */\n public readonly '~repr'!: Infer<TSchema>;\n /** Type-token, not available at runtime */\n public readonly '~memIdent'!: MemIdentity<TSchema>;\n /** Type-token, not available at runtime */\n public readonly '~gpuRepr': TSchema extends U32 ? atomicU32 : atomicI32;\n\n constructor(public readonly inner: TSchema) {}\n}\n","import type {\n Infer,\n InferGPU,\n InferPartial,\n MemIdentity,\n} from '../shared/repr';\nimport { alignmentOf } from './alignmentOf';\nimport {\n type AnyData,\n type AnyLooseData,\n type LooseDecorated,\n type LooseTypeLiteral,\n isLooseData,\n isLooseDecorated,\n} from './dataTypes';\nimport { sizeOf } from './sizeOf';\nimport {\n type Align,\n type AnyWgslData,\n type BaseData,\n type Builtin,\n type Decorated,\n type FlatInterpolatableData,\n type FlatInterpolationType,\n type Interpolate,\n type InterpolationType,\n type Location,\n type PerspectiveOrLinearInterpolatableData,\n type PerspectiveOrLinearInterpolationType,\n type Size,\n type WgslTypeLiteral,\n isAlignAttrib,\n isBuiltinAttrib,\n isDecorated,\n isSizeAttrib,\n isWgslData,\n} from './wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\nexport const builtinNames = [\n 'vertex_index',\n 'instance_index',\n 'position',\n 'clip_distances',\n 'front_facing',\n 'frag_depth',\n 'sample_index',\n 'sample_mask',\n 'fragment',\n 'local_invocation_id',\n 'local_invocation_index',\n 'global_invocation_id',\n 'workgroup_id',\n 'num_workgroups',\n 'subgroup_invocation_id',\n 'subgroup_size',\n] as const;\n\nexport type BuiltinName = (typeof builtinNames)[number];\n\nexport type AnyAttribute<\n AllowedBuiltins extends Builtin<BuiltinName> = Builtin<BuiltinName>,\n> =\n | Align<number>\n | Size<number>\n | Location<number>\n | Interpolate<InterpolationType>\n | AllowedBuiltins;\n\nexport type ExtractAttributes<T> = T extends {\n readonly attribs: unknown[];\n}\n ? T['attribs']\n : [];\n\ntype Undecorate<T> = T extends { readonly inner: infer TInner } ? TInner : T;\n\n/**\n * Decorates a data-type `TData` with an attribute `TAttrib`.\n *\n * - if `TData` is loose\n * - if `TData` is already `LooseDecorated`\n * - Prepend `TAttrib` to the existing attribute tuple.\n * - else\n * - Wrap `TData` with `LooseDecorated` and a single attribute `[TAttrib]`\n * - else\n * - if `TData` is already `Decorated`\n * - Prepend `TAttrib` to the existing attribute tuple.\n * - else\n * - Wrap `TData` with `Decorated` and a single attribute `[TAttrib]`\n */\nexport type Decorate<\n TData extends BaseData,\n TAttrib extends AnyAttribute,\n> = TData['type'] extends WgslTypeLiteral\n ? Decorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]>\n : TData['type'] extends LooseTypeLiteral\n ? LooseDecorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]>\n : never;\n\nexport type IsBuiltin<T> = ExtractAttributes<T>[number] extends []\n ? false\n : ExtractAttributes<T>[number] extends Builtin<BuiltinName>\n ? true\n : false;\n\nexport type HasCustomLocation<T> = ExtractAttributes<T>[number] extends []\n ? false\n : ExtractAttributes<T>[number] extends Location<number>\n ? true\n : false;\n\nexport function attribute<TData extends BaseData, TAttrib extends AnyAttribute>(\n data: TData,\n attrib: TAttrib,\n): Decorated | LooseDecorated {\n if (isDecorated(data)) {\n return new DecoratedImpl(data.inner, [\n attrib,\n ...data.attribs,\n ]) as Decorated;\n }\n\n if (isLooseDecorated(data)) {\n return new LooseDecoratedImpl(data.inner, [\n attrib,\n ...data.attribs,\n ]) as LooseDecorated;\n }\n\n if (isLooseData(data)) {\n return new LooseDecoratedImpl(data, [attrib]) as unknown as LooseDecorated;\n }\n\n return new DecoratedImpl(data, [attrib]) as unknown as Decorated;\n}\n\n/**\n * Gives the wrapped data-type a custom byte alignment. Useful in order to\n * fulfill uniform alignment requirements.\n *\n * @example\n * const Data = d.struct({\n * a: u32, // takes up 4 bytes\n * // 12 bytes of padding, because `b` is custom aligned to multiples of 16 bytes\n * b: d.align(16, u32),\n * });\n *\n * @param alignment The multiple of bytes this data should align itself to.\n * @param data The data-type to align.\n */\nexport function align<TAlign extends number, TData extends AnyData>(\n alignment: TAlign,\n data: TData,\n): Decorate<TData, Align<TAlign>> {\n // biome-ignore lint/suspicious/noExplicitAny: <tired of lying to types>\n return attribute(data, { type: '@align', value: alignment }) as any;\n}\n\n/**\n * Adds padding bytes after the wrapped data-type, until the whole value takes up `size` bytes.\n *\n * @example\n * const Data = d.struct({\n * a: d.size(16, u32), // takes up 16 bytes, instead of 4\n * b: u32, // starts at byte 16, because `a` has a custom size\n * });\n *\n * @param size The amount of bytes that should be reserved for this data-type.\n * @param data The data-type to wrap.\n */\nexport function size<TSize extends number, TData extends AnyData>(\n size: TSize,\n data: TData,\n): Decorate<TData, Size<TSize>> {\n // biome-ignore lint/suspicious/noExplicitAny: <tired of lying to types>\n return attribute(data, { type: '@size', value: size }) as any;\n}\n\n/**\n * Assigns an explicit numeric location to a struct member or a parameter that has this type.\n *\n * @example\n * const VertexOutput = {\n * a: d.u32, // has implicit location 0\n * b: d.location(5, d.u32),\n * c: d.u32, // has implicit location 6\n * };\n *\n * @param location The explicit numeric location.\n * @param data The data-type to wrap.\n */\nexport function location<TLocation extends number, TData extends AnyData>(\n location: TLocation,\n data: TData,\n): Decorate<TData, Location<TLocation>> {\n // biome-ignore lint/suspicious/noExplicitAny: <tired of lying to types>\n return attribute(data, { type: '@location', value: location }) as any;\n}\n\n/**\n * Specifies how user-defined vertex shader output (fragment shader input)\n * must be interpolated.\n *\n * Tip: Integer outputs cannot be interpolated.\n *\n * @example\n * const VertexOutput = {\n * a: d.f32, // has implicit 'perspective, center' interpolation\n * b: d.interpolate('linear, sample', d.f32),\n * };\n *\n * @param interpolationType How data should be interpolated.\n * @param data The data-type to wrap.\n */\nexport function interpolate<\n TInterpolation extends PerspectiveOrLinearInterpolationType,\n TData extends PerspectiveOrLinearInterpolatableData,\n>(\n interpolationType: TInterpolation,\n data: TData,\n): Decorate<TData, Interpolate<TInterpolation>>;\n\n/**\n * Specifies how user-defined vertex shader output (fragment shader input)\n * must be interpolated.\n *\n * Tip: Default sampling method of `flat` is `first`. Unless you specifically\n * need deterministic behavior provided by `'flat, first'`, prefer explicit\n * `'flat, either'` as it could be slightly faster in hardware.\n *\n * @example\n * const VertexOutput = {\n * a: d.f32, // has implicit 'perspective, center' interpolation\n * b: d.interpolate('flat, either', d.u32), // integer outputs cannot interpolate\n * };\n *\n * @param interpolationType How data should be interpolated.\n * @param data The data-type to wrap.\n */\nexport function interpolate<\n TInterpolation extends FlatInterpolationType,\n TData extends FlatInterpolatableData,\n>(\n interpolationType: TInterpolation,\n data: TData,\n): Decorate<TData, Interpolate<TInterpolation>>;\n\nexport function interpolate<\n TInterpolation extends InterpolationType,\n TData extends AnyData,\n>(\n interpolationType: TInterpolation,\n data: TData,\n): Decorate<TData, Interpolate<TInterpolation>> {\n return attribute(data, {\n type: '@interpolate',\n value: interpolationType,\n // biome-ignore lint/suspicious/noExplicitAny: <tired of lying to types>\n }) as any;\n}\n\nexport function isBuiltin<\n T extends\n | Decorated<AnyWgslData, AnyAttribute[]>\n | LooseDecorated<AnyLooseData, AnyAttribute[]>,\n>(value: T | unknown): value is T {\n return (\n (isDecorated(value) || isLooseDecorated(value)) &&\n value.attribs.find(isBuiltinAttrib) !== undefined\n );\n}\n\nexport function getAttributesString<T extends BaseData>(field: T): string {\n if (!isDecorated(field) && !isLooseDecorated(field)) {\n return '';\n }\n\n return (field.attribs as AnyAttribute[])\n .map((attrib) => `${attrib.type}(${attrib.value}) `)\n .join('');\n}\n\n// --------------\n// Implementation\n// --------------\n\nclass BaseDecoratedImpl<TInner extends BaseData, TAttribs extends unknown[]> {\n // Type-token, not available at runtime\n public readonly '~repr'!: Infer<TInner>;\n\n constructor(\n public readonly inner: TInner,\n public readonly attribs: TAttribs,\n ) {\n const alignAttrib = attribs.find(isAlignAttrib)?.value;\n const sizeAttrib = attribs.find(isSizeAttrib)?.value;\n\n if (alignAttrib !== undefined) {\n if (alignAttrib <= 0) {\n throw new Error(\n `Custom data alignment must be a positive number, got: ${alignAttrib}.`,\n );\n }\n\n if (Math.log2(alignAttrib) % 1 !== 0) {\n throw new Error(\n `Alignment has to be a power of 2, got: ${alignAttrib}.`,\n );\n }\n\n if (isWgslData(this.inner)) {\n if (alignAttrib % alignmentOf(this.inner) !== 0) {\n throw new Error(\n `Custom alignment has to be a multiple of the standard data alignment. Got: ${alignAttrib}, expected multiple of: ${alignmentOf(this.inner)}.`,\n );\n }\n }\n }\n\n if (sizeAttrib !== undefined) {\n if (sizeAttrib < sizeOf(this.inner)) {\n throw new Error(\n `Custom data size cannot be smaller then the standard data size. Got: ${sizeAttrib}, expected at least: ${sizeOf(this.inner)}.`,\n );\n }\n\n if (sizeAttrib <= 0) {\n throw new Error(\n `Custom data size must be a positive number. Got: ${sizeAttrib}.`,\n );\n }\n }\n }\n}\n\nclass DecoratedImpl<TInner extends BaseData, TAttribs extends unknown[]>\n extends BaseDecoratedImpl<TInner, TAttribs>\n implements Decorated<TInner, TAttribs>\n{\n public readonly type = 'decorated';\n readonly '~gpuRepr': InferGPU<TInner>;\n readonly '~reprPartial': InferPartial<TInner>;\n public readonly '~memIdent'!: TAttribs extends Location<number>[]\n ? MemIdentity<TInner> | Decorated<MemIdentity<TInner>, TAttribs>\n : Decorated<MemIdentity<TInner>, TAttribs>;\n}\n\nclass LooseDecoratedImpl<TInner extends BaseData, TAttribs extends unknown[]>\n extends BaseDecoratedImpl<TInner, TAttribs>\n implements LooseDecorated<TInner, TAttribs>\n{\n public readonly type = 'loose-decorated';\n}\n","import { arrayOf } from './data/array';\nimport { attribute } from './data/attributes';\nimport { f32, u32 } from './data/numeric';\nimport { vec3u, vec4f } from './data/vector';\nimport type {\n BaseData,\n Builtin,\n Decorated,\n F32,\n U32,\n Vec3u,\n Vec4f,\n WgslArray,\n} from './data/wgslTypes';\n\n// ----------\n// Public API\n// ----------\n\nexport type BuiltinVertexIndex = Decorated<U32, [Builtin<'vertex_index'>]>;\nexport type BuiltinInstanceIndex = Decorated<U32, [Builtin<'instance_index'>]>;\nexport type BuiltinPosition = Decorated<Vec4f, [Builtin<'position'>]>;\nexport type BuiltinClipDistances = Decorated<\n WgslArray<U32>,\n [Builtin<'clip_distances'>]\n>;\nexport type BuiltinFrontFacing = Decorated<F32, [Builtin<'front_facing'>]>;\nexport type BuiltinFragDepth = Decorated<F32, [Builtin<'frag_depth'>]>;\nexport type BuiltinSampleIndex = Decorated<U32, [Builtin<'sample_index'>]>;\nexport type BuiltinSampleMask = Decorated<U32, [Builtin<'sample_mask'>]>;\nexport type BuiltinLocalInvocationId = Decorated<\n Vec3u,\n [Builtin<'local_invocation_id'>]\n>;\nexport type BuiltinLocalInvocationIndex = Decorated<\n U32,\n [Builtin<'local_invocation_index'>]\n>;\nexport type BuiltinGlobalInvocationId = Decorated<\n Vec3u,\n [Builtin<'global_invocation_id'>]\n>;\nexport type BuiltinWorkgroupId = Decorated<Vec3u, [Builtin<'workgroup_id'>]>;\nexport type BuiltinNumWorkgroups = Decorated<\n Vec3u,\n [Builtin<'num_workgroups'>]\n>;\nexport type BuiltinSubgroupInvocationId = Decorated<\n U32,\n [Builtin<'subgroup_invocation_id'>]\n>;\nexport type BuiltinSubgroupSize = Decorated<U32, [Builtin<'subgroup_size'>]>;\n\nexport const builtin = {\n vertexIndex: attribute(u32, {\n type: '@builtin',\n value: 'vertex_index',\n }) as BuiltinVertexIndex,\n instanceIndex: attribute(u32, {\n type: '@builtin',\n value: 'instance_index',\n }) as BuiltinInstanceIndex,\n position: attribute(vec4f, {\n type: '@builtin',\n value: 'position',\n }) as BuiltinPosition,\n clipDistances: attribute(arrayOf(u32, 8), {\n type: '@builtin',\n value: 'clip_distances',\n }) as BuiltinClipDistances,\n frontFacing: attribute(f32, {\n type: '@builtin',\n value: 'front_facing',\n }) as BuiltinFrontFacing,\n fragDepth: attribute(f32, {\n type: '@builtin',\n value: 'frag_depth',\n }) as BuiltinFragDepth,\n sampleIndex: attribute(u32, {\n type: '@builtin',\n value: 'sample_index',\n }) as BuiltinSampleIndex,\n sampleMask: attribute(u32, {\n type: '@builtin',\n value: 'sample_mask',\n }) as BuiltinSampleMask,\n localInvocationId: attribute(vec3u, {\n type: '@builtin',\n value: 'local_invocation_id',\n }) as BuiltinLocalInvocationId,\n localInvocationIndex: attribute(u32, {\n type: '@builtin',\n value: 'local_invocation_index',\n }) as BuiltinLocalInvocationIndex,\n globalInvocationId: attribute(vec3u, {\n type: '@builtin',\n value: 'global_invocation_id',\n }) as BuiltinGlobalInvocationId,\n workgroupId: attribute(vec3u, {\n type: '@builtin',\n value: 'workgroup_id',\n }) as BuiltinWorkgroupId,\n numWorkgroups: attribute(vec3u, {\n type: '@builtin',\n value: 'num_workgroups',\n }) as BuiltinNumWorkgroups,\n subgroupInvocationId: attribute(u32, {\n type: '@builtin',\n value: 'subgroup_invocation_id',\n }) as BuiltinSubgroupInvocationId,\n subgroupSize: attribute(u32, {\n type: '@builtin',\n value: 'subgroup_size',\n }) as BuiltinSubgroupSize,\n} as const;\n\nexport type AnyBuiltin = (typeof builtin)[keyof typeof builtin];\nexport type AnyComputeBuiltin =\n | BuiltinLocalInvocationId\n | BuiltinLocalInvocationIndex\n | BuiltinGlobalInvocationId\n | BuiltinWorkgroupId\n | BuiltinNumWorkgroups\n | BuiltinSubgroupInvocationId\n | BuiltinSubgroupSize;\nexport type AnyVertexInputBuiltin = BuiltinVertexIndex | BuiltinInstanceIndex;\nexport type AnyVertexOutputBuiltin = BuiltinClipDistances | BuiltinPosition;\nexport type AnyFragmentInputBuiltin =\n | BuiltinPosition\n | BuiltinFrontFacing\n | BuiltinSampleIndex\n | BuiltinSampleMask\n | BuiltinSubgroupInvocationId\n | BuiltinSubgroupSize;\nexport type AnyFragmentOutputBuiltin = BuiltinFragDepth | BuiltinSampleMask;\n\nexport type OmitBuiltins<S> = S extends AnyBuiltin\n ? never\n : S extends BaseData\n ? S\n : {\n [Key in keyof S as S[Key] extends AnyBuiltin ? never : Key]: S[Key];\n };\n"],"mappings":"8GAAA,OAAOA,MAAS,eAYT,IAAMC,GAAc,CACzB,KAAM,aACR,EAEaC,GAAgB,CAC3B,KAAM,eACR,EAKaC,GAAa,CACxB,KAAM,MACR,EAEMC,GAAWC,GACXC,EAAU,EACL,OAAOD,CAAC,IAGb,OAAOA,GAAM,UACRA,EAAI,EAAI,EAEb,OAAO,UAAUA,CAAC,IAChBA,EAAI,GAAKA,EAAI,aACf,QAAQ,KAAK,aAAaA,CAAC,aAAa,GAE5BA,EAAI,cACD,GAEZ,KAAK,IAAI,EAAG,KAAK,IAAI,WAAY,KAAK,MAAMA,CAAC,CAAC,CAAC,EAe3CE,EAAW,OAAO,OAAOH,GAAS,CAC7C,KAAM,KACR,CAAC,EAEKI,GAAWH,GAAwB,CACvC,GAAIC,EAAU,EACZ,MAAO,OAAOD,CAAC,IAGjB,GAAI,OAAOA,GAAM,UACf,OAAOA,EAAI,EAAI,EAEjB,GAAI,OAAO,UAAUA,CAAC,EACpB,OAAIA,EAAI,aAAeA,EAAI,aACzB,QAAQ,KAAK,aAAaA,CAAC,aAAa,GAE5BA,EAAI,GACH,WAGjB,IA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,KAAM,WACN,MAAO,cACT,CAAC,EACD,cAAeL,EAAUK,EAAO,CAC9B,KAAM,WACN,MAAO,gBACT,CAAC,EACD,qBAAsBL,EAAUC,EAAK,CACnC,KAAM,WACN,MAAO,wBACT,CAAC,EACD,aAAcD,EAAUC,EAAK,CAC3B,KAAM,WACN,MAAO,eACT,CAAC,CACH","names":["bin","abstractInt","abstractFloat","bool","u32Cast","v","inGPUMode","u32","i32Cast","value","i32","f32Cast","arr","f32","f16Cast","bin","f16","wgslTypeLiterals","isWgslData","value","isWgslArray","schema","isWgslStruct","isPtr","isAtomic","isAlignAttrib","isSizeAttrib","isLocationAttrib","isInterpolateAttrib","isBuiltinAttrib","isDecorated","struct","props","WgslStructImpl","label","_a","roundUp","value","modulo","bitMask","invBitMask","vertexFormats","kindToDefaultFormatMap","looseTypeLiterals","vertexFormats","isLooseData","data","isDisarray","schema","isUnstruct","isLooseDecorated","value","getCustomAlignment","_a","_b","isAlignAttrib","getCustomSize","isSizeAttrib","getCustomLocation","isLocationAttrib","isData","isWgslData","TgpuVertexFormatDataImpl","type","__publicField","formatToWGSLType","u32","vec2u","vec4u","i32","vec2i","vec4i","f32","vec2f","vec4f","vec3f","vec3u","vec3i","packedFormats","uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10_10_10_2","unorm8x4_bgra","knownAlignmentMap","computeAlignment","data","_a","_b","_c","dataType","knownAlignment","isWgslStruct","alignmentOf","a","b","isWgslArray","isUnstruct","firstProp","getCustomAlignment","isDisarray","isDecorated","isLooseDecorated","packedFormats","computeCustomAlignment","customAlignmentOf","cachedAlignments","cachedCustomAlignments","alignment","PUBLIC_alignmentOf","schema","knownSizesMap","sizeOfStruct","struct","size","property","roundUp","alignmentOf","sizeOf","sizeOfUnstruct","data","alignment","customAlignmentOf","computeSize","_a","knownSize","isWgslStruct","isUnstruct","isWgslArray","isDisarray","isDecorated","isLooseDecorated","getCustomSize","cachedSizes","schema","PUBLIC_sizeOf","arrayOf","elementType","elementCount","WgslArrayImpl","__publicField","sizeOf","ptrFn","inner","ptrPrivate","ptrWorkgroup","ptrStorage","access","ptrUniform","ptrHandle","disarrayOf","elementType","count","DisarrayImpl","elementCount","__publicField","unstruct","properties","UnstructImpl","propTypes","__publicField","label","atomic","data","AtomicImpl","inner","__publicField","attribute","data","attrib","isDecorated","DecoratedImpl","isLooseDecorated","LooseDecoratedImpl","isLooseData","align","alignment","size","location","interpolate","interpolationType","isBuiltin","value","isBuiltinAttrib","getAttributesString","field","BaseDecoratedImpl","inner","attribs","__publicField","_a","_b","alignAttrib","isAlignAttrib","sizeAttrib","isSizeAttrib","isWgslData","alignmentOf","sizeOf","builtin","attribute","u32","vec4f","arrayOf","f32","vec3u"]}