typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
41 lines • 40.9 kB
JavaScript
var l="0.6.0";var r=Symbol(`typegpu:${l}:$internal`),se=Symbol(`typegpu:${l}:$wgslDataType`),_t=Symbol(`typegpu:${l}:$gpuValueOf`),G=Symbol(`typegpu:${l}:$getNameForward`),At=Symbol(`typegpu:${l}:$providing`),ie=Symbol(`typegpu:${l}:$repr`),It=Symbol(`typegpu:${l}:$gpuRepr`),$t=Symbol(`typegpu:${l}:$reprPartial`),St=Symbol(`typegpu:${l}:$memIdent`);var W=globalThis.process.env.NODE_ENV==="development",ae=globalThis.process.env.NODE_ENV==="test";Object.assign(globalThis,{__TYPEGPU_AUTONAME__:(e,t)=>Ie(e)&&e?.[r]&&!f(e)?e.$name(t):e});var U=globalThis,Ft=(W||ae)&&{get enabled(){return!!U.__TYPEGPU_MEASURE_PERF__},record(e,t){let n=U.__TYPEGPU_PERF_RECORDS__??=new Map,s=n.get(e);s||(s=[],n.set(e,s)),s.push(t)}}||void 0;function Ae(e){return!!e?.[G]}function f(e){return Ae(e)?f(e[G]):$e(e)?.name}function oe(e,t){Se(e,{name:t})}function Ie(e){return!!e?.$name}function $e(e){return U.__TYPEGPU_META__.get(e)}function Se(e,t){U.__TYPEGPU_META__??=new WeakMap;let n=U.__TYPEGPU_META__;n.set(e,{...n.get(e),...t})}var Y="Invariant failed";function K(e,t){if(e)return;if(!W)throw new Error(Y);let n=typeof t=="function"?t():t,s=n?`${Y}: ${n}`:Y;throw new Error(s)}var he=class e extends Error{constructor(n,s){let i=s.map(a=>`- ${a}`);i.length>20&&(i=[...i.slice(0,11),"...",...i.slice(-10)]);super(`Resolution of the following tree failed:
${i.join(`
`)}: ${n&&typeof n=="object"&&"message"in n?n.message:n}`);this.cause=n;this.trace=s;Object.setPrototypeOf(this,e.prototype)}appendToTrace(n){let s=[n,...this.trace];return new e(this.cause,s)}},ue=class e extends Error{constructor(n){super(`Missing value for '${n}'`);this.slot=n;Object.setPrototypeOf(this,e.prototype)}},ye=class e extends Error{constructor(t){super(`Buffer '${f(t)??"<unnamed>"}' is not bindable as a uniform. Use .$usage('uniform') to allow it.`),Object.setPrototypeOf(this,e.prototype)}},ce=class e extends Error{constructor(t,n){super(`The function '${t??"<unnamed>"}' is missing links to the following external values: ${n}.`),Object.setPrototypeOf(this,e.prototype)}},le=class e extends Error{constructor(t){super(`Missing bind groups for layouts: '${[...t].map(n=>f(n)??"<unnamed>").join(", ")}'. Please provide it using pipeline.with(layout, bindGroup).(...)`),Object.setPrototypeOf(this,e.prototype)}},xe=class e extends Error{constructor(t){super(`Missing vertex buffers for layouts: '${[...t].map(n=>f(n)??"<unnamed>").join(", ")}'. Please provide it using pipeline.with(layout, buffer).(...)`),Object.setPrototypeOf(this,e.prototype)}};function Rt(e){return!!e?.[se]}var Wt={[r]:!0,type:"void"},ke=["bool","f32","f16","i32","u32","u16","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 De(e){let t=e;return!!t?.[r]&&typeof t.kind?.startsWith=="function"&&t.kind.startsWith("vec")}function Pe(e){let t=e;return!!t?.[r]&&typeof t.type?.startsWith=="function"&&t.type.startsWith?.("vec2")}function Ce(e){let t=e;return!!t?.[r]&&typeof t.type?.startsWith=="function"&&t.type.startsWith("vec3")}function Fe(e){let t=e;return!!t?.[r]&&typeof t.type?.startsWith=="function"&&t.type.startsWith("vec4")}function de(e){return Pe(e)||Ce(e)||Fe(e)}function Lt(e){let t=e;return!!t?.[r]&&typeof t.kind?.startsWith=="function"&&t.kind.startsWith("mat")}function Ee(e){return e?.[r]&&e?.type==="mat2x2f"}function Me(e){return e?.[r]&&e?.type==="mat3x3f"}function Ne(e){return e?.[r]&&e?.type==="mat4x4f"}function jt(e){return Ee(e)||Me(e)||Ne(e)}function Ot(e){return De(e)&&["vec2f","vec3f","vec4f"].includes(e.kind)}function we(e){return e?.[r]&&ke.includes(e?.type)}function Gt(e){return e?.[r]&&e?.type==="array"}function Yt(e){return e?.[r]&&e?.type==="struct"}function Kt(e){return e?.[r]&&e?.type==="ptr"}function Ht(e){return e?.[r]&&e?.type==="atomic"}function pe(e){return e?.[r]&&e?.type==="@align"}function me(e){return e?.[r]&&e?.type==="@size"}function ge(e){return e?.[r]&&e?.type==="@location"}function Xt(e){return e?.[r]&&e?.type==="@interpolate"}function Zt(e){return e?.[r]&&e?.type==="@builtin"}function Te(e){return e?.[r]&&e?.type==="decorated"}function Jt(e){return e?.[r]&&e.type==="void"}var be=["uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10-10-10-2","unorm8x4-bgra"],qt={f32:"float32",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",f16:"float16",vec2h:"float16x2",vec4h:"float16x4",u32:"uint32",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",i32:"sint32",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4"};var Be=["unstruct","disarray","loose-decorated",...be];function Re(e){return e?.[r]&&Be.includes(e?.type)}function nn(e){return e?.[r]&&e?.type==="disarray"}function rn(e){return e?.[r]&&e?.type==="unstruct"}function sn(e){return e?.[r]&&e?.type==="loose-decorated"}function an(e){return e.attribs?.find(pe)?.value}function on(e){return e.attribs?.find(me)?.value}function hn(e){return e.attribs?.find(ge)?.value}function un(e){return we(e)||Re(e)}var yn={type:"unknown",toString(){return"unknown"}},L=class{constructor(t,n){this.value=t;this.dataType=n}};function u(e,t){return new L(e,t.type==="decorated"||t.type==="loose-decorated"?t.inner:t)}function cn(e){return e instanceof L}var j=null,We=Symbol("CPU"),Le=Symbol("GPU"),je={CPU:We,GPU:Le},B=[];function dn(e,t){K(j===null,"Cannot nest context providers"),j=e;try{return t()}finally{j=null}}function wn(){return j}function pn(e){B.push(e)}function mn(e){let t=B.pop();e!==void 0&&K(t===e,"Unexpected mode")}var fe=()=>B.length>0&&B[B.length-1]===je.GPU;function*zn(e){let t=0;for(;;)e.has(t)||(yield t),t++}function o(e,t,n,s){let i=(...a)=>fe()?t(...a):e(...a);return i[r]={implementation:e,argTypes:s},oe(i,n),i}var In={[r]:!0,type:"abstractInt"},$n={[r]:!0,type:"abstractFloat"},Oe=o(e=>e===void 0?!1:typeof e=="boolean"?e:!!e,e=>u(`bool(${e?.value??""})`,x),"boolCast"),x=Object.assign(Oe,{type:"bool"}),Ge=o(e=>e===void 0?0:typeof e=="boolean"?e?1:0:(e&4294967295)>>>0,e=>u(`u32(${e?.value??""})`,d),"u32Cast"),d=Object.assign(Ge,{type:"u32"}),Ye=o(e=>e===void 0?0:typeof e=="boolean"?e?1:0:e|0,e=>u(`i32(${e?.value??""})`,w),"i32Cast"),Sn={[r]:!0,type:"u16"},w=Object.assign(Ye,{type:"i32"}),Ke=o(e=>e===void 0?0:typeof e=="boolean"?e?1:0:Math.fround(e),e=>u(`f32(${e?.value??""})`,p),"f32Cast"),p=Object.assign(Ke,{type:"f32"}),ze=new ArrayBuffer(4),He=new Float32Array(ze),Xe=new Uint32Array(ze);function Ze(e){He[0]=e;let t=Xe[0],n=t>>>31&1,s=t>>>23&255,i=t&8388607;return s===255?n<<15|31744|(i?512:0):(s=s-127+15,s<=0?s<-10?n<<15:(i=(i|8388608)>>1-s,i=i+4096>>13,n<<15|i):s>=31||(i=i+4096,i&8388608&&(i=0,++s,s>=31))?n<<15|31744:n<<15|s<<10|i>>13)}function Je(e){let t=e&32768?-1:1,n=e>>10&31,s=e&1023;return n===0?s?t*s*2**-24:t*0:n===31?s?Number.NaN:t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t*(1+s/1024)*2**(n-15)}function qe(e){return Je(Ze(e))}var Qe=o(e=>e===void 0?0:typeof e=="boolean"?e?1:0:qe(e),e=>u(`f16(${e?.value??""})`,m),"f16Cast"),m=Object.assign(Qe,{type:"f16"});var R=class extends Array{[r]=!0;"~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])}},g=class extends R{e0;e1;constructor(t,n){super(2),this.e0=this.getElementSchema()(t),this.e1=this.getElementSchema()(n??t)}get 0(){return this.e0}get 1(){return this.e1}set 0(t){this.e0=this.getElementSchema()(t)}set 1(t){this.e1=this.getElementSchema()(t)}get x(){return this[0]}get y(){return this[1]}set x(t){this[0]=this.getElementSchema()(t)}set y(t){this[1]=this.getElementSchema()(t)}},T=class extends R{e0;e1;e2;constructor(t,n,s){super(3),this.e0=this.getElementSchema()(t),this.e1=this.getElementSchema()(n??t),this.e2=this.getElementSchema()(s??t)}get 0(){return this.e0}get 1(){return this.e1}get 2(){return this.e2}set 0(t){this.e0=this.getElementSchema()(t)}set 1(t){this.e1=this.getElementSchema()(t)}set 2(t){this.e2=this.getElementSchema()(t)}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=this.getElementSchema()(t)}set y(t){this[1]=this.getElementSchema()(t)}set z(t){this[2]=this.getElementSchema()(t)}},b=class extends R{e0;e1;e2;e3;constructor(t,n,s,i){super(4),this.e0=this.getElementSchema()(t),this.e1=this.getElementSchema()(n??t),this.e2=this.getElementSchema()(s??t),this.e3=this.getElementSchema()(i??t)}get 0(){return this.e0}get 1(){return this.e1}get 2(){return this.e2}get 3(){return this.e3}set 0(t){this.e0=this.getElementSchema()(t)}set 1(t){this.e1=this.getElementSchema()(t)}set 2(t){this.e2=this.getElementSchema()(t)}set 3(t){this.e3=this.getElementSchema()(t)}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set w(t){this[3]=t}},z=class e extends g{getElementSchema(){return p}get kind(){return"vec2f"}get _Vec2(){return e}get _Vec3(){return I}get _Vec4(){return P}},V=class e extends g{getElementSchema(){return m}get kind(){return"vec2h"}get _Vec2(){return e}get _Vec3(){return $}get _Vec4(){return C}},v=class e extends g{getElementSchema(){return w}get kind(){return"vec2i"}get _Vec2(){return e}get _Vec3(){return S}get _Vec4(){return F}},_=class e extends g{getElementSchema(){return d}get kind(){return"vec2u"}get _Vec2(){return e}get _Vec3(){return k}get _Vec4(){return E}},A=class e extends g{getElementSchema(){return x}get kind(){return"vec2<bool>"}get _Vec2(){return e}get _Vec3(){return D}get _Vec4(){return M}},I=class e extends T{getElementSchema(){return p}get kind(){return"vec3f"}get _Vec2(){return z}get _Vec3(){return e}get _Vec4(){return P}},$=class e extends T{getElementSchema(){return m}get kind(){return"vec3h"}get _Vec2(){return V}get _Vec3(){return e}get _Vec4(){return C}},S=class e extends T{getElementSchema(){return w}get kind(){return"vec3i"}get _Vec2(){return v}get _Vec3(){return e}get _Vec4(){return F}},k=class e extends T{getElementSchema(){return d}get kind(){return"vec3u"}get _Vec2(){return _}get _Vec3(){return e}get _Vec4(){return E}},D=class e extends T{getElementSchema(){return x}get kind(){return"vec3<bool>"}get _Vec2(){return A}get _Vec3(){return e}get _Vec4(){return M}},P=class e extends b{getElementSchema(){return p}get kind(){return"vec4f"}get _Vec2(){return z}get _Vec3(){return I}get _Vec4(){return e}},C=class e extends b{getElementSchema(){return m}get kind(){return"vec4h"}get _Vec2(){return V}get _Vec3(){return $}get _Vec4(){return e}},F=class e extends b{getElementSchema(){return w}get kind(){return"vec4i"}get _Vec2(){return v}get _Vec3(){return S}get _Vec4(){return e}},E=class e extends b{getElementSchema(){return d}get kind(){return"vec4u"}get _Vec2(){return _}get _Vec3(){return k}get _Vec4(){return e}},M=class e extends b{getElementSchema(){return x}get kind(){return"vec4<bool>"}get _Vec2(){return A}get _Vec3(){return D}get _Vec4(){return e}};var H=h(z),et=h(V),tt=h(v),nt=h(_),rt=h(A),X=h(I),st=h($),it=h(S),at=h(k),ot=h(D),Z=h(P),ht=h(C),ut=h(F),yt=h(E),ct=h(M),lt={vec2f:H,vec2h:et,vec2i:tt,vec2u:nt,"vec2<bool>":rt,vec3f:X,vec3h:st,vec3i:it,vec3u:at,"vec3<bool>":ot,vec4f:Z,vec4h:ht,vec4i:ut,vec4u:yt,"vec4<bool>":ct},xt={vec2f:p,vec2h:m,vec2i:w,vec2u:d,"vec2<bool>":x,vec3f:p,vec3h:m,vec3i:w,vec3u:d,"vec3<bool>":x,vec4f:p,vec4h:m,vec4i:w,vec4u:d,"vec4<bool>":x};function h(e){let{kind:t,length:n}=new e,s=o((...i)=>{let a=new Array(i.length),y=0;for(let N of i)if(typeof N=="number"||typeof N=="boolean")a[y++]=N;else for(let O=0;O<N.length;++O)a[y++]=N[O];if(a.length<=1||a.length===n)return new e(...a);throw new Error(`'${t}' constructor called with invalid number of arguments.`)},(...i)=>u(`${t}(${i.map(a=>a.value).join(", ")})`,lt[t]),t,(...i)=>i.map(a=>{let y=a.dataType;return Te(y)&&(y=y.inner),de(y)?y:xt[t]}));return Object.assign(s,{type:t,[ie]:void 0})}function re(e){let t={[r]:!0,type:e.type,identity:mt[e.columns],translation:e.columns===4?gt:void 0,scaling:e.columns===4?Tt:void 0,rotationX:e.columns===4?bt:void 0,rotationY:e.columns===4?ft:void 0,rotationZ:e.columns===4?zt:void 0},n=o((...s)=>{let i=[];for(let a of s)if(typeof a=="number")i.push(a);else for(let y=0;y<a.length;++y)i.push(a[y]);if(i.length!==0&&i.length!==e.columns*e.rows)throw new Error(`'${e.type}' constructor called with invalid number of arguments.`);for(let a=i.length;a<e.columns*e.rows;++a)i.push(0);return e.makeFromElements(...i)},(...s)=>u(`${t.type}(${s.map(i=>i.value).join(", ")})`,t),t.type);return Object.assign(n,t)}var J=class{[r]=!0;columns;length=4;constructor(...t){this.columns=[this.makeColumn(t[0],t[1]),this.makeColumn(t[2],t[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(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[1].x=t}set 3(t){this.columns[1].y=t}*[Symbol.iterator](){yield this[0],yield this[1],yield this[2],yield this[3]}"~resolve"(){return`${this.kind}(${Array.from({length:this.length}).map((t,n)=>this[n]).join(", ")})`}},q=class extends J{kind="mat2x2f";makeColumn(t,n){return H(t,n)}},Q=class{[r]=!0;columns;length=12;constructor(...t){this.columns=[this.makeColumn(t[0],t[1],t[2]),this.makeColumn(t[3],t[4],t[5]),this.makeColumn(t[6],t[7],t[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(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[0].z=t}set 3(t){}set 4(t){this.columns[1].x=t}set 5(t){this.columns[1].y=t}set 6(t){this.columns[1].z=t}set 7(t){}set 8(t){this.columns[2].x=t}set 9(t){this.columns[2].y=t}set 10(t){this.columns[2].z=t}set 11(t){}*[Symbol.iterator](){for(let t=0;t<12;t++)yield this[t]}"~resolve"(){return`${this.kind}(${this[0]}, ${this[1]}, ${this[2]}, ${this[4]}, ${this[5]}, ${this[6]}, ${this[8]}, ${this[9]}, ${this[10]})`}},ee=class extends Q{kind="mat3x3f";makeColumn(t,n,s){return X(t,n,s)}},te=class{[r]=!0;columns;constructor(...t){this.columns=[this.makeColumn(t[0],t[1],t[2],t[3]),this.makeColumn(t[4],t[5],t[6],t[7]),this.makeColumn(t[8],t[9],t[10],t[11]),this.makeColumn(t[12],t[13],t[14],t[15])]}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(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[0].z=t}set 3(t){this.columns[0].w=t}set 4(t){this.columns[1].x=t}set 5(t){this.columns[1].y=t}set 6(t){this.columns[1].z=t}set 7(t){this.columns[1].w=t}set 8(t){this.columns[2].x=t}set 9(t){this.columns[2].y=t}set 10(t){this.columns[2].z=t}set 11(t){this.columns[2].w=t}set 12(t){this.columns[3].x=t}set 13(t){this.columns[3].y=t}set 14(t){this.columns[3].z=t}set 15(t){this.columns[3].w=t}*[Symbol.iterator](){for(let t=0;t<16;t++)yield this[t]}"~resolve"(){return`${this.kind}(${Array.from({length:this.length}).map((t,n)=>this[n]).join(", ")})`}},ne=class extends te{kind="mat4x4f";makeColumn(t,n,s,i){return Z(t,n,s,i)}},dt=o(()=>Ve(1,0,0,1),()=>({value:`mat4x4f(
1.0, 0.0,
0.0, 1.0
)`,dataType:Ve}),"identity2"),wt=o(()=>ve(1,0,0,0,1,0,0,0,1),()=>({value:`mat4x4f(
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0,
)`,dataType:ve}),"identity3"),pt=o(()=>c(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),()=>({value:`mat4x4f(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
)`,dataType:c}),"identity4"),mt={2:dt,3:wt,4:pt},gt=o(e=>c(1,0,0,0,0,1,0,0,0,0,1,0,e.x,e.y,e.z,1),e=>({value:`mat4x4f(
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
${e.value}.x, ${e.value}.y, ${e.value}.z, 1
)`,dataType:c}),"translation4"),Tt=o(e=>c(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1),e=>({value:`mat4x4f(
${e.value}.x, 0, 0, 0,
0, ${e.value}.y, 0, 0,
0, 0, ${e.value}.z, 0,
0, 0, 0, 1
)`,dataType:c}),"scaling4"),bt=o(e=>c(1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1),e=>u(`mat4x4f(
1, 0, 0, 0,
0, cos(${e.value}), sin(${e.value}), 0,
0, -sin(${e.value}), cos(${e.value}), 0,
0, 0, 0, 1
)`,c),"rotationX4"),ft=o(e=>c(Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1),e=>u(`mat4x4f(
cos(${e.value}), 0, -sin(${e.value}), 0,
0, 1, 0, 0,
sin(${e.value}), 0, cos(${e.value}), 0,
0, 0, 0, 1
)`,c),"rotationY4"),zt=o(e=>c(Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1,0,0,0,0,1),e=>u(`mat4x4f(
cos(${e.value}), sin(${e.value}), 0, 0,
-sin(${e.value}), cos(${e.value}), 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
)`,c),"rotationZ4"),Ve=re({type:"mat2x2f",rows:2,columns:2,makeFromElements:(...e)=>new q(...e)}),ve=re({type:"mat3x3f",rows:3,columns:3,makeFromElements:(...e)=>new ee(...e)}),c=re({type:"mat4x4f",rows:4,columns:4,makeFromElements:(...e)=>new ne(...e)});function Gn(e){return e.kind==="mat3x3f"?[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]]:Array.from({length:e.length}).map((t,n)=>e[n])}function Hn(e){return{[r]:!0,type:"ptr",inner:e,addressSpace:"function",access:"read-write"}}function Xn(e){return{[r]:!0,type:"ptr",inner:e,addressSpace:"private",access:"read-write"}}function Zn(e){return{[r]:!0,type:"ptr",inner:e,addressSpace:"workgroup",access:"read-write"}}function Jn(e,t="read"){return{[r]:!0,type:"ptr",inner:e,addressSpace:"storage",access:t}}function qn(e){return{[r]:!0,type:"ptr",inner:e,addressSpace:"uniform",access:"read"}}function Qn(e){return{[r]:!0,type:"ptr",inner:e,addressSpace:"handle",access:"read"}}export{r as a,se as b,_t as c,G as d,At as e,ie as f,It as g,Ft as h,f as i,oe as j,Ie as k,$e as l,K as m,he as n,ue as o,ye as p,ce as q,le as r,xe as s,je as t,dn as u,wn as v,pn as w,mn as x,fe as y,be as z,qt as A,Rt as B,Wt as C,De as D,Pe as E,Ce as F,de as G,Lt as H,Ee as I,Me as J,jt as K,Ot as L,we as M,Gt as N,Yt as O,Kt as P,Ht as Q,pe as R,me as S,ge as T,Xt as U,Zt as V,Te as W,Jt as X,Re as Y,nn as Z,rn as _,sn as $,an as aa,on as ba,hn as ca,un as da,yn as ea,u as fa,cn as ga,zn as ha,o as ia,In as ja,$n as ka,x as la,d as ma,Sn as na,w as oa,p as pa,m as qa,H as ra,et as sa,tt as ta,nt as ua,rt as va,X as wa,st as xa,it as ya,at as za,ot as Aa,Z as Ba,ht as Ca,ut as Da,yt as Ea,ct as Fa,xt as Ga,dt as Ha,wt as Ia,pt as Ja,gt as Ka,Tt as La,bt as Ma,ft as Na,zt as Oa,Ve as Pa,ve as Qa,c as Ra,Gn as Sa,Hn as Ta,Xn as Ua,Zn as Va,Jn as Wa,qn as Xa,Qn as Ya};
//# sourceMappingURL=chunk-APTRHY5Y.js.map