typegpu 0.5.5 → 0.5.6

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/shared/symbols.ts","../src/shared/generators.ts","../src/shared/repr.ts","../src/data/vectorImpl.ts","../src/data/vector.ts","../src/data/matrix.ts","../src/data/numeric.ts","../src/data/wgslTypes.ts"],"sourcesContent":["import type { TgpuBuffer } from './core/buffer/buffer.ts';\nimport type { TgpuSlot } from './core/slot/slotTypes.ts';\nimport type { TgpuVertexLayout } from './core/vertexLayout/vertexLayout.ts';\nimport type { AnyData, Disarray } from './data/dataTypes.ts';\nimport type { WgslArray } from './data/wgslTypes.ts';\nimport type { TgpuBindGroupLayout } from './tgpuBindGroupLayout.ts';\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(\n `Resolution of the following tree failed: \\n${entries.join('\\n')}: ${cause && typeof cause === 'object' && 'message' in cause ? cause.message : cause}`,\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.ts';\nimport type { ResolutionCtx } from './types.ts';\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","export const $internal = Symbol('internal');\n","import type { TgpuDualFn } from '../data/dataTypes.ts';\nimport { inGPUMode } from '../gpuMode.ts';\nimport type { Snippet } from '../types.ts';\nimport { $internal } from './symbols.ts';\n\n/**\n * Yields values in the sequence 0,1,2..∞ except for the ones in the `excluded` set.\n */\nexport function* naturalsExcept(\n excluded: Set<number>,\n): Generator<number, number, unknown> {\n let next = 0;\n\n while (true) {\n if (!excluded.has(next)) {\n yield next;\n }\n\n next++;\n }\n}\n\ntype MapValueToSnippet<T> = { [K in keyof T]: Snippet };\n\n// biome-ignore lint/suspicious/noExplicitAny: <it's very convenient>\nexport function createDualImpl<T extends (...args: any[]) => any>(\n jsImpl: T,\n gpuImpl: (...args: MapValueToSnippet<Parameters<T>>) => Snippet,\n): TgpuDualFn<T> {\n const impl = ((...args: Parameters<T>) => {\n if (inGPUMode()) {\n return gpuImpl(\n ...(args as unknown as MapValueToSnippet<Parameters<T>>),\n ) as unknown as Snippet;\n }\n // biome-ignore lint/suspicious/noExplicitAny: <it's very convenient>\n return jsImpl(...(args as any));\n }) as T;\n\n Object.defineProperty(impl, $internal, {\n value: {\n implementation: jsImpl,\n },\n });\n\n return impl as TgpuDualFn<T>;\n}\n","export const $repr = Symbol(\n 'Type token for the inferred (CPU & GPU) representation of a resource',\n);\n\n/**\n * Extracts the inferred representation of a resource.\n * @example\n * type A = Infer<F32> // => number\n * type B = Infer<WgslArray<F32>> // => number[]\n */\nexport type Infer<T> = T extends { readonly [$repr]: infer TRepr } ? TRepr : T;\nexport type InferPartial<T> = T extends { readonly '~reprPartial': infer TRepr }\n ? TRepr\n : T extends { readonly [$repr]: infer TRepr }\n ? TRepr | undefined\n : T extends Record<string | number | symbol, unknown>\n ? InferPartialRecord<T>\n : T;\n\nexport type InferGPU<T> = T extends { readonly '~gpuRepr': infer TRepr }\n ? TRepr\n : Infer<T>;\n\nexport type InferRecord<T extends Record<string | number | symbol, unknown>> = {\n [Key in keyof T]: Infer<T[Key]>;\n};\n\nexport type InferPartialRecord<\n T extends Record<string | number | symbol, unknown>,\n> = {\n [Key in keyof T]: InferPartial<T[Key]>;\n};\n\nexport type InferGPURecord<\n T extends Record<string | number | symbol, unknown>,\n> = {\n [Key in keyof T]: InferGPU<T[Key]>;\n};\n\nexport type MemIdentity<T> = T extends {\n readonly '~memIdent': infer TMemIdent;\n}\n ? TMemIdent\n : T;\n\nexport type MemIdentityRecord<\n T extends Record<string | number | symbol, unknown>,\n> = {\n [Key in keyof T]: MemIdentity<T[Key]>;\n};\n","import type { SelfResolvable } from '../types.ts';\nimport type { VecKind } from './wgslTypes.ts';\n\n// biome-ignore format: swizzles should not expand\nexport abstract class VecBase<S> extends Array implements SelfResolvable {\n abstract get kind(): VecKind;\n\n abstract get _Vec2(): new (\n x: S,\n y: S,\n ) => Vec2<S>;\n abstract get _Vec3(): new (\n x: S,\n y: S,\n z: S,\n ) => Vec3<S>;\n abstract get _Vec4(): new (\n x: S,\n y: S,\n z: S,\n w: S,\n ) => Vec4<S>;\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<S> = [S, S];\ntype Tuple3<S> = [S, S, S];\ntype Tuple4<S> = [S, S, S, S];\n\nabstract class Vec2<S> extends VecBase<S> implements Tuple2<S> {\n declare readonly length = 2;\n abstract getDefaultValue(): S;\n\n 0: S;\n 1: S;\n\n constructor(x?: S, y?: S) {\n super(2);\n this[0] = x ?? this.getDefaultValue();\n this[1] = y ?? x ?? this.getDefaultValue();\n }\n\n get x() {\n return this[0];\n }\n\n get y() {\n return this[1];\n }\n\n set x(value: S) {\n this[0] = value;\n }\n\n set y(value: S) {\n this[1] = value;\n }\n}\n\nabstract class Vec3<S> extends VecBase<S> implements Tuple3<S> {\n declare readonly length = 3;\n abstract getDefaultValue(): S;\n\n 0: S;\n 1: S;\n 2: S;\n\n constructor(x?: S, y?: S, z?: S) {\n super(3);\n this[0] = x ?? this.getDefaultValue();\n this[1] = y ?? x ?? this.getDefaultValue();\n this[2] = z ?? x ?? this.getDefaultValue();\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: S) {\n this[0] = value;\n }\n\n set y(value: S) {\n this[1] = value;\n }\n\n set z(value: S) {\n this[2] = value;\n }\n}\n\nabstract class Vec4<S> extends VecBase<S> implements Tuple4<S> {\n declare readonly length = 4;\n abstract getDefaultValue(): S;\n\n 0: S;\n 1: S;\n 2: S;\n 3: S;\n\n constructor(x?: S, y?: S, z?: S, w?: S) {\n super(4);\n this[0] = x ?? this.getDefaultValue();\n this[1] = y ?? x ?? this.getDefaultValue();\n this[2] = z ?? x ?? this.getDefaultValue();\n this[3] = w ?? x ?? this.getDefaultValue();\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: S) {\n this[0] = value;\n }\n\n set y(value: S) {\n this[1] = value;\n }\n\n set z(value: S) {\n this[2] = value;\n }\n\n set w(value: S) {\n this[3] = value;\n }\n}\n\nexport class Vec2fImpl extends Vec2<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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 Vec2bImpl extends Vec2<boolean> {\n getDefaultValue() {\n return false;\n }\n\n get kind() {\n return 'vec2<bool>' as const;\n }\n\n get _Vec2() {\n return Vec2bImpl;\n }\n get _Vec3() {\n return Vec3bImpl;\n }\n get _Vec4() {\n return Vec4bImpl;\n }\n}\n\nexport class Vec3fImpl extends Vec3<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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 Vec3bImpl extends Vec3<boolean> {\n getDefaultValue() {\n return false;\n }\n\n get kind() {\n return 'vec3<bool>' as const;\n }\n\n get _Vec2() {\n return Vec2bImpl;\n }\n get _Vec3() {\n return Vec3bImpl;\n }\n get _Vec4() {\n return Vec4bImpl;\n }\n}\n\nexport class Vec4fImpl extends Vec4<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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<number> {\n getDefaultValue() {\n return 0;\n }\n\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\nexport class Vec4bImpl extends Vec4<boolean> {\n getDefaultValue() {\n return false;\n }\n\n get kind() {\n return 'vec4<bool>' as const;\n }\n\n get _Vec2() {\n return Vec2bImpl;\n }\n get _Vec3() {\n return Vec3bImpl;\n }\n get _Vec4() {\n return Vec4bImpl;\n }\n}\n","import { createDualImpl } from '../shared/generators.ts';\nimport { $repr } from '../shared/repr.ts';\nimport {\n Vec2bImpl,\n Vec2fImpl,\n Vec2hImpl,\n Vec2iImpl,\n Vec2uImpl,\n Vec3bImpl,\n Vec3fImpl,\n Vec3hImpl,\n Vec3iImpl,\n Vec3uImpl,\n Vec4bImpl,\n Vec4fImpl,\n Vec4hImpl,\n Vec4iImpl,\n Vec4uImpl,\n type VecBase,\n} from './vectorImpl.ts';\nimport type {\n AnyVecInstance,\n Vec2b,\n Vec2f,\n Vec2h,\n Vec2i,\n Vec2u,\n Vec3b,\n Vec3f,\n Vec3h,\n Vec3i,\n Vec3u,\n Vec4b,\n Vec4f,\n Vec4h,\n Vec4i,\n Vec4u,\n} from './wgslTypes.ts';\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 `vec2<bool>` - a vector with 2 elements of type `bool`.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec2b(); // (false, false)\n * const vector = d.vec2b(true); // (true, true)\n * const vector = d.vec2b(false, true); // (false, true)\n */\nexport const vec2b = makeVecSchema(Vec2bImpl) as Vec2b;\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 `vec3<bool>` - a vector with 3 elements of type `bool`.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec3b(); // (false, false, false)\n * const vector = d.vec3b(true); // (true, true, true)\n * const vector = d.vec3b(false, true, false); // (false, true, false)\n */\nexport const vec3b = makeVecSchema(Vec3bImpl) as Vec3b;\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\n/**\n *\n * Schema representing `vec4<bool>` - a vector with 4 elements of type `bool`.\n * Also a constructor function for this vector value.\n *\n * @example\n * const vector = d.vec4b(); // (false, false, false, false)\n * const vector = d.vec4b(true); // (true, true, true, true)\n * const vector = d.vec4b(false, true, false, true); // (false, true, false, true)\n */\nexport const vec4b = makeVecSchema(Vec4bImpl) as Vec4b;\n\n// --------------\n// Implementation\n// --------------\n\nconst vecTypeToConstructor = {\n vec2f,\n vec2h,\n vec2i,\n vec2u,\n 'vec2<bool>': vec2b,\n vec3f,\n vec3h,\n vec3i,\n vec3u,\n 'vec3<bool>': vec3b,\n vec4f,\n vec4h,\n vec4i,\n vec4u,\n 'vec4<bool>': vec4b,\n} as const;\n\ntype VecSchemaBase<TValue> = {\n readonly type: string;\n readonly [$repr]: TValue;\n};\n\nfunction makeVecSchema<TValue, S extends number | boolean>(\n VecImpl: new (...args: S[]) => VecBase<S>,\n): VecSchemaBase<TValue> & ((...args: (S | AnyVecInstance)[]) => TValue) {\n const { kind: type, length: componentCount } = new VecImpl();\n\n const construct = createDualImpl(\n (...args: (S | AnyVecInstance)[]): TValue => {\n const values = new Array(args.length);\n\n let j = 0;\n for (const arg of args) {\n if (typeof arg === 'number' || typeof arg === 'boolean') {\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 (...args) => ({\n value: `${type}(${args.map((v) => v.value).join(', ')})`,\n dataType: vecTypeToConstructor[type],\n }),\n );\n\n return Object.assign(construct, { type, [$repr]: undefined as TValue });\n}\n","import { createDualImpl } from '../shared/generators.ts';\nimport { $repr } from '../shared/repr.ts';\nimport type { SelfResolvable } from '../types.ts';\nimport { vec2f, vec3f, vec4f } from './vector.ts';\nimport type {\n AnyWgslData,\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.ts';\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 } as unknown as AnyWgslData;\n\n const construct = createDualImpl(\n // CPU implementation\n (...args: (number | ColumnType)[]): ValueType => {\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 // GPU implementation\n (...args) => {\n return {\n value: `${MatSchema.type}(${args.map((v) => v.value).join(', ')})`,\n dataType: MatSchema,\n };\n },\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","import bin from 'typed-binary';\nimport { createDualImpl } from '../shared/generators.ts';\nimport type {\n AbstractFloat,\n AbstractInt,\n Bool,\n F16,\n F32,\n I32,\n U32,\n} from './wgslTypes.ts';\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 = createDualImpl(\n // CPU implementation\n (v: number | boolean) => {\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 // GPU implementation\n (v) => {\n return { value: `u32(${v.value})`, dataType: u32 };\n },\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 unknown as U32;\n\nconst i32Cast = createDualImpl(\n // CPU implementation\n (v: number | boolean) => {\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 // GPU implementation\n (v) => {\n return { value: `i32(${v.value})`, dataType: i32 };\n },\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 unknown as I32;\n\nconst f32Cast = createDualImpl(\n // CPU implementation\n (v: number | boolean) => {\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 // GPU implementation\n (v) => {\n return { value: `f32(${v.value})`, dataType: f32 };\n },\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 unknown as F32;\n\nconst f16Cast = createDualImpl(\n // CPU implementation\n (v: number | boolean) => {\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 // GPU implementation\n // TODO: make usage of f16() in GPU mode check for feature availability and throw if not available\n (v) => {\n return { value: `f16(${v.value})`, dataType: f16 };\n },\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 unknown as F16;\n","import type { TgpuNamable } from '../namable.ts';\nimport type {\n Infer,\n InferGPU,\n InferGPURecord,\n InferPartial,\n InferPartialRecord,\n InferRecord,\n MemIdentity,\n MemIdentityRecord,\n} from '../shared/repr.ts';\nimport { $repr } from '../shared/repr.ts';\nimport type { Prettify } from '../shared/utilityTypes.ts';\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 BooleanArrayView {\n readonly length: number;\n [n: number]: boolean;\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 /** Type-token, not available at runtime */\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 /** Type-token, not available at runtime */\n readonly [$repr]: number;\n}\n\nexport interface Void {\n readonly type: 'void';\n readonly [$repr]: undefined;\n}\nexport const Void: Void = { type: 'void', [$repr]: undefined };\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: `vec2<bool>`.\n * A vector with 2 elements of type `bool`\n */\nexport interface v2b extends BooleanArrayView, Swizzle2<v2b, v3b, v4b> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec2<bool>';\n x: boolean;\n y: boolean;\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: `vec3<bool>`.\n * A vector with 3 elements of type `bool`\n */\nexport interface v3b extends BooleanArrayView, Swizzle3<v2b, v3b, v4b> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec3<bool>';\n x: boolean;\n y: boolean;\n z: boolean;\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\n/**\n * Interface representing its WGSL vector type counterpart: `vec4<bool>`.\n * A vector with 4 elements of type `bool`\n */\nexport interface v4b extends BooleanArrayView, Swizzle4<v2b, v3b, v4b> {\n /** use to distinguish between vectors of the same size on the type level */\n readonly kind: 'vec4<bool>';\n x: boolean;\n y: boolean;\n z: boolean;\n w: boolean;\n}\n\nexport type AnyFloatVecInstance = v2f | v2h | v3f | v3h | v4f | v4h;\n\nexport type AnyIntegerVecInstance = v2i | v2u | v3i | v3u | v4i | v4u;\n\nexport type AnyBooleanVecInstance = v2b | v3b | v4b;\n\nexport type AnyNumericVec2Instance = v2f | v2h | v2i | v2u;\nexport type AnyNumericVec3Instance = v3f | v3h | v3i | v3u;\nexport type AnyNumericVec4Instance = v4f | v4h | v4i | v4u;\n\nexport type AnyNumericVecInstance =\n | AnyNumericVec2Instance\n | AnyNumericVec3Instance\n | AnyNumericVec4Instance;\n\nexport type AnyVec2Instance = v2f | v2h | v2i | v2u | v2b;\nexport type AnyVec3Instance = v3f | v3h | v3i | v3u | v3b;\nexport type AnyVec4Instance = v4f | v4h | v4i | v4u | v4b;\n\nexport type AnyVecInstance =\n | AnyVec2Instance\n | AnyVec3Instance\n | AnyVec4Instance;\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: AnyNumericVec2Instance): 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: AnyNumericVec2Instance): 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: AnyNumericVec2Instance): 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: AnyNumericVec2Instance): v2u;\n}\n\n/**\n * Type of the `d.vec2b` object/function: vector data type schema/constructor\n * Cannot be used inside buffers as it is not host-shareable.\n */\nexport interface Vec2b {\n readonly type: 'vec2<bool>';\n /** Type-token, not available at runtime */\n readonly [$repr]: v2b;\n\n (x: boolean, y: boolean): v2b;\n (xy: boolean): v2b;\n (): v2b;\n (v: v2b): v2b;\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: AnyNumericVec3Instance): v3f;\n (v0: AnyNumericVec2Instance, z: number): v3f;\n (x: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec3Instance): v3h;\n (v0: AnyNumericVec2Instance, z: number): v3h;\n (x: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec3Instance): v3i;\n (v0: AnyNumericVec2Instance, z: number): v3i;\n (x: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec3Instance): v3u;\n (v0: AnyNumericVec2Instance, z: number): v3u;\n (x: number, v0: AnyNumericVec2Instance): v3u;\n}\n\n/**\n * Type of the `d.vec3b` object/function: vector data type schema/constructor\n * Cannot be used inside buffers as it is not host-shareable.\n */\nexport interface Vec3b {\n readonly type: 'vec3<bool>';\n /** Type-token, not available at runtime */\n readonly [$repr]: v3b;\n\n (x: boolean, y: boolean, z: boolean): v3b;\n (xyz: boolean): v3b;\n (): v3b;\n (v: v3b): v3b;\n (v0: v2b, z: boolean): v3b;\n (x: boolean, v0: v2b): v3b;\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: AnyNumericVec4Instance): v4f;\n (v0: AnyNumericVec3Instance, w: number): v4f;\n (x: number, v0: AnyNumericVec3Instance): v4f;\n (v0: AnyNumericVec2Instance, v1: AnyNumericVec2Instance): v4f;\n (v0: AnyNumericVec2Instance, z: number, w: number): v4f;\n (x: number, v0: AnyNumericVec2Instance, z: number): v4f;\n (x: number, y: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec4Instance): v4h;\n (v0: AnyNumericVec3Instance, w: number): v4h;\n (x: number, v0: AnyNumericVec3Instance): v4h;\n (v0: AnyNumericVec2Instance, v1: AnyNumericVec2Instance): v4h;\n (v0: AnyNumericVec2Instance, z: number, w: number): v4h;\n (x: number, v0: AnyNumericVec2Instance, z: number): v4h;\n (x: number, y: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec4Instance): v4i;\n (v0: AnyNumericVec3Instance, w: number): v4i;\n (x: number, v0: AnyNumericVec3Instance): v4i;\n (v0: AnyNumericVec2Instance, v1: AnyNumericVec2Instance): v4i;\n (v0: AnyNumericVec2Instance, z: number, w: number): v4i;\n (x: number, v0: AnyNumericVec2Instance, z: number): v4i;\n (x: number, y: number, v0: AnyNumericVec2Instance): 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: AnyNumericVec4Instance): v4u;\n (v0: AnyNumericVec3Instance, w: number): v4u;\n (x: number, v0: AnyNumericVec3Instance): v4u;\n (v0: AnyNumericVec2Instance, v1: AnyNumericVec2Instance): v4u;\n (v0: AnyNumericVec2Instance, z: number, w: number): v4u;\n (x: number, v0: AnyNumericVec2Instance, z: number): v4u;\n (x: number, y: number, v0: AnyNumericVec2Instance): v4u;\n}\n\n/**\n * Type of the `d.vec4b` object/function: vector data type schema/constructor\n * Cannot be used inside buffers as it is not host-shareable.\n */\nexport interface Vec4b {\n readonly type: 'vec4<bool>';\n /** Type-token, not available at runtime */\n readonly [$repr]: v4b;\n\n (x: boolean, y: boolean, z: boolean, w: boolean): v4b;\n (xyzw: boolean): v4b;\n (): v4b;\n (v: v4b): v4b;\n (v0: v3b, w: boolean): v4b;\n (x: boolean, v0: v3b): v4b;\n (v0: v2b, v1: v2b): v4b;\n (v0: v2b, z: boolean, w: boolean): v4b;\n (x: boolean, v0: v2b, z: boolean): v4b;\n (x: boolean, y: boolean, v0: v2b): v4b;\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 const $structTag = Symbol('Tag for struct schemas');\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: Prettify<InferRecord<TProps>>): Prettify<InferRecord<TProps>>;\n /** @deprecated */\n readonly type: 'struct';\n readonly label?: string | undefined;\n readonly propTypes: TProps;\n\n readonly [$structTag]: true;\n /** Type-token, not available at runtime */\n readonly [$repr]: Prettify<InferRecord<TProps>>;\n /** Type-token, not available at runtime */\n readonly '~gpuRepr': Prettify<InferGPURecord<TProps>>;\n /** Type-token, not available at runtime */\n readonly '~memIdent': WgslStruct<Prettify<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\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 'vec2<bool>',\n 'vec3f',\n 'vec3h',\n 'vec3i',\n 'vec3u',\n 'vec3<bool>',\n 'vec4f',\n 'vec4h',\n 'vec4i',\n 'vec4u',\n 'vec4<bool>',\n 'mat2x2f',\n 'mat3x3f',\n 'mat4x4f',\n 'struct',\n 'array',\n 'ptr',\n 'atomic',\n 'decorated',\n 'abstractInt',\n 'abstractFloat',\n 'void',\n] as const;\n\nexport type WgslTypeLiteral = (typeof wgslTypeLiterals)[number];\n\nexport type PerspectiveOrLinearInterpolatableBaseType =\n | F32\n | F16\n | Vec2f\n | Vec2h\n | Vec3f\n | Vec3h\n | Vec4f\n | Vec4h;\n\nexport type PerspectiveOrLinearInterpolatableData =\n | PerspectiveOrLinearInterpolatableBaseType\n | Decorated<PerspectiveOrLinearInterpolatableBaseType>;\n\nexport type FlatInterpolatableAdditionalBaseType =\n | I32\n | U32\n | Vec2i\n | Vec2u\n | Vec3i\n | Vec3u\n | Vec4i\n | Vec4u;\n\nexport type FlatInterpolatableData =\n | PerspectiveOrLinearInterpolatableData\n | FlatInterpolatableAdditionalBaseType\n | Decorated<FlatInterpolatableAdditionalBaseType>;\n\nexport type ScalarData =\n | Bool\n | F32\n | F16\n | I32\n | U32\n | AbstractInt\n | AbstractFloat;\n\nexport type AnyWgslData =\n | Bool\n | F32\n | F16\n | I32\n | U32\n | Vec2f\n | Vec2h\n | Vec2i\n | Vec2u\n | Vec2b\n | Vec3f\n | Vec3h\n | Vec3i\n | Vec3u\n | Vec3b\n | Vec4f\n | Vec4h\n | Vec4i\n | Vec4u\n | Vec4b\n | Mat2x2f\n | Mat3x3f\n | Mat4x4f\n | AnyWgslStruct\n | WgslArray\n | Ptr\n | Atomic\n | Decorated\n | AbstractInt\n | AbstractFloat\n | Void;\n\n// #endregion\n\nexport function isVec2(value: unknown): value is Vec2f | Vec2h | Vec2i | Vec2u {\n return (value as AnyWgslData)?.type.startsWith('vec2');\n}\n\nexport function isVec3(value: unknown): value is Vec3f | Vec3h | Vec3i | Vec3u {\n return (value as AnyWgslData)?.type.startsWith('vec3');\n}\n\nexport function isVec4(value: unknown): value is Vec4f | Vec4h | Vec4i | Vec4u {\n return (value as AnyWgslData)?.type.startsWith('vec4');\n}\n\nexport function isVec(\n value: unknown,\n): value is\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 return isVec2(value) || isVec3(value) || isVec4(value);\n}\n\nexport function isMat2x2f(value: unknown): value is Mat2x2f {\n return (value as AnyWgslData)?.type === 'mat2x2f';\n}\n\nexport function isMat3x3f(value: unknown): value is Mat3x3f {\n return (value as AnyWgslData)?.type === 'mat3x3f';\n}\n\nexport function isMat4x4f(value: unknown): value is Mat4x4f {\n return (value as AnyWgslData)?.type === 'mat4x4f';\n}\n\nexport function isMat(value: unknown): value is Mat2x2f | Mat3x3f | Mat4x4f {\n return isMat2x2f(value) || isMat3x3f(value) || isMat4x4f(value);\n}\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)?.[$structTag];\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"],"mappings":"AAOA,IAAMA,EAAS,mBAKR,SAASC,EACdC,EACAC,EACmB,CACnB,GAAID,EAEF,OAKA,MAAM,IAAI,MAAMF,CAAM,CAa1B,CASO,IAAMI,EAAN,MAAMC,UAAwB,KAAM,CACzC,YACkBC,EACAC,EAChB,CACA,IAAIC,EAAUD,EAAM,IAAKE,GAAa,KAAKA,CAAQ,EAAE,EAGjDD,EAAQ,OAAS,KACnBA,EAAU,CAAC,GAAGA,EAAQ,MAAM,EAAG,EAAE,EAAG,MAAO,GAAGA,EAAQ,MAAM,GAAG,CAAC,GAGlE,MACE;AAAA,EAA8CA,EAAQ,KAAK;AAAA,CAAI,CAAC,KAAKF,GAAS,OAAOA,GAAU,UAAY,YAAaA,EAAQA,EAAM,QAAUA,CAAK,EACvJ,EAZgB,WAAAA,EACA,WAAAC,EAchB,OAAO,eAAe,KAAMF,EAAgB,SAAS,CACvD,CAEA,cAAcI,EAAoC,CAChD,IAAMC,EAAW,CAACD,EAAU,GAAG,KAAK,K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,GACdC,EACa,CACb,OAAQA,GAAc,OAAS,OACjC,CAcO,SAASC,GACdD,EACa,CACb,MAAO,CAAC,CAAEA,IAAeb,EAAU,CACrC,CASO,SAASe,GAAqBF,EAAkC,CACrE,OAAQA,GAAc,OAAS,KACjC,CASO,SAASG,GACdH,EACa,CACb,OAAQA,GAAc,OAAS,QACjC,CAEO,SAASI,GACdd,EACY,CACZ,OAAQA,GAAa,OAAS,QAChC,CAEO,SAASe,GACdf,EACY,CACZ,OAAQA,GAAa,OAAS,OAChC,CAEO,SAASgB,GACdhB,EACY,CACZ,OAAQA,GAAa,OAAS,WAChC,CAEO,SAASiB,GACdjB,EACY,CACZ,OAAQA,GAAa,OAAS,cAChC,CAEO,SAASkB,GACdlB,EACY,CACZ,OAAQA,GAAa,OAAS,UAChC,CAEO,SAASmB,GACdnB,EACY,CACZ,OAAQA,GAAa,OAAS,WAChC","names":["prefix","invariant","condition","message","ResolutionError","_ResolutionError","cause","trace","entries","ancestor","newTrace","MissingSlotValueError","_MissingSlotValueError","slot","NotUniformError","_NotUniformError","value","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","$internal","naturalsExcept","excluded","next","createDualImpl","jsImpl","gpuImpl","impl","args","inGPUMode","$internal","$repr","VecBase","Vec2","x","y","value","Vec3","z","Vec4","w","Vec2fImpl","_Vec2fImpl","Vec3fImpl","Vec4fImpl","Vec2hImpl","_Vec2hImpl","Vec3hImpl","Vec4hImpl","Vec2iImpl","_Vec2iImpl","Vec3iImpl","Vec4iImpl","Vec2uImpl","_Vec2uImpl","Vec3uImpl","Vec4uImpl","Vec2bImpl","_Vec2bImpl","Vec3bImpl","Vec4bImpl","_Vec3fImpl","_Vec3hImpl","_Vec3iImpl","_Vec3uImpl","_Vec3bImpl","_Vec4fImpl","_Vec4hImpl","_Vec4iImpl","_Vec4uImpl","_Vec4bImpl","vec2f","makeVecSchema","Vec2fImpl","vec2h","Vec2hImpl","vec2i","Vec2iImpl","vec2u","Vec2uImpl","vec2b","Vec2bImpl","vec3f","Vec3fImpl","vec3h","Vec3hImpl","vec3i","Vec3iImpl","vec3u","Vec3uImpl","vec3b","Vec3bImpl","vec4f","Vec4fImpl","vec4h","Vec4hImpl","vec4i","Vec4iImpl","vec4u","Vec4uImpl","vec4b","Vec4bImpl","vecTypeToConstructor","VecImpl","type","componentCount","construct","createDualImpl","args","values","j","arg","c","v","$repr","createMatSchema","options","MatSchema","$repr","construct","createDualImpl","args","elements","arg","i","v","mat2x2Impl","value","_","mat2x2fImpl","e0","e1","vec2f","mat3x3Impl","mat3x3fImpl","x","y","z","vec3f","mat4x4Impl","mat4x4fImpl","w","vec4f","mat2x2f","mat3x3f","mat4x4f","matToArray","mat","idx","bin","abstractInt","abstractFloat","bool","u32Cast","createDualImpl","v","u32","i32Cast","value","i32","f32Cast","arr","f32","f16Cast","bin","f16","Void","$repr","$structTag","wgslTypeLiterals","isVec2","value","isVec3","isVec4","isVec","isMat2x2f","isMat3x3f","isMat4x4f","isMat","isWgslData","isWgslArray","schema","isWgslStruct","isPtr","isAtomic","isAlignAttrib","isSizeAttrib","isLocationAttrib","isInterpolateAttrib","isBuiltinAttrib","isDecorated"]}
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6;var N="Invariant failed";function M(t,e){if(t)return;throw new Error(N)}var K=class t extends Error{constructor(n,r){let s=r.map(i=>`- ${i}`);s.length>20&&(s=[...s.slice(0,11),"...",...s.slice(-10)]);super(`Resolution of the following tree failed:
2
- ${s.join(`
3
- `)}: ${n&&typeof n=="object"&&"message"in n?n.message:n}`);this.cause=n;this.trace=r;Object.setPrototypeOf(this,t.prototype)}appendToTrace(n){let r=[n,...this.trace];return new t(this.cause,r)}},q= exports.c =class t extends Error{constructor(n){super(`Missing value for '${n}'`);this.slot=n;Object.setPrototypeOf(this,t.prototype)}},H= exports.d =class t extends Error{constructor(e){super(`Buffer '${_nullishCoalesce(e.label, () => ("<unnamed>"))}' is not bindable as a uniform. Use .$usage('uniform') to allow it.`),Object.setPrototypeOf(this,t.prototype)}},J= exports.e =class t extends Error{constructor(e,n){super(`The function '${_nullishCoalesce(e, () => ("<unnamed>"))}' is missing links to the following external values: ${n}.`),Object.setPrototypeOf(this,t.prototype)}},Q= exports.f =class t extends Error{constructor(e){super(`Missing bind groups for layouts: '${[...e].map(n=>_nullishCoalesce(n.label, () => ("<unnamed>"))).join(", ")}'. Please provide it using pipeline.with(layout, bindGroup).(...)`),Object.setPrototypeOf(this,t.prototype)}},X= exports.g =class t extends Error{constructor(e){super(`Missing vertex buffers for layouts: '${[...e].map(n=>_nullishCoalesce(n.label, () => ("<unnamed>"))).join(", ")}'. Please provide it using pipeline.with(layout, buffer).(...)`),Object.setPrototypeOf(this,t.prototype)}};var D=null,ee=Symbol("CPU"),te=Symbol("GPU"),ne= exports.h ={CPU:ee,GPU:te},k=[];function Ne(t,e){M(D===null,"Cannot nest context providers"),D=t;try{return e()}finally{D=null}}function Me(){return D}function Be(t){k.push(t)}function Re(t){let e=k.pop();t!==void 0&&M(e===t,"Unexpected mode")}var Y=()=>k.length>0&&k[k.length-1]===ne.GPU;var Z=Symbol("internal");function*Le(t){let e=0;for(;;)t.has(e)||(yield e),e++}function y(t,e){let n=(...r)=>Y()?e(...r):t(...r);return Object.defineProperty(n,Z,{value:{implementation:t}}),n}var l=Symbol("Type token for the inferred (CPU & GPU) representation of a resource");var $=class extends Array{"~resolve"(){return`${this.kind}(${this.join(", ")})`}toString(){return this["~resolve"]()}get xx(){return new this._Vec2(this[0],this[0])}get xy(){return new this._Vec2(this[0],this[1])}get xz(){return new this._Vec2(this[0],this[2])}get xw(){return new this._Vec2(this[0],this[3])}get yx(){return new this._Vec2(this[1],this[0])}get yy(){return new this._Vec2(this[1],this[1])}get yz(){return new this._Vec2(this[1],this[2])}get yw(){return new this._Vec2(this[1],this[3])}get zx(){return new this._Vec2(this[2],this[0])}get zy(){return new this._Vec2(this[2],this[1])}get zz(){return new this._Vec2(this[2],this[2])}get zw(){return new this._Vec2(this[2],this[3])}get wx(){return new this._Vec2(this[3],this[0])}get wy(){return new this._Vec2(this[3],this[1])}get wz(){return new this._Vec2(this[3],this[2])}get ww(){return new this._Vec2(this[3],this[3])}get xxx(){return new this._Vec3(this[0],this[0],this[0])}get xxy(){return new this._Vec3(this[0],this[0],this[1])}get xxz(){return new this._Vec3(this[0],this[0],this[2])}get xxw(){return new this._Vec3(this[0],this[0],this[3])}get xyx(){return new this._Vec3(this[0],this[1],this[0])}get xyy(){return new this._Vec3(this[0],this[1],this[1])}get xyz(){return new this._Vec3(this[0],this[1],this[2])}get xyw(){return new this._Vec3(this[0],this[1],this[3])}get xzx(){return new this._Vec3(this[0],this[2],this[0])}get xzy(){return new this._Vec3(this[0],this[2],this[1])}get xzz(){return new this._Vec3(this[0],this[2],this[2])}get xzw(){return new this._Vec3(this[0],this[2],this[3])}get xwx(){return new this._Vec3(this[0],this[3],this[0])}get xwy(){return new this._Vec3(this[0],this[3],this[1])}get xwz(){return new this._Vec3(this[0],this[3],this[2])}get xww(){return new this._Vec3(this[0],this[3],this[3])}get yxx(){return new this._Vec3(this[1],this[0],this[0])}get yxy(){return new this._Vec3(this[1],this[0],this[1])}get yxz(){return new this._Vec3(this[1],this[0],this[2])}get yxw(){return new this._Vec3(this[1],this[0],this[3])}get yyx(){return new this._Vec3(this[1],this[1],this[0])}get yyy(){return new this._Vec3(this[1],this[1],this[1])}get yyz(){return new this._Vec3(this[1],this[1],this[2])}get yyw(){return new this._Vec3(this[1],this[1],this[3])}get yzx(){return new this._Vec3(this[1],this[2],this[0])}get yzy(){return new this._Vec3(this[1],this[2],this[1])}get yzz(){return new this._Vec3(this[1],this[2],this[2])}get yzw(){return new this._Vec3(this[1],this[2],this[3])}get ywx(){return new this._Vec3(this[1],this[3],this[0])}get ywy(){return new this._Vec3(this[1],this[3],this[1])}get ywz(){return new this._Vec3(this[1],this[3],this[2])}get yww(){return new this._Vec3(this[1],this[3],this[3])}get zxx(){return new this._Vec3(this[2],this[0],this[0])}get zxy(){return new this._Vec3(this[2],this[0],this[1])}get zxz(){return new this._Vec3(this[2],this[0],this[2])}get zxw(){return new this._Vec3(this[2],this[0],this[3])}get zyx(){return new this._Vec3(this[2],this[1],this[0])}get zyy(){return new this._Vec3(this[2],this[1],this[1])}get zyz(){return new this._Vec3(this[2],this[1],this[2])}get zyw(){return new this._Vec3(this[2],this[1],this[3])}get zzx(){return new this._Vec3(this[2],this[2],this[0])}get zzy(){return new this._Vec3(this[2],this[2],this[1])}get zzz(){return new this._Vec3(this[2],this[2],this[2])}get zzw(){return new this._Vec3(this[2],this[2],this[3])}get zwx(){return new this._Vec3(this[2],this[3],this[0])}get zwy(){return new this._Vec3(this[2],this[3],this[1])}get zwz(){return new this._Vec3(this[2],this[3],this[2])}get zww(){return new this._Vec3(this[2],this[3],this[3])}get wxx(){return new this._Vec3(this[3],this[0],this[0])}get wxy(){return new this._Vec3(this[3],this[0],this[1])}get wxz(){return new this._Vec3(this[3],this[0],this[2])}get wxw(){return new this._Vec3(this[3],this[0],this[3])}get wyx(){return new this._Vec3(this[3],this[1],this[0])}get wyy(){return new this._Vec3(this[3],this[1],this[1])}get wyz(){return new this._Vec3(this[3],this[1],this[2])}get wyw(){return new this._Vec3(this[3],this[1],this[3])}get wzx(){return new this._Vec3(this[3],this[2],this[0])}get wzy(){return new this._Vec3(this[3],this[2],this[1])}get wzz(){return new this._Vec3(this[3],this[2],this[2])}get wzw(){return new this._Vec3(this[3],this[2],this[3])}get wwx(){return new this._Vec3(this[3],this[3],this[0])}get wwy(){return new this._Vec3(this[3],this[3],this[1])}get wwz(){return new this._Vec3(this[3],this[3],this[2])}get www(){return new this._Vec3(this[3],this[3],this[3])}get xxxx(){return new this._Vec4(this[0],this[0],this[0],this[0])}get xxxy(){return new this._Vec4(this[0],this[0],this[0],this[1])}get xxxz(){return new this._Vec4(this[0],this[0],this[0],this[2])}get xxxw(){return new this._Vec4(this[0],this[0],this[0],this[3])}get xxyx(){return new this._Vec4(this[0],this[0],this[1],this[0])}get xxyy(){return new this._Vec4(this[0],this[0],this[1],this[1])}get xxyz(){return new this._Vec4(this[0],this[0],this[1],this[2])}get xxyw(){return new this._Vec4(this[0],this[0],this[1],this[3])}get xxzx(){return new this._Vec4(this[0],this[0],this[2],this[0])}get xxzy(){return new this._Vec4(this[0],this[0],this[2],this[1])}get xxzz(){return new this._Vec4(this[0],this[0],this[2],this[2])}get xxzw(){return new this._Vec4(this[0],this[0],this[2],this[3])}get xxwx(){return new this._Vec4(this[0],this[0],this[3],this[0])}get xxwy(){return new this._Vec4(this[0],this[0],this[3],this[1])}get xxwz(){return new this._Vec4(this[0],this[0],this[3],this[2])}get xxww(){return new this._Vec4(this[0],this[0],this[3],this[3])}get xyxx(){return new this._Vec4(this[0],this[1],this[0],this[0])}get xyxy(){return new this._Vec4(this[0],this[1],this[0],this[1])}get xyxz(){return new this._Vec4(this[0],this[1],this[0],this[2])}get xyxw(){return new this._Vec4(this[0],this[1],this[0],this[3])}get xyyx(){return new this._Vec4(this[0],this[1],this[1],this[0])}get xyyy(){return new this._Vec4(this[0],this[1],this[1],this[1])}get xyyz(){return new this._Vec4(this[0],this[1],this[1],this[2])}get xyyw(){return new this._Vec4(this[0],this[1],this[1],this[3])}get xyzx(){return new this._Vec4(this[0],this[1],this[2],this[0])}get xyzy(){return new this._Vec4(this[0],this[1],this[2],this[1])}get xyzz(){return new this._Vec4(this[0],this[1],this[2],this[2])}get xyzw(){return new this._Vec4(this[0],this[1],this[2],this[3])}get xywx(){return new this._Vec4(this[0],this[1],this[3],this[0])}get xywy(){return new this._Vec4(this[0],this[1],this[3],this[1])}get xywz(){return new this._Vec4(this[0],this[1],this[3],this[2])}get xyww(){return new this._Vec4(this[0],this[1],this[3],this[3])}get xzxx(){return new this._Vec4(this[0],this[2],this[0],this[0])}get xzxy(){return new this._Vec4(this[0],this[2],this[0],this[1])}get xzxz(){return new this._Vec4(this[0],this[2],this[0],this[2])}get xzxw(){return new this._Vec4(this[0],this[2],this[0],this[3])}get xzyx(){return new this._Vec4(this[0],this[2],this[1],this[0])}get xzyy(){return new this._Vec4(this[0],this[2],this[1],this[1])}get xzyz(){return new this._Vec4(this[0],this[2],this[1],this[2])}get xzyw(){return new this._Vec4(this[0],this[2],this[1],this[3])}get xzzx(){return new this._Vec4(this[0],this[2],this[2],this[0])}get xzzy(){return new this._Vec4(this[0],this[2],this[2],this[1])}get xzzz(){return new this._Vec4(this[0],this[2],this[2],this[2])}get xzzw(){return new this._Vec4(this[0],this[2],this[2],this[3])}get xzwx(){return new this._Vec4(this[0],this[2],this[3],this[0])}get xzwy(){return new this._Vec4(this[0],this[2],this[3],this[1])}get xzwz(){return new this._Vec4(this[0],this[2],this[3],this[2])}get xzww(){return new this._Vec4(this[0],this[2],this[3],this[3])}get xwxx(){return new this._Vec4(this[0],this[3],this[0],this[0])}get xwxy(){return new this._Vec4(this[0],this[3],this[0],this[1])}get xwxz(){return new this._Vec4(this[0],this[3],this[0],this[2])}get xwxw(){return new this._Vec4(this[0],this[3],this[0],this[3])}get xwyx(){return new this._Vec4(this[0],this[3],this[1],this[0])}get xwyy(){return new this._Vec4(this[0],this[3],this[1],this[1])}get xwyz(){return new this._Vec4(this[0],this[3],this[1],this[2])}get xwyw(){return new this._Vec4(this[0],this[3],this[1],this[3])}get xwzx(){return new this._Vec4(this[0],this[3],this[2],this[0])}get xwzy(){return new this._Vec4(this[0],this[3],this[2],this[1])}get xwzz(){return new this._Vec4(this[0],this[3],this[2],this[2])}get xwzw(){return new this._Vec4(this[0],this[3],this[2],this[3])}get xwwx(){return new this._Vec4(this[0],this[3],this[3],this[0])}get xwwy(){return new this._Vec4(this[0],this[3],this[3],this[1])}get xwwz(){return new this._Vec4(this[0],this[3],this[3],this[2])}get xwww(){return new this._Vec4(this[0],this[3],this[3],this[3])}get yxxx(){return new this._Vec4(this[1],this[0],this[0],this[0])}get yxxy(){return new this._Vec4(this[1],this[0],this[0],this[1])}get yxxz(){return new this._Vec4(this[1],this[0],this[0],this[2])}get yxxw(){return new this._Vec4(this[1],this[0],this[0],this[3])}get yxyx(){return new this._Vec4(this[1],this[0],this[1],this[0])}get yxyy(){return new this._Vec4(this[1],this[0],this[1],this[1])}get yxyz(){return new this._Vec4(this[1],this[0],this[1],this[2])}get yxyw(){return new this._Vec4(this[1],this[0],this[1],this[3])}get yxzx(){return new this._Vec4(this[1],this[0],this[2],this[0])}get yxzy(){return new this._Vec4(this[1],this[0],this[2],this[1])}get yxzz(){return new this._Vec4(this[1],this[0],this[2],this[2])}get yxzw(){return new this._Vec4(this[1],this[0],this[2],this[3])}get yxwx(){return new this._Vec4(this[1],this[0],this[3],this[0])}get yxwy(){return new this._Vec4(this[1],this[0],this[3],this[1])}get yxwz(){return new this._Vec4(this[1],this[0],this[3],this[2])}get yxww(){return new this._Vec4(this[1],this[0],this[3],this[3])}get yyxx(){return new this._Vec4(this[1],this[1],this[0],this[0])}get yyxy(){return new this._Vec4(this[1],this[1],this[0],this[1])}get yyxz(){return new this._Vec4(this[1],this[1],this[0],this[2])}get yyxw(){return new this._Vec4(this[1],this[1],this[0],this[3])}get yyyx(){return new this._Vec4(this[1],this[1],this[1],this[0])}get yyyy(){return new this._Vec4(this[1],this[1],this[1],this[1])}get yyyz(){return new this._Vec4(this[1],this[1],this[1],this[2])}get yyyw(){return new this._Vec4(this[1],this[1],this[1],this[3])}get yyzx(){return new this._Vec4(this[1],this[1],this[2],this[0])}get yyzy(){return new this._Vec4(this[1],this[1],this[2],this[1])}get yyzz(){return new this._Vec4(this[1],this[1],this[2],this[2])}get yyzw(){return new this._Vec4(this[1],this[1],this[2],this[3])}get yywx(){return new this._Vec4(this[1],this[1],this[3],this[0])}get yywy(){return new this._Vec4(this[1],this[1],this[3],this[1])}get yywz(){return new this._Vec4(this[1],this[1],this[3],this[2])}get yyww(){return new this._Vec4(this[1],this[1],this[3],this[3])}get yzxx(){return new this._Vec4(this[1],this[2],this[0],this[0])}get yzxy(){return new this._Vec4(this[1],this[2],this[0],this[1])}get yzxz(){return new this._Vec4(this[1],this[2],this[0],this[2])}get yzxw(){return new this._Vec4(this[1],this[2],this[0],this[3])}get yzyx(){return new this._Vec4(this[1],this[2],this[1],this[0])}get yzyy(){return new this._Vec4(this[1],this[2],this[1],this[1])}get yzyz(){return new this._Vec4(this[1],this[2],this[1],this[2])}get yzyw(){return new this._Vec4(this[1],this[2],this[1],this[3])}get yzzx(){return new this._Vec4(this[1],this[2],this[2],this[0])}get yzzy(){return new this._Vec4(this[1],this[2],this[2],this[1])}get yzzz(){return new this._Vec4(this[1],this[2],this[2],this[2])}get yzzw(){return new this._Vec4(this[1],this[2],this[2],this[3])}get yzwx(){return new this._Vec4(this[1],this[2],this[3],this[0])}get yzwy(){return new this._Vec4(this[1],this[2],this[3],this[1])}get yzwz(){return new this._Vec4(this[1],this[2],this[3],this[2])}get yzww(){return new this._Vec4(this[1],this[2],this[3],this[3])}get ywxx(){return new this._Vec4(this[1],this[3],this[0],this[0])}get ywxy(){return new this._Vec4(this[1],this[3],this[0],this[1])}get ywxz(){return new this._Vec4(this[1],this[3],this[0],this[2])}get ywxw(){return new this._Vec4(this[1],this[3],this[0],this[3])}get ywyx(){return new this._Vec4(this[1],this[3],this[1],this[0])}get ywyy(){return new this._Vec4(this[1],this[3],this[1],this[1])}get ywyz(){return new this._Vec4(this[1],this[3],this[1],this[2])}get ywyw(){return new this._Vec4(this[1],this[3],this[1],this[3])}get ywzx(){return new this._Vec4(this[1],this[3],this[2],this[0])}get ywzy(){return new this._Vec4(this[1],this[3],this[2],this[1])}get ywzz(){return new this._Vec4(this[1],this[3],this[2],this[2])}get ywzw(){return new this._Vec4(this[1],this[3],this[2],this[3])}get ywwx(){return new this._Vec4(this[1],this[3],this[3],this[0])}get ywwy(){return new this._Vec4(this[1],this[3],this[3],this[1])}get ywwz(){return new this._Vec4(this[1],this[3],this[3],this[2])}get ywww(){return new this._Vec4(this[1],this[3],this[3],this[3])}get zxxx(){return new this._Vec4(this[2],this[0],this[0],this[0])}get zxxy(){return new this._Vec4(this[2],this[0],this[0],this[1])}get zxxz(){return new this._Vec4(this[2],this[0],this[0],this[2])}get zxxw(){return new this._Vec4(this[2],this[0],this[0],this[3])}get zxyx(){return new this._Vec4(this[2],this[0],this[1],this[0])}get zxyy(){return new this._Vec4(this[2],this[0],this[1],this[1])}get zxyz(){return new this._Vec4(this[2],this[0],this[1],this[2])}get zxyw(){return new this._Vec4(this[2],this[0],this[1],this[3])}get zxzx(){return new this._Vec4(this[2],this[0],this[2],this[0])}get zxzy(){return new this._Vec4(this[2],this[0],this[2],this[1])}get zxzz(){return new this._Vec4(this[2],this[0],this[2],this[2])}get zxzw(){return new this._Vec4(this[2],this[0],this[2],this[3])}get zxwx(){return new this._Vec4(this[2],this[0],this[3],this[0])}get zxwy(){return new this._Vec4(this[2],this[0],this[3],this[1])}get zxwz(){return new this._Vec4(this[2],this[0],this[3],this[2])}get zxww(){return new this._Vec4(this[2],this[0],this[3],this[3])}get zyxx(){return new this._Vec4(this[2],this[1],this[0],this[0])}get zyxy(){return new this._Vec4(this[2],this[1],this[0],this[1])}get zyxz(){return new this._Vec4(this[2],this[1],this[0],this[2])}get zyxw(){return new this._Vec4(this[2],this[1],this[0],this[3])}get zyyx(){return new this._Vec4(this[2],this[1],this[1],this[0])}get zyyy(){return new this._Vec4(this[2],this[1],this[1],this[1])}get zyyz(){return new this._Vec4(this[2],this[1],this[1],this[2])}get zyyw(){return new this._Vec4(this[2],this[1],this[1],this[3])}get zyzx(){return new this._Vec4(this[2],this[1],this[2],this[0])}get zyzy(){return new this._Vec4(this[2],this[1],this[2],this[1])}get zyzz(){return new this._Vec4(this[2],this[1],this[2],this[2])}get zyzw(){return new this._Vec4(this[2],this[1],this[2],this[3])}get zywx(){return new this._Vec4(this[2],this[1],this[3],this[0])}get zywy(){return new this._Vec4(this[2],this[1],this[3],this[1])}get zywz(){return new this._Vec4(this[2],this[1],this[3],this[2])}get zyww(){return new this._Vec4(this[2],this[1],this[3],this[3])}get zzxx(){return new this._Vec4(this[2],this[2],this[0],this[0])}get zzxy(){return new this._Vec4(this[2],this[2],this[0],this[1])}get zzxz(){return new this._Vec4(this[2],this[2],this[0],this[2])}get zzxw(){return new this._Vec4(this[2],this[2],this[0],this[3])}get zzyx(){return new this._Vec4(this[2],this[2],this[1],this[0])}get zzyy(){return new this._Vec4(this[2],this[2],this[1],this[1])}get zzyz(){return new this._Vec4(this[2],this[2],this[1],this[2])}get zzyw(){return new this._Vec4(this[2],this[2],this[1],this[3])}get zzzx(){return new this._Vec4(this[2],this[2],this[2],this[0])}get zzzy(){return new this._Vec4(this[2],this[2],this[2],this[1])}get zzzz(){return new this._Vec4(this[2],this[2],this[2],this[2])}get zzzw(){return new this._Vec4(this[2],this[2],this[2],this[3])}get zzwx(){return new this._Vec4(this[2],this[2],this[3],this[0])}get zzwy(){return new this._Vec4(this[2],this[2],this[3],this[1])}get zzwz(){return new this._Vec4(this[2],this[2],this[3],this[2])}get zzww(){return new this._Vec4(this[2],this[2],this[3],this[3])}get zwxx(){return new this._Vec4(this[2],this[3],this[0],this[0])}get zwxy(){return new this._Vec4(this[2],this[3],this[0],this[1])}get zwxz(){return new this._Vec4(this[2],this[3],this[0],this[2])}get zwxw(){return new this._Vec4(this[2],this[3],this[0],this[3])}get zwyx(){return new this._Vec4(this[2],this[3],this[1],this[0])}get zwyy(){return new this._Vec4(this[2],this[3],this[1],this[1])}get zwyz(){return new this._Vec4(this[2],this[3],this[1],this[2])}get zwyw(){return new this._Vec4(this[2],this[3],this[1],this[3])}get zwzx(){return new this._Vec4(this[2],this[3],this[2],this[0])}get zwzy(){return new this._Vec4(this[2],this[3],this[2],this[1])}get zwzz(){return new this._Vec4(this[2],this[3],this[2],this[2])}get zwzw(){return new this._Vec4(this[2],this[3],this[2],this[3])}get zwwx(){return new this._Vec4(this[2],this[3],this[3],this[0])}get zwwy(){return new this._Vec4(this[2],this[3],this[3],this[1])}get zwwz(){return new this._Vec4(this[2],this[3],this[3],this[2])}get zwww(){return new this._Vec4(this[2],this[3],this[3],this[3])}get wxxx(){return new this._Vec4(this[3],this[0],this[0],this[0])}get wxxy(){return new this._Vec4(this[3],this[0],this[0],this[1])}get wxxz(){return new this._Vec4(this[3],this[0],this[0],this[2])}get wxxw(){return new this._Vec4(this[3],this[0],this[0],this[3])}get wxyx(){return new this._Vec4(this[3],this[0],this[1],this[0])}get wxyy(){return new this._Vec4(this[3],this[0],this[1],this[1])}get wxyz(){return new this._Vec4(this[3],this[0],this[1],this[2])}get wxyw(){return new this._Vec4(this[3],this[0],this[1],this[3])}get wxzx(){return new this._Vec4(this[3],this[0],this[2],this[0])}get wxzy(){return new this._Vec4(this[3],this[0],this[2],this[1])}get wxzz(){return new this._Vec4(this[3],this[0],this[2],this[2])}get wxzw(){return new this._Vec4(this[3],this[0],this[2],this[3])}get wxwx(){return new this._Vec4(this[3],this[0],this[3],this[0])}get wxwy(){return new this._Vec4(this[3],this[0],this[3],this[1])}get wxwz(){return new this._Vec4(this[3],this[0],this[3],this[2])}get wxww(){return new this._Vec4(this[3],this[0],this[3],this[3])}get wyxx(){return new this._Vec4(this[3],this[1],this[0],this[0])}get wyxy(){return new this._Vec4(this[3],this[1],this[0],this[1])}get wyxz(){return new this._Vec4(this[3],this[1],this[0],this[2])}get wyxw(){return new this._Vec4(this[3],this[1],this[0],this[3])}get wyyx(){return new this._Vec4(this[3],this[1],this[1],this[0])}get wyyy(){return new this._Vec4(this[3],this[1],this[1],this[1])}get wyyz(){return new this._Vec4(this[3],this[1],this[1],this[2])}get wyyw(){return new this._Vec4(this[3],this[1],this[1],this[3])}get wyzx(){return new this._Vec4(this[3],this[1],this[2],this[0])}get wyzy(){return new this._Vec4(this[3],this[1],this[2],this[1])}get wyzz(){return new this._Vec4(this[3],this[1],this[2],this[2])}get wyzw(){return new this._Vec4(this[3],this[1],this[2],this[3])}get wywx(){return new this._Vec4(this[3],this[1],this[3],this[0])}get wywy(){return new this._Vec4(this[3],this[1],this[3],this[1])}get wywz(){return new this._Vec4(this[3],this[1],this[3],this[2])}get wyww(){return new this._Vec4(this[3],this[1],this[3],this[3])}get wzxx(){return new this._Vec4(this[3],this[2],this[0],this[0])}get wzxy(){return new this._Vec4(this[3],this[2],this[0],this[1])}get wzxz(){return new this._Vec4(this[3],this[2],this[0],this[2])}get wzxw(){return new this._Vec4(this[3],this[2],this[0],this[3])}get wzyx(){return new this._Vec4(this[3],this[2],this[1],this[0])}get wzyy(){return new this._Vec4(this[3],this[2],this[1],this[1])}get wzyz(){return new this._Vec4(this[3],this[2],this[1],this[2])}get wzyw(){return new this._Vec4(this[3],this[2],this[1],this[3])}get wzzx(){return new this._Vec4(this[3],this[2],this[2],this[0])}get wzzy(){return new this._Vec4(this[3],this[2],this[2],this[1])}get wzzz(){return new this._Vec4(this[3],this[2],this[2],this[2])}get wzzw(){return new this._Vec4(this[3],this[2],this[2],this[3])}get wzwx(){return new this._Vec4(this[3],this[2],this[3],this[0])}get wzwy(){return new this._Vec4(this[3],this[2],this[3],this[1])}get wzwz(){return new this._Vec4(this[3],this[2],this[3],this[2])}get wzww(){return new this._Vec4(this[3],this[2],this[3],this[3])}get wwxx(){return new this._Vec4(this[3],this[3],this[0],this[0])}get wwxy(){return new this._Vec4(this[3],this[3],this[0],this[1])}get wwxz(){return new this._Vec4(this[3],this[3],this[0],this[2])}get wwxw(){return new this._Vec4(this[3],this[3],this[0],this[3])}get wwyx(){return new this._Vec4(this[3],this[3],this[1],this[0])}get wwyy(){return new this._Vec4(this[3],this[3],this[1],this[1])}get wwyz(){return new this._Vec4(this[3],this[3],this[1],this[2])}get wwyw(){return new this._Vec4(this[3],this[3],this[1],this[3])}get wwzx(){return new this._Vec4(this[3],this[3],this[2],this[0])}get wwzy(){return new this._Vec4(this[3],this[3],this[2],this[1])}get wwzz(){return new this._Vec4(this[3],this[3],this[2],this[2])}get wwzw(){return new this._Vec4(this[3],this[3],this[2],this[3])}get wwwx(){return new this._Vec4(this[3],this[3],this[3],this[0])}get wwwy(){return new this._Vec4(this[3],this[3],this[3],this[1])}get wwwz(){return new this._Vec4(this[3],this[3],this[3],this[2])}get wwww(){return new this._Vec4(this[3],this[3],this[3],this[3])}},a=class extends ${constructor(e,n){super(2),this[0]=_nullishCoalesce(e, () => (this.getDefaultValue())),this[1]=_nullishCoalesce(_nullishCoalesce(n, () => (e)), () => (this.getDefaultValue()))}get x(){return this[0]}get y(){return this[1]}set x(e){this[0]=e}set y(e){this[1]=e}},o=class extends ${constructor(e,n,r){super(3),this[0]=_nullishCoalesce(e, () => (this.getDefaultValue())),this[1]=_nullishCoalesce(_nullishCoalesce(n, () => (e)), () => (this.getDefaultValue())),this[2]=_nullishCoalesce(_nullishCoalesce(r, () => (e)), () => (this.getDefaultValue()))}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}},u=class extends ${constructor(e,n,r,s){super(4),this[0]=_nullishCoalesce(e, () => (this.getDefaultValue())),this[1]=_nullishCoalesce(_nullishCoalesce(n, () => (e)), () => (this.getDefaultValue())),this[2]=_nullishCoalesce(_nullishCoalesce(r, () => (e)), () => (this.getDefaultValue())),this[3]=_nullishCoalesce(_nullishCoalesce(s, () => (e)), () => (this.getDefaultValue()))}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set w(e){this[3]=e}},x=class t extends a{getDefaultValue(){return 0}get kind(){return"vec2f"}get _Vec2(){return t}get _Vec3(){return p}get _Vec4(){return f}},w=class t extends a{getDefaultValue(){return 0}get kind(){return"vec2h"}get _Vec2(){return t}get _Vec3(){return V}get _Vec4(){return v}},d=class t extends a{getDefaultValue(){return 0}get kind(){return"vec2i"}get _Vec2(){return t}get _Vec3(){return g}get _Vec4(){return _}},m=class t extends a{getDefaultValue(){return 0}get kind(){return"vec2u"}get _Vec2(){return t}get _Vec3(){return T}get _Vec4(){return I}},z=class t extends a{getDefaultValue(){return!1}get kind(){return"vec2<bool>"}get _Vec2(){return t}get _Vec3(){return b}get _Vec4(){return A}},p=class t extends o{getDefaultValue(){return 0}get kind(){return"vec3f"}get _Vec2(){return x}get _Vec3(){return t}get _Vec4(){return f}},V=class t extends o{getDefaultValue(){return 0}get kind(){return"vec3h"}get _Vec2(){return w}get _Vec3(){return t}get _Vec4(){return v}},g=class t extends o{getDefaultValue(){return 0}get kind(){return"vec3i"}get _Vec2(){return d}get _Vec3(){return t}get _Vec4(){return _}},T=class t extends o{getDefaultValue(){return 0}get kind(){return"vec3u"}get _Vec2(){return m}get _Vec3(){return t}get _Vec4(){return I}},b=class t extends o{getDefaultValue(){return!1}get kind(){return"vec3<bool>"}get _Vec2(){return z}get _Vec3(){return t}get _Vec4(){return A}},f=class t extends u{getDefaultValue(){return 0}get kind(){return"vec4f"}get _Vec2(){return x}get _Vec3(){return p}get _Vec4(){return t}},v=class t extends u{getDefaultValue(){return 0}get kind(){return"vec4h"}get _Vec2(){return w}get _Vec3(){return V}get _Vec4(){return t}},_=class t extends u{getDefaultValue(){return 0}get kind(){return"vec4i"}get _Vec2(){return d}get _Vec3(){return g}get _Vec4(){return t}},I=class t extends u{getDefaultValue(){return 0}get kind(){return"vec4u"}get _Vec2(){return m}get _Vec3(){return T}get _Vec4(){return t}},A=class t extends u{getDefaultValue(){return!1}get kind(){return"vec4<bool>"}get _Vec2(){return z}get _Vec3(){return b}get _Vec4(){return t}};var B=h(x),re= exports.s =h(w),se= exports.t =h(d),ie= exports.u =h(m),he= exports.v =h(z),R= exports.w =h(p),ye= exports.x =h(V),ae= exports.y =h(g),oe= exports.z =h(T),ue= exports.A =h(b),F= exports.B =h(f),ce= exports.C =h(v),le= exports.D =h(_),xe= exports.E =h(I),we= exports.F =h(A),de={vec2f:B,vec2h:re,vec2i:se,vec2u:ie,"vec2<bool>":he,vec3f:R,vec3h:ye,vec3i:ae,vec3u:oe,"vec3<bool>":ue,vec4f:F,vec4h:ce,vec4i:le,vec4u:xe,"vec4<bool>":we};function h(t){let{kind:e,length:n}=new t,r=y((...s)=>{let i=new Array(s.length),c=0;for(let S of s)if(typeof S=="number"||typeof S=="boolean")i[c++]=S;else for(let C=0;C<S.length;++C)i[c++]=S[C];if(i.length<=1||i.length===n)return new t(...i);throw new Error(`'${e}' constructor called with invalid number of arguments.`)},(...s)=>({value:`${e}(${s.map(i=>i.value).join(", ")})`,dataType:de[e]}));return Object.assign(r,{type:e,[l]:void 0})}function E(t){let e={[l]:void 0,type:t.type,label:t.type},n=y((...r)=>{let s=[];for(let i of r)if(typeof i=="number")s.push(i);else for(let c=0;c<i.length;++c)s.push(i[c]);for(let i=s.length;i<t.columns*t.rows;++i)s.push(0);return t.makeFromElements(...s)},(...r)=>({value:`${e.type}(${r.map(s=>s.value).join(", ")})`,dataType:e}));return Object.assign(n,e)}var U= (_class =class{__init() {this.length=4}constructor(...e){;_class.prototype.__init.call(this);this.columns=[this.makeColumn(e[0],e[1]),this.makeColumn(e[2],e[3])]}get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[1].x}get 3(){return this.columns[1].y}set 0(e){this.columns[0].x=e}set 1(e){this.columns[0].y=e}set 2(e){this.columns[1].x=e}set 3(e){this.columns[1].y=e}"~resolve"(){return`${this.kind}(${Array.from({length:this.length}).map((e,n)=>this[n]).join(", ")})`}}, _class),W= (_class2 =class extends U{constructor(...args) { super(...args); _class2.prototype.__init2.call(this); }__init2() {this.kind="mat2x2f"}makeColumn(e,n){return B(e,n)}}, _class2),O= (_class3 =class{__init3() {this.length=12}constructor(...e){;_class3.prototype.__init3.call(this);this.columns=[this.makeColumn(e[0],e[1],e[2]),this.makeColumn(e[3],e[4],e[5]),this.makeColumn(e[6],e[7],e[8])]}get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[0].z}get 3(){return 0}get 4(){return this.columns[1].x}get 5(){return this.columns[1].y}get 6(){return this.columns[1].z}get 7(){return 0}get 8(){return this.columns[2].x}get 9(){return this.columns[2].y}get 10(){return this.columns[2].z}get 11(){return 0}set 0(e){this.columns[0].x=e}set 1(e){this.columns[0].y=e}set 2(e){this.columns[0].z=e}set 3(e){}set 4(e){this.columns[1].x=e}set 5(e){this.columns[1].y=e}set 6(e){this.columns[1].z=e}set 7(e){}set 8(e){this.columns[2].x=e}set 9(e){this.columns[2].y=e}set 10(e){this.columns[2].z=e}set 11(e){}"~resolve"(){return`${this.kind}(${this[0]}, ${this[1]}, ${this[2]}, ${this[4]}, ${this[5]}, ${this[6]}, ${this[8]}, ${this[9]}, ${this[10]})`}}, _class3),L= (_class4 =class extends O{constructor(...args2) { super(...args2); _class4.prototype.__init4.call(this); }__init4() {this.kind="mat3x3f"}makeColumn(e,n,r){return R(e,n,r)}}, _class4),j= (_class5 =class{constructor(...e){;_class5.prototype.__init5.call(this);this.columns=[this.makeColumn(e[0],e[1],e[2],e[3]),this.makeColumn(e[4],e[5],e[6],e[7]),this.makeColumn(e[8],e[9],e[10],e[11]),this.makeColumn(e[12],e[13],e[14],e[15])]}__init5() {this.length=16}get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[0].z}get 3(){return this.columns[0].w}get 4(){return this.columns[1].x}get 5(){return this.columns[1].y}get 6(){return this.columns[1].z}get 7(){return this.columns[1].w}get 8(){return this.columns[2].x}get 9(){return this.columns[2].y}get 10(){return this.columns[2].z}get 11(){return this.columns[2].w}get 12(){return this.columns[3].x}get 13(){return this.columns[3].y}get 14(){return this.columns[3].z}get 15(){return this.columns[3].w}set 0(e){this.columns[0].x=e}set 1(e){this.columns[0].y=e}set 2(e){this.columns[0].z=e}set 3(e){this.columns[0].w=e}set 4(e){this.columns[1].x=e}set 5(e){this.columns[1].y=e}set 6(e){this.columns[1].z=e}set 7(e){this.columns[1].w=e}set 8(e){this.columns[2].x=e}set 9(e){this.columns[2].y=e}set 10(e){this.columns[2].z=e}set 11(e){this.columns[2].w=e}set 12(e){this.columns[3].x=e}set 13(e){this.columns[3].y=e}set 14(e){this.columns[3].z=e}set 15(e){this.columns[3].w=e}"~resolve"(){return`${this.kind}(${Array.from({length:this.length}).map((e,n)=>this[n]).join(", ")})`}}, _class5),G= (_class6 =class extends j{constructor(...args3) { super(...args3); _class6.prototype.__init6.call(this); }__init6() {this.kind="mat4x4f"}makeColumn(e,n,r,s){return F(e,n,r,s)}}, _class6),Ze= exports.G =E({type:"mat2x2f",rows:2,columns:2,makeFromElements:(...t)=>new W(...t)}),et= exports.H =E({type:"mat3x3f",rows:3,columns:3,makeFromElements:(...t)=>new L(...t)}),tt= exports.I =E({type:"mat4x4f",rows:4,columns:4,makeFromElements:(...t)=>new G(...t)});function nt(t){return t.kind==="mat3x3f"?[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]]:Array.from({length:t.length}).map((e,n)=>t[n])}var _typedbinary = require('typed-binary'); var _typedbinary2 = _interopRequireDefault(_typedbinary);var ht={type:"abstractInt"},yt= exports.L ={type:"abstractFloat"},at= exports.M ={type:"bool"},me=y(t=>typeof t=="boolean"?t?1:0:Number.isInteger(t)?((t<0||t>4294967295)&&console.warn(`u32 value ${t} overflowed`),(t&4294967295)>>>0):Math.max(0,Math.min(4294967295,Math.floor(t))),t=>({value:`u32(${t.value})`,dataType:ze})),ze= exports.N =Object.assign(me,{type:"u32"}),pe=y(t=>{if(typeof t=="boolean")return t?1:0;if(Number.isInteger(t))return(t<-2147483648||t>2147483647)&&console.warn(`i32 value ${t} overflowed`),(t|0)&4294967295;let e=t<0?Math.ceil(t):Math.floor(t);return Math.max(-2147483648,Math.min(2147483647,e))},t=>({value:`i32(${t.value})`,dataType:Ve})),Ve= exports.O =Object.assign(pe,{type:"i32"}),ge=y(t=>{if(typeof t=="boolean")return t?1:0;let e=new Float32Array(1);return e[0]=t,e[0]},t=>({value:`f32(${t.value})`,dataType:Te})),Te= exports.P =Object.assign(ge,{type:"f32"}),be=y(t=>{if(typeof t=="boolean")return t?1:0;let e=new ArrayBuffer(2);return _typedbinary2.default.f16.write(new _typedbinary2.default.BufferWriter(e),t),_typedbinary2.default.f16.read(new _typedbinary2.default.BufferReader(e))},t=>({value:`f16(${t.value})`,dataType:fe})),fe= exports.Q =Object.assign(be,{type:"f16"});var ct={type:"void",[l]:void 0},ve= exports.S =Symbol("Tag for struct schemas"),_e=["bool","f32","f16","i32","u32","vec2f","vec2h","vec2i","vec2u","vec2<bool>","vec3f","vec3h","vec3i","vec3u","vec3<bool>","vec4f","vec4h","vec4i","vec4u","vec4<bool>","mat2x2f","mat3x3f","mat4x4f","struct","array","ptr","atomic","decorated","abstractInt","abstractFloat","void"];function Ie(t){return _optionalChain([t, 'optionalAccess', _2 => _2.type, 'access', _3 => _3.startsWith, 'call', _4 => _4("vec2")])}function Ae(t){return _optionalChain([t, 'optionalAccess', _5 => _5.type, 'access', _6 => _6.startsWith, 'call', _7 => _7("vec3")])}function Se(t){return _optionalChain([t, 'optionalAccess', _8 => _8.type, 'access', _9 => _9.startsWith, 'call', _10 => _10("vec4")])}function lt(t){return Ie(t)||Ae(t)||Se(t)}function ke(t){return _optionalChain([t, 'optionalAccess', _11 => _11.type])==="mat2x2f"}function $e(t){return _optionalChain([t, 'optionalAccess', _12 => _12.type])==="mat3x3f"}function De(t){return _optionalChain([t, 'optionalAccess', _13 => _13.type])==="mat4x4f"}function xt(t){return ke(t)||$e(t)||De(t)}function wt(t){return _e.includes(_optionalChain([t, 'optionalAccess', _14 => _14.type]))}function dt(t){return _optionalChain([t, 'optionalAccess', _15 => _15.type])==="array"}function mt(t){return!!_optionalChain([t, 'optionalAccess', _16 => _16[ve]])}function zt(t){return _optionalChain([t, 'optionalAccess', _17 => _17.type])==="ptr"}function pt(t){return _optionalChain([t, 'optionalAccess', _18 => _18.type])==="atomic"}function Vt(t){return _optionalChain([t, 'optionalAccess', _19 => _19.type])==="@align"}function gt(t){return _optionalChain([t, 'optionalAccess', _20 => _20.type])==="@size"}function Tt(t){return _optionalChain([t, 'optionalAccess', _21 => _21.type])==="@location"}function bt(t){return _optionalChain([t, 'optionalAccess', _22 => _22.type])==="@interpolate"}function ft(t){return _optionalChain([t, 'optionalAccess', _23 => _23.type])==="@builtin"}function vt(t){return _optionalChain([t, 'optionalAccess', _24 => _24.type])==="decorated"}exports.a = M; exports.b = K; exports.c = q; exports.d = H; exports.e = J; exports.f = Q; exports.g = X; exports.h = ne; exports.i = Ne; exports.j = Me; exports.k = Be; exports.l = Re; exports.m = Y; exports.n = Z; exports.o = Le; exports.p = y; exports.q = l; exports.r = B; exports.s = re; exports.t = se; exports.u = ie; exports.v = he; exports.w = R; exports.x = ye; exports.y = ae; exports.z = oe; exports.A = ue; exports.B = F; exports.C = ce; exports.D = le; exports.E = xe; exports.F = we; exports.G = Ze; exports.H = et; exports.I = tt; exports.J = nt; exports.K = ht; exports.L = yt; exports.M = at; exports.N = ze; exports.O = Ve; exports.P = Te; exports.Q = fe; exports.R = ct; exports.S = ve; exports.T = Ie; exports.U = Ae; exports.V = lt; exports.W = ke; exports.X = $e; exports.Y = xt; exports.Z = wt; exports._ = dt; exports.$ = mt; exports.aa = zt; exports.ba = pt; exports.ca = Vt; exports.da = gt; exports.ea = Tt; exports.fa = bt; exports.ga = ft; exports.ha = vt;
4
- //# sourceMappingURL=chunk-VUYQ2ZIK.cjs.map