@hology/core 0.0.182 → 0.0.184

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.
Files changed (176) hide show
  1. package/dist/config/project-config.js +1 -1
  2. package/dist/controllers/base-game-controller.js +1 -1
  3. package/dist/csm.js +1 -1
  4. package/dist/effects/particles/examples.js +1 -1
  5. package/dist/effects/particles/particle-system-config.js +1 -1
  6. package/dist/effects/vfx/behaviours.js +1 -1
  7. package/dist/effects/vfx/index.js +1 -1
  8. package/dist/effects/vfx/initializsers.js +1 -1
  9. package/dist/effects/vfx/rates.js +1 -1
  10. package/dist/effects/vfx/stretched-sprite.js +1 -1
  11. package/dist/effects/vfx/trail-renderer.js +1 -1
  12. package/dist/effects/vfx/vfx-actor.js +1 -1
  13. package/dist/effects/vfx/vfx-asset.js +1 -1
  14. package/dist/effects/vfx/vfx-collision-behaviour.js +1 -1
  15. package/dist/effects/vfx/vfx-defs.js +1 -1
  16. package/dist/effects/vfx/vfx-materializer.js +1 -1
  17. package/dist/effects/vfx/vfx-old-materializer.js +1 -1
  18. package/dist/effects/vfx/vfx-param.js +1 -1
  19. package/dist/effects/vfx/vfx-renderers.js +1 -1
  20. package/dist/effects/vfx/vfx-service.js +1 -1
  21. package/dist/effects/vfx/zones.js +1 -1
  22. package/dist/game-component/component-decorators.js +1 -1
  23. package/dist/game-component/game-component.js +1 -1
  24. package/dist/gameplay/actors/actor.js +1 -1
  25. package/dist/gameplay/actors/builtin/camera-actor.js +1 -1
  26. package/dist/gameplay/actors/builtin/components/character/character-animation.js +1 -1
  27. package/dist/gameplay/actors/builtin/components/character/character-movement.js +1 -1
  28. package/dist/gameplay/actors/builtin/components/character/modes.js +1 -1
  29. package/dist/gameplay/actors/builtin/components/editor-sprite-component.js +1 -1
  30. package/dist/gameplay/actors/builtin/components/index.js +1 -1
  31. package/dist/gameplay/actors/builtin/components/mesh-component.js +1 -1
  32. package/dist/gameplay/actors/builtin/components/scene-component.js +1 -1
  33. package/dist/gameplay/actors/builtin/components/tween-component.js +1 -1
  34. package/dist/gameplay/actors/builtin/components/volume-editor-component.js +1 -1
  35. package/dist/gameplay/actors/builtin/index.js +1 -1
  36. package/dist/gameplay/actors/builtin/navmesh-actor.js +1 -1
  37. package/dist/gameplay/actors/builtin/positional-audio-actor.js +1 -1
  38. package/dist/gameplay/actors/builtin/post-process-volume-actor.js +1 -1
  39. package/dist/gameplay/actors/builtin/spawn-point.js +1 -1
  40. package/dist/gameplay/actors/builtin/trigger-volume.js +1 -1
  41. package/dist/gameplay/actors/camera/camera-component.js +1 -1
  42. package/dist/gameplay/actors/camera/third-person-camera-component.js +1 -1
  43. package/dist/gameplay/actors/component.js +1 -1
  44. package/dist/gameplay/actors/factory.js +1 -1
  45. package/dist/gameplay/actors/index.js +1 -1
  46. package/dist/gameplay/actors/internal/component-init.js +1 -1
  47. package/dist/gameplay/actors/internal/container-map.js +1 -1
  48. package/dist/gameplay/ai/behavior-tree/bt.js +1 -1
  49. package/dist/gameplay/ai/behavior-tree/move.js +1 -1
  50. package/dist/gameplay/ai/build-tile.js +1 -1
  51. package/dist/gameplay/ai/dynamic-tiled-navmesh.js +1 -1
  52. package/dist/gameplay/ai/dynamic-tiled-navmesh.worker.js +1 -1
  53. package/dist/gameplay/ai/index.js +1 -1
  54. package/dist/gameplay/ai/navigation.js +1 -1
  55. package/dist/gameplay/animation/anim-sm.js +1 -1
  56. package/dist/gameplay/animation/root-motion.js +1 -1
  57. package/dist/gameplay/env.js +1 -1
  58. package/dist/gameplay/index.js +1 -1
  59. package/dist/gameplay/initiate.js +2 -2
  60. package/dist/gameplay/inject.d.ts +3 -1
  61. package/dist/gameplay/inject.js +1 -1
  62. package/dist/gameplay/input/index.js +1 -1
  63. package/dist/gameplay/input/input-service.js +1 -1
  64. package/dist/gameplay/input/input.js +1 -1
  65. package/dist/gameplay/input/keybind.js +1 -1
  66. package/dist/gameplay/polyfill.js +1 -1
  67. package/dist/gameplay/services/asset-loader.js +1 -1
  68. package/dist/gameplay/services/physics/abstract-physics-system.js +1 -1
  69. package/dist/gameplay/services/physics/collision-contact.js +1 -1
  70. package/dist/gameplay/services/physics/physics-system.js +1 -1
  71. package/dist/gameplay/services/pointer-events.js +1 -1
  72. package/dist/gameplay/services/render.js +1 -1
  73. package/dist/gameplay/services/shader-provider.js +1 -1
  74. package/dist/gameplay/services/world.js +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/rendering/bloom/LuminosityHighPassShader.js +1 -1
  77. package/dist/rendering/bloom/UnrealBloomPass.js +1 -1
  78. package/dist/rendering/bloom/types.js +1 -1
  79. package/dist/rendering/color-pass.js +1 -1
  80. package/dist/rendering/fog/fog-volume-actor.js +1 -1
  81. package/dist/rendering/fog/fog-volume-object.js +1 -1
  82. package/dist/rendering/fog/volumetric-fog-pass.js +1 -1
  83. package/dist/rendering/outline-effect.js +1 -1
  84. package/dist/rendering/shader-override.js +1 -1
  85. package/dist/rendering/ssr/SSRPass.js +1 -1
  86. package/dist/rendering/ssr/SSRShader.js +1 -1
  87. package/dist/rendering/tone-mapping.js +1 -1
  88. package/dist/rendering.d.ts +7 -1
  89. package/dist/rendering.js +2 -2
  90. package/dist/scene/asset-resource-loader.js +1 -1
  91. package/dist/scene/assets-provider.js +1 -1
  92. package/dist/scene/batched-mesh-2.js +2 -2
  93. package/dist/scene/bootstrap.js +1 -1
  94. package/dist/scene/collision/collision-shape-import.js +1 -1
  95. package/dist/scene/collision/collision-shape.js +1 -1
  96. package/dist/scene/landscape/landscape-manager.js +1 -1
  97. package/dist/scene/landscape/landscape.js +1 -1
  98. package/dist/scene/landscape/utils.js +1 -1
  99. package/dist/scene/materializer.d.ts +5 -0
  100. package/dist/scene/materializer.js +2 -2
  101. package/dist/scene/materials/grass-foliage.js +1 -1
  102. package/dist/scene/materials/grass.js +1 -1
  103. package/dist/scene/materials/utils/material-painting.js +1 -1
  104. package/dist/scene/materials/utils/noise.glsl.js +1 -1
  105. package/dist/scene/materials/water.js +1 -1
  106. package/dist/scene/model.js +1 -1
  107. package/dist/scene/objects/prefab.js +1 -1
  108. package/dist/scene/objects/ramp-geometry.js +1 -1
  109. package/dist/scene/objects/shapes.js +1 -1
  110. package/dist/scene/objects/stairs-geometry.js +1 -1
  111. package/dist/scene/runtime-asset-service.js +1 -1
  112. package/dist/scene/runtime-backend-service.js +1 -1
  113. package/dist/scene/runtime-bundled-backend-service.js +1 -1
  114. package/dist/scene/scene-data-service.js +1 -1
  115. package/dist/scene/sky.js +1 -1
  116. package/dist/scene/storage/storage.js +1 -1
  117. package/dist/shader/builtin/decal-standard-shader.js +1 -1
  118. package/dist/shader/builtin/decal-unlit-shader.js +1 -1
  119. package/dist/shader/builtin/index.js +1 -1
  120. package/dist/shader/builtin/lambert-shader.js +1 -1
  121. package/dist/shader/builtin/landscape-composite-shader.js +1 -1
  122. package/dist/shader/builtin/landscape-shader.js +1 -1
  123. package/dist/shader/builtin/layered-shader.js +1 -1
  124. package/dist/shader/builtin/standard-shader.js +1 -1
  125. package/dist/shader/builtin/toon-shader.js +1 -1
  126. package/dist/shader/builtin/unlit-shader.js +1 -1
  127. package/dist/shader/color-layer.js +1 -1
  128. package/dist/shader/decal-shader.js +1 -1
  129. package/dist/shader/index.js +1 -1
  130. package/dist/shader/parameter.js +1 -1
  131. package/dist/shader/shader.js +1 -1
  132. package/dist/shader/sprite-shader.js +1 -1
  133. package/dist/shader/trail-shader.js +1 -1
  134. package/dist/shader-nodes/bulge.js +1 -1
  135. package/dist/shader-nodes/curve-sample.js +1 -1
  136. package/dist/shader-nodes/decal.js +1 -1
  137. package/dist/shader-nodes/depth.js +1 -1
  138. package/dist/shader-nodes/effects.js +1 -1
  139. package/dist/shader-nodes/glsl-node.js +1 -1
  140. package/dist/shader-nodes/index.js +1 -1
  141. package/dist/shader-nodes/landscape.js +1 -1
  142. package/dist/shader-nodes/layers.js +1 -1
  143. package/dist/shader-nodes/math.js +1 -1
  144. package/dist/shader-nodes/particle.js +1 -1
  145. package/dist/shader-nodes/pom.js +1 -1
  146. package/dist/shader-nodes/scene-sample.js +1 -1
  147. package/dist/shader-nodes/shapes.js +1 -1
  148. package/dist/shader-nodes/texture-sequence.js +1 -1
  149. package/dist/shader-nodes/time.js +1 -1
  150. package/dist/shader-nodes/voronoi.js +1 -1
  151. package/dist/test/injection.test.js +1 -1
  152. package/dist/utils/async.js +1 -1
  153. package/dist/utils/buffer.js +1 -1
  154. package/dist/utils/collections.js +1 -1
  155. package/dist/utils/curve.js +1 -1
  156. package/dist/utils/files.js +1 -1
  157. package/dist/utils/materials.js +1 -1
  158. package/dist/utils/math.js +1 -1
  159. package/dist/utils/mesh.js +1 -1
  160. package/dist/utils/polyfill.js +1 -1
  161. package/dist/utils/three/cleanup.js +1 -1
  162. package/dist/utils/three/depth-pass.js +1 -1
  163. package/dist/utils/three/gpu-stats-panel.js +1 -1
  164. package/dist/utils/three/line-sphere.js +1 -1
  165. package/dist/utils/three/outline-pass.js +1 -1
  166. package/dist/utils/three/positional-audio-helper.js +1 -1
  167. package/dist/utils/three/stats.js +1 -1
  168. package/dist/utils/three/transform-controls.js +1 -1
  169. package/dist/utils/three/traverse.js +1 -1
  170. package/dist/utils/three/unscaled-sprite.js +1 -1
  171. package/dist/utils/type.js +1 -1
  172. package/dist/utils/uuid.js +1 -1
  173. package/dist/utils/voxel-bitset.js +1 -1
  174. package/dist/worker/index.js +1 -1
  175. package/package.json +1 -1
  176. package/tsconfig.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
