@hology/core 0.0.267 → 0.0.268

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.
@@ -27,6 +27,29 @@ export declare class StandardShader extends Shader {
27
27
  anisotropyRotation?: number;
28
28
  anisotropyMap?: Sampler2DNode;
29
29
  anisotropy?: number;
30
+ ior: number;
31
+ specularIntensity: number;
32
+ specularIntensityMap?: Sampler2DNode;
33
+ specularColor: Color;
34
+ specularColorMap?: Sampler2DNode;
35
+ clearcoat: number;
36
+ clearcoatMap?: Sampler2DNode;
37
+ clearcoatRoughness: number;
38
+ clearcoatRoughnessMap?: Sampler2DNode;
39
+ clearcoatNormalMap?: Sampler2DNode;
40
+ clearcoatNormalScale: Vector2;
41
+ iridescence: number;
42
+ iridescenceMap?: Sampler2DNode;
43
+ iridescenceIOR: number;
44
+ iridescenceThicknessRange: Vector2;
45
+ iridescenceThicknessMap?: Sampler2DNode;
46
+ transmission: number;
47
+ transmissionMap?: Sampler2DNode;
48
+ thickness: number;
49
+ thicknessMap?: Sampler2DNode;
50
+ attenuationColor: Color;
51
+ attenuationDistance: number;
52
+ dispersion: number;
30
53
  envMap?: Texture;
31
54
  envMapIntensity?: number;
32
55
  heightMap?: Sampler2DNode;
@@ -1,4 +1,4 @@
1
- import{__decorate as e,__metadata as a}from"tslib";import{Color as t,MeshStandardMaterial as n,Texture as r,Vector2 as i}from"three";import{Shader as s}from"../shader.js";import{Parameter as o}from"../parameter.js";import*as p from"three";import{attributes as l,AttributeVec3Node as d,colorToNormal as h,ifDefApply as m,NodeShaderMaterial as u,normalize as v,Sampler2DNode as c,standardMaterial as y,UniformSampler2d as S,uniformFloat as g,uniformVec2 as f,uniformVec3 as M,varying as x,varyingAttributes as C,varyingTransformed as b,vec2 as w,UniformVec3Node as O,UniformFloatNode as R}from"three-shader-graph";import{parallaxOcclusionMapping as T}from"../../shader-nodes/pom.js";import{createPlaceholderTexture as L}from"../../utils/three/placeholder-texture.js";const N=L(),B=new i(1,1);export class StandardShader extends s{constructor(){super(...arguments),this.color=new t("#FFFFFF"),this.map=new S("map",N),this.opacity=1,this.alphaMap=new S("alphaMap",N),this.roughness=1,this.roughnessMap=new S("roughnessMap",N),this.metalness=0,this.metalnessMap=new S("metalnessMap",N),this.lightMap=new S("lightMap",N),this.aoMap=new S("aoMap",N),this.emissiveMap=new S("emissiveMap",N),this.normalMap=new S("normalMap",N),this.normalScale=new i(1,1),this.sheen=0,this.sheenColor=new t("#FFFFFF"),this.sheenColorMap=new S("sheenColorMap",N),this.sheenRoughness=.5,this.sheenRoughnessMap=new S("sheenRoughnessMap",N),this.anisotropyMap=new S("anisotropyMap",N),this.anisotropy=0,this.heightMap=new S("heightMap",N),this.vertexColor=!1,this.uvScale=B}build(){P(this.map,p.SRGBColorSpace),P(this.alphaMap,p.LinearSRGBColorSpace),P(this.roughnessMap,p.LinearSRGBColorSpace),P(this.metalnessMap,p.LinearSRGBColorSpace),P(this.aoMap,p.LinearSRGBColorSpace),P(this.emissiveMap,p.SRGBColorSpace),P(this.normalMap,p.LinearSRGBColorSpace),P(this.sheenColorMap,p.LinearSRGBColorSpace),P(this.sheenRoughnessMap,p.LinearSRGBColorSpace),P(this.anisotropyMap,p.LinearSRGBColorSpace);let e=!1;const a=f("uvScale",this.uvScale??B);let n=C.uv.multiply(a);F(this.heightMap)&&0!==(this.heightScale??.05)&&(n=T(n,this.heightMap,g("heightScale",this.heightScale??.05)));const r=x(new d("particleData"));let s=m("IS_PARTICLE",new R("opacity",this.opacity,void 0,!1),e=>e.multiply(r.x)),o=new O("color",(new p.Vector3).setFromColor(this.color),void 0,!1).rgb;if(F(this.map)){const e=this.map.sample(n);o=o.multiply(e.rgb),s=s.multiply(e.a)}F(this.alphaMap)&&(s=s.multiply(this.alphaMap.sample(n).r)),!0===this.vertexColor&&(o=o.multiply(x(l.color.rgb)));let c=null,S=null;F(this.aoMap)&&(S=g("aoMapIntensity",this.aoMapIntensity??1),c=this.aoMap.sample(n).r);let L=g("roughness",this.roughness??1);F(this.roughnessMap)&&(L=L.multiply(this.roughnessMap.sample(n).g),e=!0);let N=g("metalness",this.metalness??0);F(this.metalnessMap)&&(N=N.multiply(this.metalnessMap.sample(n).b),e=!0);let D=null;F(this.lightMap)&&(D=this.lightMap.sample(n).rgb.multiplyScalar(g("lightMapIntensity",this.lightMapIntensity??1)));let _=M("emissive",(new p.Vector3).setFromColor(this.emissive??new t(0))).rgb;F(this.emissiveMap)&&(_=_.multiply(this.emissiveMap.sample(n).rgb));const I=g("emissiveIntensity",this.emissiveIntensity??1);let E=b.normal;if(F(this.normalMap)){const e=g("normalScale",this.normalScale?.x??1);E=h(this.normalMap.sample(n),e)}let V=null,G=null;if((this.sheen??0)>0){const e=g("sheen",this.sheen??0);V=M("sheenColor",(new p.Vector3).setFromColor(this.sheenColor??new t(16777215))).rgb.multiplyScalar(e),F(this.sheenColorMap)&&(V=V.multiply(this.sheenColorMap.sample(n).rgb)),G=g("sheenRoughness",this.sheenRoughness??.5),F(this.sheenRoughnessMap)&&(G=G.multiply(this.sheenRoughnessMap.sample(n).a))}(this.roughness<1||this.metalness>0)&&(e=!0);let H=null,A=null;if((this.anisotropy??0)>0&&(H=g("anisotropy",this.anisotropy??0),A=f("anisotropyDirection",(U=this.anisotropyRotation??0,new i(Math.cos(U),Math.sin(U)))),F(this.anisotropyMap))){const e=this.anisotropyMap.sample(n),a=v(w(e.r,e.g).multiplyScalar(2).subtract(w(1,1)));A=w(A.x.multiply(a.x).subtract(A.y.multiply(a.y)),A.y.multiply(a.x).add(A.x.multiply(a.y))),H=H.multiply(e.b)}var U;const z=new u({color:y({color:o.rgba(s),roughness:L,metalness:N,ambientOcclusion:c,ambientOcclusionIntensity:S,emissive:_,emissiveIntensity:I,normal:E,bakedLight:D,sheenColor:V,sheenRoughness:G,anisotropy:H,anisotropyDirection:A,specular:e}),opacity:s,roughness:L,normal:E,emissive:_.multiplyScalar(I),envMap:this.envMap,alphaTest:this.alphaTest});return null!=this.envMap&&(z.uniforms.envMapIntensity={value:this.envMapIntensity??1}),z.vertexColors=!0===this.vertexColor,z}}function F(e){return null!=e&&(!(e instanceof S)||null!=e.value&&e.value!==N)}e([o(),a("design:type",t)],StandardShader.prototype,"color",void 0),e([o({label:"Color Map"}),a("design:type",c)],StandardShader.prototype,"map",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"opacity",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"alphaMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"roughness",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"roughnessMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"metalness",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"metalnessMap",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"lightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"lightMapIntensity",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"aoMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"aoMapIntensity",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"emissive",void 0),e([o({range:[0,10]}),a("design:type",Number)],StandardShader.prototype,"emissiveIntensity",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"emissiveMap",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"normalMap",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"normalScale",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"sheen",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"sheenColor",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"sheenColorMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"sheenRoughness",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"sheenRoughnessMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"anisotropyRotation",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"anisotropyMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"anisotropy",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"envMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"envMapIntensity",void 0),e([o(),a("design:type",c)],StandardShader.prototype,"heightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"heightScale",void 0),e([o(),a("design:type",Boolean)],StandardShader.prototype,"vertexColor",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"uvScale",void 0);export var ParallaxType;!function(e){e[e.none=0]="none",e[e.offset=1]="offset",e[e.pom=2]="pom"}(ParallaxType||(ParallaxType={}));export class ParallaxStandardMaterial extends n{constructor(e={}){super(e),e.heightMap&&(this.heightMap=e.heightMap),this.heightScale=e.heightScale??.05,this.parallaxType=e.parallaxType??ParallaxType.pom,this.minLayers=e.minLayers??10,this.maxLayers=e.maxLayers??32}onBeforeCompile(e){e.uniforms.heightMap={value:this.heightMap},e.uniforms.heightScale={value:this.heightScale},e.uniforms.minLayers={value:this.minLayers},e.uniforms.maxLayers={value:this.maxLayers},e.uniforms.parallaxType={value:this.parallaxType},e.vertexTangents=!0,e.vertexShader=e.vertexShader.replace("#include <uv_pars_vertex>","\n #include <uv_pars_vertex>\n "),e.vertexShader=e.vertexShader.replace("#include <begin_vertex>","\n #include <begin_vertex>\n "),e.fragmentShader=e.fragmentShader.replace("#include <uv_pars_fragment>","\n #include <uv_pars_fragment>\n uniform sampler2D heightMap;\n uniform float heightScale;\n uniform int minLayers;\n uniform int maxLayers;\n uniform int parallaxType;\n\n vec2 parallaxOffset(vec2 uv, vec3 viewDir, vec3 normal) {\n // Compute TBN in fragment shader using screen-space derivatives\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uv);\n vec2 duv2 = dFdy(uv);\n \n vec3 dp2perp = cross(dp2, normal);\n vec3 dp1perp = cross(normal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n \n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 tbn = mat3(T * invmax, B * invmax, normal);\n vec3 viewDirTS = -viewDir * tbn;\n\n float h = texture(heightMap, uv).r;\n return uv - (viewDirTS.xy / viewDirTS.z) * (h * heightScale);\n }\n\n vec2 parallaxOcclusion2(vec2 uv, vec3 viewDir, vec3 normal) {\n // Compute TBN in fragment shader using screen-space derivatives\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uv);\n vec2 duv2 = dFdy(uv);\n \n vec3 dp2perp = cross(dp2, normal);\n vec3 dp1perp = cross(normal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n \n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 tbn = mat3(T * invmax, B * invmax, normal);\n vec3 vv = -viewDir * tbn;\n\n float parallaxLimit = -length(vv.xy) / vv.z;\n parallaxLimit *= heightScale;\n\n vec2 vOffsetDir = normalize(vv.xy);\n vec2 vMaxOffset = vOffsetDir * parallaxLimit;\n\n float factor = pow(1.0 - abs(vv.z), 2.0);\n float nNumSamples = mix(float(minLayers), float(maxLayers), factor);\n float fStepSize = 1.0 / nNumSamples;\n\n float fCurrRayHeight = 1.0;\n vec2 vCurrOffset = vec2(0.0);\n vec2 vLastOffset = vec2(0.0);\n float fLastSampledHeight = 1.0;\n float fCurrSampledHeight = 1.0;\n\n for (int nCurrSample = 0; nCurrSample < 128; nCurrSample++) {\n if (float(nCurrSample) > nNumSamples) break;\n\n fCurrSampledHeight = texture2D(heightMap, uv + vCurrOffset).r;\n if (fCurrSampledHeight > fCurrRayHeight) {\n float delta1 = fCurrSampledHeight - fCurrRayHeight;\n float delta2 = (fCurrRayHeight + fStepSize) - fLastSampledHeight;\n float ratio = delta1 / (delta1 + delta2);\n vCurrOffset = ratio * vLastOffset + (1.0 - ratio) * vCurrOffset;\n break;\n } else {\n fCurrRayHeight -= fStepSize;\n vLastOffset = vCurrOffset;\n vCurrOffset += fStepSize * vMaxOffset;\n fLastSampledHeight = fCurrSampledHeight;\n }\n }\n\n return uv + vCurrOffset;\n }\n "),e.fragmentShader=e.fragmentShader.replace("#include <map_fragment>","\n vec3 pomViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n vec2 uvPOM = vMapUv ;\n if (parallaxType == 1) {\n uvPOM = parallaxOffset(vMapUv, pomViewDir, vNormal);\n } else if (parallaxType == 2) {\n uvPOM = parallaxOcclusion2(vMapUv, pomViewDir, vNormal);\n }\n\n vec4 texelColor = texture2D(map, uvPOM);\n diffuseColor *= texelColor;\n "),e.fragmentShader=e.fragmentShader.replace("#include <normal_fragment_maps>","\n #ifdef USE_NORMALMAP\n // RE-COMPUTE TBN for normal mapping consistency\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uvPOM);\n vec2 duv2 = dFdy(uvPOM);\n vec3 dp2perp = cross(dp2, vNormal);\n vec3 dp1perp = cross(vNormal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 localTBN = mat3(T * invmax, B * invmax, vNormal);\n\n vec3 mapN = texture2D(normalMap, uvPOM).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( localTBN * mapN );\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <roughnessmap_fragment>","\n float roughnessFactor = roughness;\n #ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, uvPOM );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <metalnesssmap_fragment>","\n float metalnessFactor = metalness;\n #ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, uvPOM );\n // reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n metalnessFactor *= texelMetalness.b;\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <aomap_fragment>","\n #ifdef USE_AOMAP\n\n // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n float ambientOcclusion = ( texture2D( aoMap, uvPOM ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\n #endif\n\n #endif\n "),this.userData.shader=e}clone(){const e=super.clone();return e.heightMap=this.heightMap,e.heightScale=this.heightScale,e.parallaxType=this.parallaxType,e.minLayers=this.minLayers,e.maxLayers=this.maxLayers,e}}export function applyTiling(e,a){if(null==e||null==a)return e;if(1===a.x&&1===a.y)return e;const t=e.clone();return t.repeat.copy(a),t.needsUpdate=!0,t}function P(e,a){null!=e&&(e instanceof r?e.colorSpace=a:e instanceof S&&null!=e.value&&(e.value.colorSpace=a))}/*
1
+ import{__decorate as e,__metadata as a}from"tslib";import{Color as t,MeshStandardMaterial as n,Texture as r,Vector2 as i}from"three";import{Shader as s}from"../shader.js";import{Parameter as o}from"../parameter.js";import*as p from"three";import{attributes as l,AttributeVec3Node as d,colorToNormal as h,ifDefApply as c,NodeShaderMaterial as u,normalize as m,mix as v,Sampler2DNode as y,standardMaterial as S,UniformSampler2d as g,uniformFloat as M,uniformVec2 as f,uniformVec3 as x,varying as C,varyingAttributes as b,varyingTransformed as w,vec2 as R,vec3 as N,UniformVec3Node as T,UniformFloatNode as O}from"three-shader-graph";import{transmissionSceneSampler as F}from"../../shader-nodes/scene-sample.js";import{parallaxOcclusionMapping as L}from"../../shader-nodes/pom.js";import{createPlaceholderTexture as I}from"../../utils/three/placeholder-texture.js";const B=I(),D=new i(1,1);export class StandardShader extends s{constructor(){super(...arguments),this.color=new t("#FFFFFF"),this.map=new g("map",B),this.opacity=1,this.alphaMap=new g("alphaMap",B),this.roughness=1,this.roughnessMap=new g("roughnessMap",B),this.metalness=0,this.metalnessMap=new g("metalnessMap",B),this.lightMap=new g("lightMap",B),this.aoMap=new g("aoMap",B),this.emissiveMap=new g("emissiveMap",B),this.normalMap=new g("normalMap",B),this.normalScale=new i(1,1),this.sheen=0,this.sheenColor=new t("#FFFFFF"),this.sheenColorMap=new g("sheenColorMap",B),this.sheenRoughness=.5,this.sheenRoughnessMap=new g("sheenRoughnessMap",B),this.anisotropyMap=new g("anisotropyMap",B),this.anisotropy=0,this.ior=1.5,this.specularIntensity=1,this.specularIntensityMap=new g("specularIntensityMap",B),this.specularColor=new t("#FFFFFF"),this.specularColorMap=new g("specularColorMap",B),this.clearcoat=0,this.clearcoatMap=new g("clearcoatMap",B),this.clearcoatRoughness=0,this.clearcoatRoughnessMap=new g("clearcoatRoughnessMap",B),this.clearcoatNormalMap=new g("clearcoatNormalMap",B),this.clearcoatNormalScale=new i(1,1),this.iridescence=0,this.iridescenceMap=new g("iridescenceMap",B),this.iridescenceIOR=1.3,this.iridescenceThicknessRange=new i(100,400),this.iridescenceThicknessMap=new g("iridescenceThicknessMap",B),this.transmission=0,this.transmissionMap=new g("transmissionMap",B),this.thickness=0,this.thicknessMap=new g("thicknessMap",B),this.attenuationColor=new t("#FFFFFF"),this.attenuationDistance=1/0,this.dispersion=0,this.heightMap=new g("heightMap",B),this.vertexColor=!1,this.uvScale=D}build(){k(this.map,p.SRGBColorSpace),k(this.alphaMap,p.LinearSRGBColorSpace),k(this.roughnessMap,p.LinearSRGBColorSpace),k(this.metalnessMap,p.LinearSRGBColorSpace),k(this.aoMap,p.LinearSRGBColorSpace),k(this.emissiveMap,p.SRGBColorSpace),k(this.normalMap,p.LinearSRGBColorSpace),k(this.sheenColorMap,p.SRGBColorSpace),k(this.sheenRoughnessMap,p.LinearSRGBColorSpace),k(this.anisotropyMap,p.LinearSRGBColorSpace),k(this.specularColorMap,p.SRGBColorSpace);for(const e of[this.specularIntensityMap,this.clearcoatMap,this.clearcoatRoughnessMap,this.clearcoatNormalMap,this.iridescenceMap,this.iridescenceThicknessMap,this.transmissionMap,this.thicknessMap])k(e,p.LinearSRGBColorSpace);let e=!1;const a=f("uvScale",this.uvScale??D);let n=b.uv.multiply(a);P(this.heightMap)&&0!==(this.heightScale??.05)&&(n=L(n,this.heightMap,M("heightScale",this.heightScale??.05)));const r=C(new d("particleData"));let s=c("IS_PARTICLE",new O("opacity",this.opacity,void 0,!1),e=>e.multiply(r.x)),o=new T("color",(new p.Vector3).setFromColor(this.color),void 0,!1).rgb;if(P(this.map)){const e=this.map.sample(n);o=o.multiply(e.rgb),s=s.multiply(e.a)}P(this.alphaMap)&&(s=s.multiply(this.alphaMap.sample(n).r)),!0===this.vertexColor&&(o=o.multiply(C(l.color.rgb)));let y=null,g=null;P(this.aoMap)&&(g=M("aoMapIntensity",this.aoMapIntensity??1),y=this.aoMap.sample(n).r);let I=M("roughness",this.roughness??1);P(this.roughnessMap)&&(I=I.multiply(this.roughnessMap.sample(n).g),e=!0);let B=M("metalness",this.metalness??0);P(this.metalnessMap)&&(B=B.multiply(this.metalnessMap.sample(n).b),e=!0);let _=null;P(this.lightMap)&&(_=this.lightMap.sample(n).rgb.multiplyScalar(M("lightMapIntensity",this.lightMapIntensity??1)));let V=x("emissive",(new p.Vector3).setFromColor(this.emissive??new t(0))).rgb;P(this.emissiveMap)&&(V=V.multiply(this.emissiveMap.sample(n).rgb));const E=M("emissiveIntensity",this.emissiveIntensity??1);let G=w.normal;if(P(this.normalMap)){const e=M("normalScale",this.normalScale?.x??1);G=h(this.normalMap.sample(n),e)}let H=null,A=null;if((this.sheen??0)>0){const e=M("sheen",this.sheen??0);H=x("sheenColor",(new p.Vector3).setFromColor(this.sheenColor??new t(16777215))).rgb.multiplyScalar(e),P(this.sheenColorMap)&&(H=H.multiply(this.sheenColorMap.sample(n).rgb)),A=M("sheenRoughness",this.sheenRoughness??.5),P(this.sheenRoughnessMap)&&(A=A.multiply(this.sheenRoughnessMap.sample(n).a))}(this.roughness<1||this.metalness>0)&&(e=!0);let U=null,z=null;if((this.anisotropy??0)>0&&(U=M("anisotropy",this.anisotropy??0),z=f("anisotropyDirection",(j=this.anisotropyRotation??0,new i(Math.cos(j),Math.sin(j)))),P(this.anisotropyMap))){const e=this.anisotropyMap.sample(n),a=m(R(e.r,e.g).multiplyScalar(2).subtract(R(1,1)));z=R(z.x.multiply(a.x).subtract(z.y.multiply(a.y)),z.y.multiply(a.x).add(z.x.multiply(a.y))),U=U.multiply(e.b)}var j;const q=(e,a,t,r)=>{const i=M(e,a);return P(t)?i.multiply(t.sample(n)[r]):i},J=(this.clearcoat??0)>0,K=(this.iridescence??0)>0,Q=(this.transmission??0)>0,W=1.5!==(this.ior??1.5)||1!==(this.specularIntensity??1)||1!==(this.specularColor?.r??1)||1!==(this.specularColor?.g??1)||1!==(this.specularColor?.b??1)||P(this.specularIntensityMap)||P(this.specularColorMap);let X=null,Y=null;W&&(X=x("specularColor",(new p.Vector3).setFromColor(this.specularColor??new t(16777215))),P(this.specularColorMap)&&(X=X.multiply(this.specularColorMap.sample(n).rgb)),Y=q("specularIntensity",this.specularIntensity??1,this.specularIntensityMap,"a"));let Z=null;if(J&&P(this.clearcoatNormalMap)){const e=this.clearcoatNormalMap.sample(n),a=f("clearcoatNormalScale",this.clearcoatNormalScale??D),t=N(e.r.subtract(.5).multiply(a.x).add(.5),e.g.subtract(.5).multiply(a.y).add(.5),e.b);Z=h(t,1,void 0,void 0,n)}const $=this.iridescenceThicknessRange??new i(100,400),ee=K?P(this.iridescenceThicknessMap)?v(M("iridescenceThicknessMin",$.x),M("iridescenceThicknessMax",$.y),this.iridescenceThicknessMap.sample(n).g):M("iridescenceThicknessMax",$.y):null;(W||K||Q||(this.sheen??0)>0||(this.anisotropy??0)>0)&&(e=!0);const ae=new u({color:S({color:o.rgba(s),roughness:I,metalness:B,ambientOcclusion:y,ambientOcclusionIntensity:g,emissive:V,emissiveIntensity:E,normal:G,bakedLight:_,sheenColor:H,sheenRoughness:A,anisotropy:U,anisotropyDirection:z,specular:e,...W?{ior:M("ior",this.ior??1.5),specularColor:X,specularIntensity:Y}:{},...J?{clearcoat:q("clearcoat",this.clearcoat,this.clearcoatMap,"r"),clearcoatRoughness:q("clearcoatRoughness",this.clearcoatRoughness??0,this.clearcoatRoughnessMap,"g"),clearcoatNormal:Z}:{},...K?{iridescence:q("iridescence",this.iridescence,this.iridescenceMap,"r"),iridescenceIOR:M("iridescenceIOR",this.iridescenceIOR??1.3),iridescenceThickness:ee}:{},...Q?{transmission:q("transmission",this.transmission,this.transmissionMap,"r"),transmissionSampler:F,ior:M("ior",this.ior??1.5),thickness:q("thickness",this.thickness??0,this.thicknessMap,"g"),attenuationColor:x("attenuationColor",(new p.Vector3).setFromColor(this.attenuationColor??new t(16777215))),attenuationDistance:M("attenuationDistance",this.attenuationDistance??1/0),dispersion:M("dispersion",this.dispersion??0)}:{}}),opacity:s,roughness:I,normal:G,emissive:V.multiplyScalar(E),envMap:this.envMap,alphaTest:this.alphaTest});return null!=this.envMap&&(ae.uniforms.envMapIntensity={value:this.envMapIntensity??1}),ae.vertexColors=!0===this.vertexColor,ae}}function P(e){return null!=e&&(!(e instanceof g)||null!=e.value&&e.value!==B)}e([o(),a("design:type",t)],StandardShader.prototype,"color",void 0),e([o({label:"Color Map"}),a("design:type",y)],StandardShader.prototype,"map",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"opacity",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"alphaMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"roughness",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"roughnessMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"metalness",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"metalnessMap",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"lightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"lightMapIntensity",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"aoMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"aoMapIntensity",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"emissive",void 0),e([o({range:[0,10]}),a("design:type",Number)],StandardShader.prototype,"emissiveIntensity",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"emissiveMap",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"normalMap",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"normalScale",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"sheen",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"sheenColor",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"sheenColorMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"sheenRoughness",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"sheenRoughnessMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"anisotropyRotation",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"anisotropyMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"anisotropy",void 0),e([o({range:[1,2.333]}),a("design:type",Number)],StandardShader.prototype,"ior",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"specularIntensity",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"specularIntensityMap",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"specularColor",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"specularColorMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"clearcoat",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"clearcoatMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"clearcoatRoughness",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"clearcoatRoughnessMap",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"clearcoatNormalMap",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"clearcoatNormalScale",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"iridescence",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"iridescenceMap",void 0),e([o({range:[1,2.333]}),a("design:type",Number)],StandardShader.prototype,"iridescenceIOR",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"iridescenceThicknessRange",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"iridescenceThicknessMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"transmission",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"transmissionMap",void 0),e([o({range:[0,10]}),a("design:type",Number)],StandardShader.prototype,"thickness",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"thicknessMap",void 0),e([o(),a("design:type",t)],StandardShader.prototype,"attenuationColor",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"attenuationDistance",void 0),e([o({range:[0,10]}),a("design:type",Number)],StandardShader.prototype,"dispersion",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"envMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"envMapIntensity",void 0),e([o(),a("design:type",y)],StandardShader.prototype,"heightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"heightScale",void 0),e([o(),a("design:type",Boolean)],StandardShader.prototype,"vertexColor",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"uvScale",void 0);export var ParallaxType;!function(e){e[e.none=0]="none",e[e.offset=1]="offset",e[e.pom=2]="pom"}(ParallaxType||(ParallaxType={}));export class ParallaxStandardMaterial extends n{constructor(e={}){super(e),e.heightMap&&(this.heightMap=e.heightMap),this.heightScale=e.heightScale??.05,this.parallaxType=e.parallaxType??ParallaxType.pom,this.minLayers=e.minLayers??10,this.maxLayers=e.maxLayers??32}onBeforeCompile(e){e.uniforms.heightMap={value:this.heightMap},e.uniforms.heightScale={value:this.heightScale},e.uniforms.minLayers={value:this.minLayers},e.uniforms.maxLayers={value:this.maxLayers},e.uniforms.parallaxType={value:this.parallaxType},e.vertexTangents=!0,e.vertexShader=e.vertexShader.replace("#include <uv_pars_vertex>","\n #include <uv_pars_vertex>\n "),e.vertexShader=e.vertexShader.replace("#include <begin_vertex>","\n #include <begin_vertex>\n "),e.fragmentShader=e.fragmentShader.replace("#include <uv_pars_fragment>","\n #include <uv_pars_fragment>\n uniform sampler2D heightMap;\n uniform float heightScale;\n uniform int minLayers;\n uniform int maxLayers;\n uniform int parallaxType;\n\n vec2 parallaxOffset(vec2 uv, vec3 viewDir, vec3 normal) {\n // Compute TBN in fragment shader using screen-space derivatives\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uv);\n vec2 duv2 = dFdy(uv);\n \n vec3 dp2perp = cross(dp2, normal);\n vec3 dp1perp = cross(normal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n \n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 tbn = mat3(T * invmax, B * invmax, normal);\n vec3 viewDirTS = -viewDir * tbn;\n\n float h = texture(heightMap, uv).r;\n return uv - (viewDirTS.xy / viewDirTS.z) * (h * heightScale);\n }\n\n vec2 parallaxOcclusion2(vec2 uv, vec3 viewDir, vec3 normal) {\n // Compute TBN in fragment shader using screen-space derivatives\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uv);\n vec2 duv2 = dFdy(uv);\n \n vec3 dp2perp = cross(dp2, normal);\n vec3 dp1perp = cross(normal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n \n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 tbn = mat3(T * invmax, B * invmax, normal);\n vec3 vv = -viewDir * tbn;\n\n float parallaxLimit = -length(vv.xy) / vv.z;\n parallaxLimit *= heightScale;\n\n vec2 vOffsetDir = normalize(vv.xy);\n vec2 vMaxOffset = vOffsetDir * parallaxLimit;\n\n float factor = pow(1.0 - abs(vv.z), 2.0);\n float nNumSamples = mix(float(minLayers), float(maxLayers), factor);\n float fStepSize = 1.0 / nNumSamples;\n\n float fCurrRayHeight = 1.0;\n vec2 vCurrOffset = vec2(0.0);\n vec2 vLastOffset = vec2(0.0);\n float fLastSampledHeight = 1.0;\n float fCurrSampledHeight = 1.0;\n\n for (int nCurrSample = 0; nCurrSample < 128; nCurrSample++) {\n if (float(nCurrSample) > nNumSamples) break;\n\n fCurrSampledHeight = texture2D(heightMap, uv + vCurrOffset).r;\n if (fCurrSampledHeight > fCurrRayHeight) {\n float delta1 = fCurrSampledHeight - fCurrRayHeight;\n float delta2 = (fCurrRayHeight + fStepSize) - fLastSampledHeight;\n float ratio = delta1 / (delta1 + delta2);\n vCurrOffset = ratio * vLastOffset + (1.0 - ratio) * vCurrOffset;\n break;\n } else {\n fCurrRayHeight -= fStepSize;\n vLastOffset = vCurrOffset;\n vCurrOffset += fStepSize * vMaxOffset;\n fLastSampledHeight = fCurrSampledHeight;\n }\n }\n\n return uv + vCurrOffset;\n }\n "),e.fragmentShader=e.fragmentShader.replace("#include <map_fragment>","\n vec3 pomViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n vec2 uvPOM = vMapUv ;\n if (parallaxType == 1) {\n uvPOM = parallaxOffset(vMapUv, pomViewDir, vNormal);\n } else if (parallaxType == 2) {\n uvPOM = parallaxOcclusion2(vMapUv, pomViewDir, vNormal);\n }\n\n vec4 texelColor = texture2D(map, uvPOM);\n diffuseColor *= texelColor;\n "),e.fragmentShader=e.fragmentShader.replace("#include <normal_fragment_maps>","\n #ifdef USE_NORMALMAP\n // RE-COMPUTE TBN for normal mapping consistency\n vec3 dp1 = dFdx(-vViewPosition);\n vec3 dp2 = dFdy(-vViewPosition);\n vec2 duv1 = dFdx(uvPOM);\n vec2 duv2 = dFdy(uvPOM);\n vec3 dp2perp = cross(dp2, vNormal);\n vec3 dp1perp = cross(vNormal, dp1);\n vec3 T = dp2perp * duv1.x + dp1perp * duv2.x;\n vec3 B = dp2perp * duv1.y + dp1perp * duv2.y;\n float invmax = inversesqrt(max(dot(T,T), dot(B,B)));\n mat3 localTBN = mat3(T * invmax, B * invmax, vNormal);\n\n vec3 mapN = texture2D(normalMap, uvPOM).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( localTBN * mapN );\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <roughnessmap_fragment>","\n float roughnessFactor = roughness;\n #ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, uvPOM );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <metalnesssmap_fragment>","\n float metalnessFactor = metalness;\n #ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, uvPOM );\n // reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n metalnessFactor *= texelMetalness.b;\n #endif\n "),e.fragmentShader=e.fragmentShader.replace("#include <aomap_fragment>","\n #ifdef USE_AOMAP\n\n // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n float ambientOcclusion = ( texture2D( aoMap, uvPOM ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\n #endif\n\n #endif\n "),this.userData.shader=e}clone(){const e=super.clone();return e.heightMap=this.heightMap,e.heightScale=this.heightScale,e.parallaxType=this.parallaxType,e.minLayers=this.minLayers,e.maxLayers=this.maxLayers,e}}export function applyTiling(e,a){if(null==e||null==a)return e;if(1===a.x&&1===a.y)return e;const t=e.clone();return t.repeat.copy(a),t.needsUpdate=!0,t}function k(e,a){null!=e&&(e instanceof r?e.colorSpace=a:e instanceof g&&null!=e.value&&(e.value.colorSpace=a))}/*
2
2
  * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -16,4 +16,7 @@ export declare const aoColorSampler: import("three-shader-graph").UniformSampler
16
16
  * @returns
17
17
  */
18
18
  export declare function sampleScreenAO(uv?: Vec2Node): FloatNode;
19
+ /** Linear HDR opaque capture with roughness mipmaps, owned by the renderer. */
20
+ export declare const transmissionMapUniformName = "hology_transmission_map";
21
+ export declare const transmissionSceneSampler: import("three-shader-graph").UniformSampler2d;
19
22
  //# sourceMappingURL=scene-sample.d.ts.map
@@ -1,4 +1,4 @@
1
- import{float as o,ifDefApply as e,uniformSampler2d as r,Vec3ExpressionNode as p}from"three-shader-graph";import{screenUV as a}from"./depth.js";import{createPlaceholderTexture as t}from"../utils/three/placeholder-texture.js";export const sceneMapUniformName="hology_scene_map";export const sceneColorSampler=r("hology_scene_map",t());export function sampleSceneColor(o){return sceneColorSampler.sample(o)}export const fragCoord=new p("gl_FragCoord");export const aoMapUniformName="hology_ao_map";export const aoColorSampler=r("hology_ao_map",t());export function sampleScreenAO(r=a){return e("USE_SSAO_MAP",o(1),()=>aoColorSampler.sample(r).r)}/*
1
+ import{float as o,ifDefApply as e,uniformSampler2d as r,Vec3ExpressionNode as a}from"three-shader-graph";import{screenUV as n}from"./depth.js";import{createPlaceholderTexture as p}from"../utils/three/placeholder-texture.js";export const sceneMapUniformName="hology_scene_map";export const sceneColorSampler=r("hology_scene_map",p());export function sampleSceneColor(o){return sceneColorSampler.sample(o)}export const fragCoord=new a("gl_FragCoord");export const aoMapUniformName="hology_ao_map";export const aoColorSampler=r("hology_ao_map",p());export function sampleScreenAO(r=n){return e("USE_SSAO_MAP",o(1),()=>aoColorSampler.sample(r).r)}export const transmissionMapUniformName="hology_transmission_map";export const transmissionSceneSampler=r("hology_transmission_map",p());/*
2
2
  * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=frame-audio-listener.test.d.ts.map
@@ -0,0 +1,4 @@
1
+ import{afterEach as e,describe as t,expect as o,it as s}from"vitest";import{AudioContext as a,Object3D as n}from"three";import{FrameAudioListener as i}from"../utils/three/frame-audio-listener.js";const r=[];function l(e="running"){const t=[],o={};for(const e of["positionX","positionY","positionZ","forwardX","forwardY","forwardZ","upX","upY","upZ"])o[e]={linearRampToValueAtTime:(o,s)=>t.push({name:e,value:o,time:s})};const s={state:e,currentTime:1,listener:o,destination:{},createGain:()=>({connect(){},gain:{value:1}})};a.setContext(s);const n=new i;return r.push(n),{context:s,calls:t,listener:n}}e(()=>{for(const e of r.splice(0))e.disposePoseUpdates()}),t("frame audio listener",()=>{s("coalesces traversals and publishes the final world pose",async()=>{const{listener:e,calls:t}=l(),s=new n;s.add(e);for(let e=0;e<6;e++)s.position.x=e,s.updateMatrixWorld(!0);o(t).toHaveLength(0),await Promise.resolve(),o(t).toHaveLength(9),o(t.find(e=>"positionX"===e.name)?.value).toBe(5),s.updateMatrixWorld(!0),await Promise.resolve(),o(t).toHaveLength(9),s.rotation.y=Math.PI/2,s.updateMatrixWorld(!0),await Promise.resolve(),o(t).toHaveLength(18),o(t.filter(e=>"forwardX"===e.name).at(-1)?.value).toBeCloseTo(-1)}),s("skips suspended contexts and synchronises after resume",async()=>{const{listener:e,context:t,calls:s}=l("suspended");e.position.x=20,e.updateMatrixWorld(!0),await Promise.resolve(),o(s).toHaveLength(0),t.state="running",e.updateMatrixWorld(!0),await Promise.resolve(),o(s).toHaveLength(9),o(s.find(e=>"positionX"===e.name)?.value).toBe(20)}),s("does not flush disposed listeners or contexts suspended after traversal",async()=>{const e=l();e.listener.updateMatrixWorld(!0),e.listener.disposePoseUpdates(),await Promise.resolve(),o(e.calls).toHaveLength(0);const t=l();t.listener.updateMatrixWorld(!0),t.context.state="suspended",await Promise.resolve(),o(t.calls).toHaveLength(0)}),s("retains the fallback listener API and bounds interpolation after long gaps",async()=>{const{listener:e,context:t}=l();let s=[],a=[];t.listener={setPosition(...e){s=e},setOrientation(...e){a=e}},e.position.set(1,2,3),e.up.set(0,0,1),e.updateMatrixWorld(!0),await Promise.resolve(),o(s).toEqual([1,2,3]),o(a).toEqual([0,0,-1,0,0,1]),o(e.timeDelta).toBeLessThanOrEqual(.05)})});/*
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
+ * See the LICENSE.md file for details.
4
+ */
@@ -1,4 +1,4 @@
1
- import{describe as e,expect as t,it as o,vi as n}from"vitest";import{DataTexture as r,Material as a,MeshStandardMaterial as i,RGBAFormat as s,SpriteMaterial as l,Vector4 as d}from"three";import{batchingUniformVec4 as h,float as u,NodeShaderMaterial as m,rgb as c,rgba as p,standardMaterial as f,translateX as v,uniformFloat as S,uniformVec4 as g,uniformSampler2d as w,varyingAttributes as x,vec3 as C,vec4 as y}from"three-shader-graph";import{createNodeMaterialSignature as B,markMaterialUniformValuesNeedUpdate as M,NodeMaterialWebGpuResolver as b,setMaterialUniformValuesAutoUpdate as T,withThreeDefaultVertexAttributeValues as L}from"../rendering/node-material-webgpu-resolver.js";import{LandscapeCompositeShader as W}from"../shader/builtin/landscape-composite-shader.js";import{DecalUnlitShader as A}from"../shader/builtin/decal-unlit-shader.js";import{getSpritePosition as _}from"../shader/sprite-shader.js";import{depthNormal as G,depthWorldPosition as U,fragmentLinearEyeDepth as V,sampleSceneDepth as k,screenUV as I}from"../shader-nodes/depth.js";import{sampleSceneColor as D}from"../shader-nodes/scene-sample.js";import{applyDithering as j}from"../shader-nodes/dither.js";import{parallaxOcclusionMapping as E}from"../shader-nodes/pom.js";import{elapsedTimeUniformName as F}from"../shader-nodes/time.js";import{Trail as O}from"../effects/vfx/trail-renderer.js";import{particleUniforms as q}from"../shader-nodes/particle.js";import{buildShaderGraphMaterial as P,createDefaultShaderGraphDocument as z}from"../shader/graph/index.js";class N extends a{set uniformValuesNeedsUpdate(e){e&&this.uniformValuesAutoVersion++}constructor(e){super(),this.disposed=!1,this.uniformValuesAutoUpdate=!0,this.uniformValuesAutoVersion=0,this.vertexShader=e.vertexShader,this.fragmentShader=e.fragmentShader,this.depthVertexShader=e.depthVertexShader??null,this.depthFragmentShader=e.depthFragmentShader??null,this.pointShadowVertexShader=e.pointShadowVertexShader??null,this.pointShadowFragmentShader=e.pointShadowFragmentShader??null,this.uniforms=e.uniforms,this.sceneTextures=e.sceneTextures??{},this.graphTextures=e.graphTextures??{},this.vertexAttributes=e.vertexAttributes??[],this.transparent=e.transparent??!1,this.alphaTest=e.alphaTest??0,this.depthTest=e.depthTest??!0,this.depthWrite=e.depthWrite??!0,this.side=e.side??this.side}dispose(){this.disposed=!0,super.dispose()}}e("NodeMaterialWebGpuResolver",()=>{o("keeps explicitly tracked outline uniforms clean until controls change",()=>{const e=new m({color:f({color:c(16777215)})});e.uniformValuesAutoUpdate=!1,e.userData.outlineParameters={thickness:.012,darkening:.65,alpha:.8};const o=new b({WGSLShaderMaterial:N}),n=o.resolve(e,"outline");t(n.uniformValuesAutoUpdate).toBe(!1);const r=n.uniformValuesAutoVersion;t(o.resolve(e,"outline")).toBe(n),t(n.uniformValuesAutoVersion).toBe(r),e.userData.outlineParameters.thickness=.025,o.resolve(e,"outline"),t(n.uniforms.outlineThickness.value).toBe(.025),t(n.uniformValuesAutoVersion).toBeGreaterThan(r),o.dispose()}),o("derives a textured, darkened albedo outline and updates its controls",()=>{const e=new r(new Uint8Array([128,96,64,255]),1,1,s);e.needsUpdate=!0;const o=w("outlineAlbedo",e).sample(x.uv),n=new m({color:f({color:o})});n.userData.outlineParameters={colorMode:"darkenedAlbedo",thickness:.012,darkening:.65,alpha:.8};const a=new b({WGSLShaderMaterial:N}),i=a.resolve(n,"outline");t(i).toBeInstanceOf(N),t(i.side).toBe(1),t(i.vertexShader).toContain("materialUniforms.outlineThickness"),t(i.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"skinIndex"}),t.objectContaining({name:"skinWeight"})])),t(i.vertexShader).toContain("rendererSkinPosition"),t(i.vertexShader).toContain("outline_local_position_"),t(i.vertexShader).toContain("outline_local_normal_"),t(i.vertexShader).toContain("sqrt("),t(i.fragmentShader).toContain("outlineAlbedoTexture"),t(i.fragmentShader).toContain("materialUniforms.outlineDarkening"),t(i.uniforms.outlineThickness.value).toBe(.012),t(i.uniforms.outlineDarkening.value).toBe(.65),t(i.uniforms.outlineAlpha.value).toBe(.8),n.userData.outlineParameters.darkening=2,n.userData.outlineParameters.thickness=.02;const l=a.resolve(n,"outline");t(l).toBe(i),t(l.uniforms.outlineThickness.value).toBe(.02),t(l.uniforms.outlineDarkening.value).toBe(1)}),o("declines an albedo outline when the source graph has no albedo output",()=>{const e=new m({color:p(16777215)}),o=new b({WGSLShaderMaterial:N});t(o.resolve(e,"outline")).toBeUndefined()}),o("compiles shader graph scene-light nodes against the renderer light ABI",()=>{const e=z("surface");e.shadingModel="unlit",e.nodes.push({id:"ambient",kind:"scene.ambientLight"},{id:"directional",kind:"scene.directionalLight"},{id:"combined",kind:"math.add"}),e.edges.push({from:{nodeId:"ambient",port:"color"},to:{nodeId:"combined",port:"a"}},{from:{nodeId:"directional",port:"color"},to:{nodeId:"combined",port:"b"}}),e.outputs.color={input:{nodeId:"combined",port:"value"}};const o=new b({WGSLShaderMaterial:N}).resolve(P(e));t(o?.fragmentShader).toContain("rendererAmbientLight()"),t(o?.fragmentShader).toContain("rendererDirectionalLightForLight"),t(o?.fragmentShader).toContain("rendererDirectionalLightCount()"),t(o?.fragmentShader).not.toContain("NUM_DIR_LIGHTS")}),o("compiles the shader graph world normal without a WGSL matrix inverse",()=>{const e=z("surface");e.shadingModel="unlit",e.nodes.push({id:"world-normal",kind:"builtin.worldNormal"}),e.outputs.color={input:{nodeId:"world-normal",port:"value"}};const o=new b({WGSLShaderMaterial:N}).resolve(P(e));t(o?.vertexShader).toContain("transpose(rendererViewMatrix())"),t(o?.vertexShader).not.toContain("nodeInverseMat4")}),o("compiles decal surface rejection without undefined WGSL expressions",()=>{const e=(new A).build(),o=new b({WGSLShaderMaterial:N}).resolve(e);t(o?.fragmentShader).not.toContain("undefined"),t(o?.fragmentShader).toContain("hology_scene_mapTexture")}),o("recompiles an opaque variant when receiveDecals changes",()=>{const e=new m({color:p(16777215)});e.userData.receiveDecals=!0;const o=new b({WGSLShaderMaterial:N},e=>[p(16777215,!1===e.userData.receiveDecals?0:2)]),n=o.resolve(e,"opaque");e.userData.receiveDecals=!1,e.needsUpdate=!0;const r=o.resolve(e,"opaque");t(r).not.toBe(n),t(n.disposed).toBe(!0),t(n.fragmentShader).not.toBe(r.fragmentShader)}),o("maps Hology elapsed time to the renderer frame clock",()=>{const e=S(F),o=new m({color:p(C(e)),transform:v(e)}),n=new b({WGSLShaderMaterial:N}).resolve(o);t(n?.vertexShader).toContain("rendererElapsedTime()"),t(n?.fragmentShader).toContain("rendererElapsedTime()"),t(n?.depthVertexShader).toContain("rendererElapsedTime()"),t(n?.pointShadowVertexShader).toContain("rendererElapsedTime()"),t(n?.uniforms).not.toHaveProperty(F)}),o("compiles the native sprite billboard position without a GLSL fallback",()=>{const e=new m({color:p(16777215),position:_(S("rotation",.25),S("screenSpaceSize",0),S("lockYAxis",1))}),o=new b({WGSLShaderMaterial:N}).resolve(e);t(o).toBeInstanceOf(N),t(o?.vertexShader).toContain("cos("),t(o?.vertexShader).toContain("sin("),t(o?.vertexShader).toContain("materialUniforms.lockYAxis"),t(o?.vertexShader).not.toContain("customFunction_")}),o("uses the per-instance rotation attribute for instanced sprites",()=>{const e=new m({color:p(16777215),position:_(S("rotation",0),void 0,void 0,!0)}),o=new b({WGSLShaderMaterial:N}).resolve(e);t(o?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"rotation",format:"float32",stepMode:"instance"})])),t(o?.vertexShader).toContain("input.rotation"),t(o?.vertexShader).not.toContain("materialUniforms.rotation")}),o("uses per-instance particle opacity in WebGPU fragment shaders",()=>{const e=new m({color:p(c(16777215),q.opacity)}),o=new b({WGSLShaderMaterial:N}).resolve(e);t(o?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"particleData",format:"float32x3",stepMode:"instance"})])),t(o?.fragmentShader).toContain(".x"),t(o?.fragmentShader).toContain("> 0.5")}),o("maps THREE.SpriteMaterial to the native sprite shader",()=>{const e=new r(new Uint8Array([255,255,255,255]),1,1,s),o=new l({map:e,color:8429760,opacity:.6,rotation:.25,sizeAttenuation:!1,alphaTest:.2,transparent:!0}),n=new b({WGSLShaderMaterial:N}),a=n.resolve(o);t(a).toBeInstanceOf(N),t(a?.vertexShader).toContain("materialUniforms.rotation"),t(a?.vertexShader).toContain("materialUniforms.screenSpaceSize"),t(a?.fragmentShader).toContain("textureSample("),t(a?.alphaTest).toBe(.2),t(a?.transparent).toBe(!0),t(a?.uniforms.rotation.value).toBe(.25),t(a?.uniforms.screenSpaceSize.value).toBe(1),o.rotation=.75;const i=n.resolve(o);t(i).toBe(a),t(i?.uniforms.rotation.value).toBe(.75)}),o("memoizes node-material signatures for repeated lookups",()=>{const e=["version","vertexShader","fragmentShader","alphaTest","alphaToCoverage","blending","colorWrite","depthFunc","depthTest","depthWrite","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","premultipliedAlpha","side","stencilWrite","transparent"],o=new Map([["version",1],["vertexShader","#vertex"],["fragmentShader","#fragment"],["alphaTest",0],["alphaToCoverage",!1],["blending",1],["colorWrite",!0],["depthFunc",3],["depthTest",!0],["depthWrite",!0],["polygonOffset",!1],["polygonOffsetFactor",0],["polygonOffsetUnits",0],["premultipliedAlpha",!1],["side",0],["stencilWrite",!1],["transparent",!1]]);let n=0;const r=new Proxy({},{get:(t,r)=>"string"==typeof r&&e.includes(r)?(n+=1,o.get(r)):Reflect.get(t,r)});B(r),B(r),t(n).toBe(e.length)}),o("adapts a NodeShaderMaterial without replacing its scene material",()=>{const e=S("intensity",.75),o=new m({color:f({color:c(5210052).multiplyScalar(e),roughness:.42,metalness:.18}),transparent:!0,alphaTest:.25}),n=new b({WGSLShaderMaterial:N}),r=n.resolve(o);t(r).toBeInstanceOf(N),t(r).not.toBe(o),t(r?.transparent).toBe(!0),t(r?.alphaTest).toBe(.25),t(r?.fragmentShader).toContain("rendererPointLightForLight"),t(o.isShaderMaterial).toBe(!0),e.value=.25,t(n.resolve(o)).toBe(r),t(r?.uniforms.intensity?.value).toBe(.25)}),o("syncs direct NodeShaderMaterial uniform mutations to the resolved material",()=>{const e=g("trailTint",new d(0,0,0,0)),o=S("hology_particle_energy",1),n=new m({color:e.multiplyScalar(o)}),r=new b({WGSLShaderMaterial:N});n.uniforms.trailTint.value=new d(1,.25,.5,.75),n.uniforms.hology_particle_energy.value=.4;const a=r.resolve(n);t(a?.uniforms.trailTint.value).toEqual(new d(1,.25,.5,.75)),t(a?.uniforms.hology_particle_energy.value).toBe(.4),n.uniforms.trailTint.value.set(.2,.4,.6,.8),n.uniforms.hology_particle_energy.value=.1,t(r.resolve(n)).toBe(a),t(a?.uniforms.trailTint.value).toEqual(new d(.2,.4,.6,.8)),t(a?.uniforms.hology_particle_energy.value).toBe(.1)}),o("only syncs explicitly invalidated uniforms when auto update is disabled",()=>{const e=S("intensity",.75),o=new m({color:p(C(e))});o.uniformValuesAutoUpdate=!1;const n=new b({WGSLShaderMaterial:N}),r=n.resolve(o),a=r.uniformValuesAutoVersion;e.value=.25,t(n.resolve(o)).toBe(r),t(r?.uniforms.intensity.value).toBe(.75),t(r?.uniformValuesAutoVersion).toBe(a),o.uniformValuesNeedsUpdate=!0,t(n.resolve(o)).toBe(r),t(r?.uniforms.intensity.value).toBe(.25),t(r?.uniformValuesAutoVersion).toBe(a+1)}),o("supports explicit invalidation for mapped Three.js materials",()=>{const e=new i({roughness:.8});T(e,!1);const o=new b({WGSLShaderMaterial:N}),n=o.resolve(e);e.roughness=.2,t(o.resolve(e)).toBe(n),t(n?.uniforms.roughness.value).toBe(.8),M(e),t(o.resolve(e)).toBe(n),t(n?.uniforms.roughness.value).toBe(.2)}),o("binds uniforms referenced only by an MRT material output",()=>{const e=S("roughness",.7),o=new m({color:p(5601177),alphaTest:.1});o.outputRoughness=e;const n=new b({WGSLShaderMaterial:N},e=>[e.outputColor,y(C(0,0,1),e.outputRoughness)]).resolve(o);t(n?.fragmentShader).toContain("materialUniforms.roughness"),t(n?.fragmentShader).not.toContain("graphColor"),t(n?.fragmentShader).toMatch(/if \(.+ < 0\.1\) \{ discard; \}/),t(n?.uniforms.roughness?.value).toBe(.7)}),o("compiles a landscape composite built from node material semantic outputs",()=>{const e=new b({WGSLShaderMaterial:N}),o=new m({color:f({color:c(5147450),roughness:.82,metalness:0})}),n=new m({color:f({color:c(7432286),roughness:.6,metalness:.05})}),r=new W;r.layers=[o,n];const a=e.resolve(r.build());t(a).toBeInstanceOf(N),t(a?.fragmentShader).toContain("rendererDirectionalLightForLight"),t(a?.vertexShader).toContain("@location(6) material: vec4<f32>"),t(a?.vertexShader).toContain("@location(8) hole: f32")}),o("allocates the trail's authored vertex attributes",()=>{const e=new b({WGSLShaderMaterial:N}).resolve(O.createBaseMaterial());t(e).toBeInstanceOf(N),t(e?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"nodeID",shaderLocation:6,format:"float32"}),t.objectContaining({name:"nodeCenter",shaderLocation:7,format:"float32x3"})]))}),o("uses Three's default value when a geometry has no uv1 attribute",()=>{const e=L([{name:"uv1",shaderLocation:6,format:"float32x2"},{name:"custom",shaderLocation:7,format:"float32"}]);t(e).toEqual(t.arrayContaining([t.objectContaining({name:"uv1",defaultValue:[0,0]}),t.objectContaining({name:"custom"})])),t(e[1]).not.toHaveProperty("defaultValue")}),o("compiles the foliage transform and named texture-uniform pattern",()=>{const e=new b({WGSLShaderMaterial:N}),o=new r(new Uint8Array([255,255,255,255]),1,1,s),n=new m({color:w("map").sample(x.uv),transform:v(S("windOffset",.25)),uniforms:{map:{value:o}},alphaTest:.5}),a=e.resolve(n);t(a).toBeInstanceOf(N),t(a?.vertexShader).toContain("rendererClipPosition(_ng_localPosition"),t(a?.depthVertexShader).toContain("materialUniforms.windOffset"),t(a?.depthFragmentShader).toContain("textureSample("),t(a?.depthFragmentShader).toContain("< 0.5) { discard;"),t(a?.pointShadowFragmentShader).toContain("distanceToLight")}),o("rebuilds cached materials when scene-local texture bindings change",()=>{const e=new b({WGSLShaderMaterial:N}),o=new r(new Uint8Array([255,255,255,255]),1,1,s),n=new r(new Uint8Array([32,64,128,255]),1,1,s),a=new m({color:w("map").sample(x.uv),uniforms:{map:{value:o}},alphaTest:.5}),i=e.resolve(a);a.uniforms.map.value=n;const l=e.resolve(a);t(l).not.toBe(i),t(i.disposed).toBe(!0),a.dispose();const d=e.resolve(a);t(d).not.toBe(l),t(l.disposed).toBe(!0)}),o("uses the renderer batch id without Three’s batchingIdTexture",()=>{const e=new b({WGSLShaderMaterial:N}),o=new r(new Uint8Array([255,96,24,255]),1,1,s),n=new m({color:p(h("vp0")),uniforms:{vp0:{value:o}}}),a=e.resolve(n);t(a).toBeInstanceOf(N),t(a?.vertexShader).toContain("rendererBatchingId(input.instanceIndex)")}),o("compiles depth nodes that use fragment-coordinate expressions",()=>{const e=new b({WGSLShaderMaterial:N}),o=new m({color:p(C(I.x,I.y,V))}),n=e.resolve(o);t(n).toBeInstanceOf(N),t(n?.fragmentShader).toContain("input.position.xy"),t(n?.fragmentShader).toContain("input.position.z"),t(n?.fragmentShader).toContain("rendererViewportSize()"),t(n?.fragmentShader).not.toContain("gl_FragCoord")}),o("maps scene color and depth nodes to renderer-owned textures",()=>{const e=new b({WGSLShaderMaterial:N}),o=new m({color:D(I).multiplyScalar(k(I))}),n=e.resolve(o);t(n.sceneTextures).toEqual({hology_scene_map:"sceneColor",hology_depth_map:"sceneDepth"}),t(n.graphTextures).toEqual({}),t(n.fragmentShader).toContain("hology_scene_mapTexture"),t(n.fragmentShader).toContain("hology_depth_mapTexture"),t(n.fragmentShader).toContain("vec4<f32>(textureSample(hology_depth_mapTexture")}),o("caches distinct material variants for opaque and late draw stages",()=>{const e=new b({WGSLShaderMaterial:N},(e,t)=>"opaque"===t?[p(C(1)),p(C(0))]:void 0),o=new m({color:p(C(1))}),n=e.resolve(o,"opaque"),r=e.resolve(o,"late");t(n).not.toBe(r),t(e.resolve(o,"opaque")).toBe(n),t(e.resolve(o,"late")).toBe(r),t(n?.fragmentShader).toContain("@location(1)"),t(r?.fragmentShader).not.toContain("@location(1)")}),o("reconstructs WebGPU depth positions with inverted NDC Y",()=>{const e=new b({WGSLShaderMaterial:N}),o=new m({color:p(U.add(G.multiplyScalar(0)))}),n=e.resolve(o);t(n.fragmentShader).toContain("vec2<f32>(2.0, -2.0)"),t(n.fragmentShader).toMatch(/-\(float_op_\d+\)/)}),o("emits dither and parallax nodes without GLSL custom functions",()=>{const e=new b({WGSLShaderMaterial:N}),o=new r(new Uint8Array([128,128,128,255]),1,1,s),n=E(x.uv,w("heightMap",o),u(.03)),a=new m({color:y(n.x,n.y,j(C(.2,.4,.8)).z,1)}),i=e.resolve(a);t(i).toBeInstanceOf(N),t(i?.fragmentShader).toContain("textureSampleLevel(heightMapTexture, heightMapSampler"),t(i?.fragmentShader).toMatch(/= -dpdy\(-pom_\d+ViewPosition\)/),t(i?.fragmentShader).toMatch(/= -dpdy\(pom_\d+Uv\)/),t(i?.fragmentShader).not.toContain("customFunction_"),t(i?.fragmentShader).not.toContain("gl_FragCoord")}),o("inherits, updates, and clears the WebGPU world environment",()=>{const e=new r(new Uint8Array([255,255,255,255]),1,1,s),o=new m({color:f({color:c(8421504),roughness:.5,metalness:.1})}),n=new b({WGSLShaderMaterial:N});n.setWorldEnvironment({texture:e,intensity:.75});const a=n.resolve(o);t(a.fragmentShader).toContain("envMapTexture"),t(a.uniforms.envMapIntensity?.value).toBe(.75),t(o.envMap).toBeUndefined(),n.setWorldEnvironment({texture:e,intensity:.25});const i=n.resolve(o);t(i).toBe(a),t(i.uniforms.envMapIntensity?.value).toBe(.25),n.setWorldEnvironment(null);const l=n.resolve(o);t(l).not.toBe(a),t(a.disposed).toBe(!0),t(l.fragmentShader).not.toContain("envMapTexture")}),o("keeps an authored material environment ahead of the world environment",()=>{const e=new r(new Uint8Array([255,255,255,255]),1,1,s),o=new r(new Uint8Array([64,96,128,255]),1,1,s),a=new r(new Uint8Array([32,48,64,255]),1,1,s),i=new m({color:f({color:c(8421504),roughness:.5,metalness:.1}),envMap:o}),l=n.fn(()=>a),d=new b({WGSLShaderMaterial:N},void 0,l);d.setWorldEnvironment({texture:e,intensity:.2}),d.resolve(i),t(l).toHaveBeenCalledWith(o),t(i.uniforms.envMap.value).toBe(a),t(i.envMap).toBe(o)})});/*
1
+ import{describe as e,expect as t,it as o,vi as n}from"vitest";import{DataTexture as a,Material as r,MeshPhysicalMaterial as i,MeshStandardMaterial as s,RGBAFormat as l,SpriteMaterial as d,Vector4 as h}from"three";import{batchingUniformVec4 as u,float as m,NodeShaderMaterial as c,rgb as p,rgba as f,standardMaterial as v,translateX as S,uniformFloat as g,uniformVec4 as w,uniformSampler2d as x,varyingAttributes as C,vec3 as y,vec4 as B}from"three-shader-graph";import{createNodeMaterialSignature as b,markMaterialUniformValuesNeedUpdate as M,NodeMaterialWebGpuResolver as T,setMaterialUniformValuesAutoUpdate as L,withThreeDefaultVertexAttributeValues as W}from"../rendering/node-material-webgpu-resolver.js";import{StandardShader as _}from"../shader/builtin/standard-shader.js";import{LandscapeCompositeShader as G}from"../shader/builtin/landscape-composite-shader.js";import{DecalUnlitShader as A}from"../shader/builtin/decal-unlit-shader.js";import{getSpritePosition as U}from"../shader/sprite-shader.js";import{depthNormal as V,depthWorldPosition as k,fragmentLinearEyeDepth as I,sampleSceneDepth as j,screenUV as D}from"../shader-nodes/depth.js";import{sampleSceneColor as q}from"../shader-nodes/scene-sample.js";import{applyDithering as E}from"../shader-nodes/dither.js";import{parallaxOcclusionMapping as O}from"../shader-nodes/pom.js";import{elapsedTimeUniformName as F}from"../shader-nodes/time.js";import{Trail as P}from"../effects/vfx/trail-renderer.js";import{particleUniforms as N}from"../shader-nodes/particle.js";import{buildShaderGraphMaterial as z,createDefaultShaderGraphDocument as R}from"../shader/graph/index.js";class H extends r{set uniformValuesNeedsUpdate(e){e&&this.uniformValuesAutoVersion++}constructor(e){super(),this.disposed=!1,this.uniformValuesAutoUpdate=!0,this.uniformValuesAutoVersion=0,this.vertexShader=e.vertexShader,this.fragmentShader=e.fragmentShader,this.depthVertexShader=e.depthVertexShader??null,this.depthFragmentShader=e.depthFragmentShader??null,this.pointShadowVertexShader=e.pointShadowVertexShader??null,this.pointShadowFragmentShader=e.pointShadowFragmentShader??null,this.uniforms=e.uniforms,this.sceneTextures=e.sceneTextures??{},this.graphTextures=e.graphTextures??{},this.vertexAttributes=e.vertexAttributes??[],this.transparent=e.transparent??!1,this.alphaTest=e.alphaTest??0,this.depthTest=e.depthTest??!0,this.depthWrite=e.depthWrite??!0,this.side=e.side??this.side}dispose(){this.disposed=!0,super.dispose()}}e("NodeMaterialWebGpuResolver",()=>{o("compiles physical lobes and binds transmission to the HDR late-pass snapshot",()=>{const e=new _;e.clearcoat=1,e.iridescence=1,e.sheen=.4,e.anisotropy=.5,e.transmission=1,e.thickness=.2,e.dispersion=.5;const o=e.build();t(o.uniforms.hology_transmission_map).toBeDefined();const n=new T({WGSLShaderMaterial:H}),a=n.resolve(o,"late");t(a.graphTextures.hology_transmission_map).toMatchObject({resource:"physicalTransmissionSnapshot",requiresLatePass:!0}),t(a.fragmentShader).toContain("tsgTransmission_volume"),t(a.fragmentShader).toContain("tsgIridescence_eval"),t(a.fragmentShader).toContain("textureNumLevels"),t(a.fragmentShader).not.toContain("vec3 "),t(a.fragmentShader).not.toMatch(/\bmat3\(/),n.dispose()}),o("omits disabled physical features from ordinary materials",()=>{const e=new T({WGSLShaderMaterial:H}),o=(new _).build(),n=e.resolve(o,"opaque");t(n.graphTextures).toEqual({}),t(o.uniforms.transmission).toBeUndefined(),t(o.uniforms.clearcoat).toBeUndefined(),t(o.uniforms.iridescence).toBeUndefined(),t(n.fragmentShader).not.toContain("tsgTransmission_volume"),e.dispose()}),o("preserves native physical properties and updates enabled lobe uniforms",()=>{const e=new T({WGSLShaderMaterial:H}),o=new i({clearcoat:.5,iridescence:.2}),n=e.resolve(o);o.clearcoat=.7,t(e.resolve(o)).toBe(n),t(n.uniforms.clearcoat.value).toBe(.7),o.transmission=1;const a=e.resolve(o);t(a).not.toBe(n),t(a.fragmentShader).toContain("tsgTransmission_volume"),t(a.graphTextures.hology_transmission_map).toMatchObject({requiresLatePass:!0}),e.dispose()}),o("keeps explicitly tracked outline uniforms clean until controls change",()=>{const e=new c({color:v({color:p(16777215)})});e.uniformValuesAutoUpdate=!1,e.userData.outlineParameters={thickness:.012,darkening:.65,alpha:.8};const o=new T({WGSLShaderMaterial:H}),n=o.resolve(e,"outline");t(n.uniformValuesAutoUpdate).toBe(!1);const a=n.uniformValuesAutoVersion;t(o.resolve(e,"outline")).toBe(n),t(n.uniformValuesAutoVersion).toBe(a),e.userData.outlineParameters.thickness=.025,o.resolve(e,"outline"),t(n.uniforms.outlineThickness.value).toBe(.025),t(n.uniformValuesAutoVersion).toBeGreaterThan(a),o.dispose()}),o("derives a textured, darkened albedo outline and updates its controls",()=>{const e=new a(new Uint8Array([128,96,64,255]),1,1,l);e.needsUpdate=!0;const o=x("outlineAlbedo",e).sample(C.uv),n=new c({color:v({color:o})});n.userData.outlineParameters={colorMode:"darkenedAlbedo",thickness:.012,darkening:.65,alpha:.8};const r=new T({WGSLShaderMaterial:H}),i=r.resolve(n,"outline");t(i).toBeInstanceOf(H),t(i.side).toBe(1),t(i.vertexShader).toContain("materialUniforms.outlineThickness"),t(i.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"skinIndex"}),t.objectContaining({name:"skinWeight"})])),t(i.vertexShader).toContain("rendererSkinPosition"),t(i.vertexShader).toContain("outline_local_position_"),t(i.vertexShader).toContain("outline_local_normal_"),t(i.vertexShader).toContain("sqrt("),t(i.fragmentShader).toContain("outlineAlbedoTexture"),t(i.fragmentShader).toContain("materialUniforms.outlineDarkening"),t(i.uniforms.outlineThickness.value).toBe(.012),t(i.uniforms.outlineDarkening.value).toBe(.65),t(i.uniforms.outlineAlpha.value).toBe(.8),n.userData.outlineParameters.darkening=2,n.userData.outlineParameters.thickness=.02;const s=r.resolve(n,"outline");t(s).toBe(i),t(s.uniforms.outlineThickness.value).toBe(.02),t(s.uniforms.outlineDarkening.value).toBe(1)}),o("declines an albedo outline when the source graph has no albedo output",()=>{const e=new c({color:f(16777215)}),o=new T({WGSLShaderMaterial:H});t(o.resolve(e,"outline")).toBeUndefined()}),o("compiles shader graph scene-light nodes against the renderer light ABI",()=>{const e=R("surface");e.shadingModel="unlit",e.nodes.push({id:"ambient",kind:"scene.ambientLight"},{id:"directional",kind:"scene.directionalLight"},{id:"combined",kind:"math.add"}),e.edges.push({from:{nodeId:"ambient",port:"color"},to:{nodeId:"combined",port:"a"}},{from:{nodeId:"directional",port:"color"},to:{nodeId:"combined",port:"b"}}),e.outputs.color={input:{nodeId:"combined",port:"value"}};const o=new T({WGSLShaderMaterial:H}).resolve(z(e));t(o?.fragmentShader).toContain("rendererAmbientLight()"),t(o?.fragmentShader).toContain("rendererDirectionalLightForLight"),t(o?.fragmentShader).toContain("rendererDirectionalLightCount()"),t(o?.fragmentShader).not.toContain("NUM_DIR_LIGHTS")}),o("compiles the shader graph world normal without a WGSL matrix inverse",()=>{const e=R("surface");e.shadingModel="unlit",e.nodes.push({id:"world-normal",kind:"builtin.worldNormal"}),e.outputs.color={input:{nodeId:"world-normal",port:"value"}};const o=new T({WGSLShaderMaterial:H}).resolve(z(e));t(o?.vertexShader).toContain("transpose(rendererViewMatrix())"),t(o?.vertexShader).not.toContain("nodeInverseMat4")}),o("compiles decal surface rejection without undefined WGSL expressions",()=>{const e=(new A).build(),o=new T({WGSLShaderMaterial:H}).resolve(e);t(o?.fragmentShader).not.toContain("undefined"),t(o?.fragmentShader).toContain("hology_scene_mapTexture")}),o("recompiles an opaque variant when receiveDecals changes",()=>{const e=new c({color:f(16777215)});e.userData.receiveDecals=!0;const o=new T({WGSLShaderMaterial:H},e=>[f(16777215,!1===e.userData.receiveDecals?0:2)]),n=o.resolve(e,"opaque");e.userData.receiveDecals=!1,e.needsUpdate=!0;const a=o.resolve(e,"opaque");t(a).not.toBe(n),t(n.disposed).toBe(!0),t(n.fragmentShader).not.toBe(a.fragmentShader)}),o("maps Hology elapsed time to the renderer frame clock",()=>{const e=g(F),o=new c({color:f(y(e)),transform:S(e)}),n=new T({WGSLShaderMaterial:H}).resolve(o);t(n?.vertexShader).toContain("rendererElapsedTime()"),t(n?.fragmentShader).toContain("rendererElapsedTime()"),t(n?.depthVertexShader).toContain("rendererElapsedTime()"),t(n?.pointShadowVertexShader).toContain("rendererElapsedTime()"),t(n?.uniforms).not.toHaveProperty(F)}),o("compiles the native sprite billboard position without a GLSL fallback",()=>{const e=new c({color:f(16777215),position:U(g("rotation",.25),g("screenSpaceSize",0),g("lockYAxis",1))}),o=new T({WGSLShaderMaterial:H}).resolve(e);t(o).toBeInstanceOf(H),t(o?.vertexShader).toContain("cos("),t(o?.vertexShader).toContain("sin("),t(o?.vertexShader).toContain("materialUniforms.lockYAxis"),t(o?.vertexShader).not.toContain("customFunction_")}),o("uses the per-instance rotation attribute for instanced sprites",()=>{const e=new c({color:f(16777215),position:U(g("rotation",0),void 0,void 0,!0)}),o=new T({WGSLShaderMaterial:H}).resolve(e);t(o?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"rotation",format:"float32",stepMode:"instance"})])),t(o?.vertexShader).toContain("input.rotation"),t(o?.vertexShader).not.toContain("materialUniforms.rotation")}),o("uses per-instance particle opacity in WebGPU fragment shaders",()=>{const e=new c({color:f(p(16777215),N.opacity)}),o=new T({WGSLShaderMaterial:H}).resolve(e);t(o?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"particleData",format:"float32x3",stepMode:"instance"})])),t(o?.fragmentShader).toContain(".x"),t(o?.fragmentShader).toContain("> 0.5")}),o("maps THREE.SpriteMaterial to the native sprite shader",()=>{const e=new a(new Uint8Array([255,255,255,255]),1,1,l),o=new d({map:e,color:8429760,opacity:.6,rotation:.25,sizeAttenuation:!1,alphaTest:.2,transparent:!0}),n=new T({WGSLShaderMaterial:H}),r=n.resolve(o);t(r).toBeInstanceOf(H),t(r?.vertexShader).toContain("materialUniforms.rotation"),t(r?.vertexShader).toContain("materialUniforms.screenSpaceSize"),t(r?.fragmentShader).toContain("textureSample("),t(r?.alphaTest).toBe(.2),t(r?.transparent).toBe(!0),t(r?.uniforms.rotation.value).toBe(.25),t(r?.uniforms.screenSpaceSize.value).toBe(1),o.rotation=.75;const i=n.resolve(o);t(i).toBe(r),t(i?.uniforms.rotation.value).toBe(.75)}),o("memoizes node-material signatures for repeated lookups",()=>{const e=["version","vertexShader","fragmentShader","alphaTest","alphaToCoverage","blending","colorWrite","depthFunc","depthTest","depthWrite","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","premultipliedAlpha","side","stencilWrite","transparent"],o=new Map([["version",1],["vertexShader","#vertex"],["fragmentShader","#fragment"],["alphaTest",0],["alphaToCoverage",!1],["blending",1],["colorWrite",!0],["depthFunc",3],["depthTest",!0],["depthWrite",!0],["polygonOffset",!1],["polygonOffsetFactor",0],["polygonOffsetUnits",0],["premultipliedAlpha",!1],["side",0],["stencilWrite",!1],["transparent",!1]]);let n=0;const a=new Proxy({},{get:(t,a)=>"string"==typeof a&&e.includes(a)?(n+=1,o.get(a)):Reflect.get(t,a)});b(a),b(a),t(n).toBe(e.length)}),o("adapts a NodeShaderMaterial without replacing its scene material",()=>{const e=g("intensity",.75),o=new c({color:v({color:p(5210052).multiplyScalar(e),roughness:.42,metalness:.18}),transparent:!0,alphaTest:.25}),n=new T({WGSLShaderMaterial:H}),a=n.resolve(o);t(a).toBeInstanceOf(H),t(a).not.toBe(o),t(a?.transparent).toBe(!0),t(a?.alphaTest).toBe(.25),t(a?.fragmentShader).toContain("rendererPointLightForLight"),t(o.isShaderMaterial).toBe(!0),e.value=.25,t(n.resolve(o)).toBe(a),t(a?.uniforms.intensity?.value).toBe(.25)}),o("syncs direct NodeShaderMaterial uniform mutations to the resolved material",()=>{const e=w("trailTint",new h(0,0,0,0)),o=g("hology_particle_energy",1),n=new c({color:e.multiplyScalar(o)}),a=new T({WGSLShaderMaterial:H});n.uniforms.trailTint.value=new h(1,.25,.5,.75),n.uniforms.hology_particle_energy.value=.4;const r=a.resolve(n);t(r?.uniforms.trailTint.value).toEqual(new h(1,.25,.5,.75)),t(r?.uniforms.hology_particle_energy.value).toBe(.4),n.uniforms.trailTint.value.set(.2,.4,.6,.8),n.uniforms.hology_particle_energy.value=.1,t(a.resolve(n)).toBe(r),t(r?.uniforms.trailTint.value).toEqual(new h(.2,.4,.6,.8)),t(r?.uniforms.hology_particle_energy.value).toBe(.1)}),o("only syncs explicitly invalidated uniforms when auto update is disabled",()=>{const e=g("intensity",.75),o=new c({color:f(y(e))});o.uniformValuesAutoUpdate=!1;const n=new T({WGSLShaderMaterial:H}),a=n.resolve(o),r=a.uniformValuesAutoVersion;e.value=.25,t(n.resolve(o)).toBe(a),t(a?.uniforms.intensity.value).toBe(.75),t(a?.uniformValuesAutoVersion).toBe(r),o.uniformValuesNeedsUpdate=!0,t(n.resolve(o)).toBe(a),t(a?.uniforms.intensity.value).toBe(.25),t(a?.uniformValuesAutoVersion).toBe(r+1)}),o("supports explicit invalidation for mapped Three.js materials",()=>{const e=new s({roughness:.8});L(e,!1);const o=new T({WGSLShaderMaterial:H}),n=o.resolve(e);e.roughness=.2,t(o.resolve(e)).toBe(n),t(n?.uniforms.roughness.value).toBe(.8),M(e),t(o.resolve(e)).toBe(n),t(n?.uniforms.roughness.value).toBe(.2)}),o("binds uniforms referenced only by an MRT material output",()=>{const e=g("roughness",.7),o=new c({color:f(5601177),alphaTest:.1});o.outputRoughness=e;const n=new T({WGSLShaderMaterial:H},e=>[e.outputColor,B(y(0,0,1),e.outputRoughness)]).resolve(o);t(n?.fragmentShader).toContain("materialUniforms.roughness"),t(n?.fragmentShader).not.toContain("graphColor"),t(n?.fragmentShader).toMatch(/if \(.+ < 0\.1\) \{ discard; \}/),t(n?.uniforms.roughness?.value).toBe(.7)}),o("compiles a landscape composite built from node material semantic outputs",()=>{const e=new T({WGSLShaderMaterial:H}),o=new c({color:v({color:p(5147450),roughness:.82,metalness:0})}),n=new c({color:v({color:p(7432286),roughness:.6,metalness:.05})}),a=new G;a.layers=[o,n];const r=e.resolve(a.build());t(r).toBeInstanceOf(H),t(r?.fragmentShader).toContain("rendererDirectionalLightForLight"),t(r?.vertexShader).toContain("@location(6) material: vec4<f32>"),t(r?.vertexShader).toContain("@location(8) hole: f32")}),o("allocates the trail's authored vertex attributes",()=>{const e=new T({WGSLShaderMaterial:H}).resolve(P.createBaseMaterial());t(e).toBeInstanceOf(H),t(e?.vertexAttributes).toEqual(t.arrayContaining([t.objectContaining({name:"nodeID",shaderLocation:6,format:"float32"}),t.objectContaining({name:"nodeCenter",shaderLocation:7,format:"float32x3"})]))}),o("uses Three's default value when a geometry has no uv1 attribute",()=>{const e=W([{name:"uv1",shaderLocation:6,format:"float32x2"},{name:"custom",shaderLocation:7,format:"float32"}]);t(e).toEqual(t.arrayContaining([t.objectContaining({name:"uv1",defaultValue:[0,0]}),t.objectContaining({name:"custom"})])),t(e[1]).not.toHaveProperty("defaultValue")}),o("compiles the foliage transform and named texture-uniform pattern",()=>{const e=new T({WGSLShaderMaterial:H}),o=new a(new Uint8Array([255,255,255,255]),1,1,l),n=new c({color:x("map").sample(C.uv),transform:S(g("windOffset",.25)),uniforms:{map:{value:o}},alphaTest:.5}),r=e.resolve(n);t(r).toBeInstanceOf(H),t(r?.vertexShader).toContain("rendererClipPosition(_ng_localPosition"),t(r?.depthVertexShader).toContain("materialUniforms.windOffset"),t(r?.depthFragmentShader).toContain("textureSample("),t(r?.depthFragmentShader).toContain("< 0.5) { discard;"),t(r?.pointShadowFragmentShader).toContain("distanceToLight")}),o("rebuilds cached materials when scene-local texture bindings change",()=>{const e=new T({WGSLShaderMaterial:H}),o=new a(new Uint8Array([255,255,255,255]),1,1,l),n=new a(new Uint8Array([32,64,128,255]),1,1,l),r=new c({color:x("map").sample(C.uv),uniforms:{map:{value:o}},alphaTest:.5}),i=e.resolve(r);r.uniforms.map.value=n;const s=e.resolve(r);t(s).not.toBe(i),t(i.disposed).toBe(!0),r.dispose();const d=e.resolve(r);t(d).not.toBe(s),t(s.disposed).toBe(!0)}),o("uses the renderer batch id without Three’s batchingIdTexture",()=>{const e=new T({WGSLShaderMaterial:H}),o=new a(new Uint8Array([255,96,24,255]),1,1,l),n=new c({color:f(u("vp0")),uniforms:{vp0:{value:o}}}),r=e.resolve(n);t(r).toBeInstanceOf(H),t(r?.vertexShader).toContain("rendererBatchingId(input.instanceIndex)")}),o("compiles depth nodes that use fragment-coordinate expressions",()=>{const e=new T({WGSLShaderMaterial:H}),o=new c({color:f(y(D.x,D.y,I))}),n=e.resolve(o);t(n).toBeInstanceOf(H),t(n?.fragmentShader).toContain("input.position.xy"),t(n?.fragmentShader).toContain("input.position.z"),t(n?.fragmentShader).toContain("rendererViewportSize()"),t(n?.fragmentShader).not.toContain("gl_FragCoord")}),o("maps scene color and depth nodes to renderer-owned textures",()=>{const e=new T({WGSLShaderMaterial:H}),o=new c({color:q(D).multiplyScalar(j(D))}),n=e.resolve(o);t(n.sceneTextures).toEqual({hology_scene_map:"sceneColor",hology_depth_map:"sceneDepth"}),t(n.graphTextures).toEqual({}),t(n.fragmentShader).toContain("hology_scene_mapTexture"),t(n.fragmentShader).toContain("hology_depth_mapTexture"),t(n.fragmentShader).toContain("vec4<f32>(textureSample(hology_depth_mapTexture")}),o("caches distinct material variants for opaque and late draw stages",()=>{const e=new T({WGSLShaderMaterial:H},(e,t)=>"opaque"===t?[f(y(1)),f(y(0))]:void 0),o=new c({color:f(y(1))}),n=e.resolve(o,"opaque"),a=e.resolve(o,"late");t(n).not.toBe(a),t(e.resolve(o,"opaque")).toBe(n),t(e.resolve(o,"late")).toBe(a),t(n?.fragmentShader).toContain("@location(1)"),t(a?.fragmentShader).not.toContain("@location(1)")}),o("reconstructs WebGPU depth positions with inverted NDC Y",()=>{const e=new T({WGSLShaderMaterial:H}),o=new c({color:f(k.add(V.multiplyScalar(0)))}),n=e.resolve(o);t(n.fragmentShader).toContain("vec2<f32>(2.0, -2.0)"),t(n.fragmentShader).toMatch(/-\(float_op_\d+\)/)}),o("emits dither and parallax nodes without GLSL custom functions",()=>{const e=new T({WGSLShaderMaterial:H}),o=new a(new Uint8Array([128,128,128,255]),1,1,l),n=O(C.uv,x("heightMap",o),m(.03)),r=new c({color:B(n.x,n.y,E(y(.2,.4,.8)).z,1)}),i=e.resolve(r);t(i).toBeInstanceOf(H),t(i?.fragmentShader).toContain("textureSampleLevel(heightMapTexture, heightMapSampler"),t(i?.fragmentShader).toMatch(/= -dpdy\(-pom_\d+ViewPosition\)/),t(i?.fragmentShader).toMatch(/= -dpdy\(pom_\d+Uv\)/),t(i?.fragmentShader).not.toContain("customFunction_"),t(i?.fragmentShader).not.toContain("gl_FragCoord")}),o("inherits, updates, and clears the WebGPU world environment",()=>{const e=new a(new Uint8Array([255,255,255,255]),1,1,l),o=new c({color:v({color:p(8421504),roughness:.5,metalness:.1})}),n=new T({WGSLShaderMaterial:H});n.setWorldEnvironment({texture:e,intensity:.75});const r=n.resolve(o);t(r.fragmentShader).toContain("envMapTexture"),t(r.uniforms.envMapIntensity?.value).toBe(.75),t(o.envMap).toBeUndefined(),n.setWorldEnvironment({texture:e,intensity:.25});const i=n.resolve(o);t(i).toBe(r),t(i.uniforms.envMapIntensity?.value).toBe(.25),n.setWorldEnvironment(null);const s=n.resolve(o);t(s).not.toBe(r),t(r.disposed).toBe(!0),t(s.fragmentShader).not.toContain("envMapTexture")}),o("keeps an authored material environment ahead of the world environment",()=>{const e=new a(new Uint8Array([255,255,255,255]),1,1,l),o=new a(new Uint8Array([64,96,128,255]),1,1,l),r=new a(new Uint8Array([32,48,64,255]),1,1,l),i=new c({color:v({color:p(8421504),roughness:.5,metalness:.1}),envMap:o}),s=n.fn(()=>r),d=new T({WGSLShaderMaterial:H},void 0,s);d.setWorldEnvironment({texture:e,intensity:.2}),d.resolve(i),t(s).toHaveBeenCalledWith(o),t(i.uniforms.envMap.value).toBe(r),t(i.envMap).toBe(o)})});/*
2
2
  * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -0,0 +1,19 @@
1
+ import { AudioListener } from 'three';
2
+ /** Matrix traversals may visit the listener several times in a render turn.
3
+ * Publish only the final pose, without scheduling native audio work while the
4
+ * shared engine audio context is suspended. Audio nodes/gain remain unchanged.
5
+ */
6
+ export declare class FrameAudioListener extends AudioListener {
7
+ private pendingPose;
8
+ private disposedPose;
9
+ private readonly poseClock;
10
+ private readonly positionScratch;
11
+ private readonly orientationScratch;
12
+ private readonly quaternionScratch;
13
+ private readonly scaleScratch;
14
+ private readonly lastPose;
15
+ updateMatrixWorld(force?: boolean): void;
16
+ private readonly flushPose;
17
+ disposePoseUpdates(): void;
18
+ }
19
+ //# sourceMappingURL=frame-audio-listener.d.ts.map
@@ -0,0 +1,4 @@
1
+ import{AudioListener as t,Clock as e,Object3D as i,Quaternion as s,Vector3 as o}from"three";export class FrameAudioListener extends t{constructor(){super(...arguments),this.pendingPose=!1,this.disposedPose=!1,this.poseClock=new e,this.positionScratch=new o,this.orientationScratch=new o,this.quaternionScratch=new s,this.scaleScratch=new o,this.lastPose=new Float64Array(9).fill(NaN),this.flushPose=()=>{if(this.pendingPose=!1,this.disposedPose||"running"!==this.context.state)return;this.matrixWorld.decompose(this.positionScratch,this.quaternionScratch,this.scaleScratch),this.orientationScratch.set(0,0,-1).applyQuaternion(this.quaternionScratch);const t=this.positionScratch,e=this.orientationScratch,i=this.up,s=this.lastPose;if(s[0]===t.x&&s[1]===t.y&&s[2]===t.z&&s[3]===e.x&&s[4]===e.y&&s[5]===e.z&&s[6]===i.x&&s[7]===i.y&&s[8]===i.z)return;const o=this.context.listener;if(o.positionX){const s=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(t.x,s),o.positionY.linearRampToValueAtTime(t.y,s),o.positionZ.linearRampToValueAtTime(t.z,s),o.forwardX.linearRampToValueAtTime(e.x,s),o.forwardY.linearRampToValueAtTime(e.y,s),o.forwardZ.linearRampToValueAtTime(e.z,s),o.upX.linearRampToValueAtTime(i.x,s),o.upY.linearRampToValueAtTime(i.y,s),o.upZ.linearRampToValueAtTime(i.z,s)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(e.x,e.y,e.z,i.x,i.y,i.z);s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=e.x,s[4]=e.y,s[5]=e.z,s[6]=i.x,s[7]=i.y,s[8]=i.z}}updateMatrixWorld(t){i.prototype.updateMatrixWorld.call(this,t),this.disposedPose||"running"!==this.context.state||this.pendingPose||(this.timeDelta=Math.min(this.poseClock.getDelta(),.05),this.pendingPose=!0,queueMicrotask(this.flushPose))}disposePoseUpdates(){this.disposedPose=!0}}/*
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
+ * See the LICENSE.md file for details.
4
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hology/core",
3
- "version": "0.0.267",
3
+ "version": "0.0.268",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -227,7 +227,7 @@
227
227
  "recast-navigation": "0.39.0",
228
228
  "rxjs": "7.8.1",
229
229
  "three-mesh-bvh": "^0.7.5",
230
- "three-shader-graph": "0.2.66",
230
+ "three-shader-graph": "0.2.68",
231
231
  "three-stdlib": "2.34.0",
232
232
  "ts-key-enum": "^2.0.12",
233
233
  "typedi": "^0.10.0"