1
  import{__decorate as r,__metadata as e}from"tslib";import{NodeShader as t}from"../shader.js";import{Parameter as o}from"../parameter.js";import{ColorLayer as l}from"../../shader/color-layer.js";import{rgba as s}from"three-shader-graph";export class LayeredShader extends t{constructor(){super(...arguments),this.layers=[]}output(){const r=this.layers.filter(r=>!1!==r.enabled);if(0===r.length)return{color:s("black",0)};let e=r[0].apply(null);for(let t=1;t<r.length;t++)e=r[t].apply(e);return{color:e}}build(){const r=super.build();return r.forceSinglePass=!1,r}}r([o({type:l}),e("design:type",Array)],LayeredShader.prototype,"layers",void 0);/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
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{removeObjectUndefined as p}from"../../utils/collections.js";const l=new r;export class StandardShader extends s{constructor(){super(...arguments),this.color=new t("#FFFFFF"),this.opacity=1,this.roughness=1,this.metalness=0,this.normalScale=new i(1,1),this.heightMap=l}build(){const e=(null!=this.map||null!=this.normalMap)&&null!=this.heightMap&&this.heightMap!=l&&0!==this.heightScale;return new(e?ParallaxStandardMaterial:n)(p({color:this.color,opacity:this.opacity,roughness:this.roughness,metalness:this.metalness,map:this.map,lightMap:this.lightMap,lightMapIntensity:this.lightMapIntensity,aoMap:this.aoMap,aoMapIntensity:this.aoMapIntensity,emissive:this.emissive,emissiveIntensity:this.emissiveIntensity,emissiveMap:this.emissiveMap,bumpMap:this.bumpMap,bumpScale:this.bumpScale,normalMap:this.normalMap,normalScale:this.normalScale,displacementMap:this.displacementMap,displacementScale:this.displacementScale,displacementBias:this.displacementBias,roughnessMap:this.roughnessMap,metalnessMap:this.metalnessMap,alphaMap:this.alphaMap,envMap:this.envMap,envMapIntensity:this.envMapIntensity,refractionRatio:this.refractionRatio,...e?{heightMap:this.heightMap,heightScale:this.heightScale}:{}}))}}e([o(),a("design:type",t)],StandardShader.prototype,"color",void 0),e([o({label:"Color Map"}),a("design:type",r)],StandardShader.prototype,"map",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"opacity",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"alphaMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"roughness",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"roughnessMap",void 0),e([o({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"metalness",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"metalnessMap",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"lightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"lightMapIntensity",void 0),e([o(),a("design:type",r)],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",r)],StandardShader.prototype,"emissiveMap",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"bumpMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"bumpScale",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"normalMap",void 0),e([o(),a("design:type",i)],StandardShader.prototype,"normalScale",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"displacementMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"displacementScale",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"displacementBias",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({range:[0,1]}),a("design:type",Number)],StandardShader.prototype,"refractionRatio",void 0),e([o(),a("design:type",r)],StandardShader.prototype,"heightMap",void 0),e([o(),a("design:type",Number)],StandardShader.prototype,"heightScale",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 varying vec3 vViewDirTS;\n varying mat3 vTBN;\n "),e.vertexShader=e.vertexShader.replace("#include <begin_vertex>","\n #include <begin_vertex>\n vec3 N = normalize(normalMatrix * normal);\n vec3 T = normalize(normalMatrix * tangent.xyz);\n vec3 B = cross(N, T) * tangent.w;\n vTBN = mat3(T, B, N);\n\n vec3 viewDir = cameraPosition - (modelMatrix * vec4(transformed, 1.0)).xyz;\n vViewDirTS = normalize(vTBN * viewDir);\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 varying vec3 vViewDirTS;\n varying mat3 vTBN;\n\n vec2 parallaxOffset(vec2 uv, vec3 viewDirTS) {\n float h = texture(heightMap, uv).r;\n return uv - (viewDirTS.xy / viewDirTS.z) * (h * heightScale);\n }\n\n vec2 parallaxOcclusion2(vec2 uv, vec3 viewDirTS) {\n vec3 viewDir = normalize(vViewPosition);\n vec3 vv = -viewDir * vTBN;\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 // Probably should use actual normal but it might not matter\n vec3 nNormal = vec3(0.0, 0.0, 1.0);\n float nNumSamples = mix(float(maxLayers), float(minLayers), dot(viewDir, nNormal));\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 < 50; 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 vec2 uvPOM = vMapUv ;\n if (parallaxType == 1) {\n uvPOM = parallaxOffset(vMapUv , vViewDirTS);\n } else if (parallaxType == 2) {\n uvPOM = parallaxOcclusion2(vMapUv , vViewDirTS);\n }\n\n\n vec4 texelColor = texture2D(map, uvPOM);\n //texelColor = mapTexelToLinear(texelColor);\n diffuseColor *= texelColor;\n "),e.fragmentShader=e.fragmentShader.replace("#include <normal_fragment_maps>","\n #ifdef USE_NORMALMAP\n vec3 mapN = texture2D(normalMap, uvPOM).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * 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}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{__decorate as t,__metadata as e}from"tslib";import{Color as o,DataTexture as i,MeshToonMaterial as p,RedFormat as s,Texture as a,Vector2 as n}from"three";import{removeObjectUndefined as r}from"../../utils/collections.js";import{Parameter as h}from"../parameter.js";import{Shader as d}from"../shader.js";export class ToonShader extends d{constructor(){super(...arguments),this.color=new o("#FFFFFF"),this.opacity=1,this.intensity=1,this.lightSteps=[],this.normalScale=new n(1,1)}build(){let t;if(null!=this.lightSteps&&this.lightSteps.length>0){const e=new Uint8Array(this.lightSteps.length);for(let t=0;t<=e.length;t++)e[t]=255*this.lightSteps[t];t=new i(e,e.length,1,s),t.needsUpdate=!0}return new p(r({color:this.color.multiplyScalar(this.intensity),opacity:this.opacity,map:this.map,gradientMap:t,lightMap:this.lightMap,lightMapIntensity:this.lightMapIntensity,normalMap:this.normalMap,normalScale:this.normalScale,emissive:this.emissive,emissiveIntensity:this.emissiveIntensity,emissiveMap:this.emissiveMap,aoMap:this.aoMap,aoMapIntensity:this.aoMapIntensity,alphaMap:this.alphaMap}))}}t([h(),e("design:type",o)],ToonShader.prototype,"color",void 0),t([h({range:[0,1]}),e("design:type",Number)],ToonShader.prototype,"opacity",void 0),t([h({range:[0,10]}),e("design:type",Number)],ToonShader.prototype,"intensity",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"map",void 0),t([h({type:Number,array:!0,range:[0,1]}),e("design:type",Array)],ToonShader.prototype,"lightSteps",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"lightMap",void 0),t([h(),e("design:type",Number)],ToonShader.prototype,"lightMapIntensity",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"normalMap",void 0),t([h(),e("design:type",n)],ToonShader.prototype,"normalScale",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"aoMap",void 0),t([h(),e("design:type",Number)],ToonShader.prototype,"aoMapIntensity",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"alphaMap",void 0),t([h(),e("design:type",o)],ToonShader.prototype,"emissive",void 0),t([h({range:[0,10]}),e("design:type",Number)],ToonShader.prototype,"emissiveIntensity",void 0),t([h(),e("design:type",a)],ToonShader.prototype,"emissiveMap",void 0);/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{__decorate as t,__metadata as e}from"tslib";import{AddOperation as i,MultiplyOperation as o,MixOperation as p,Color as a,MeshBasicMaterial as r,Texture as n}from"three";import{Shader as s}from"../shader.js";import{Parameter as l}from"../parameter.js";import{removeObjectUndefined as d}from"../../utils/collections.js";export class UnlitShader extends s{constructor(){super(...arguments),this.color=new a("#FFFFFF"),this.opacity=1,this.intensity=1}build(){return new r(d({color:this.color.multiplyScalar(this.intensity),emissive:this.color.multiplyScalar(this.intensity),opacity:this.opacity,map:this.map,lightMap:this.lightMap,lightMapIntensity:this.lightMapIntensity,aoMap:this.aoMap,aoMapIntensity:this.aoMapIntensity,specularMap:this.specularMap,alphaMap:this.alphaMap,envMap:this.envMap,combine:this.combine,reflectivity:this.reflectivity,refractionRatio:this.refractionRatio}))}}t([l(),e("design:type",a)],UnlitShader.prototype,"color",void 0),t([l({range:[0,1]}),e("design:type",Number)],UnlitShader.prototype,"opacity",void 0),t([l({range:[0,10]}),e("design:type",Number)],UnlitShader.prototype,"intensity",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"map",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"lightMap",void 0),t([l(),e("design:type",Number)],UnlitShader.prototype,"lightMapIntensity",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"aoMap",void 0),t([l(),e("design:type",Number)],UnlitShader.prototype,"aoMapIntensity",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"specularMap",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"alphaMap",void 0),t([l(),e("design:type",n)],UnlitShader.prototype,"envMap",void 0),t([l({options:[{name:"Mix",value:p},{name:"Multiply",value:o},{name:"Add",value:i}]}),e("design:type",Number)],UnlitShader.prototype,"combine",void 0),t([l({range:[0,1]}),e("design:type",Number)],UnlitShader.prototype,"reflectivity",void 0),t([l({range:[0,1]}),e("design:type",Number)],UnlitShader.prototype,"refractionRatio",void 0);/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{__decorate as e,__metadata as t}from"tslib";import{Color as r,Texture as o,Vector2 as a}from"three";import{abs as s,attributes as l,float as p,FloatNode as i,max as y,min as n,mix as u,pow as d,rgba as c,SimplexNoiseNode as h,standardMaterial as L,step as g,textureSampler2d as M,varying as m,varyingAttributes as x,vec2 as v,colorToNormal as k,varyingTransformed as f}from"three-shader-graph";import{edgeDepthEffect as C,fresnelEffect as b,oneMinus as T,sceneColorSampler as w,screenUV as S,timeUniforms as A}from"../shader-nodes";import{SerializedParamType as V}from"../scene/model";import{Parameter as F}from"../gameplay";export var ColorLayerType;!function(e){e.solid="solid",e.refraction="refraction",e.lighting="lighting",e.texture="texture",e.textureMask="textureMask",e.vertexMask="vertexMask",e.fresnelMask="fresnelMask",e.depthMask="depthMask",e.gradientMask="gradientMask"}(ColorLayerType||(ColorLayerType={}));export const defaultValueColorLayer={enabled:!0,type:ColorLayerType.solid,outputType:"rgba",opacity:1,blendMode:"normal",params:{color:{type:V.Color,value:"#FFFFFF"}}};export const defaultValueMaskLayer={enabled:!0,type:ColorLayerType.textureMask,outputType:"alpha",opacity:1,blendMode:"normal",params:{texture:{type:V.Texture,value:null},channel:{type:V.String,value:"red"}}};const N={normal:(e,t,r)=>u(e,t,r),add:(e,t,r)=>e.add(t.multiplyScalar(r)),multiply:(e,t,r)=>u(e,e.multiply(t),r),screen:(e,t,r)=>u(e,T(T(e).multiply(T(t))),r),overlay:(e,t,r)=>{const o=u(e.multiply(t).multiplyScalar(2),T(p(2).multiplyVec3(T(e)).multiply(T(t))),g(.5,e));return u(e,o.rgb,r)},difference:(e,t,r)=>u(e,s(e.subtract(t)),r),subtract:(e,t,r)=>u(e,e.subtract(t),r)};export const blendModes=Object.keys(N);const z={normal:(e,t,r)=>u(e,t,r),add:(e,t,r)=>e.add(t.multiply(r)),multiply:(e,t,r)=>u(e,e.multiply(t),r),max:(e,t,r)=>u(e,y(e,t),r),min:(e,t,r)=>u(e,n(e,t),r),difference:(e,t,r)=>u(e,s(e.subtract(t)),r),subtract:(e,t,r)=>u(e,e.subtract(t),r)};export const maskBlendModes=Object.keys(z);export class ColorLayer{constructor(){this.layers=[]}static get outputType(){return"rgba"}apply(e){const t=this.output();if(t instanceof i)return c(e.rgb,this.applyMask(e.a));{let a=t;if(null!=this.layers&&(a=this.layers.filter(e=>!1!==e.enabled).reduce((e,t)=>t.apply(e),t)),null==e)return a;const s=N[this.blendMode]??N.normal,l=a.a.multiply(this.opacity),p=s(e.rgb,a.rgb,l);let i=(r=e.a,(o=l).add(r.multiply(T(o))));return c(p,i)}var r,o}applyMask(e){const t=this.output();if(t instanceof i){let r=t;null!=this.layers&&(r=this.layers.filter(e=>!1!==e.enabled).reduce((e,t)=>t.applyMask(e),t));return(z[this.blendMode]??N.normal)(e,r,this.opacity)}return console.error("Can not use non-float layer for mask"),e}init(e,t){}static async decode(e,t){if(console.log("Decode value",e),!isColorLayerSerialized(e))return;const r=new layerTypes[e.type];return r.enabled=e.enabled,r.opacity=e.opacity??1,r.blendMode=e.blendMode,r}output(){return c("white")}}export class SolidColorLayer extends ColorLayer{constructor(){super(...arguments),this.color=new r("white"),this.layers=[]}output(){return c(this.color).multiplyScalar(1.3)}}e([F(),t("design:type",r)],SolidColorLayer.prototype,"color",void 0),e([F({type:ColorLayer,array:!0}),t("design:type",Array)],SolidColorLayer.prototype,"layers",void 0);export class TextureColorLayer extends ColorLayer{constructor(){super(...arguments),this.texture=new o,this.scale=new a(1,1),this.scroll=new a(0,0),this.layers=[]}output(){let e=x.uv;return null!=this.scroll&&this.scroll.lengthSq()>0&&(e=e.add(v(this.scroll).multiplyScalar(A.elapsed))),e=e.multiply(v(this.scale??1)),M(this.texture).sample(e)}}e([F(),t("design:type",o)],TextureColorLayer.prototype,"texture",void 0),e([F(),t("design:type",a)],TextureColorLayer.prototype,"scale",void 0),e([F(),t("design:type",a)],TextureColorLayer.prototype,"scroll",void 0),e([F({type:ColorLayer,array:!0}),t("design:type",Array)],TextureColorLayer.prototype,"layers",void 0);export class RefractionColorLayer extends ColorLayer{constructor(){super(...arguments),this.texture=new o,this.layers=[]}output(){return w.sample(S.addScalar(new h(x.uv).multiply(.2)))}}e([F(),t("design:type",o)],RefractionColorLayer.prototype,"texture",void 0),e([F({type:ColorLayer,array:!0}),t("design:type",Array)],RefractionColorLayer.prototype,"layers",void 0);export class LightingColorLayer extends ColorLayer{constructor(){super(...arguments),this.roughness=1,this.metalness=0}apply(e){const t=x.uv;let r=p(this.roughness);null!=this.roughnessMap&&(r=r.multiply(M(this.roughnessMap).sample(t).g));let o=p(this.metalness);null!=this.metalnessMap&&(o=o.multiply(M(this.metalnessMap).sample(t).b));let a=f.normal;null!=this.normalMap&&(a=k(M(this.normalMap).sample(t),this.normalScale));let s=null;return null!=this.aoMap&&(s=M(this.aoMap).sample(t).r),L({color:e,metalness:o,roughness:r,normal:a})}}e([F({range:[0,1]}),t("design:type",Number)],LightingColorLayer.prototype,"roughness",void 0),e([F(),t("design:type",o)],LightingColorLayer.prototype,"roughnessMap",void 0),e([F({range:[0,1]}),t("design:type",Number)],LightingColorLayer.prototype,"metalness",void 0),e([F(),t("design:type",o)],LightingColorLayer.prototype,"metalnessMap",void 0),e([F(),t("design:type",o)],LightingColorLayer.prototype,"aoMap",void 0),e([F(),t("design:type",Number)],LightingColorLayer.prototype,"aoMapIntensity",void 0),e([F(),t("design:type",o)],LightingColorLayer.prototype,"normalMap",void 0),e([F(),t("design:type",i)],LightingColorLayer.prototype,"normalScale",void 0);export class MaskLayer extends ColorLayer{constructor(){super(...arguments),this.power=1,this.invert=!1}static get outputType(){return"float"}output(){let e=this.outputAlpha();return this.invert&&(e=T(e)),null!=this.power&&1!==this.power&&(e=d(e,this.power)),e}outputAlpha(){throw"not implemented"}}const B=["red","green","blue","alpha"];export class TextureMaskLayer extends MaskLayer{constructor(){super(...arguments),this.texture=new o,this.channel="red",this.space="uv",this.flipU=!1,this.flipV=!1,this.scale=new a(1,1),this.scroll=new a(0,0),this.offsetLayers=[],this.offset=new a(1,0),this.power=1,this.invert=!1,this.layers=[]}outputAlpha(){let e=x.uv;switch(this.space??"uv"){case"uv":e=x.uv;break;case"world xz":e=f.worldPosition.xz}if(this.flipU&&(e=v(T(e.x),e.y)),this.flipV&&(e=v(e.x,T(e.y))),null!=this.scroll&&this.scroll.lengthSq()>0&&(e=e.add(v(this.scroll).multiplyScalar(A.elapsed))),null!=this.offsetLayers&&this.offsetLayers.length>0&&null!=this.offset&&this.offset.lengthSq()>0){const t=this.offsetLayers.reduce((e,t)=>t.applyMask(e),p(0));e=e.add(v(this.offset).multiplyScalar(t))}e=e.multiply(v(this.scale??1));return G(M(this.texture).sample(e),this.channel)}}e([F(),t("design:type",o)],TextureMaskLayer.prototype,"texture",void 0),e([F({options:B.map(e=>({name:e,value:e}))}),t("design:type",String)],TextureMaskLayer.prototype,"channel",void 0),e([F({options:["uv","world xz"].map(e=>({name:e,value:e}))}),t("design:type",String)],TextureMaskLayer.prototype,"space",void 0),e([F(),t("design:type",Boolean)],TextureMaskLayer.prototype,"flipU",void 0),e([F(),t("design:type",Boolean)],TextureMaskLayer.prototype,"flipV",void 0),e([F(),t("design:type",a)],TextureMaskLayer.prototype,"scale",void 0),e([F(),t("design:type",a)],TextureMaskLayer.prototype,"scroll",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],TextureMaskLayer.prototype,"offsetLayers",void 0),e([F(),t("design:type",a)],TextureMaskLayer.prototype,"offset",void 0),e([F(),t("design:type",Number)],TextureMaskLayer.prototype,"power",void 0),e([F(),t("design:type",Boolean)],TextureMaskLayer.prototype,"invert",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],TextureMaskLayer.prototype,"layers",void 0);export class VertexMaskLayer extends MaskLayer{constructor(){super(...arguments),this.channel="red",this.power=1,this.invert=!1,this.layers=[]}outputAlpha(){const e=l.color;return m(G(e,this.channel))}}function G(e,t){switch(t??"red"){case"red":return e.r;case"green":return e.g;case"blue":return e.b;case"alpha":return e.a}}e([F({options:B.map(e=>({name:e,value:e}))}),t("design:type",String)],VertexMaskLayer.prototype,"channel",void 0),e([F(),t("design:type",Number)],VertexMaskLayer.prototype,"power",void 0),e([F(),t("design:type",Boolean)],VertexMaskLayer.prototype,"invert",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],VertexMaskLayer.prototype,"layers",void 0);export class GradientMaskLayer extends MaskLayer{constructor(){super(...arguments),this.direction="u",this.start=0,this.end=1,this.invert=!1,this.layers=[]}outputAlpha(){return u(p(this.start),p(this.end),function(e){switch(e??"u"){case"u":return x.uv.x;case"v":return x.uv.y;case"x":return x.position.x;case"y":return x.position.y;case"z":return x.position.z}}(this.direction))}}e([F({options:["u","v","x","y","z"].map(e=>({name:e,value:e}))}),t("design:type",String)],GradientMaskLayer.prototype,"direction",void 0),e([F(),t("design:type",Number)],GradientMaskLayer.prototype,"start",void 0),e([F(),t("design:type",Number)],GradientMaskLayer.prototype,"end",void 0),e([F(),t("design:type",Boolean)],GradientMaskLayer.prototype,"invert",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],GradientMaskLayer.prototype,"layers",void 0);export class FresnelMaskLayer extends MaskLayer{constructor(){super(...arguments),this.power=1,this.invert=!1,this.layers=[]}outputAlpha(){return m(b(1))}}e([F(),t("design:type",Number)],FresnelMaskLayer.prototype,"power",void 0),e([F(),t("design:type",Boolean)],FresnelMaskLayer.prototype,"invert",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],FresnelMaskLayer.prototype,"layers",void 0);export class DepthMaskLayer extends MaskLayer{constructor(){super(...arguments),this.power=1,this.invert=!1,this.layers=[]}outputAlpha(){return C(1)}}e([F(),t("design:type",Number)],DepthMaskLayer.prototype,"power",void 0),e([F(),t("design:type",Boolean)],DepthMaskLayer.prototype,"invert",void 0),e([F({type:MaskLayer,array:!0}),t("design:type",Array)],DepthMaskLayer.prototype,"layers",void 0);export function isColorLayerSerialized(e){return"object"==typeof e&&null!==e&&"boolean"==typeof e.enabled&&"string"==typeof e.type&&e.outputType&&("object"==typeof e.params||void 0===e.params)}export const layerTypes={[ColorLayerType.solid]:SolidColorLayer,[ColorLayerType.texture]:TextureColorLayer,[ColorLayerType.refraction]:RefractionColorLayer,[ColorLayerType.lighting]:LightingColorLayer,[ColorLayerType.textureMask]:TextureMaskLayer,[ColorLayerType.vertexMask]:VertexMaskLayer,[ColorLayerType.fresnelMask]:FresnelMaskLayer,[ColorLayerType.depthMask]:DepthMaskLayer,[ColorLayerType.gradientMask]:GradientMaskLayer};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{NodeShaderMaterial as r}from"../shader-nodes/index.js";import{decalDiscard as s}from"../shader-nodes/decal.js";export class DecalNodeShader{build(){const e=this.output();let d=s;null!=e.discard&&(d=d.or(e.discard));const a=new r({transparent:!1,...e,discard:d});return a.userData.isDecal=!0,a}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export*from"./parameter.js";export*from"./builtin/index.js";export*from"./shader.js";export*from"./decal-shader.js";export*from"./sprite-shader.js";export*from"./trail-shader.js";/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import"reflect-metadata";import{reflect as t,decorateProperty as e}from"@plumier/reflect";import{ArrayMap as r}from"../utils/collections.js";Symbol("format");class o{constructor(t){this.options=t,this.isParameterDecorator=!0}}new Map;const a=new r;export function Parameter(t){return function(r,n,c){if(null!=r){a.push(r.constructor,{name:n,options:t??{}});try{e(new o(t))(r,n,c)}catch(t){console.warn("Failed to decorate method ",r,n,c)}}}}export function extractShaderParameters(t){if(null==t)return[];const e=a.get(t).map(({name:e,options:r})=>{const o=Reflect.getMetadata("design:type",t.prototype,e),a=r.type??o,n=Reflect.getMetadata("prefab:type",t.prototype,e);return r.prefabOf??(r.prefabOf=n),r.array=o===Array,{name:e,type:a,options:r}});return[...extractShaderParameters(Object.getPrototypeOf(t)).filter(t=>e.every(e=>e.name!==t.name)),...e]}export function ParameterCategory(t){}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{NodeShaderMaterial as r,BooleanNode as s,attributeFloat as e}from"../shader-nodes/index.js";export*from"./parameter.js";export class Shader{}const a=e("hole").gt(.5);export class NodeShader{build(){const e=this.output();return new r({transparent:!1,...e,...!0===e.landscape?{discard:null!=e.discard&&e.discard instanceof s?e.discard.or(a):a}:{}})}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{NodeShaderMaterial as o}from"../shader-nodes/index.js";import{Vec4Node as e,glslFunction as i,transformed as t,uniforms as r,UniformFloatNode as n}from"three-shader-graph";import*as a from"three";export class SpriteNodeShader{build(){const o=this.output(),e=getSpritePosition(new n("rotation",0));return new SpriteNodeShaderMaterial({color:o.color,discard:o.discard,transparent:o.transparent??!0,position:e,uniforms:{color:{value:new a.Color(0)}}})}}export function getSpritePosition(o){return i(e,{position:t.position,cameraPosition:r.cameraPosition,viewMatrix:r.viewMatrix,modelViewMatrix:r.modelViewMatrix,rotation:o},"\n // Scale from your model matrix\n vec2 scale;\n scale.x = length(vec3(modelMatrix[0].x, modelMatrix[0].y, modelMatrix[0].z));\n scale.y = length(vec3(modelMatrix[1].x, modelMatrix[1].y, modelMatrix[1].z));\n\n vec3 right, up;\n vec3 objectPos = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;\n\n #ifdef LOCK_Y_AXIS\n vec3 cameraPos = cameraPosition;\n vec3 lookDir = normalize(vec3(cameraPos.x - objectPos.x, 0.0, cameraPos.z - objectPos.z));\n right = normalize(vec3(lookDir.z, 0.0, -lookDir.x));\n up = vec3(0.0, 1.0, 0.0);\n #else\n right = vec3(viewMatrix[0][0], viewMatrix[1][0], viewMatrix[2][0]);\n up = vec3(viewMatrix[0][1], viewMatrix[1][1], viewMatrix[2][1]);\n #endif\n\n // then your shared code:\n vec2 center = vec2(0.5, 0.5);\n vec2 alignedPosition = (position.xy - (center - vec2(0.5))) * scale;\n\n vec2 rotatedPosition;\n rotatedPosition.x = cos(rotation) * alignedPosition.x - sin(rotation) * alignedPosition.y;\n rotatedPosition.y = sin(rotation) * alignedPosition.x + cos(rotation) * alignedPosition.y;\n\n vec3 billboardPos = objectPos + right * rotatedPosition.x + up * rotatedPosition.y;\n\n return projectionMatrix * viewMatrix * vec4(billboardPos, 1.0);\n ")}export class SpriteNodeShaderMaterial extends o{get color(){return this.uniforms.color.value}set color(o){this.uniforms.color.value=new a.Color(o)}get rotation(){return this.uniforms.rotation.value}set rotation(o){this.uniforms.rotation.value=o}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{NodeShaderMaterial as r}from"three-shader-graph";import{Trail as e}from"../effects/vfx/trail-renderer";export class TrailNodeShader{build(){const o=this.output(),{position:t}=e.getTrailShaderNodes(!1),a=new r({position:t,color:o.color});return e.applyTrailShaderParameters(a),a}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{length as r,pow as t}from"three-shader-graph";export function bulge(e,a,l=1){let o=e;o=e.subtract(a);const u=r(o),c=1===l?u:t(u,l);return o=o.multiplyScalar(c),o=e.add(a),o}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{DataTexture as e,LinearFilter as r,RedFormat as t,UnsignedByteType as n}from"three";import{textureSampler2d as p,vec2 as a}from"three-shader-graph";export function sampleCurve(e,r){return curveSampler(e).sample(r)}export function curveSampler(a,m=64){const o=new Uint8Array(m);for(let e=0;e<m;e++){const r=e/m;o[e]=255*a.getY(r)}const s=new e(o,m,1);s.format=t,s.type=n,s.minFilter=s.magFilter=r,s.needsUpdate=!0;const l=p(s);return new CurveSampler(l)}export class CurveSampler{constructor(e){this.sampler=e}sample(e){return this.sampler.sample(a(e,0)).r}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{abs as t,inverse as r,min as o,smoothstep as e,uniforms as a,varying as c,vec4 as l}from"three-shader-graph";import{depthNormal as p,depthWorldPosition as x}from"./depth.js";const d=c(r(a.instanceMatrix.multiply(a.modelMatrix))),i=d.multiplyVec(l(x,1)).xyz;export const decalNormal=d.multiplyVec(l(p,0)).xyz;export const decalDiscard=t(i.x).gt(.5).or(t(i.y).gt(.5)).or(t(i.z).gt(.5));export const decalUV=i.xz.addScalar(.5);export const decalAlpha=o(e(.5,.49,t(i.x)),o(e(.5,.49,t(i.y)),e(.5,.49,t(i.z))));/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as e from"three";import{Vector2 as t}from"three";import{cross as o,dot as r,float as n,FloatExpressionNode as s,FloatNode as c,inverse as a,normalize as i,texture2d as p,transformed as l,uniformFloat as m,uniforms as h,uniformSampler2d as u,uniformVec2 as d,unpackRGBToNormal as x,varying as f,vec2 as _,Vec2ExpressionNode as y,vec4 as U,Vec4Node as g}from"three-shader-graph";export function supportsDepthTextureExtension(e){return!0}export const depthUniformName="hology_depth_map";export const resolutionUniformName="hology_resolution";export const nearUniformName="hology_camera_near";export const farUniformName="hology_camera_far";export const sceneNormalUniformName="hology_scene_normal_map";export const depthSampler=u(depthUniformName,new e.DepthTexture(1,1));const k=m(nearUniformName,.5),$=m(farUniformName,500);class N extends c{compile(e){const t=e.variable();var o=e.get(k),r=e.get($);return{chunk:`\n float depth_${t} = 2.0 * ${o} * ${r} / (${r} + ${o} - (2.0 * ${e.get(this.depth)} - 1.0) * (${r} - ${o}));\n `,out:`depth_${t}`}}constructor(e){super(),this.depth=e}}function v(e){return new N(e)}new class extends g{constructor(){super(...arguments),this.k="31u50"}compile(e){return{pars:`\n const float UnpackDownscale_${this.k} = 255. / 256.; // 0..1 -> fraction (excluding 1)\n const vec4 PackFactors_${this.k} = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\n const vec4 UnpackFactors_${this.k} = vec4( UnpackDownscale_${this.k} / PackFactors_${this.k}.rgb, 1.0 / PackFactors_${this.k}.a );\n `,out:`UnpackFactors_${this.k}`}}};function w(e){return p(depthSampler,e).r}const V=f(h.projectionMatrix.multiplyVec(l.mvPosition).zw);export const highPrecisionEyeDepth=V.x.multiply(.5).divide(V.y).add(.5);const P=new s("gl_FragCoord.z");export const fragmentLinearEyeDepth=v(P);export const resolution=d("hology_resolution",new t(250,1e3));export const screenUV=new y("gl_FragCoord.xy").divide(resolution);export const linearEyeDepth=v(w(screenUV));const b=f(a(h.projectionMatrix)),D=f(a(h.viewMatrix));function F(e=screenUV){const t=w(e).multiply(2).subtract(1),o=e.multiplyScalar(2).subtractScalar(1),r=U(o.x,o.y,t,1),n=b.multiplyVec(r),s=n.xyz.divideScalar(n.w);return D.multiplyVec(U(s,1)).xyz}export const depthWorldPosition=F(screenUV);const S=n(1).divide(resolution.x),z=n(1).divide(resolution.y),E=F(screenUV.add(_(S,n(0)))),M=F(screenUV.add(_(n(0),z)));export const depthNormal=i(o(E.subtract(depthWorldPosition),M.subtract(depthWorldPosition)));export const sceneNormalSampler=u(sceneNormalUniformName,new e.Texture);export const sceneNormal=x(sceneNormalSampler.sample(screenUV).rgb);/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{attributes as t,clamp as r,dot as e,float as o,ifDefApply as i,normalize as m,pow as n,saturate as p,transformed as a,uniforms as c,varying as f,varyingAttributes as l,vec4 as s}from"three-shader-graph";import{fragmentLinearEyeDepth as u,linearEyeDepth as d}from"./depth.js";import{oneMinus as h}from"./math.js";c.modelMatrix.multiplyVec(s(t.position,1));export function fresnelEffect(t=1){const r=i("FLIP_SIDED",a.normal,()=>a.normal.multiplyScalar(-1));return n(h(p(e(a.viewDir,r))),o(t))}const D=o(1).subtract(r(d.subtract(u).divide(d),0,1));export function edgeDepthEffect(t=1){return n(D,o(t))}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function glslFunction(t,e,n){const o=t.typeName;return new class extends t{compile(t){const c=`customFunction_${t.variable()}`,s=Object.entries(e).map(([t,e])=>`${e.constructor.typeName} ${t}`).join(", "),r=Object.values(e).map(e=>t.get(e)).join(", ");return{pars:`${o} ${c}(${s}) {\n ${n}\n }`,out:`${c}(${r})`}}}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export*from"three-shader-graph";export{linearEyeDepth,fragmentLinearEyeDepth,depthSampler,resolution,screenUV,depthWorldPosition}from"./depth.js";export{timeUniforms}from"./time.js";export{particleUniforms}from"./particle.js";export*from"./layers.js";export*from"./landscape.js";export*from"./shapes.js";export*from"./voronoi.js";export*from"./effects.js";export*from"./math.js";export*from"./bulge.js";export*from"./texture-sequence.js";export*from"./decal.js";export*from"./scene-sample.js";export*from"./curve-sample.js";/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{attributes as r,float as t,uniforms as o,vec4 as e,varyingVec2 as a}from"three-shader-graph";const i=o.modelMatrix.multiplyVec(e(r.position,1));export function getLandscapeCoords(r){return a(i.xz.multiplyScalar(t(r)))}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{float as e,uniforms as o,vec4 as r,attributes as a,SimplexNoiseNode as t,select as i,mix as l,smoothstep as d,AttributeVec4Node as n,varying as s}from"three-shader-graph";export var LayerMixMode;!function(e){e[e.hard=0]="hard",e[e.soft=1]="soft"}(LayerMixMode||(LayerMixMode={}));const y={enableNoise:!0,noiseScale:e(.1),noiseAmount:e(.5),decay:.3,mode:LayerMixMode.soft},c=s(o.modelMatrix.multiplyVec(r(a.position,1)).xz),m=new n("material"),u=new n("material2"),x=s(m),p=s(u),M=[e(0),x.x,x.y,x.z,x.w,p.x,p.y,p.z,p.w];export function mixColorsByLayer(o){const r={...y,...o},a=e(r.noiseAmount).multiply(e(.1)),n=e(r.noiseScale),s=new t(c.multiplyScalar(n)).multiply(e(2)).subtract(e(1)).multiply(a),m=e(.5),u=r.enableNoise?m.add(s.multiply(e(.1))):m;if(r.mode==LayerMixMode.hard)return r.layerColors.reduce((e,o,r)=>i(M[r].gt(u),o,e));{const o=e(r.decay),a=e(.5),t=o.divide(e(2)),i=a.subtract(t),n=a.add(t);return r.layerColors.slice(0,M.length).reduce((e,o,r)=>l(e,o,d(i,n,M[r].add(s))))}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{FloatNode as t,IntNode as r,Vec2Node as e,Vec3Node as n,Vec4Node as a,atan2 as s,float as c,fract as o,int as u,sqrt as i,vec2 as d,vec3 as p,vec4 as f}from"three-shader-graph";export function oneMinus(s){switch(!0){case s instanceof t:return c(1).subtract(s);case s instanceof r:return u(1).subtract(s);case s instanceof e:return d(1,1).subtract(s);case s instanceof n:return p(1,1,1).subtract(s);case s instanceof a:return f(1,1,1,1).subtract(s)}throw"Unsupported type "+s}export function vectorToRadial(t){const{x:r,y:e}=t,n=i(r.multiply(r).add(e.multiply(e))),a=o(s(e,r).divide(2*Math.PI));return{coords:d(a,n),radius:n,angle:a}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{Vector3 as e}from"three";import{attributeVec3 as t,ifDefApply as o,uniformFloat as r,uniformVec3 as i,varying as a,Vec3ExpressionNode as c}from"three-shader-graph";export const particleEnergyUniformName="hology_particle_energy";export const particleTimeUniformName="hology_particle_time";export const particleVelcoityUniformName="hology_particle_velocity";export const particleUniforms={energy:o("USE_INSTANCING",r("hology_particle_energy",1),()=>t("particleData").y),color:o("USE_INSTANCING",i("color",new e(0,0,0)),()=>a(new c("instanceColor"))),opacity:o("USE_INSTANCING",r("opacity",1),()=>t("particleData").x),time:r("hology_particle_time")};export const particleAttributes={};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{attributes as e,AttributeVec4Node as t,cross as a,float as r,mat3 as i,normalize as n,transformed as l,uniforms as f,varying as m,Vec2Node as o}from"three-shader-graph";import{glslFunction as v}from"./glsl-node";const u=e.normal,s=new t("tangent"),p=n(f.normalMatrix.multiplyVec(u)),S=n(f.normalMatrix.multiplyVec(s.xyz)),h=i(S,a(p,S).multiplyScalar(s.w),p),c=m(h),g=f.cameraPosition.subtract(f.modelMatrix.multiplyVec(l.position).xyz),y=n(m(n(h.multiplyVec(g)))),C=m(l.mvPosition.xyz.multiplyScalar(-1));export function parallaxOcclusionMapping(e,t,a,i=10,n=32){return v(o,{uv:e,heightScale:a,heightMap:t,minLayers:r(i),maxLayers:r(n),vTBN:c,vViewDirTS:y,vViewPosition:C},"\n vec3 viewDir = normalize(vViewPosition);\n vec3 vv = -viewDir * vTBN;\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 // Probably should use actual normal but it might not matter\n vec3 nNormal = vec3(0.0, 1.0, 0.0);\n float nNumSamples = mix(float(maxLayers), float(minLayers), dot(viewDir, nNormal));\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 < 50; 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 ")}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{float as o,ifDefApply as e,uniformSampler2d as r,Vec3ExpressionNode as a}from"three-shader-graph";import*as p from"three";import{screenUV as t}from"./depth.js";export const sceneMapUniformName="hology_scene_map";export const sceneColorSampler=r("hology_scene_map",new p.Texture);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",new p.Texture);export function sampleScreenAO(r=t){return e("USE_SSAO_MAP",o(1),()=>aoColorSampler.sample(r).r)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{float as t,length as a,min as r,max as e,saturate as c,dFdx as d,dFdy as l,abs as u,ComponentsVec2Node as n,vec2 as i}from"three-shader-graph";export function rectangleFloat(t,a,e){const o=u(t.multiplyScalar(2).subtractScalar(1)).subtract(new n(a,e)),s=i(1,1).subtract(o.divide(u(d(p=o)).add(u(l(p)))));var p;return c(r(s.x,s.y))}export function roundedRectangleFloat(o,s,p,b){const m=e(r(r(u(b.multiply(2)),u(s)),u(p)),t(1e-5)),v=u(o.multiplyScalar(2).subtractScalar(1)).subtract(new n(s,p)).addScalar(m),S=a(e(i(0,0),v)).divide(m);return c(t(1).subtract(S).divide(u(d(y=S)).add(u(l(y)))));var y}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{float as l,floor as t,min as e,mod as p,varying as a,vec2 as i}from"three-shader-graph";export function sampleFlipbook(m,o,r,c,d,s=60,u="clamp"){const n=r*c;let h;switch(u){case"clamp":h=t(e(d.multiply(l(s)),l(n-1)));break;case"loop":h=t(p(d.multiply(l(s)),l(n)))}const y=l(1/r),b=l(1/c),f=p(h,l(r)).multiply(y),k=t(h.divide(c).add(1)).multiply(b),v=i(f,l(1).subtract(k));return m.sample(a(v.add(o.divide(i(r,c)))))}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{uniformFloat as e,varyingAttributes as o,vec2 as r}from"three-shader-graph";export const elapsedTimeUniformName="hology_elapsed_time";export const timeUniforms={elapsed:e("hology_elapsed_time")};export function panCoord(e,t=r(1,1),m=o.uv,p){return m.multiply(t).add(e.multiplyScalar(p??timeUniforms.elapsed))}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{select as t,length as a,ComponentsVec2Node as r,ConstantMat2Node as l,fract as d,sin as n,cos as e,vec2 as o,vec3 as u,floor as c}from"three-shader-graph";export function voronoi(i,p,m){const y=i.multiplyScalar(m),s=c(y),x=d(y),f=[-1,0,1],h=f.flatMap(t=>f.map(a=>[t,a])).reduce((c,[i,m])=>{const y=o(i,m),f=function(t,a){const o=new l(15.27,47.63,99.41,89.98);return t=d(n(t.multiplyMat(o)).multiplyScalar(46839.32)),new r(n(t.y.add(a)).multiply(.5).add(.5),e(t.x.add(a)).multiply(.5).add(.5))}(y.add(s),p),h=a(y.add(f).subtract(x));return t(h.lt(c.x),u(h,f.x,f.y),c)},u(8,0,0));return{noise:h.x,cells:h.y}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{__decorate as t}from"tslib";import"reflect-metadata";import{expect as e,test as a}from"vitest";import{Actor as s,ActorComponent as o,ActorFactory as n,BaseActor as c,Component as i,inject as r}from"../gameplay/index.js";import{Container as l,Service as m}from"typedi";a("injecting without a service decorator",()=>{class t{}const e=l.of("test");e.set({id:t,type:t});e.get(t)}),a("creating actors with non default container instance",async()=>{const t=new n(l.of("custom"),{inEditor:!1});l.set(n,t);const a=await t.create(v);e(a.componentA.a.value).toBe(a.a.value),e(l.of("another").get(p).value).toBeGreaterThan(a.a.value)}),a("injection with dynamically attached component using same container",async()=>{const t=new n(l.of("custom2"),{inEditor:!1});l.set(n,t);const a=await t.create(w);e(a.componentA.a.value).toBe(a.a.value)});let u=class{};u=t([m()],u);let h=0,p=class{constructor(){this.name="a",this.value=h++,this.b=r(d)}};p=t([m()],p);let d=class{constructor(){this.name="b",this.value=h++}};d=t([m()],d);let f=class extends o{constructor(){super(...arguments),this.a=r(p)}};f=t([i()],f);let v=class extends c{constructor(){super(...arguments),this.a=r(p),this.componentA=this.attach(f)}};v=t([s()],v);let w=class extends c{constructor(){super(...arguments),this.a=r(p)}onInit(){this.componentA=this.attach(f)}};w=t([s()],w);/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function sleepDelay(e){return new Promise(t=>setTimeout(t,e))}export function whenIdle(e){return new Promise((t,n)=>{window.requestIdleCallback(()=>{t(e())},{timeout:500})})}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export const hasSharedArrayBufferSupport=window.crossOriginIsolated&&void 0!==window.SharedArrayBuffer;export function toSharedFloat32Array(r){const e=new SharedArrayBuffer(r.buffer.byteLength),t=new Float32Array(e);return t.set(r),t}export function toSharedUint32Array(r){const e=new SharedArrayBuffer(r.buffer.byteLength),t=new Uint32Array(e);return t.set(r),t}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function groupBy(t,e){const r=new Map;for(const s of t??[]){const t=e(s);r.has(t)||r.set(t,[]),r.get(t).push(s)}return r}export function indexBy(t,e){const r=new Map;for(const s of t??[])r.set(e(s),s);return r}export class DefaultMap{constructor(t){this.defaultValue=t,this.map=new Map}clear(){this.map.clear()}delete(t){return this.map.delete(t)}forEach(t,e){this.map.forEach(t)}getDefault(){return"function"==typeof this.defaultValue?this.defaultValue():JSON.parse(JSON.stringify(this.defaultValue))}get(t){return this.map.has(t)||this.map.set(t,this.getDefault()),this.map.get(t)}has(t){return!0}set(t,e){return this.map.set(t,e),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}[Symbol.iterator](){return this.map[Symbol.iterator]()}}Symbol.toStringTag;export class ArrayMap extends DefaultMap{constructor(){super(()=>[])}push(t,e){this.get(t).push(e)}}export function partition(t,e){let r=[],s=[];for(const a of t)(e(a)?r:s).push(a);return[r,s]}export function removeObjectUndefined(t){for(const e of Object.keys(t))null==t[e]&&delete t[e];return t}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{ease as e}from"@hology/nebula";export class Curve2{static decode(e){return"string"==typeof e?EaseCurve.fromString(e):Curve2.linear()}getY(e){return e}static linear(){return new EaseCurve(e.easeLinear)}}export class EaseCurve extends Curve2{constructor(e){super(),this.fn=e}getY(e){return this.fn(e)}static fromString(r){const n=e["ease"+r];return null==n?(console.warn("no easing function called "+r),new EaseCurve(e.easeLinear)):new EaseCurve(n)}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function pathJoin(...e){return e.map((e,r)=>0===r?e.trim().replace(/[\/]*$/g,""):e.trim().replace(/(^[\/]*|[\/]*$)/g,"")).filter(e=>e.length).join("/")}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function*iterateMaterials(e){if(e instanceof Array)for(const i of e)yield i;else yield e}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as t from"three";import{Vector3 as e}from"three";export function clamp(t,e,n){return Math.max(Math.min(n,t),e)}export function byChance(t,e){Math.random()<t&&e()}export function mean(t){let e=0,n=t.length;for(;--n>=0;)e+=t[n];return t.length>0?e/t.length:0}export function meanVectors3(t){const e=n.set(0,0,0);for(const n of t)e.add(n);return e.divideScalar(t.length),e}export function meanBottomVectors3(t){const e=n.set(0,0,0);let o=null;for(const n of t)e.add(n),(null==o||n.y<o)&&(o=n.y);return e.divideScalar(t.length),e.y=o,e}export function meanVectors3Mapped(t,n){const o=new e,r=new e;for(const e of t)r.add(n(e,o));return r.divideScalar(t.length),r}const n=new e;export function meanVectors3withWeight(t,e,o){let r=0;for(const t of e)r+=t;n.set(0,0,0);let a=0;for(const o of t){const t=e[a]/r;n.x+=o.x*t,n.y+=o.y*t,n.z+=o.z*t,a++}return o.copy(n),o}export function randomString(t=9){return Math.random().toString(36).substring(2,t)}export function toDegrees(t){return t*(180/Math.PI)}var o=new t.Sphere,r=new t.Sphere;export function boundingRadius(...e){o.makeEmpty(),r.makeEmpty();for(var n=0;n<e.length;n++)e[n].traverse(e=>{if(e instanceof t.Mesh){const t=e.geometry;t.computeBoundingSphere(),r.copy(t.boundingSphere),r.applyMatrix4(e.matrixWorld),o.makeEmpty().union(r)}});return o.radius}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as e from"three";import{SkeletonUtils as t}from"three-stdlib";export class NoRaycastMesh extends e.Mesh{raycast(...e){}}export function cloneMesh(e){return t.clone(e)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as e from"three";import{computeBoundsTree as o,disposeBoundsTree as r,acceleratedRaycast as t}from"three-mesh-bvh";export function polyfill(){e.BufferGeometry.prototype.computeBoundsTree=o,e.BufferGeometry.prototype.disposeBoundsTree=r,e.Mesh.prototype.raycast=t}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function disposeScene(e){e.traverse(e=>{e.geometry&&e.geometry.dispose();const s=e.material;s&&(Array.isArray(s)?s.forEach(disposeMaterial):disposeMaterial(s))})}export function disposeMaterial(e){for(const s in e){const o=e[s];o&&o.isTexture&&o.dispose()}e.dispose()}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{depthUniformName as e}from"../../shader-nodes/depth.js";import{Mesh as r}from"three";import{Pass as t}from"three-stdlib";class s extends t{constructor(e,r,t,s){super(),this.scene=e,this.camera=r,this.depthMaterial=t,this.depthRenderTarget=s,this.needsSwap=!0}dispose(){}setSize(e,r){}render(t,s,i,a,n){if(this.renderToScreen)t.setRenderTarget(null),t.render(this.scene,this.camera);else{const i=[];this.scene.traverse(t=>{t instanceof r&&t.visible&&(t.material?.userData?.water||t.material?.uniforms&&null!=t.material?.uniforms[e])&&(t.visible=!1,i.push(t))}),this.scene.overrideMaterial=this.depthMaterial,t.setRenderTarget(this.depthRenderTarget),t.render(this.scene,this.camera),this.scene.overrideMaterial=null,i.forEach(e=>e.visible=!0),t.setRenderTarget(s),t.clear(),t.render(this.scene,this.camera)}}}export{s as DepthPass};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import e from"three/examples/jsm/libs/stats.module.js";class t extends e.Panel{constructor(e,t="GPU MS"){super(t,"#f90","#210");let i=!0,s=e.getExtension("EXT_disjoint_timer_query_webgl2");null===s&&(i=!1,s=e.getExtension("EXT_disjoint_timer_query"),null===s&&console.warn("GPUStatsPanel: disjoint_time_query extension not available.")),this.context=e,this.extension=s,this.maxTime=30,this.activeQueries=0,this.startQuery=function(){if(this.activeQueries>2)return;const e=this.context,t=this.extension;if(null===t)return;let s;i?(s=e.createQuery(),e.beginQuery(t.TIME_ELAPSED_EXT,s)):(s=t.createQueryEXT(),t.beginQueryEXT(t.TIME_ELAPSED_EXT,s)),this.activeQueries++;const n=()=>{let r,E,u;i?(r=e.getQueryParameter(s,e.QUERY_RESULT_AVAILABLE),E=e.getParameter(t.GPU_DISJOINT_EXT),u=e.getQueryParameter(s,e.QUERY_RESULT)):(r=t.getQueryObjectEXT(s,t.QUERY_RESULT_AVAILABLE_EXT),E=e.getParameter(t.GPU_DISJOINT_EXT),u=t.getQueryObjectEXT(s,t.QUERY_RESULT_EXT));const a=1e-6*u;r?(E||this.update(a,this.maxTime),this.activeQueries--):requestAnimationFrame(n)};n()},this.endQuery=function(){const e=this.extension,t=this.context;null!==e&&(i?t.endQuery(e.TIME_ELAPSED_EXT):e.endQueryEXT(e.TIME_ELAPSED_EXT))}}}export{t as GPUStatsPanel};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as e from"three";const t=new e.EllipseCurve(0,0,1,1,0,2*Math.PI,!1,0).getPoints(50),r=(new e.BufferGeometry).setFromPoints(t),o=new e.LineBasicMaterial({color:16777215,side:e.DoubleSide});function n(t){const n=new e.Line(r,o);return n.scale.multiplyScalar(t),n}export function createLineSphere(t){const r=n(t),o=n(t);o.rotateY(Math.PI/2),o.updateMatrixWorld();const a=n(t);return a.rotateX(Math.PI/2),a.updateMatrixWorld(),(new e.Group).add(r,o,a)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{AdditiveBlending as e,Color as r,DoubleSide as t,LinearFilter as i,Matrix4 as a,MeshBasicMaterial as s,MeshDepthMaterial as n,NoBlending as l,RGBADepthPacking as u,RGBAFormat as o,ShaderMaterial as d,UniformsUtils as h,Vector2 as f,Vector3 as v,WebGLRenderTarget as g}from"three";import{Pass as c,FullScreenQuad as m}from"three-stdlib";import{CopyShader as p}from"three-stdlib";class x extends c{constructor(e,v,c,x){super(),this.renderScene=v,this.renderCamera=c,this.selectedObjects=void 0!==x?x:[],this.visibleEdgeColor=new r(1,1,1),this.hiddenEdgeColor=new r(.1,.04,.02),this.edgeGlow=0,this.usePatternTexture=!1,this.edgeThickness=1,this.edgeStrength=3,this.downSampleRatio=2,this.pulsePeriod=0,this._visibilityCache=new Map,this.resolution=void 0!==e?new f(e.x,e.y):new f(256,256);const M={minFilter:i,magFilter:i,format:o},T=Math.round(this.resolution.x/this.downSampleRatio),B=Math.round(this.resolution.y/this.downSampleRatio);this.maskBufferMaterial=new s({color:16777215}),this.maskBufferMaterial.side=t,this.renderTargetMaskBuffer=new g(this.resolution.x,this.resolution.y,M),this.renderTargetMaskBuffer.texture.name="OutlinePass.mask",this.renderTargetMaskBuffer.texture.generateMipmaps=!1,this.depthMaterial=new n,this.depthMaterial.side=t,this.depthMaterial.depthPacking=u,this.depthMaterial.blending=l,this.prepareMaskMaterial=this.getPrepareMaskMaterial(),this.prepareMaskMaterial.side=t,this.prepareMaskMaterial.fragmentShader=function(e,r){var t=r.isPerspectiveCamera?"perspective":"orthographic";return e.replace(/DEPTH_TO_VIEW_Z/g,t+"DepthToViewZ")}(this.prepareMaskMaterial.fragmentShader,this.renderCamera),this.renderTargetDepthBuffer=new g(this.resolution.x,this.resolution.y,M),this.renderTargetDepthBuffer.texture.name="OutlinePass.depth",this.renderTargetDepthBuffer.texture.generateMipmaps=!1,this.renderTargetMaskDownSampleBuffer=new g(T,B,M),this.renderTargetMaskDownSampleBuffer.texture.name="OutlinePass.depthDownSample",this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps=!1,this.renderTargetBlurBuffer1=new g(T,B,M),this.renderTargetBlurBuffer1.texture.name="OutlinePass.blur1",this.renderTargetBlurBuffer1.texture.generateMipmaps=!1,this.renderTargetBlurBuffer2=new g(Math.round(T/2),Math.round(B/2),M),this.renderTargetBlurBuffer2.texture.name="OutlinePass.blur2",this.renderTargetBlurBuffer2.texture.generateMipmaps=!1,this.edgeDetectionMaterial=this.getEdgeDetectionMaterial(),this.renderTargetEdgeBuffer1=new g(T,B,M),this.renderTargetEdgeBuffer1.texture.name="OutlinePass.edge1",this.renderTargetEdgeBuffer1.texture.generateMipmaps=!1,this.renderTargetEdgeBuffer2=new g(Math.round(T/2),Math.round(B/2),M),this.renderTargetEdgeBuffer2.texture.name="OutlinePass.edge2",this.renderTargetEdgeBuffer2.texture.generateMipmaps=!1;this.separableBlurMaterial1=this.getSeperableBlurMaterial(4),this.separableBlurMaterial1.uniforms.texSize.value.set(T,B),this.separableBlurMaterial1.uniforms.kernelRadius.value=1,this.separableBlurMaterial2=this.getSeperableBlurMaterial(4),this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(T/2),Math.round(B/2)),this.separableBlurMaterial2.uniforms.kernelRadius.value=4,this.overlayMaterial=this.getOverlayMaterial(),void 0===p&&console.error("THREE.OutlinePass relies on CopyShader");const S=p;this.copyUniforms=h.clone(S.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new d({uniforms:this.copyUniforms,vertexShader:S.vertexShader,fragmentShader:S.fragmentShader,blending:l,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new r,this.oldClearAlpha=1,this.fsQuad=new m(null),this.tempPulseColor1=new r,this.tempPulseColor2=new r,this.textureMatrix=new a}dispose(){this.renderTargetMaskBuffer.dispose(),this.renderTargetDepthBuffer.dispose(),this.renderTargetMaskDownSampleBuffer.dispose(),this.renderTargetBlurBuffer1.dispose(),this.renderTargetBlurBuffer2.dispose(),this.renderTargetEdgeBuffer1.dispose(),this.renderTargetEdgeBuffer2.dispose()}setSize(e,r){this.renderTargetMaskBuffer.setSize(e,r),this.renderTargetDepthBuffer.setSize(e,r);let t=Math.round(e/this.downSampleRatio),i=Math.round(r/this.downSampleRatio);this.renderTargetMaskDownSampleBuffer.setSize(t,i),this.renderTargetBlurBuffer1.setSize(t,i),this.renderTargetEdgeBuffer1.setSize(t,i),this.separableBlurMaterial1.uniforms.texSize.value.set(t,i),t=Math.round(t/2),i=Math.round(i/2),this.renderTargetBlurBuffer2.setSize(t,i),this.renderTargetEdgeBuffer2.setSize(t,i),this.separableBlurMaterial2.uniforms.texSize.value.set(t,i)}changeVisibilityOfSelectedObjects(e){const r=this._visibilityCache;function t(t){(t.isMesh||t.isSprite)&&(!0===e?t.visible=r.get(t):(r.set(t,t.visible),t.visible=e))}for(let e=0;e<this.selectedObjects.length;e++){this.selectedObjects[e].traverse(t)}}changeVisibilityOfNonSelectedObjects(e){const r=this._visibilityCache,t=[];function i(e){(e.isMesh||e.isSprite)&&t.push(e)}for(let e=0;e<this.selectedObjects.length;e++){this.selectedObjects[e].traverse(i)}this.renderScene.traverse(function(i){if(i.isMesh||i.isSprite||i.isTransformControls){let a=!1;for(let e=0;e<t.length;e++){if(t[e].id===i.id){a=!0;break}}if(!1===a){const t=i.visible;!1!==e&&!0!==r.get(i)||(i.visible=e),r.set(i,t)}}else(i.isPoints||i.isLine)&&(!0===e?i.visible=r.get(i):(r.set(i,i.visible),i.visible=e))})}updateTextureMatrix(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),this.textureMatrix.multiply(this.renderCamera.projectionMatrix),this.textureMatrix.multiply(this.renderCamera.matrixWorldInverse)}render(e,r,t,i,a){if(this.selectedObjects.length>0){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const r=e.autoClear;e.autoClear=!1,a&&e.state.buffers.stencil.setTest(!1),e.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);const i=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,e.setRenderTarget(this.renderTargetDepthBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.changeVisibilityOfSelectedObjects(!0),this._visibilityCache.clear(),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value.set(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,e.setRenderTarget(this.renderTargetMaskBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this._visibilityCache.clear(),this.renderScene.background=i,this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,e.setRenderTarget(this.renderTargetMaskDownSampleBuffer),e.clear(),this.fsQuad.render(e),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){const e=.625+.75*Math.cos(.01*performance.now()/this.pulsePeriod)/2;this.tempPulseColor1.multiplyScalar(e),this.tempPulseColor2.multiplyScalar(e)}this.fsQuad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value.set(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=x.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,e.setRenderTarget(this.renderTargetBlurBuffer1),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=x.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=x.BlurDirectionX,e.setRenderTarget(this.renderTargetBlurBuffer2),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=x.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer2),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,a&&e.state.buffers.stencil.setTest(!0),e.setRenderTarget(t),this.fsQuad.render(e),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=r}this.renderToScreen&&(this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=t.texture,e.setRenderTarget(null),this.fsQuad.render(e))}getPrepareMaskMaterial(){return new d({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new f(.5,.5)},textureMatrix:{value:null}},vertexShader:"#include <morphtarget_pars_vertex>\n #include <skinning_pars_vertex>\n varying vec4 projTexCoord;\n varying vec4 vPosition;\n uniform mat4 textureMatrix;\n void main() {\n #include <skinbase_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n vPosition = mvPosition;\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n projTexCoord = textureMatrix * worldPosition;\n }",fragmentShader:"#include <packing>\n varying vec4 vPosition;\n varying vec4 projTexCoord;\n uniform sampler2D depthTexture;\n uniform vec2 cameraNearFar;\n void main() {\n float depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord ));\n float viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y );\n float depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0;\n gl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);\n }"})}getEdgeDetectionMaterial(){return new d({uniforms:{maskTexture:{value:null},texSize:{value:new f(.5,.5)},visibleEdgeColor:{value:new v(1,1,1)},hiddenEdgeColor:{value:new v(1,1,1)}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"varying vec2 vUv;\n uniform sampler2D maskTexture;\n uniform vec2 texSize;\n uniform vec3 visibleEdgeColor;\n uniform vec3 hiddenEdgeColor;\n void main() {\n vec2 invSize = 1.0 / texSize;\n vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);\n vec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);\n vec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);\n vec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);\n vec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);\n float diff1 = (c1.r - c2.r)*0.5;\n float diff2 = (c3.r - c4.r)*0.5;\n float d = length( vec2(diff1, diff2) );\n float a1 = min(c1.g, c2.g);\n float a2 = min(c3.g, c4.g);\n float visibilityFactor = min(a1, a2);\n vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;\n gl_FragColor = vec4(edgeColor, 1.0) * vec4(d);\n }"})}getSeperableBlurMaterial(e){return new d({defines:{MAX_RADIUS:e},uniforms:{colorTexture:{value:null},texSize:{value:new f(.5,.5)},direction:{value:new f(.5,.5)},kernelRadius:{value:1}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"#include <common>\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n uniform vec2 texSize;\n uniform vec2 direction;\n uniform float kernelRadius;\n float gaussianPdf(in float x, in float sigma) {\n return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n }\n void main() {\n vec2 invSize = 1.0 / texSize;\n float weightSum = gaussianPdf(0.0, kernelRadius);\n vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;\n vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);\n vec2 uvOffset = delta;\n for( int i = 1; i <= MAX_RADIUS; i ++ ) {\n float w = gaussianPdf(uvOffset.x, kernelRadius);\n vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);\n vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);\n diffuseSum += ((sample1 + sample2) * w);\n weightSum += (2.0 * w);\n uvOffset += delta;\n }\n gl_FragColor = diffuseSum/weightSum;\n }"})}getOverlayMaterial(){return new d({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"varying vec2 vUv;\n uniform sampler2D maskTexture;\n uniform sampler2D edgeTexture1;\n uniform sampler2D edgeTexture2;\n uniform sampler2D patternTexture;\n uniform float edgeStrength;\n uniform float edgeGlow;\n uniform bool usePatternTexture;\n void main() {\n vec4 edgeValue1 = texture2D(edgeTexture1, vUv);\n vec4 edgeValue2 = texture2D(edgeTexture2, vUv);\n vec4 maskColor = texture2D(maskTexture, vUv);\n vec4 patternColor = texture2D(patternTexture, 6.0 * vUv);\n float visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5;\n vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;\n vec4 finalColor = edgeStrength * maskColor.r * edgeValue;\n if(usePatternTexture)\n finalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r);\n gl_FragColor = finalColor;\n }",blending:e,depthTest:!1,depthWrite:!1,transparent:!0})}}x.BlurDirectionX=new f(1,0),x.BlurDirectionY=new f(0,1);export{x as OutlinePass};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{BufferGeometry as t,BufferAttribute as e,LineBasicMaterial as i,Line as s,MathUtils as n}from"three";class o extends s{constructor(s,n=1,o=16,r=2){const a=new t,d=new Float32Array(3*(3*(o+2*r)+3));a.setAttribute("position",new e(d,3));const h=new i({color:65280,linewidth:2});super(a,[new i({color:16776960,linewidth:2}),h]),this.type="PositionalAudioHelper",this.audio=s,this.range=n,this.divisionsInnerAngle=o,this.divisionsOuterAngle=r,this.update()}update(){const t=this.audio,e=this.range,i=this.divisionsInnerAngle,s=this.divisionsOuterAngle,o=n.degToRad(t.panner.coneInnerAngle),r=n.degToRad(t.panner.coneOuterAngle),a=o/2,d=r/2;let h,l,p=0,c=0;const u=this.geometry,g=u.attributes.position;function m(t,i,s,n){const o=(i-t)/s;for(g.setXYZ(p,0,0,0),c++,h=t;h<i;h+=o)l=p+c,g.setXYZ(l,Math.sin(h)*e,0,Math.cos(h)*e),g.setXYZ(l+1,Math.sin(Math.min(h+o,i))*e,0,Math.cos(Math.min(h+o,i))*e),g.setXYZ(l+2,0,0,0),c+=3;u.addGroup(p,c,n),p+=c,c=0}u.clearGroups(),m(-d,-a,s,0),m(-a,a,i,1),m(a,d,s,0),g.needsUpdate=!0,o===r&&(this.material[0].visible=!1)}dispose(){this.geometry.dispose(),this.material[0].dispose(),this.material[1].dispose()}}export{o as PositionalAudioHelper};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  var e=function(){var t=0,l=document.createElement("div");function n(e){return l.appendChild(e.dom),e}function a(e){for(var n=0;n<l.children.length;n++)l.children[n].style.display=n===e?"block":"none";t=e}l.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",l.addEventListener("click",function(e){e.preventDefault(),a(++t%l.children.length)},!1);var i=(performance||Date).now(),o=i,r=0,f=n(new e.Panel("FPS","#0ff","#002")),c=n(new e.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var d=n(new e.Panel("MB","#f08","#201"));return a(0),{REVISION:16,dom:l,addPanel:n,showPanel:a,begin:function(){i=(performance||Date).now()},end:function(){r++;var e=(performance||Date).now();if(c.update(e-i,200),e>=o+1e3&&(f.update(1e3*r/(e-o),100),o=e,r=0,d)){var t=performance.memory;d.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){i=this.end()},domElement:l,setMode:a}};e.Panel=function(e,t,l){var n=1/0,a=0,i=Math.round,o=i(window.devicePixelRatio||1),r=80*o,f=48*o,c=3*o,d=2*o,p=3*o,u=15*o,m=74*o,s=30*o,h=document.createElement("canvas");h.width=r,h.height=f,h.style.cssText="width:80px;height:48px";var v=h.getContext("2d");return v.font="bold "+9*o+"px Helvetica,Arial,sans-serif",v.textBaseline="top",v.fillStyle=l,v.fillRect(0,0,r,f),v.fillStyle=t,v.fillText(e,c,d),v.fillRect(p,u,m,s),v.fillStyle=l,v.globalAlpha=.9,v.fillRect(p,u,m,s),{dom:h,update:function(f,x){n=Math.min(n,f),a=Math.max(a,f),v.fillStyle=l,v.globalAlpha=1,v.fillRect(0,0,r,u),v.fillStyle=t,v.fillText(i(f)+" "+e+" ("+i(n)+"-"+i(a)+")",c,d),v.drawImage(h,p+o,u,m-o,s,p,u,m-o,s),v.fillRect(p+m-o,u,o,s),v.fillStyle=l,v.globalAlpha=.9,v.fillRect(p+m-o,u,o,i((1-f/x)*s))}}};export default e;/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{BoxGeometry as t,BufferGeometry as e,CylinderGeometry as i,DoubleSide as n,Euler as o,Float32BufferAttribute as s,Line as a,LineBasicMaterial as r,Matrix4 as h,Mesh as l,MeshBasicMaterial as c,Object3D as p,OctahedronGeometry as d,PlaneGeometry as m,Quaternion as w,Raycaster as u,SphereGeometry as y,TorusGeometry as b,Vector3 as v}from"three";const M=new u,P=new v,g=new v,S=new w,x={X:new v(1,0,0),Y:new v(0,1,0),Z:new v(0,0,1)},_={type:"change"},f={type:"mouseDown"},E={type:"mouseUp",mode:null},I={type:"objectChange"};export class TransformControls extends p{constructor(t,e){super(),this.raycaster=M,void 0===e&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";const i=new G;this._gizmo=i,this.gizmo=i,this.add(i);const n=new B;this._plane=n,this.add(n);const o=this;function s(t,e){let s=e;Object.defineProperty(o,t,{get:function(){return void 0!==s?s:e},set:function(e){s!==e&&(s=e,n[t]=e,i[t]=e,o.dispatchEvent({type:t+"-changed",value:e}),o.dispatchEvent(_))}}),o[t]=e,n[t]=e,i[t]=e}s("camera",t),s("object",void 0),s("enabled",!0),s("axis",null),s("mode","translate"),s("translationSnap",null),s("rotationSnap",null),s("scaleSnap",null),s("space","world"),s("size",1),s("dragging",!1),s("showX",!0),s("showY",!0),s("showZ",!0);const a=new v,r=new v,h=new w,l=new w,c=new v,p=new w,d=new v,m=new v,u=new v,y=new v;s("worldPosition",a),s("worldPositionStart",r),s("worldQuaternion",h),s("worldQuaternionStart",l),s("cameraPosition",c),s("cameraQuaternion",p),s("pointStart",d),s("pointEnd",m),s("rotationAxis",u),s("rotationAngle",0),s("eye",y),this._offset=new v,this._startNorm=new v,this._endNorm=new v,this._cameraScale=new v,this._parentPosition=new v,this._parentQuaternion=new w,this._parentQuaternionInv=new w,this._parentScale=new v,this._worldScaleStart=new v,this._worldQuaternionInv=new w,this._worldScale=new v,this._positionStart=new v,this._quaternionStart=new w,this._scaleStart=new v,this._getPointer=X.bind(this),this._onPointerDown=Y.bind(this),this._onPointerHover=Q.bind(this),this._onPointerMove=Z.bind(this),this._onPointerUp=A.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(t){if(void 0===this.object||!0===this.dragging)return;M.setFromCamera(t,this.camera);const e=z(this._gizmo.picker[this.mode],M);this.axis=e?e.object.name:null}pointerDown(t){if(void 0!==this.object&&!0!==this.dragging&&0===t.button&&null!==this.axis){M.setFromCamera(t,this.camera);const e=z(this._plane,M,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,f.mode=this.mode,this.dispatchEvent(f)}}pointerMove(t){const e=this.axis,i=this.mode,n=this.object;let o=this.space;if("scale"===i?o="local":"E"!==e&&"XYZE"!==e&&"XYZ"!==e||(o="world"),void 0===n||null===e||!1===this.dragging||-1!==t.button)return;M.setFromCamera(t,this.camera);const s=z(this._plane,M,!0);if(s){if(this.pointEnd.copy(s.point).sub(this.worldPositionStart),"translate"===i)this._offset.copy(this.pointEnd).sub(this.pointStart),"local"===o&&"XYZ"!==e&&this._offset.applyQuaternion(this._worldQuaternionInv),-1===e.indexOf("X")&&(this._offset.x=0),-1===e.indexOf("Y")&&(this._offset.y=0),-1===e.indexOf("Z")&&(this._offset.z=0),"local"===o&&"XYZ"!==e?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),n.position.copy(this._offset).add(this._positionStart),this.translationSnap&&("local"===o&&(n.position.applyQuaternion(S.copy(this._quaternionStart).invert()),-1!==e.search("X")&&(n.position.x=Math.round(n.position.x/this.translationSnap)*this.translationSnap),-1!==e.search("Y")&&(n.position.y=Math.round(n.position.y/this.translationSnap)*this.translationSnap),-1!==e.search("Z")&&(n.position.z=Math.round(n.position.z/this.translationSnap)*this.translationSnap),n.position.applyQuaternion(this._quaternionStart)),"world"===o&&(n.parent&&n.position.add(P.setFromMatrixPosition(n.parent.matrixWorld)),-1!==e.search("X")&&(n.position.x=Math.round(n.position.x/this.translationSnap)*this.translationSnap),-1!==e.search("Y")&&(n.position.y=Math.round(n.position.y/this.translationSnap)*this.translationSnap),-1!==e.search("Z")&&(n.position.z=Math.round(n.position.z/this.translationSnap)*this.translationSnap),n.parent&&n.position.sub(P.setFromMatrixPosition(n.parent.matrixWorld))));else if("scale"===i){if(-1!==e.search("XYZ")){let t=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(t*=-1),g.set(t,t,t)}else P.copy(this.pointStart),g.copy(this.pointEnd),P.applyQuaternion(this._worldQuaternionInv),g.applyQuaternion(this._worldQuaternionInv),g.divide(P),-1===e.search("X")&&(g.x=1),-1===e.search("Y")&&(g.y=1),-1===e.search("Z")&&(g.z=1);n.scale.copy(this._scaleStart).multiply(g),this.scaleSnap&&(-1!==e.search("X")&&(n.scale.x=Math.round(n.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==e.search("Y")&&(n.scale.y=Math.round(n.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==e.search("Z")&&(n.scale.z=Math.round(n.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if("rotate"===i){this._offset.copy(this.pointEnd).sub(this.pointStart);const t=20/this.worldPosition.distanceTo(P.setFromMatrixPosition(this.camera.matrixWorld));"E"===e?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1):"XYZE"===e?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(P.copy(this.rotationAxis).cross(this.eye))*t):"X"!==e&&"Y"!==e&&"Z"!==e||(this.rotationAxis.copy(x[e]),P.copy(x[e]),"local"===o&&P.applyQuaternion(this.worldQuaternion),this.rotationAngle=this._offset.dot(P.cross(this.eye).normalize())*t),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),"local"===o&&"E"!==e&&"XYZE"!==e?(n.quaternion.copy(this._quaternionStart),n.quaternion.multiply(S.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),n.quaternion.copy(S.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),n.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(_),this.dispatchEvent(I)}}pointerUp(t){0===t.button&&(this.dragging&&null!==this.axis&&(E.mode=this.mode,this.dispatchEvent(E)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}attach(t){return this.object=t,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(_),this.dispatchEvent(I),this.pointStart.copy(this.pointEnd))}getRaycaster(){return M}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}update(){console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")}}function X(t){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:t.button};{const e=this.domElement.getBoundingClientRect();return{x:(t.clientX-e.left)/e.width*2-1,y:-(t.clientY-e.top)/e.height*2+1,button:t.button}}}function Q(t){if(this.enabled)switch(t.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(t))}}function Y(t){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(t)),this.pointerDown(this._getPointer(t)))}function Z(t){this.enabled&&this.pointerMove(this._getPointer(t))}function A(t){this.enabled&&(this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(t)))}function z(t,e,i){const n=e.intersectObject(t,!0);for(let t=0;t<n.length;t++)if(n[t].object.visible||i)return n[t];return!1}TransformControls.prototype.isTransformControls=!0;const q=new o,T=new v(0,1,0),j=new v(0,0,0),k=new h,W=new w,C=new w,F=new v,H=new h,L=new v(1,0,0),D=new v(0,1,0),O=new v(0,0,1),R=new v,N=new v,U=new v;class G extends p{constructor(){super(),this.type="TransformControlsGizmo";const n=new c({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),o=new r({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),h=n.clone();h.opacity=.15;const m=o.clone();m.opacity=.5;const w=n.clone();w.color.setHex(16711680);const u=n.clone();u.color.setHex(65280);const v=n.clone();v.color.setHex(255);const M=n.clone();M.color.setHex(16711680),M.opacity=.5;const P=n.clone();P.color.setHex(65280),P.opacity=.5;const g=n.clone();g.color.setHex(255),g.opacity=.5;const S=n.clone();S.opacity=.25;const x=n.clone();x.color.setHex(16776960),x.opacity=.25;n.clone().color.setHex(16776960);const _=n.clone();_.color.setHex(7895160);const f=new i(0,.04,.1,12);f.translate(0,.05,0);const E=new t(.08,.08,.08);E.translate(0,.04,0);const I=new e;I.setAttribute("position",new s([0,0,0,1,0,0],3));const X=new i(.0075,.0075,.5,3);function Q(t,e){const i=new b(t,.0075,3,64,e*Math.PI*2);return i.rotateY(Math.PI/2),i.rotateX(Math.PI/2),i}X.translate(0,.25,0);const Y={X:[[new l(f,w),[.5,0,0],[0,0,-Math.PI/2]],[new l(f,w),[-.5,0,0],[0,0,Math.PI/2]],[new l(X,w),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new l(f,u),[0,.5,0]],[new l(f,u),[0,-.5,0],[Math.PI,0,0]],[new l(X,u)]],Z:[[new l(f,v),[0,0,.5],[Math.PI/2,0,0]],[new l(f,v),[0,0,-.5],[-Math.PI/2,0,0]],[new l(X,v),null,[Math.PI/2,0,0]]],XYZ:[[new l(new d(.1,0),S.clone()),[0,0,0]]],XY:[[new l(new t(.15,.15,.01),g.clone()),[.15,.15,0]]],YZ:[[new l(new t(.15,.15,.01),M.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l(new t(.15,.15,.01),P.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},Z={X:[[new l(new i(.2,0,.6,4),h),[.3,0,0],[0,0,-Math.PI/2]],[new l(new i(.2,0,.6,4),h),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new l(new i(.2,0,.6,4),h),[0,.3,0]],[new l(new i(.2,0,.6,4),h),[0,-.3,0],[0,0,Math.PI]]],Z:[[new l(new i(.2,0,.6,4),h),[0,0,.3],[Math.PI/2,0,0]],[new l(new i(.2,0,.6,4),h),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new l(new d(.2,0),h)]],XY:[[new l(new t(.2,.2,.01),h),[.15,.15,0]]],YZ:[[new l(new t(.2,.2,.01),h),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l(new t(.2,.2,.01),h),[.15,0,.15],[-Math.PI/2,0,0]]]},A={START:[[new l(new d(.01,2),m),null,null,null,"helper"]],END:[[new l(new d(.01,2),m),null,null,null,"helper"]],DELTA:[[new a(function(){const t=new e;return t.setAttribute("position",new s([0,0,0,1,1,1],3)),t}(),m),null,null,null,"helper"]],X:[[new a(I,m.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new a(I,m.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new a(I,m.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},z={XYZE:[[new l(Q(.5,1),_),null,[0,Math.PI/2,0]]],X:[[new l(Q(.5,.5),w)]],Y:[[new l(Q(.5,.5),u),null,[0,0,-Math.PI/2]]],Z:[[new l(Q(.5,.5),v),null,[0,Math.PI/2,0]]],E:[[new l(Q(.75,1),x),null,[0,Math.PI/2,0]]]},q={AXIS:[[new a(I,m.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},T={XYZE:[[new l(new y(.25,10,8),h)]],X:[[new l(new b(.5,.1,4,24),h),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new l(new b(.5,.1,4,24),h),[0,0,0],[Math.PI/2,0,0]]],Z:[[new l(new b(.5,.1,4,24),h),[0,0,0],[0,0,-Math.PI/2]]],E:[[new l(new b(.75,.1,2,24),h)]]},j={X:[[new l(E,w),[.5,0,0],[0,0,-Math.PI/2]],[new l(X,w),[0,0,0],[0,0,-Math.PI/2]],[new l(E,w),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new l(E,u),[0,.5,0]],[new l(X,u)],[new l(E,u),[0,-.5,0],[0,0,Math.PI]]],Z:[[new l(E,v),[0,0,.5],[Math.PI/2,0,0]],[new l(X,v),[0,0,0],[Math.PI/2,0,0]],[new l(E,v),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new l(new t(.15,.15,.01),g),[.15,.15,0]]],YZ:[[new l(new t(.15,.15,.01),M),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l(new t(.15,.15,.01),P),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new l(new t(.1,.1,.1),S.clone())]]},k={X:[[new l(new i(.2,0,.6,4),h),[.3,0,0],[0,0,-Math.PI/2]],[new l(new i(.2,0,.6,4),h),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new l(new i(.2,0,.6,4),h),[0,.3,0]],[new l(new i(.2,0,.6,4),h),[0,-.3,0],[0,0,Math.PI]]],Z:[[new l(new i(.2,0,.6,4),h),[0,0,.3],[Math.PI/2,0,0]],[new l(new i(.2,0,.6,4),h),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new l(new t(.2,.2,.01),h),[.15,.15,0]]],YZ:[[new l(new t(.2,.2,.01),h),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new l(new t(.2,.2,.01),h),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new l(new t(.2,.2,.2),h),[0,0,0]]]},W={X:[[new a(I,m.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new a(I,m.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new a(I,m.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function C(t){const e=new p;for(const i in t)for(let n=t[i].length;n--;){const o=t[i][n][0].clone(),s=t[i][n][1],a=t[i][n][2],r=t[i][n][3],h=t[i][n][4];o.name=i,o.tag=h,s&&o.position.set(s[0],s[1],s[2]),a&&o.rotation.set(a[0],a[1],a[2]),r&&o.scale.set(r[0],r[1],r[2]),o.updateMatrix();const l=o.geometry.clone();l.applyMatrix4(o.matrix),o.geometry=l,o.renderOrder=1/0,o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),e.add(o)}return e}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=C(Y)),this.add(this.gizmo.rotate=C(z)),this.add(this.gizmo.scale=C(j)),this.add(this.picker.translate=C(Z)),this.add(this.picker.rotate=C(T)),this.add(this.picker.scale=C(k)),this.add(this.helper.translate=C(A)),this.add(this.helper.rotate=C(q)),this.add(this.helper.scale=C(W)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(t){const e="local"===("scale"===this.mode?"local":this.space)?this.worldQuaternion:C;this.gizmo.translate.visible="translate"===this.mode,this.gizmo.rotate.visible="rotate"===this.mode,this.gizmo.scale.visible="scale"===this.mode,this.helper.translate.visible="translate"===this.mode,this.helper.rotate.visible="rotate"===this.mode,this.helper.scale.visible="scale"===this.mode;let i=[];i=i.concat(this.picker[this.mode].children),i=i.concat(this.gizmo[this.mode].children),i=i.concat(this.helper[this.mode].children);for(let t=0;t<i.length;t++){const n=i[t];let o;if(n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition),o=this.camera.isOrthographicCamera?(this.camera.top-this.camera.bottom)/this.camera.zoom:this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(o*this.size/4),"helper"!==n.tag){if(n.quaternion.copy(e),"translate"===this.mode||"scale"===this.mode){const t=.99,i=.2;"X"===n.name&&Math.abs(T.copy(L).applyQuaternion(e).dot(this.eye))>t&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"Y"===n.name&&Math.abs(T.copy(D).applyQuaternion(e).dot(this.eye))>t&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"Z"===n.name&&Math.abs(T.copy(O).applyQuaternion(e).dot(this.eye))>t&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"XY"===n.name&&Math.abs(T.copy(O).applyQuaternion(e).dot(this.eye))<i&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"YZ"===n.name&&Math.abs(T.copy(L).applyQuaternion(e).dot(this.eye))<i&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),"XZ"===n.name&&Math.abs(T.copy(D).applyQuaternion(e).dot(this.eye))<i&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)}else"rotate"===this.mode&&(W.copy(e),T.copy(this.eye).applyQuaternion(S.copy(e).invert()),-1!==n.name.search("E")&&n.quaternion.setFromRotationMatrix(k.lookAt(this.eye,j,D)),"X"===n.name&&(S.setFromAxisAngle(L,Math.atan2(-T.y,T.z)),S.multiplyQuaternions(W,S),n.quaternion.copy(S)),"Y"===n.name&&(S.setFromAxisAngle(D,Math.atan2(T.x,T.z)),S.multiplyQuaternions(W,S),n.quaternion.copy(S)),"Z"===n.name&&(S.setFromAxisAngle(O,Math.atan2(T.y,T.x)),S.multiplyQuaternions(W,S),n.quaternion.copy(S)));n.visible=n.visible&&(-1===n.name.indexOf("X")||this.showX),n.visible=n.visible&&(-1===n.name.indexOf("Y")||this.showY),n.visible=n.visible&&(-1===n.name.indexOf("Z")||this.showZ),n.visible=n.visible&&(-1===n.name.indexOf("E")||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(t){return n.name===t}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}else n.visible=!1,"AXIS"===n.name?(n.position.copy(this.worldPositionStart),n.visible=!!this.axis,"X"===this.axis&&(S.setFromEuler(q.set(0,0,0)),n.quaternion.copy(e).multiply(S),Math.abs(T.copy(L).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"Y"===this.axis&&(S.setFromEuler(q.set(0,0,Math.PI/2)),n.quaternion.copy(e).multiply(S),Math.abs(T.copy(D).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"Z"===this.axis&&(S.setFromEuler(q.set(0,Math.PI/2,0)),n.quaternion.copy(e).multiply(S),Math.abs(T.copy(O).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),"XYZE"===this.axis&&(S.setFromEuler(q.set(0,Math.PI/2,0)),T.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(k.lookAt(j,T,D)),n.quaternion.multiply(S),n.visible=this.dragging),"E"===this.axis&&(n.visible=!1)):"START"===n.name?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):"END"===n.name?(n.position.copy(this.worldPosition),n.visible=this.dragging):"DELTA"===n.name?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),P.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),P.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(P),n.visible=this.dragging):(n.quaternion.copy(e),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=-1!==this.axis.search(n.name)))}super.updateMatrixWorld(t)}}G.prototype.isTransformControlsGizmo=!0;class B extends l{constructor(){super(new m(1e5,1e5,2,2),new c({visible:!1,wireframe:!0,side:n,transparent:!0,opacity:.1,toneMapped:!1})),this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),"scale"===this.mode&&(e="local"),R.copy(L).applyQuaternion("local"===e?this.worldQuaternion:C),N.copy(D).applyQuaternion("local"===e?this.worldQuaternion:C),U.copy(O).applyQuaternion("local"===e?this.worldQuaternion:C),T.copy(N),this.mode){case"translate":case"scale":switch(this.axis){case"X":T.copy(this.eye).cross(R),F.copy(R).cross(T);break;case"Y":T.copy(this.eye).cross(N),F.copy(N).cross(T);break;case"Z":T.copy(this.eye).cross(U),F.copy(U).cross(T);break;case"XY":F.copy(U);break;case"YZ":F.copy(R);break;case"XZ":T.copy(U),F.copy(N);break;case"XYZ":case"E":F.set(0,0,0)}break;default:F.set(0,0,0)}0===F.length()?this.quaternion.copy(this.cameraQuaternion):(H.lookAt(P.set(0,0,0),F,T),this.quaternion.setFromRotationMatrix(H)),super.updateMatrixWorld(t)}}B.prototype.isTransformControlsPlane=!0;export{G as TransformControlsGizmo,B as TransformControlsPlane};/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import{Mesh as e,Scene as t,Vector3 as n}from"three";import{isCollisionMesh as r}from"../../scene/collision/collision-shape-import.js";import{traverseVisibleGenerator as i}from"three/examples/jsm/utils/SceneUtils.js";export function filterScene(e,t){const n=[];return e.traverse(e=>{t(e)&&n.push(e)}),n}export function findFirstVisibleObject(e,t){const n=[e];for(;n.length>0;){const e=n.pop();if(t(e))return e;e.visible&&null!=e.children&&n.push(...e.children)}return null}export function findFirstVisibleMesh(t){return findFirstVisibleObject(t,t=>!r(t)&&t instanceof e&&null!=t.geometry)}export function filterSceneShallow(e,t,n){return filterChildrenShallow(e,t,n)}export function filterChildrenShallow(e,n,r){const i=[],l=[e];for(;l.length>0;){const e=l.pop();n(e)?i.push(e):(null==r||r(e)||e instanceof t)&&null!=e.children&&l.push(...e.children)}return i}const l=new n;export function calculateEffectiveScale(e){return l.copy(e.scale),e.traverseAncestors(e=>{l.multiply(e.scale)}),l}export function traverseVisibleStop(e,t){const n=[e];for(;n.length>0;){const e=n.pop();e.visible&&!1!==t(e)&&null!=e.children&&n.push(...e.children)}return null}export function traverseVisibleEvery(e,t){let n=!0;return traverseVisibleStop(e,e=>{if(n=n&&t(e),!n)return!1}),n}export async function traverseAsync(e,t){for(const n of i(e))await t(n)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  import*as t from"three";export class UnscaledSprite extends t.Sprite{constructor(t){super(t)}updateMatrixWorld(s){super.updateMatrixWorld(s),this.parent?(r.copy(this.parent.matrixWorld),r.decompose(e,o,i),r.compose(e,o,new t.Vector3(1,1,1)),this.matrixWorld.multiplyMatrices(r,this.matrix)):this.matrixWorld.copy(this.matrix)}}const r=new t.Matrix4,e=new t.Vector3,o=new t.Quaternion,i=new t.Vector3;/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export function assertType(e,n){if(!(e instanceof n))throw new Error(`Invalid type: expected instance of ${n.name}`)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  const t=[];for(let e=0;e<256;++e)t.push((e+256).toString(16).substr(1));const n=new Uint8Array(256);let o=n.length;export function randomUUID(){const e=(o>n.length-10&&(crypto.getRandomValues(n),o=0),n.slice(o,o+=10)),r=function(){const t=100*(Date.now()+performance.now());return Math.round(t)}().toString(16);return e[0]=15&e[0]|64,e[2]=63&e[2]|128,function(n,o){return(n.slice(0,8)+"-"+n.slice(8,12)+"-"+t[o[0]]+t[o[1]]+"-"+t[o[2]]+t[o[3]]+"-"+t[o[4]]+t[o[5]]+t[o[6]]+t[o[7]]+t[o[8]]+t[o[9]]).toLowerCase()}(r,e)}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export class VoxelBitset{constructor(t,h,s){this.width=t,this.height=h,this.depth=s;const i=t*h*s,e=Math.ceil(i/32);this.data=new Uint32Array(e)}getIndex(t,h,s){const i=t+h*this.width+s*this.width*this.height;return[Math.floor(i/32),i%32]}set(t,h,s,i){const[e,a]=this.getIndex(t,h,s);i?this.data[e]|=1<<a:this.data[e]&=~(1<<a)}get(t,h,s){const[i,e]=this.getIndex(t,h,s);return!!(this.data[i]&1<<e)}}/*
2
- * Copyright (©) 2025 Hology Interactive AB. All rights reserved.
2
+ * Copyright (©) 2026 Hology Interactive AB. All rights reserved.
3
3
  * See the LICENSE.md file for details.
4
4
  */