angular-three-soba 4.0.6 → 4.0.8
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.
- package/fesm2022/angular-three-soba-misc.mjs +32 -26
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/package.json +1 -1
- package/types/angular-three-soba-abstractions.d.ts +71 -71
- package/types/angular-three-soba-materials.d.ts +2 -2
- package/types/angular-three-soba-misc.d.ts +3 -3
- package/types/angular-three-soba-performances.d.ts +2 -2
- package/types/angular-three-soba-shaders.d.ts +2 -2
|
@@ -1965,11 +1965,11 @@ vec2 pcssVogelDiskSample(int sampleIndex, int sampleCount, float angle) {
|
|
|
1965
1965
|
return vec2(cosine, sine) * r;
|
|
1966
1966
|
}
|
|
1967
1967
|
|
|
1968
|
-
float
|
|
1968
|
+
float pcssPenumbraSize( const in float zReceiver, const in float zBlocker ) {
|
|
1969
1969
|
return (zReceiver - zBlocker) / zBlocker;
|
|
1970
1970
|
}
|
|
1971
1971
|
|
|
1972
|
-
float
|
|
1972
|
+
float pcssFindBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) {
|
|
1973
1973
|
float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);
|
|
1974
1974
|
float blockerDepthSum = float(${focus});
|
|
1975
1975
|
float blockers = 0.0;
|
|
@@ -2018,30 +2018,15 @@ float PCSS (sampler2D shadowMap, vec4 coords, float shadowIntensity) {
|
|
|
2018
2018
|
vec2 uv = coords.xy;
|
|
2019
2019
|
float zReceiver = coords.z;
|
|
2020
2020
|
float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2;
|
|
2021
|
-
float avgBlockerDepth =
|
|
2021
|
+
float avgBlockerDepth = pcssFindBlocker(shadowMap, uv, zReceiver, angle);
|
|
2022
2022
|
if (avgBlockerDepth == -1.0) {
|
|
2023
2023
|
return 1.0;
|
|
2024
2024
|
}
|
|
2025
|
-
float penumbraRatio =
|
|
2025
|
+
float penumbraRatio = pcssPenumbraSize(zReceiver, avgBlockerDepth);
|
|
2026
2026
|
float shadow = pcssVogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle);
|
|
2027
2027
|
return mix( 1.0, shadow, shadowIntensity );
|
|
2028
2028
|
}`;
|
|
2029
2029
|
}
|
|
2030
|
-
/**
|
|
2031
|
-
* Generates the replacement getShadow function for r182+
|
|
2032
|
-
*/
|
|
2033
|
-
function getShadowReplacement() {
|
|
2034
|
-
return `float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
2035
|
-
shadowCoord.xyz /= shadowCoord.w;
|
|
2036
|
-
shadowCoord.z += shadowBias;
|
|
2037
|
-
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
|
|
2038
|
-
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
|
|
2039
|
-
if ( frustumTest ) {
|
|
2040
|
-
return PCSS( shadowMap, shadowCoord, shadowIntensity );
|
|
2041
|
-
}
|
|
2042
|
-
return 1.0;
|
|
2043
|
-
}`;
|
|
2044
|
-
}
|
|
2045
2030
|
function reset(gl, scene, camera) {
|
|
2046
2031
|
scene.traverse((object) => {
|
|
2047
2032
|
if (object.material) {
|
|
@@ -2073,14 +2058,35 @@ class NgtsSoftShadows {
|
|
|
2073
2058
|
const version = getVersion();
|
|
2074
2059
|
const original = THREE.ShaderChunk.shadowmap_pars_fragment;
|
|
2075
2060
|
if (version >= 182) {
|
|
2076
|
-
// Three.js r182+ uses native depth textures and has a different shader structure
|
|
2077
|
-
//
|
|
2061
|
+
// Three.js r182+ uses native depth textures and has a different shader structure.
|
|
2062
|
+
// The PCF path uses sampler2DShadow, but PCSS needs sampler2D for manual depth comparison.
|
|
2063
|
+
// We inject our PCSS code and replace the BASIC shadow type's getShadow function,
|
|
2064
|
+
// then also replace the PCF uniform declarations to use sampler2D instead of sampler2DShadow.
|
|
2078
2065
|
const pcssCode = pcssModern(options);
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2066
|
+
let shader = THREE.ShaderChunk.shadowmap_pars_fragment;
|
|
2067
|
+
// 1. Inject PCSS functions after USE_SHADOWMAP
|
|
2068
|
+
shader = shader.replace('#ifdef USE_SHADOWMAP', '#ifdef USE_SHADOWMAP\n' + pcssCode);
|
|
2069
|
+
// 2. Replace sampler2DShadow with sampler2D for directional lights (PCF path)
|
|
2070
|
+
shader = shader.replace(/#if defined\( SHADOWMAP_TYPE_PCF \)\s+uniform sampler2DShadow directionalShadowMap\[ NUM_DIR_LIGHT_SHADOWS \];/, `#if defined( SHADOWMAP_TYPE_PCF )
|
|
2071
|
+
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];`);
|
|
2072
|
+
// 3. Replace sampler2DShadow with sampler2D for spot lights (PCF path)
|
|
2073
|
+
shader = shader.replace(/#if defined\( SHADOWMAP_TYPE_PCF \)\s+uniform sampler2DShadow spotShadowMap\[ NUM_SPOT_LIGHT_SHADOWS \];/, `#if defined( SHADOWMAP_TYPE_PCF )
|
|
2074
|
+
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];`);
|
|
2075
|
+
// 4. Replace the PCF getShadow function to use our PCSS
|
|
2076
|
+
// Match from the function signature to its closing brace
|
|
2077
|
+
const getShadowPCFRegex = /(#if defined\( SHADOWMAP_TYPE_PCF \)\s+float getShadow\( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord \) \{[\s\S]*?return mix\( 1\.0, shadow, shadowIntensity \);\s*\})/;
|
|
2078
|
+
shader = shader.replace(getShadowPCFRegex, `#if defined( SHADOWMAP_TYPE_PCF )
|
|
2079
|
+
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
|
|
2080
|
+
shadowCoord.xyz /= shadowCoord.w;
|
|
2081
|
+
shadowCoord.z += shadowBias;
|
|
2082
|
+
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
|
|
2083
|
+
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
|
|
2084
|
+
if ( frustumTest ) {
|
|
2085
|
+
return PCSS( shadowMap, shadowCoord, shadowIntensity );
|
|
2086
|
+
}
|
|
2087
|
+
return 1.0;
|
|
2088
|
+
}`);
|
|
2089
|
+
THREE.ShaderChunk.shadowmap_pars_fragment = shader;
|
|
2084
2090
|
}
|
|
2085
2091
|
else {
|
|
2086
2092
|
// Three.js < r182 uses RGBA-packed depth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-three-soba-misc.mjs","sources":["../../../../libs/soba/misc/src/lib/animations.ts","../../../../libs/soba/misc/src/lib/bake-shadows.ts","../../../../libs/soba/misc/src/lib/computed-attribute.ts","../../../../libs/soba/misc/src/lib/constants.ts","../../../../libs/soba/misc/src/lib/decal.ts","../../../../libs/soba/misc/src/lib/deprecated.ts","../../../../libs/soba/misc/src/lib/fbo.ts","../../../../libs/soba/misc/src/lib/depth-buffer.ts","../../../../libs/soba/misc/src/lib/html/utils.ts","../../../../libs/soba/misc/src/lib/html/html-content.ts","../../../../libs/soba/misc/src/lib/html/html.ts","../../../../libs/soba/misc/src/lib/intersect.ts","../../../../libs/soba/misc/src/lib/preload.ts","../../../../libs/soba/misc/src/lib/sampler.ts","../../../../libs/soba/misc/src/lib/scale-factor.ts","../../../../libs/soba/misc/src/lib/soft-shadows.ts","../../../../libs/soba/misc/src/angular-three-soba-misc.ts"],"sourcesContent":["import { computed, DestroyRef, ElementRef, inject, Injector, isSignal } from '@angular/core';\nimport { beforeRender, resolveRef } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Animation clip type with flexible name typing.\n * Allows consumers to pass in type-safe animation clips with custom name types.\n * @internal\n */\ntype NgtsAnimationClipWithoutName = Omit<THREE.AnimationClip, 'name'> & { name: any };\n\n/**\n * Extended animation clip type with proper clone signature.\n * Wraps THREE.AnimationClip with modified name and clone types for type safety.\n */\nexport type NgtsAnimationClip = Omit<NgtsAnimationClipWithoutName, 'clone'> & { clone: () => NgtsAnimationClip };\n\n/**\n * Type helper for creating a union of animation clips with specific names.\n * Useful for type-safe access to animations by name.\n *\n * @typeParam TAnimationNames - Union of animation name strings\n */\nexport type NgtsAnimationClips<TAnimationNames extends string> = {\n\t[Name in TAnimationNames]: Omit<NgtsAnimationClip, 'name'> & { name: Name };\n}[TAnimationNames];\n\n/**\n * API returned by the `animations` function.\n * Provides access to clips, mixer, action map, and ready state.\n *\n * @typeParam T - The animation clip type\n */\nexport type NgtsAnimationApi<T extends NgtsAnimationClip> = {\n\t/** Array of all animation clips */\n\tclips: T[];\n\t/** The THREE.AnimationMixer instance managing all animations */\n\tmixer: THREE.AnimationMixer;\n\t/** Array of animation names for easy iteration */\n\tnames: T['name'][];\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Whether the animations have finished initializing.\n\t\t\t * When `true`, the `actions` property is available.\n\t\t\t */\n\t\t\tget isReady(): true;\n\t\t\t/** Map of animation names to their corresponding AnimationAction instances */\n\t\t\tactions: { [key in T['name']]: THREE.AnimationAction };\n\t }\n\t| {\n\t\t\t/**\n\t\t\t * Whether the animations have finished initializing.\n\t\t\t * When `false`, the `actions` property is not yet available.\n\t\t\t */\n\t\t\tget isReady(): false;\n\t }\n);\n\n/**\n * Input type for the `animations` function.\n * Accepts either an array of clips or an object with an `animations` property.\n *\n * @typeParam TAnimation - The animation clip type\n */\nexport type NgtsAnimation<TAnimation extends NgtsAnimationClip = NgtsAnimationClip> =\n\t| TAnimation[]\n\t| { animations: TAnimation[] };\n\n/**\n * Creates an animation API for managing THREE.js animation clips on an object.\n *\n * Sets up an AnimationMixer, processes animation clips, and provides a reactive\n * API for controlling animations. The mixer is automatically updated each frame\n * and cleaned up on destroy.\n *\n * @param animationsFactory - Signal of animation clips or object with animations\n * @param object - The Object3D to attach animations to (or ref/factory returning one)\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns Animation API with clips, mixer, actions, and ready state\n *\n * @example\n * ```typescript\n * const gltf = injectGLTF(() => 'model.glb');\n * const api = animations(\n * () => gltf()?.animations,\n * () => gltf()?.scene\n * );\n *\n * effect(() => {\n * if (api.isReady) {\n * api.actions['walk'].play();\n * }\n * });\n * ```\n */\nexport function animations<TAnimation extends NgtsAnimationClip>(\n\tanimationsFactory: () => NgtsAnimation<TAnimation> | undefined | null,\n\tobject:\n\t\t| ElementRef<THREE.Object3D>\n\t\t| THREE.Object3D\n\t\t| (() => ElementRef<THREE.Object3D> | THREE.Object3D | undefined | null),\n\t{ injector }: { injector?: Injector } = {},\n): NgtsAnimationApi<TAnimation> {\n\treturn assertInjector(animations, injector, () => {\n\t\tconst mixer = new THREE.AnimationMixer(null!);\n\t\tbeforeRender(({ delta }) => {\n\t\t\tif (!mixer.getRoot()) return;\n\t\t\tmixer.update(delta);\n\t\t});\n\n\t\tlet cached = {} as Record<string, THREE.AnimationAction>;\n\t\tconst actions = {} as { [key in TAnimation['name']]: THREE.AnimationAction };\n\t\tconst clips = [] as NgtsAnimationApi<TAnimation>['clips'];\n\t\tconst names = [] as NgtsAnimationApi<TAnimation>['names'];\n\n\t\tconst actualObject = computed(() =>\n\t\t\tisSignal(object) || typeof object === 'function' ? resolveRef(object()) : resolveRef(object),\n\t\t);\n\n\t\tconst isReady = computed(() => {\n\t\t\tconst obj = actualObject() as THREE.Object3D | undefined;\n\t\t\tif (!obj) return false;\n\n\t\t\tObject.assign(mixer, { _root: obj });\n\n\t\t\tconst maybeAnimationClips = animationsFactory();\n\t\t\tif (!maybeAnimationClips) return;\n\n\t\t\tconst animationClips = Array.isArray(maybeAnimationClips)\n\t\t\t\t? maybeAnimationClips\n\t\t\t\t: maybeAnimationClips.animations;\n\n\t\t\tfor (let i = 0; i < animationClips.length; i++) {\n\t\t\t\tconst clip = animationClips[i];\n\n\t\t\t\tnames.push(clip.name);\n\t\t\t\tclips.push(clip);\n\n\t\t\t\tif (!actions[clip.name as TAnimation['name']]) {\n\t\t\t\t\tObject.defineProperty(actions, clip.name, {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tget: () => {\n\t\t\t\t\t\t\tif (!cached[clip.name]) {\n\t\t\t\t\t\t\t\tcached[clip.name] = mixer.clipAction(clip, obj);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn cached[clip.name];\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tconst obj = actualObject() as THREE.Object3D | undefined;\n\n\t\t\t// clear cached\n\t\t\tcached = {};\n\t\t\t// stop all actions\n\t\t\tmixer.stopAllAction();\n\t\t\t// uncache actions\n\t\t\tObject.values(actions).forEach((action) => {\n\t\t\t\tmixer.uncacheAction(action as THREE.AnimationClip, obj);\n\t\t\t});\n\t\t});\n\n\t\treturn {\n\t\t\tclips,\n\t\t\tmixer,\n\t\t\tactions,\n\t\t\tnames,\n\t\t\tget isReady() {\n\t\t\t\treturn isReady();\n\t\t\t},\n\t\t} as NgtsAnimationApi<TAnimation>;\n\t});\n}\n\n/**\n * @deprecated Use `animations` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see animations\n */\nexport const injectAnimations = animations;\n","import { Directive, effect } from '@angular/core';\nimport { injectStore } from 'angular-three';\n\n/**\n * Disables automatic shadow map updates for performance optimization.\n *\n * When added to the scene, this directive sets `shadowMap.autoUpdate` to `false`\n * and triggers a single `needsUpdate` to bake the current shadow state. This is\n * useful for static scenes where shadows don't need to update every frame.\n *\n * On cleanup, automatic shadow updates are restored.\n *\n * @example\n * ```html\n * <ngt-group>\n * <ngts-bake-shadows />\n * <!-- static meshes with shadows -->\n * </ngt-group>\n * ```\n */\n@Directive({ selector: 'ngts-bake-shadows' })\nexport class NgtsBakeShadows {\n\tconstructor() {\n\t\tconst store = injectStore();\n\t\teffect((onCleanup) => {\n\t\t\tconst gl = store.gl();\n\t\t\tgl.shadowMap.autoUpdate = false;\n\t\t\tgl.shadowMap.needsUpdate = true;\n\t\t\tonCleanup(() => {\n\t\t\t\tgl.shadowMap.autoUpdate = gl.shadowMap.needsUpdate = true;\n\t\t\t});\n\t\t});\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, getInstanceState } from 'angular-three';\nimport * as THREE from 'three';\n\n/**\n * Computes and attaches a custom BufferAttribute to a parent BufferGeometry.\n *\n * This component must be used as a child of a BufferGeometry. It calls the provided\n * `compute` function with the parent geometry and attaches the resulting attribute\n * under the specified name.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-box-geometry>\n * <ngts-computed-attribute\n * name=\"customAttribute\"\n * [compute]=\"computeCustomAttr\"\n * />\n * </ngt-box-geometry>\n * <ngt-mesh-basic-material />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * computeCustomAttr = (geometry: THREE.BufferGeometry) => {\n * const count = geometry.attributes['position'].count;\n * const data = new Float32Array(count);\n * // ... fill data\n * return new THREE.BufferAttribute(data, 1);\n * };\n * ```\n */\n@Component({\n\tselector: 'ngts-computed-attribute',\n\ttemplate: `\n\t\t<ngt-primitive #attribute *args=\"[bufferAttribute]\" [attach]=\"['attributes', name()]\" [parameters]=\"options()\">\n\t\t\t<ng-content />\n\t\t</ngt-primitive>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsComputedAttribute {\n\t/**\n\t * Function that computes the BufferAttribute from the parent geometry.\n\t * Called whenever the geometry or compute function changes.\n\t */\n\tcompute = input.required<(geometry: THREE.BufferGeometry) => THREE.BufferAttribute>();\n\n\t/**\n\t * The attribute name to attach to the geometry (e.g., 'uv2', 'customData').\n\t */\n\tname = input.required<string>();\n\n\t/**\n\t * Additional options to pass to the underlying buffer attribute.\n\t */\n\toptions = input({} as Partial<NgtThreeElements['ngt-buffer-geometry']>);\n\n\tprotected bufferAttribute = new THREE.BufferAttribute(new Float32Array(0), 1);\n\tattributeRef = viewChild<ElementRef<THREE.BufferAttribute>>('attribute');\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst bufferAttribute = this.attributeRef()?.nativeElement;\n\t\t\tif (!bufferAttribute) return;\n\n\t\t\tconst instanceState = getInstanceState(bufferAttribute);\n\t\t\tif (!instanceState) return;\n\n\t\t\tconst geometry = ((bufferAttribute as any).parent as THREE.BufferGeometry) ?? instanceState.parent();\n\n\t\t\tconst attribute = this.compute()(geometry);\n\t\t\tbufferAttribute.copy(attribute);\n\t\t});\n\t}\n}\n","import { REVISION } from 'three';\n\n/**\n * Retrieves the current THREE.js version as a numeric value.\n *\n * Parses the THREE.js REVISION constant, stripping any non-numeric characters\n * (e.g., 'r152' becomes 152).\n *\n * @returns The THREE.js version as an integer\n *\n * @example\n * ```typescript\n * if (getVersion() >= 150) {\n * // Use features available in r150+\n * }\n * ```\n */\nexport function getVersion() {\n\treturn parseInt(REVISION.replace(/\\D+/g, ''));\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { applyProps, extend, getInstanceState, is, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { AxesHelper, BoxGeometry, Mesh, MeshNormalMaterial } from 'three';\nimport { DecalGeometry } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsDecal component.\n */\nexport interface NgtsDecalOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Polygon offset factor to prevent z-fighting with the parent mesh.\n\t * More negative values push the decal further from the surface.\n\t * @default -10\n\t */\n\tpolygonOffsetFactor: number;\n\n\t/**\n\t * Whether to enable depth testing for the decal material.\n\t * Set to `false` to ensure decal is always visible.\n\t * @default false\n\t */\n\tdepthTest: boolean;\n\n\t/**\n\t * Shows a debug helper (box + axes) to visualize decal placement.\n\t * @default false\n\t */\n\tdebug: boolean;\n\n\t/**\n\t * Texture map to apply to the decal.\n\t */\n\tmap?: THREE.Texture | null;\n}\n\nconst defaultOptions: NgtsDecalOptions = {\n\tpolygonOffsetFactor: -10,\n\tdebug: false,\n\tdepthTest: false,\n};\n\n/**\n * Projects a texture decal onto a mesh surface using THREE.DecalGeometry.\n *\n * The decal automatically conforms to the parent mesh's geometry and\n * orients itself based on the surface normal at the specified position.\n * Can be used as a child of a mesh or reference an external mesh via input.\n *\n * @example\n * ```html\n * <!-- As child of mesh -->\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-standard-material />\n * <ngts-decal\n * [options]=\"{\n * position: [0, 0, 1],\n * scale: [0.5, 0.5, 0.5],\n * map: logoTexture\n * }\"\n * />\n * </ngt-mesh>\n *\n * <!-- With external mesh reference -->\n * <ngt-mesh #targetMesh>...</ngt-mesh>\n * <ngts-decal [mesh]=\"targetMesh\" [options]=\"{ ... }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-decal',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [parameters]=\"parameters()\">\n\t\t\t<ngt-value [rawValue]=\"true\" attach=\"material.transparent\" />\n\t\t\t<ngt-value [rawValue]=\"true\" attach=\"material.polygonOffset\" />\n\t\t\t<ngt-value [rawValue]=\"map()\" attach=\"material.map\" />\n\n\t\t\t<ng-content>\n\t\t\t\t<!-- we only want to pass through these material properties if they don't use a custom material -->\n\t\t\t\t<ngt-value [rawValue]=\"polygonOffsetFactor()\" attach=\"material.polygonOffsetFactor\" />\n\t\t\t\t<ngt-value [rawValue]=\"depthTest()\" attach=\"material.depthTest\" />\n\t\t\t</ng-content>\n\n\t\t\t@if (debug()) {\n\t\t\t\t<ngt-mesh #helper>\n\t\t\t\t\t<ngt-box-geometry />\n\t\t\t\t\t<ngt-mesh-normal-material wireframe />\n\t\t\t\t\t<ngt-axes-helper />\n\t\t\t\t</ngt-mesh>\n\t\t\t}\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsDecal {\n\t/**\n\t * Optional external mesh to project the decal onto.\n\t * If not provided, uses the parent mesh in the scene graph.\n\t */\n\tmesh = input<ElementRef<THREE.Mesh> | THREE.Mesh | null>();\n\n\t/**\n\t * Decal configuration options including position, scale, rotation, and material properties.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'debug',\n\t\t'map',\n\t\t'depthTest',\n\t\t'polygonOffsetFactor',\n\t\t'position',\n\t\t'scale',\n\t\t'rotation',\n\t]);\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\tprivate helperRef = viewChild<ElementRef<THREE.Mesh>>('helper');\n\n\tprotected map = pick(this.options, 'map');\n\tprotected depthTest = pick(this.options, 'depthTest');\n\tprotected polygonOffsetFactor = pick(this.options, 'polygonOffsetFactor');\n\tprotected debug = pick(this.options, 'debug');\n\tprivate position = pick(this.options, 'position');\n\tprivate rotation = pick(this.options, 'rotation');\n\tprivate scale = pick(this.options, 'scale');\n\n\tconstructor() {\n\t\textend({ Mesh, BoxGeometry, MeshNormalMaterial, AxesHelper });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst thisMesh = this.meshRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(thisMesh);\n\t\t\tif (!instanceState) return;\n\n\t\t\tconst parent = resolveRef(this.mesh()) || instanceState.parent();\n\n\t\t\tif (parent && !is.three<THREE.Mesh>(parent, 'isMesh')) {\n\t\t\t\tthrow new Error('<ngts-decal> must have a Mesh as parent or specify its \"mesh\" input');\n\t\t\t}\n\n\t\t\tif (!parent) return;\n\n\t\t\tconst parentInstanceState = getInstanceState(parent);\n\t\t\tif (!parentInstanceState) return;\n\n\t\t\t// track parent's children\n\t\t\tconst parentNonObjects = parentInstanceState.nonObjects();\n\t\t\tif (!parentNonObjects || !parentNonObjects.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if parent geometry doesn't have its attributes populated properly, we skip\n\t\t\tif (!parent.geometry?.attributes?.['position']) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [position, rotation, scale] = [this.position(), this.rotation(), this.scale()];\n\t\t\tconst state = {\n\t\t\t\tposition: new THREE.Vector3(),\n\t\t\t\trotation: new THREE.Euler(),\n\t\t\t\tscale: new THREE.Vector3(1, 1, 1),\n\t\t\t};\n\n\t\t\tapplyProps(state, { position, scale });\n\n\t\t\t// zero out the parents matrix world for this operation\n\t\t\tconst matrixWorld = parent.matrixWorld.clone();\n\t\t\tparent.matrixWorld.identity();\n\n\t\t\tif (!rotation || typeof rotation === 'number') {\n\t\t\t\tconst obj = new THREE.Object3D();\n\t\t\t\tobj.position.copy(state.position);\n\n\t\t\t\t// Thanks https://x.com/N8Programs !\n\t\t\t\tconst vertices = parent.geometry.attributes['position'].array;\n\t\t\t\tif (parent.geometry.attributes['normal'] === undefined) {\n\t\t\t\t\tparent.geometry.computeVertexNormals();\n\t\t\t\t}\n\t\t\t\tconst normal = parent.geometry.attributes['normal'].array;\n\t\t\t\tlet distance = Infinity;\n\t\t\t\tlet closestNormal = new THREE.Vector3();\n\t\t\t\tconst ox = obj.position.x;\n\t\t\t\tconst oy = obj.position.y;\n\t\t\t\tconst oz = obj.position.z;\n\t\t\t\tconst vLength = vertices.length;\n\t\t\t\tlet chosenIdx = -1;\n\t\t\t\tfor (let i = 0; i < vLength; i += 3) {\n\t\t\t\t\tconst x = vertices[i];\n\t\t\t\t\tconst y = vertices[i + 1];\n\t\t\t\t\tconst z = vertices[i + 2];\n\t\t\t\t\tconst xDiff = x - ox;\n\t\t\t\t\tconst yDiff = y - oy;\n\t\t\t\t\tconst zDiff = z - oz;\n\t\t\t\t\tconst distSquared = xDiff * xDiff + yDiff * yDiff + zDiff * zDiff;\n\t\t\t\t\tif (distSquared < distance) {\n\t\t\t\t\t\tdistance = distSquared;\n\t\t\t\t\t\tchosenIdx = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosestNormal.fromArray(normal, chosenIdx);\n\n\t\t\t\t// Get vector tangent to normal\n\t\t\t\tobj.lookAt(obj.position.clone().add(closestNormal));\n\t\t\t\tobj.rotateZ(Math.PI);\n\t\t\t\tobj.rotateY(Math.PI);\n\n\t\t\t\tif (typeof rotation === 'number') obj.rotateZ(rotation);\n\t\t\t\tapplyProps(state, { rotation: obj.rotation });\n\t\t\t} else {\n\t\t\t\tapplyProps(state, { rotation });\n\t\t\t}\n\n\t\t\tthisMesh.geometry = new DecalGeometry(parent, state.position, state.rotation, state.scale);\n\t\t\tconst helper = this.helperRef()?.nativeElement;\n\t\t\tif (helper) {\n\t\t\t\tapplyProps(helper, state);\n\t\t\t\t// Prevent the helpers from blocking rays\n\t\t\t\thelper.traverse((child) => (child.raycast = () => null));\n\t\t\t}\n\n\t\t\t// Reset parents matrix-world\n\t\t\tparent.matrixWorld = matrixWorld;\n\n\t\t\tonCleanup(() => {\n\t\t\t\tthisMesh.geometry.dispose();\n\t\t\t});\n\t\t});\n\t}\n}\n","import type * as THREE from 'three';\n\n/**\n * Sets the update range on a BufferAttribute for partial GPU uploads.\n *\n * Handles the API change in THREE.js r159 where `updateRange` was replaced\n * with `updateRanges` array and `addUpdateRange()` method.\n *\n * @deprecated This function handles legacy THREE.js API compatibility.\n * Consider using `attribute.addUpdateRange()` directly for r159+.\n *\n * @param attribute - The BufferAttribute to update\n * @param updateRange - Object specifying the range to update\n * @param updateRange.start - Starting index in the attribute array\n * @param updateRange.count - Number of elements to update\n *\n * @example\n * ```typescript\n * const positions = geometry.attributes['position'];\n * // Only update first 100 vertices\n * setUpdateRange(positions, { start: 0, count: 100 * 3 });\n * positions.needsUpdate = true;\n * ```\n */\nexport const setUpdateRange = (\n\tattribute: THREE.BufferAttribute,\n\tupdateRange: { start: number; count: number },\n): void => {\n\tif ('updateRanges' in attribute) {\n\t\t// attribute.updateRanges[0] = updateRange;\n\t\tattribute.addUpdateRange(updateRange.start, updateRange.count);\n\t} else {\n\t\tObject.assign(attribute, { updateRange });\n\t}\n};\n","import {\n\tDestroyRef,\n\tDirective,\n\tInjector,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n} from '@angular/core';\nimport { injectStore } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Parameters for creating a Frame Buffer Object (FBO).\n */\nexport interface NgtsFBOParams {\n\t/**\n\t * Width of the render target in pixels, or RenderTargetOptions if height is not provided.\n\t * Defaults to canvas width × device pixel ratio.\n\t */\n\twidth?: number | THREE.RenderTargetOptions;\n\n\t/**\n\t * Height of the render target in pixels.\n\t * Defaults to canvas height × device pixel ratio.\n\t */\n\theight?: number;\n\n\t/**\n\t * Additional THREE.RenderTargetOptions for the WebGLRenderTarget.\n\t */\n\tsettings?: THREE.RenderTargetOptions;\n}\n\n/**\n * Creates a WebGLRenderTarget (Frame Buffer Object) for off-screen rendering.\n *\n * Automatically sized to the canvas dimensions if width/height not specified.\n * The FBO is disposed on component destroy.\n *\n * @param params - Signal of FBO configuration\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns A THREE.WebGLRenderTarget instance\n *\n * @example\n * ```typescript\n * // Basic usage - sized to canvas\n * const renderTarget = fbo();\n *\n * // Custom size with multisampling\n * const target = fbo(() => ({\n * width: 512,\n * height: 512,\n * settings: { samples: 4 }\n * }));\n *\n * // Render to FBO\n * beforeRender(({ gl, scene, camera }) => {\n * gl.setRenderTarget(target);\n * gl.render(scene, camera);\n * gl.setRenderTarget(null);\n * });\n * ```\n */\nexport function fbo(params: () => NgtsFBOParams = () => ({}), { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(fbo, injector, () => {\n\t\tconst store = injectStore();\n\n\t\tconst width = computed(() => {\n\t\t\tconst { width } = params();\n\t\t\treturn typeof width === 'number' ? width : store.size.width() * store.viewport.dpr();\n\t\t});\n\n\t\tconst height = computed(() => {\n\t\t\tconst { height } = params();\n\t\t\treturn typeof height === 'number' ? height : store.size.height() * store.viewport.dpr();\n\t\t});\n\n\t\tconst settings = computed(() => {\n\t\t\tconst { width, settings } = params();\n\t\t\tconst _settings = (typeof width === 'number' ? settings : (width as THREE.RenderTargetOptions)) || {};\n\t\t\tif (_settings.samples === undefined) {\n\t\t\t\t_settings.samples = 0;\n\t\t\t}\n\t\t\treturn _settings;\n\t\t});\n\n\t\tconst target = (() => {\n\t\t\tconst [{ samples = 0, depth, ...targetSettings }, _width, _height] = [\n\t\t\t\tuntracked(settings),\n\t\t\t\tuntracked(width),\n\t\t\t\tuntracked(height),\n\t\t\t];\n\n\t\t\tconst target = new THREE.WebGLRenderTarget(_width, _height, {\n\t\t\t\tminFilter: THREE.LinearFilter,\n\t\t\t\tmagFilter: THREE.LinearFilter,\n\t\t\t\ttype: THREE.HalfFloatType,\n\t\t\t\t...targetSettings,\n\t\t\t});\n\n\t\t\tif (depth) {\n\t\t\t\ttarget.depthTexture = new THREE.DepthTexture(_width, _height, THREE.FloatType);\n\t\t\t}\n\n\t\t\ttarget.samples = samples;\n\t\t\treturn target;\n\t\t})();\n\n\t\teffect(() => {\n\t\t\tconst [{ samples = 0 }, _width, _height] = [settings(), width(), height()];\n\t\t\ttarget.setSize(_width, _height);\n\t\t\tif (samples) target.samples = samples;\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => target.dispose());\n\n\t\treturn target;\n\t});\n}\n\n/**\n * @deprecated Use `fbo` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see fbo\n */\nexport const injectFBO = fbo;\n\n/**\n * Structural directive for creating an FBO with template context.\n *\n * Provides the created WebGLRenderTarget as implicit context to the template.\n *\n * @example\n * ```html\n * <ng-template [fbo]=\"{ width: 512, height: 512 }\" let-target>\n * <!-- target is the WebGLRenderTarget -->\n * <ngt-mesh>\n * <ngt-plane-geometry />\n * <ngt-mesh-basic-material [map]=\"target.texture\" />\n * </ngt-mesh>\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[fbo]' })\nexport class NgtsFBO {\n\t/**\n\t * FBO configuration including width, height, and RenderTargetOptions.\n\t */\n\tfbo = input({} as { width: NgtsFBOParams['width']; height: NgtsFBOParams['height'] } & THREE.RenderTargetOptions);\n\n\tprivate template = inject(TemplateRef);\n\tprivate viewContainerRef = inject(ViewContainerRef);\n\n\tconstructor() {\n\t\tconst fboTarget = fbo(() => {\n\t\t\tconst { width, height, ...settings } = this.fbo();\n\t\t\treturn { width, height, settings };\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst ref = this.viewContainerRef.createEmbeddedView(this.template, { $implicit: fboTarget });\n\t\t\tref.detectChanges();\n\t\t\tonCleanup(() => void ref.destroy());\n\t\t});\n\t}\n\n\t/**\n\t * Type guard for template context.\n\t * Ensures the implicit context is typed as WebGLRenderTarget.\n\t */\n\tstatic ngTemplateContextGuard(_: NgtsFBO, ctx: unknown): ctx is { $implicit: ReturnType<typeof fbo> } {\n\t\treturn true;\n\t}\n}\n","import { computed, Injector } from '@angular/core';\nimport { beforeRender, injectStore } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { fbo } from './fbo';\n\n/**\n * Creates a depth buffer texture that captures scene depth information.\n *\n * Renders the scene to an off-screen FBO with a depth texture attachment,\n * which can be used for effects like soft particles, SSAO, or custom shaders.\n *\n * @param params - Signal of configuration options\n * @param params.size - Resolution of the depth buffer (default: 256, or canvas size if not specified)\n * @param params.frames - Number of frames to render (default: Infinity for continuous)\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns The DepthTexture from the FBO\n *\n * @example\n * ```typescript\n * // Create a depth buffer for post-processing\n * const depth = depthBuffer(() => ({ size: 512 }));\n *\n * // Use in a shader\n * effect(() => {\n * material.uniforms['depthTexture'].value = depth;\n * });\n * ```\n */\nexport function depthBuffer(\n\tparams: () => { size?: number; frames?: number } = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(depthBuffer, injector, () => {\n\t\tconst size = computed(() => params().size || 256);\n\t\tconst frames = computed(() => params().frames || Infinity);\n\n\t\tconst store = injectStore();\n\n\t\tconst w = computed(() => size() || store.size.width() * store.viewport.dpr());\n\t\tconst h = computed(() => size() || store.size.height() * store.viewport.dpr());\n\n\t\tconst depthConfig = computed(() => {\n\t\t\tconst depthTexture = new THREE.DepthTexture(w(), h());\n\t\t\tdepthTexture.format = THREE.DepthFormat;\n\t\t\tdepthTexture.type = THREE.UnsignedShortType;\n\t\t\treturn { depthTexture };\n\t\t});\n\n\t\tconst depthFBO = fbo(() => ({ width: w(), height: h(), settings: depthConfig() }));\n\n\t\tlet count = 0;\n\t\tbeforeRender(({ gl, scene, camera }) => {\n\t\t\tif (frames() === Infinity || count < frames()) {\n\t\t\t\tgl.setRenderTarget(depthFBO);\n\t\t\t\tgl.render(scene, camera);\n\t\t\t\tgl.setRenderTarget(null);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t});\n\n\t\treturn depthFBO.depthTexture;\n\t});\n}\n\n/**\n * @deprecated Use `depthBuffer` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see depthBuffer\n */\nexport const injectDepthBuffer = depthBuffer;\n","import { is } from 'angular-three';\nimport * as THREE from 'three';\n\n// Reusable vectors to avoid allocations in hot paths\nconst v1 = new THREE.Vector3();\nconst v2 = new THREE.Vector3();\nconst v3 = new THREE.Vector3();\nconst v4 = new THREE.Vector2();\n\n/**\n * Calculates the 2D screen position of a 3D object.\n *\n * Projects the object's world position through the camera to get\n * normalized device coordinates, then converts to pixel coordinates.\n *\n * @param el - The THREE.Object3D to project\n * @param camera - The camera to project through\n * @param size - The canvas size in pixels\n * @returns `[x, y]` screen coordinates in pixels (top-left origin)\n */\nexport function defaultCalculatePosition(\n\tel: THREE.Object3D,\n\tcamera: THREE.Camera,\n\tsize: { width: number; height: number },\n) {\n\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tobjectPos.project(camera);\n\tconst widthHalf = size.width / 2;\n\tconst heightHalf = size.height / 2;\n\treturn [objectPos.x * widthHalf + widthHalf, -(objectPos.y * heightHalf) + heightHalf];\n}\n\n/**\n * Function signature for custom position calculation.\n * @see defaultCalculatePosition\n */\nexport type CalculatePosition = typeof defaultCalculatePosition;\n\n/**\n * Determines if an object is behind the camera.\n *\n * Calculates the angle between the camera's forward direction and\n * the vector from camera to object. If > 90 degrees, object is behind.\n *\n * @param el - The object to check\n * @param camera - The camera reference\n * @returns `true` if the object is behind the camera\n */\nexport function isObjectBehindCamera(el: THREE.Object3D, camera: THREE.Camera) {\n\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\tconst deltaCamObj = objectPos.sub(cameraPos);\n\tconst camDir = camera.getWorldDirection(v3);\n\treturn deltaCamObj.angleTo(camDir) > Math.PI / 2;\n}\n\n/**\n * Checks if an object is visible (not occluded by other objects).\n *\n * Casts a ray from the camera through the object's screen position\n * and checks if any occluding objects are closer than the target.\n *\n * @param el - The object to check visibility for\n * @param camera - The camera reference\n * @param raycaster - Raycaster instance for intersection tests\n * @param occlude - Array of objects that can occlude the target\n * @returns `true` if the object is visible (not occluded)\n */\nexport function isObjectVisible(\n\tel: THREE.Object3D,\n\tcamera: THREE.Camera,\n\traycaster: THREE.Raycaster,\n\tocclude: THREE.Object3D[],\n) {\n\tconst elPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tconst screenPos = elPos.clone();\n\tscreenPos.project(camera);\n\tv4.set(screenPos.x, screenPos.y);\n\traycaster.setFromCamera(v4, camera);\n\tconst intersects = raycaster.intersectObjects(occlude, true);\n\tif (intersects.length) {\n\t\tconst intersectionDistance = intersects[0].distance;\n\t\tconst pointDistance = elPos.distanceTo(raycaster.ray.origin);\n\t\treturn pointDistance < intersectionDistance;\n\t}\n\treturn true;\n}\n\n/**\n * Calculates a scale factor based on object distance from camera.\n *\n * For perspective cameras, returns a value that makes objects appear\n * the same size regardless of distance. For orthographic cameras,\n * returns the camera zoom level.\n *\n * @param el - The object to calculate scale for\n * @param camera - The camera reference\n * @returns Scale factor (smaller values for distant objects in perspective)\n */\nexport function objectScale(el: THREE.Object3D, camera: THREE.Camera) {\n\tif (is.three<THREE.OrthographicCamera>(camera, 'isOrthographicCamera')) return camera.zoom;\n\tif (is.three<THREE.PerspectiveCamera>(camera, 'isPerspectiveCamera')) {\n\t\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\t\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\t\tconst vFOV = (camera.fov * Math.PI) / 180;\n\t\tconst dist = objectPos.distanceTo(cameraPos);\n\t\tconst scaleFOV = 2 * Math.tan(vFOV / 2) * dist;\n\t\treturn 1 / scaleFOV;\n\t}\n\treturn 1;\n}\n\n/**\n * Calculates a z-index value based on object distance from camera.\n *\n * Maps the distance from camera (between near and far planes) to\n * the provided z-index range. Closer objects get higher z-index values.\n *\n * @param el - The object to calculate z-index for\n * @param camera - The camera reference (must be Perspective or Orthographic)\n * @param zIndexRange - `[max, min]` range to map distance to\n * @returns Calculated z-index, or `undefined` for unsupported camera types\n */\nexport function objectZIndex(el: THREE.Object3D, camera: THREE.Camera, zIndexRange: Array<number>) {\n\tif (\n\t\tis.three<THREE.PerspectiveCamera>(camera, 'isPerspectiveCamera') ||\n\t\tis.three<THREE.OrthographicCamera>(camera, 'isOrthographicCamera')\n\t) {\n\t\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\t\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\t\tconst dist = objectPos.distanceTo(cameraPos);\n\t\tconst A = (zIndexRange[1] - zIndexRange[0]) / (camera.far - camera.near);\n\t\tconst B = zIndexRange[1] - A * camera.far;\n\t\treturn Math.round(A * dist + B);\n\t}\n\treturn undefined;\n}\n\n/**\n * Clamps very small values to zero to avoid floating point precision issues in CSS.\n * @param value - The number to check\n * @returns `0` if value is smaller than 1e-10, otherwise the original value\n */\nexport function epsilon(value: number) {\n\treturn Math.abs(value) < 1e-10 ? 0 : value;\n}\n\n/**\n * Converts a THREE.Matrix4 to a CSS matrix3d() string.\n *\n * @param matrix - The 4x4 transformation matrix\n * @param multipliers - Array of 16 multipliers for each matrix element\n * @param prepend - Optional string to prepend (e.g., 'translate(-50%,-50%)')\n * @returns CSS matrix3d() transform string\n */\nexport function getCSSMatrix(matrix: THREE.Matrix4, multipliers: number[], prepend = '') {\n\tlet matrix3d = 'matrix3d(';\n\tfor (let i = 0; i !== 16; i++) {\n\t\tmatrix3d += epsilon(multipliers[i] * matrix.elements[i]) + (i !== 15 ? ',' : ')');\n\t}\n\treturn prepend + matrix3d;\n}\n\n/**\n * Converts camera's inverse world matrix to CSS matrix3d.\n * Applies Y-axis flip to account for CSS vs WebGL coordinate differences.\n */\nexport const getCameraCSSMatrix = ((multipliers: number[]) => {\n\treturn (matrix: THREE.Matrix4) => getCSSMatrix(matrix, multipliers);\n})([1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1]);\n\n/**\n * Converts object's world matrix to CSS matrix3d with centering and scaling.\n * Prepends translate(-50%,-50%) to center the element on the transform origin.\n *\n * @param matrix - The object's world matrix\n * @param factor - Scale factor derived from distanceFactor\n */\nexport const getObjectCSSMatrix = ((scaleMultipliers: (n: number) => number[]) => {\n\treturn (matrix: THREE.Matrix4, factor: number) =>\n\t\tgetCSSMatrix(matrix, scaleMultipliers(factor), 'translate(-50%,-50%)');\n})((f: number) => [1 / f, 1 / f, 1 / f, 1, -1 / f, -1 / f, -1 / f, -1, 1 / f, 1 / f, 1 / f, 1, 1, 1, 1, 1]);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tElementRef,\n\tinject,\n\tinput,\n\toutput,\n\tRenderer2,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, injectStore, is, NgtHTML, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { NgtsHTMLImpl } from './html';\nimport {\n\tCalculatePosition,\n\tdefaultCalculatePosition,\n\tepsilon,\n\tgetCameraCSSMatrix,\n\tgetObjectCSSMatrix,\n\tisObjectBehindCamera,\n\tisObjectVisible,\n\tobjectScale,\n\tobjectZIndex,\n} from './utils';\n\n/**\n * Valid CSS pointer-events property values.\n */\ntype PointerEventsProperties =\n\t| 'auto'\n\t| 'none'\n\t| 'visiblePainted'\n\t| 'visibleFill'\n\t| 'visibleStroke'\n\t| 'visible'\n\t| 'painted'\n\t| 'fill'\n\t| 'stroke'\n\t| 'all'\n\t| 'inherit';\n\n/**\n * Configuration options for the NgtsHTMLContent component.\n */\nexport interface NgtsHTMLContentOptions {\n\t/**\n\t * Epsilon for position/zoom change detection.\n\t * Lower values = more frequent updates.\n\t *\n\t * @default 0.001\n\t */\n\teps: number;\n\t/**\n\t * Range for automatic z-index calculation based on camera distance.\n\t * `[max, min]` - closer objects get higher z-index.\n\t *\n\t * @default [16777271, 0]\n\t */\n\tzIndexRange: [number, number];\n\t/**\n\t * Centers the HTML element on the projected point.\n\t * Applies `transform: translate3d(-50%, -50%, 0)`.\n\t *\n\t * @default false\n\t */\n\tcenter: boolean;\n\t/**\n\t * Prepends to parent instead of appending.\n\t * Useful for z-index stacking order control.\n\t *\n\t * @default false\n\t */\n\tprepend: boolean;\n\t/**\n\t * Makes the container fill the entire canvas size.\n\t * Useful for full-screen overlays anchored to a 3D point.\n\t *\n\t * @default false\n\t */\n\tfullscreen: boolean;\n\t/**\n\t * CSS class applied to the inner container div.\n\t */\n\tcontainerClass: string;\n\t/**\n\t * Inline styles applied to the inner container div.\n\t */\n\tcontainerStyle: Partial<CSSStyleDeclaration>;\n\t/**\n\t * CSS `pointer-events` value for the HTML content.\n\t * Set to `'none'` to allow clicking through to the canvas.\n\t *\n\t * @default 'auto'\n\t */\n\tpointerEvents: PointerEventsProperties;\n\t/**\n\t * Custom function to calculate screen position from 3D coordinates.\n\t *\n\t * @default defaultCalculatePosition\n\t */\n\tcalculatePosition: CalculatePosition;\n\t/**\n\t * When `true` (with `transform: true` on parent), HTML always faces the camera.\n\t * Similar to THREE.Sprite behavior.\n\t *\n\t * @default false\n\t */\n\tsprite: boolean;\n\t/**\n\t * Scales HTML based on distance from camera.\n\t * Higher values = larger HTML at same distance.\n\t * - In transform mode: affects CSS matrix scaling\n\t * - In non-transform mode: affects CSS scale transform\n\t */\n\tdistanceFactor?: number;\n\t/**\n\t * Custom parent element for the HTML content.\n\t * Defaults to the canvas container or `events.connected` element.\n\t */\n\tparent?: HTMLElement | ElementRef<HTMLElement>;\n}\n\nconst defaultHtmlContentOptions: NgtsHTMLContentOptions = {\n\teps: 0.001,\n\tzIndexRange: [16777271, 0],\n\tpointerEvents: 'auto',\n\tcalculatePosition: defaultCalculatePosition,\n\tcontainerClass: '',\n\tcontainerStyle: {},\n\tcenter: false,\n\tprepend: false,\n\tfullscreen: false,\n\tsprite: false,\n};\n\n/**\n * Renders HTML content positioned relative to a `NgtsHTML` anchor in 3D space.\n *\n * This component projects the parent THREE.Group's world position to screen\n * coordinates and uses CSS absolute positioning/transforms to overlay HTML\n * on the canvas.\n *\n * Must be used as a child of `ngts-html`. The host `div` element is the actual\n * positioned element. Extends `NgtHTML` to integrate with the custom renderer.\n *\n * @example\n * ```html\n * <ngts-html [options]=\"{ transform: true }\">\n * <!-- Basic label -->\n * <div [htmlContent]=\"{ distanceFactor: 10 }\">\n * <h1>Title</h1>\n * </div>\n * </ngts-html>\n *\n * <!-- With styling and interactivity -->\n * <ngts-html>\n * <div\n * [htmlContent]=\"{\n * center: true,\n * containerClass: 'tooltip',\n * pointerEvents: 'auto'\n * }\"\n * (click)=\"handleClick()\"\n * >\n * <button>Click me</button>\n * </div>\n * </ngts-html>\n *\n * <!-- Custom occlusion handling -->\n * <ngts-html [options]=\"{ occlude: true }\">\n * <div\n * [htmlContent]=\"{}\"\n * (occluded)=\"isHidden = $event\"\n * [class.faded]=\"isHidden\"\n * >\n * Content with custom occlusion handling\n * </div>\n * </ngts-html>\n * ```\n */\n@Component({\n\tselector: 'div[htmlContent]',\n\ttemplate: `\n\t\t@if (html.transform()) {\n\t\t\t<div\n\t\t\t\t#transformOuter\n\t\t\t\tstyle=\"position: absolute; top: 0; left: 0; transform-style: preserve-3d; pointer-events: none;\"\n\t\t\t\t[style.width.px]=\"size.width()\"\n\t\t\t\t[style.height.px]=\"size.height()\"\n\t\t\t>\n\t\t\t\t<div #transformInner style=\"position: absolute\" [style.pointer-events]=\"pointerEvents()\">\n\t\t\t\t\t<div #container [class]=\"containerClass()\" [style]=\"containerStyle()\">\n\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div\n\t\t\t\t#container\n\t\t\t\tstyle=\"position:absolute\"\n\t\t\t\t[style.transform]=\"center() ? 'translate3d(-50%,-50%,0)' : 'none'\"\n\t\t\t\t[style.top]=\"fullscreen() ? -size.height() / 2 + 'px' : 'unset'\"\n\t\t\t\t[style.left]=\"fullscreen() ? -size.width() / 2 + 'px' : 'unset'\"\n\t\t\t\t[style.width]=\"fullscreen() ? size.width() : 'unset'\"\n\t\t\t\t[style.height]=\"fullscreen() ? size.height() : 'unset'\"\n\t\t\t\t[class]=\"containerClass()\"\n\t\t\t\t[style]=\"containerStyle()\"\n\t\t\t>\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t</div>\n\t\t}\n\n\t\t<ng-template #content>\n\t\t\t<ng-content />\n\t\t</ng-template>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgTemplateOutlet],\n\thost: { 'data-ngts-html-content': '' },\n})\nexport class NgtsHTMLContent extends NgtHTML {\n\t/**\n\t * Content positioning and behavior options.\n\t * Aliased as `htmlContent` for use with the `[htmlContent]` attribute selector.\n\t */\n\toptions = input(defaultHtmlContentOptions, {\n\t\ttransform: mergeInputs(defaultHtmlContentOptions),\n\t\talias: 'htmlContent',\n\t});\n\n\t/**\n\t * Emits when occlusion state changes.\n\t * - `true` - HTML is occluded (hidden behind objects)\n\t * - `false` - HTML is visible\n\t *\n\t * If no listener is attached, visibility is handled automatically\n\t * via `display: none/block`. When subscribed, you control visibility.\n\t */\n\toccluded = output<boolean>();\n\n\t/** Reference to outer transform container (transform mode only) */\n\ttransformOuterRef = viewChild<ElementRef<HTMLDivElement>>('transformOuter');\n\t/** Reference to inner transform container (transform mode only) */\n\ttransformInnerRef = viewChild<ElementRef<HTMLDivElement>>('transformInner');\n\t/** Reference to the content container div */\n\tcontainerRef = viewChild<ElementRef<HTMLDivElement>>('container');\n\n\tprotected html = inject(NgtsHTMLImpl);\n\tprivate host = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate store = injectStore();\n\tprotected size = this.store.size;\n\n\tprivate parent = pick(this.options, 'parent');\n\tprivate zIndexRange = pick(this.options, 'zIndexRange');\n\tprivate calculatePosition = pick(this.options, 'calculatePosition');\n\tprivate prepend = pick(this.options, 'prepend');\n\tprotected center = pick(this.options, 'center');\n\tprotected fullscreen = pick(this.options, 'fullscreen');\n\tprotected pointerEvents = pick(this.options, 'pointerEvents');\n\tprotected containerClass = pick(this.options, 'containerClass');\n\tprotected containerStyle = pick(this.options, 'containerStyle');\n\n\tprivate target = computed(() => {\n\t\tconst parent = resolveRef(this.parent());\n\t\tif (parent) return parent;\n\t\treturn (this.store.events.connected?.() || this.store.gl.domElement.parentNode()) as HTMLElement;\n\t});\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst renderer = inject(Renderer2);\n\n\t\tlet isMeshSizeSet = false;\n\n\t\teffect(() => {\n\t\t\tconst [occlude, canvasEl, zIndexRange] = [\n\t\t\t\tthis.html.occlude(),\n\t\t\t\tthis.store.snapshot.gl.domElement,\n\t\t\t\tuntracked(this.zIndexRange),\n\t\t\t];\n\n\t\t\tif (occlude && occlude === 'blending') {\n\t\t\t\trenderer.setStyle(canvasEl, 'z-index', `${Math.floor(zIndexRange[0] / 2)}`);\n\t\t\t\trenderer.setStyle(canvasEl, 'position', 'absolute');\n\t\t\t\trenderer.setStyle(canvasEl, 'pointer-events', 'none');\n\t\t\t} else {\n\t\t\t\trenderer.removeStyle(canvasEl, 'z-index');\n\t\t\t\trenderer.removeStyle(canvasEl, 'position');\n\t\t\t\trenderer.removeStyle(canvasEl, 'pointer-events');\n\t\t\t}\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [transform, target, hostEl, prepend, scene, calculatePosition, group, size, camera] = [\n\t\t\t\tthis.html.transform(),\n\t\t\t\tthis.target(),\n\t\t\t\tthis.host.nativeElement,\n\t\t\t\tuntracked(this.prepend),\n\t\t\t\tthis.store.snapshot.scene,\n\t\t\t\tuntracked(this.calculatePosition),\n\t\t\t\tuntracked(this.html.groupRef).nativeElement,\n\t\t\t\tthis.store.snapshot.size,\n\t\t\t\tthis.store.snapshot.camera,\n\t\t\t];\n\n\t\t\tscene.updateMatrixWorld();\n\t\t\trenderer.setStyle(hostEl, 'position', 'absolute');\n\t\t\trenderer.setStyle(hostEl, 'top', '0');\n\t\t\trenderer.setStyle(hostEl, 'left', '0');\n\n\t\t\tif (transform) {\n\t\t\t\trenderer.setStyle(hostEl, 'pointer-events', 'none');\n\t\t\t\trenderer.setStyle(hostEl, 'overflow', 'hidden');\n\t\t\t\trenderer.removeStyle(hostEl, 'transform');\n\t\t\t\trenderer.removeStyle(hostEl, 'transform-origin');\n\t\t\t} else {\n\t\t\t\tconst vec = calculatePosition(group, camera, size);\n\t\t\t\trenderer.setStyle(hostEl, 'transform', `translate3d(${vec[0]}px,${vec[1]}px,0)`);\n\t\t\t\trenderer.setStyle(hostEl, 'transform-origin', '0 0');\n\t\t\t\trenderer.removeStyle(hostEl, 'pointer-events');\n\t\t\t\trenderer.removeStyle(hostEl, 'overflow');\n\t\t\t}\n\n\t\t\tif (prepend) target.prepend(hostEl);\n\t\t\telse target.appendChild(hostEl);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tif (target) target.removeChild(hostEl);\n\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst _ = [this.options(), this.html.options()];\n\t\t\tisMeshSizeSet = false;\n\t\t});\n\n\t\tlet visible = true;\n\t\tlet oldZoom = 0;\n\t\tlet oldPosition = [0, 0];\n\n\t\tbeforeRender(({ camera: rootCamera }) => {\n\t\t\tconst [\n\t\t\t\thostEl,\n\t\t\t\ttransformOuterEl,\n\t\t\t\ttransformInnerEl,\n\t\t\t\tgroup,\n\t\t\t\tocclusionMesh,\n\t\t\t\tocclusionGeometry,\n\t\t\t\tisRaycastOcclusion,\n\t\t\t\t{ camera, size, viewport, raycaster, scene },\n\t\t\t\t{ calculatePosition, eps, zIndexRange, sprite, distanceFactor },\n\t\t\t\t{ transform, occlude, scale },\n\t\t\t] = [\n\t\t\t\tthis.host.nativeElement,\n\t\t\t\tthis.transformOuterRef()?.nativeElement,\n\t\t\t\tthis.transformInnerRef()?.nativeElement,\n\t\t\t\tthis.html.groupRef().nativeElement,\n\t\t\t\tthis.html.occlusionMeshRef()?.nativeElement,\n\t\t\t\tthis.html.occlusionGeometryRef()?.nativeElement,\n\t\t\t\tthis.html.isRaycastOcclusion(),\n\t\t\t\tthis.store.snapshot,\n\t\t\t\tthis.options(),\n\t\t\t\tthis.html.options(),\n\t\t\t];\n\n\t\t\tif (group) {\n\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\tgroup.updateWorldMatrix(true, false);\n\t\t\t\tconst vec = transform ? oldPosition : calculatePosition(group, camera, size);\n\n\t\t\t\tif (\n\t\t\t\t\ttransform ||\n\t\t\t\t\tMath.abs(oldZoom - camera.zoom) > eps ||\n\t\t\t\t\tMath.abs(oldPosition[0] - vec[0]) > eps ||\n\t\t\t\t\tMath.abs(oldPosition[1] - vec[1]) > eps\n\t\t\t\t) {\n\t\t\t\t\tconst isBehindCamera = isObjectBehindCamera(group, camera);\n\t\t\t\t\tlet raytraceTarget: null | undefined | boolean | THREE.Object3D[] = false;\n\n\t\t\t\t\tif (isRaycastOcclusion) {\n\t\t\t\t\t\tif (Array.isArray(occlude)) {\n\t\t\t\t\t\t\traytraceTarget = occlude.map((item) => resolveRef(item)) as THREE.Object3D[];\n\t\t\t\t\t\t} else if (occlude !== 'blending') {\n\t\t\t\t\t\t\traytraceTarget = [scene];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst previouslyVisible = visible;\n\t\t\t\t\tif (raytraceTarget) {\n\t\t\t\t\t\tconst isVisible = isObjectVisible(group, camera, raycaster, raytraceTarget);\n\t\t\t\t\t\tvisible = isVisible && !isBehindCamera;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvisible = !isBehindCamera;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (previouslyVisible !== visible) {\n\t\t\t\t\t\tif (this.occluded['listeners']) this.occluded.emit(!visible);\n\t\t\t\t\t\telse renderer.setStyle(hostEl, 'display', visible ? 'block' : 'none');\n\t\t\t\t\t}\n\n\t\t\t\t\tconst halfRange = Math.floor(zIndexRange[0] / 2);\n\t\t\t\t\tconst zRange = occlude\n\t\t\t\t\t\t? isRaycastOcclusion //\n\t\t\t\t\t\t\t? [zIndexRange[0], halfRange]\n\t\t\t\t\t\t\t: [halfRange - 1, 0]\n\t\t\t\t\t\t: zIndexRange;\n\n\t\t\t\t\trenderer.setStyle(hostEl, 'z-index', `${objectZIndex(group, camera, zRange)}`);\n\n\t\t\t\t\tif (transform) {\n\t\t\t\t\t\tconst [widthHalf, heightHalf] = [size.width / 2, size.height / 2];\n\t\t\t\t\t\tconst fov = camera.projectionMatrix.elements[5] * heightHalf;\n\t\t\t\t\t\tconst { isOrthographicCamera, top, left, bottom, right } = camera as THREE.OrthographicCamera;\n\t\t\t\t\t\tconst cameraMatrix = getCameraCSSMatrix(camera.matrixWorldInverse);\n\t\t\t\t\t\tconst cameraTransform = isOrthographicCamera\n\t\t\t\t\t\t\t? `scale(${fov})translate(${epsilon(-(right + left) / 2)}px,${epsilon((top + bottom) / 2)}px)`\n\t\t\t\t\t\t\t: `translateZ(${fov}px)`;\n\t\t\t\t\t\tlet matrix = group.matrixWorld;\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tmatrix = camera.matrixWorldInverse\n\t\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t\t.transpose()\n\t\t\t\t\t\t\t\t.copyPosition(matrix)\n\t\t\t\t\t\t\t\t.scale(group.scale);\n\t\t\t\t\t\t\tmatrix.elements[3] = matrix.elements[7] = matrix.elements[11] = 0;\n\t\t\t\t\t\t\tmatrix.elements[15] = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'width', size.width + 'px');\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'height', size.height + 'px');\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'perspective', isOrthographicCamera ? '' : `${fov}px`);\n\n\t\t\t\t\t\tif (transformOuterEl && transformInnerEl) {\n\t\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\t\ttransformOuterEl,\n\t\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t\t`${cameraTransform}${cameraMatrix}translate(${widthHalf}px,${heightHalf}px)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\t\ttransformInnerEl,\n\t\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t\tgetObjectCSSMatrix(matrix, 1 / ((distanceFactor || 10) / 400)),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst scale = distanceFactor === undefined ? 1 : objectScale(group, camera) * distanceFactor;\n\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\thostEl,\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate3d(${vec[0]}px,${vec[1]}px,0) scale(${scale})`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toldPosition = vec;\n\t\t\t\t\toldZoom = camera.zoom;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isRaycastOcclusion && occlusionMesh && !isMeshSizeSet) {\n\t\t\t\tif (transform) {\n\t\t\t\t\tif (transformOuterEl) {\n\t\t\t\t\t\tconst el = transformOuterEl.children[0];\n\n\t\t\t\t\t\tif (el?.clientWidth && el?.clientHeight) {\n\t\t\t\t\t\t\tconst { isOrthographicCamera } = camera as THREE.OrthographicCamera;\n\n\t\t\t\t\t\t\tif (isOrthographicCamera || occlusionGeometry) {\n\t\t\t\t\t\t\t\tif (scale) {\n\t\t\t\t\t\t\t\t\tif (!Array.isArray(scale)) {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.setScalar(1 / (scale as number));\n\t\t\t\t\t\t\t\t\t} else if (is.three<THREE.Vector3>(scale, 'isVector3')) {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.copy(scale.clone().divideScalar(1));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.set(1 / scale[0], 1 / scale[1], 1 / scale[2]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst ratio = (distanceFactor || 10) / 400;\n\t\t\t\t\t\t\t\tconst w = el.clientWidth * ratio;\n\t\t\t\t\t\t\t\tconst h = el.clientHeight * ratio;\n\n\t\t\t\t\t\t\t\tocclusionMesh.scale.set(w, h, 1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisMeshSizeSet = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst ele = hostEl.children[0];\n\n\t\t\t\t\tif (ele?.clientWidth && ele?.clientHeight) {\n\t\t\t\t\t\tconst ratio = 1 / viewport.factor;\n\t\t\t\t\t\tconst w = ele.clientWidth * ratio;\n\t\t\t\t\t\tconst h = ele.clientHeight * ratio;\n\n\t\t\t\t\t\tocclusionMesh.scale.set(w, h, 1);\n\n\t\t\t\t\t\tisMeshSizeSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tocclusionMesh.lookAt(rootCamera.position);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { extend, is, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry, ShaderMaterial } from 'three';\nimport { NgtsHTMLContent } from './html-content';\n\n/**\n * Configuration options for the NgtsHTML component.\n */\nexport interface NgtsHTMLOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Controls how HTML is hidden when behind other objects.\n\t * - `false` - No occlusion (default)\n\t * - `true` - Raycast against entire scene\n\t * - `'raycast'` - Same as `true`\n\t * - `'blending'` - Uses z-index blending (canvas becomes transparent)\n\t * - `Object3D[]` or `ElementRef<Object3D>[]` - Raycast against specific objects only\n\t */\n\tocclude: ElementRef<THREE.Object3D>[] | THREE.Object3D[] | boolean | 'raycast' | 'blending';\n\t/**\n\t * When `true`, uses CSS 3D transforms to position HTML in 3D space.\n\t * When `false`, projects 3D position to 2D screen coordinates.\n\t *\n\t * Transform mode enables proper 3D rotation/scaling but may have\n\t * performance implications with many elements.\n\t *\n\t * @default false\n\t */\n\ttransform: boolean;\n\t/**\n\t * Forward shadow casting to occlusion mesh.\n\t * Only used with blending occlusion mode.\n\t *\n\t * @default false\n\t */\n\tcastShadow: boolean;\n\t/**\n\t * Forward shadow receiving to occlusion mesh.\n\t * Only used with blending occlusion mode.\n\t *\n\t * @default false\n\t */\n\treceiveShadow: boolean;\n}\n\nconst defaultHtmlOptions: NgtsHTMLOptions = {\n\tocclude: false,\n\ttransform: false,\n\tcastShadow: false,\n\treceiveShadow: false,\n};\n\n/**\n * Creates a THREE.Group anchor point in the 3D scene for HTML overlay positioning.\n *\n * This component renders a THREE.Group that serves as the spatial reference\n * for `NgtsHTMLContent`. It can be placed standalone in the scene or\n * as a child of any THREE.Object3D (mesh, group, etc.).\n *\n * Must contain a `div[htmlContent]` child to render actual HTML content.\n * The Group's world position is used to calculate screen-space coordinates.\n *\n * @example\n * ```html\n * <!-- Attached to a mesh -->\n * <ngt-mesh [position]=\"[0, 2, 0]\">\n * <ngts-html [options]=\"{ transform: true }\">\n * <div [htmlContent]=\"{ distanceFactor: 10 }\">Label</div>\n * </ngts-html>\n * </ngt-mesh>\n *\n * <!-- Standalone in scene -->\n * <ngts-html [options]=\"{ position: [5, 5, 0] }\">\n * <div [htmlContent]=\"{}\">Floating UI</div>\n * </ngts-html>\n * ```\n */\n@Component({\n\tselector: 'ngts-html',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t@if (occlude() && !isRaycastOcclusion()) {\n\t\t\t\t<ngt-mesh #occlusionMesh [castShadow]=\"castShadow()\" [receiveShadow]=\"receiveShadow()\">\n\t\t\t\t\t<ng-content select=\"[data-occlusion-geometry]\">\n\t\t\t\t\t\t<ngt-plane-geometry #occlusionGeometry />\n\t\t\t\t\t</ng-content>\n\t\t\t\t\t<ng-content select=\"[data-occlusion-material]\">\n\t\t\t\t\t\t<ngt-shader-material\n\t\t\t\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t\t\t\t[vertexShader]=\"vertexShader()\"\n\t\t\t\t\t\t\t[fragmentShader]=\"fragmentShader()\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ng-content>\n\t\t\t\t</ngt-mesh>\n\t\t\t}\n\t\t</ngt-group>\n\n\t\t<ng-content />\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsHTMLImpl {\n\t/**\n\t * HTML anchor configuration including position, occlusion, and transform settings.\n\t */\n\toptions = input(defaultHtmlOptions, { transform: mergeInputs(defaultHtmlOptions) });\n\tprotected parameters = omit(this.options, ['occlude', 'castShadow', 'receiveShadow', 'transform']);\n\n\t/** Reference to the THREE.Group that serves as the 3D anchor point */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\t/** Reference to the occlusion mesh (when using blending occlusion mode) */\n\tocclusionMeshRef = viewChild<ElementRef<THREE.Mesh>>('occlusionMesh');\n\t/** Reference to the occlusion geometry */\n\tocclusionGeometryRef = viewChild<ElementRef<THREE.PlaneGeometry>>('occlusionGeometry');\n\n\tprotected castShadow = pick(this.options, 'castShadow');\n\tprotected receiveShadow = pick(this.options, 'receiveShadow');\n\t/** Current occlusion mode setting */\n\tocclude = pick(this.options, 'occlude');\n\t/** Whether CSS 3D transform mode is enabled */\n\ttransform = pick(this.options, 'transform');\n\n\tisRaycastOcclusion = computed(() => {\n\t\tconst occlude = this.occlude();\n\t\treturn (occlude && occlude !== 'blending') || (Array.isArray(occlude) && occlude.length && is.ref(occlude[0]));\n\t});\n\n\tprivate shaders = computed(() => {\n\t\tconst transform = this.transform();\n\t\tconst vertexShader = !transform\n\t\t\t? /* language=glsl glsl */ `\n /*\n This shader is from the THREE's SpriteMaterial.\n We need to turn the backing plane into a Sprite\n (make it always face the camera) if \"transfrom\"\n is false.\n */\n #include <common>\n\n void main() {\n vec2 center = vec2(0., 1.);\n float rotation = 0.0;\n\n // This is somewhat arbitrary, but it seems to work well\n // Need to figure out how to derive this dynamically if it even matters\n float size = 0.03;\n\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\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 bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;\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 mvPosition.xy += rotatedPosition;\n\n gl_Position = projectionMatrix * mvPosition;\n }\n `\n\t\t\t: undefined;\n\n\t\tconst fragmentShader = /* language=glsl glsl */ `\n void main() {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n `;\n\n\t\treturn { vertexShader, fragmentShader };\n\t});\n\n\tprotected vertexShader = pick(this.shaders, 'vertexShader');\n\tprotected fragmentShader = pick(this.shaders, 'fragmentShader');\n\n\tconstructor() {\n\t\textend({ Group, Mesh, PlaneGeometry, ShaderMaterial });\n\t}\n\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n}\n\n/**\n * Combined export of NgtsHTMLImpl and NgtsHTMLContent for convenient importing.\n *\n * @example\n * ```typescript\n * import { NgtsHTML } from 'angular-three-soba/misc';\n *\n * @Component({\n * imports: [NgtsHTML]\n * })\n * ```\n */\nexport const NgtsHTML = [NgtsHTMLImpl, NgtsHTMLContent] as const;\n","import { Directive, effect, ElementRef, inject, Injector, model, signal, WritableSignal } from '@angular/core';\nimport { addAfterEffect, addEffect, resolveRef } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Tracks whether an object is within the camera's view frustum.\n *\n * Uses THREE.js's built-in frustum culling by monitoring `onBeforeRender` calls.\n * When an object is visible to the camera, THREE calls `onBeforeRender`, which\n * this function uses to detect visibility state changes.\n *\n * @typeParam TObject - Type of THREE.Object3D being tracked\n * @param object - Signal of the object to track\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @param options.source - Writable signal to update (default: creates new signal)\n * @returns Read-only signal that emits `true` when object is in frustum\n *\n * @example\n * ```typescript\n * const meshRef = viewChild<ElementRef<THREE.Mesh>>('mesh');\n * const isVisible = intersect(() => meshRef());\n *\n * effect(() => {\n * if (isVisible()) {\n * // Object is in view - start expensive animations\n * }\n * });\n * ```\n */\nexport function intersect<TObject extends THREE.Object3D>(\n\tobject: () => ElementRef<TObject> | TObject | undefined | null,\n\t{ injector, source = signal(false) }: { injector?: Injector; source?: WritableSignal<boolean> } = {},\n) {\n\treturn assertInjector(intersect, injector, () => {\n\t\tlet check = false;\n\t\tlet temp = false;\n\n\t\teffect((onCleanup) => {\n\t\t\tconst obj = resolveRef(object());\n\t\t\tif (!obj) return;\n\n\t\t\t// Stamp out frustum check pre-emptively\n\t\t\tconst unsub1 = addEffect(() => {\n\t\t\t\tcheck = false;\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\t// If the object is inside the frustum three will call onRender\n\t\t\tconst oldOnRender = obj.onBeforeRender?.bind(obj);\n\t\t\tobj.onBeforeRender = () => (check = true);\n\n\t\t\t// Compare the check value against the temp value, if it differs set state\n\t\t\tconst unsub2 = addAfterEffect(() => {\n\t\t\t\tif (check !== temp) source.set((temp = check));\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\tonCleanup(() => {\n\t\t\t\tobj.onBeforeRender = oldOnRender;\n\t\t\t\tunsub1();\n\t\t\t\tunsub2();\n\t\t\t});\n\t\t});\n\n\t\treturn source.asReadonly();\n\t});\n}\n\n/**\n * @deprecated Use `intersect` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see intersect\n */\nexport const injectIntersect = intersect;\n\n/**\n * Directive that tracks whether the host Object3D is in the camera frustum.\n *\n * Apply to any THREE.js element to get a two-way bound signal indicating\n * whether the object is currently visible to the camera.\n *\n * @example\n * ```html\n * <ngt-mesh [(intersect)]=\"isInView\">\n * <ngt-box-geometry />\n * <ngt-mesh-basic-material />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * isInView = signal(false);\n *\n * effect(() => {\n * console.log('Mesh visible:', this.isInView());\n * });\n * ```\n */\n@Directive({ selector: '[intersect]' })\nexport class NgtsIntersect {\n\t/**\n\t * Two-way bound signal indicating frustum intersection state.\n\t * `true` when object is visible, `false` when outside frustum.\n\t */\n\tintersect = model(false);\n\n\tconstructor() {\n\t\tconst host = inject<ElementRef<THREE.Object3D>>(ElementRef);\n\t\tintersect(() => host, { source: this.intersect });\n\t}\n}\n","import { computed, Directive, effect, ElementRef, model } from '@angular/core';\nimport { injectStore, resolveRef } from 'angular-three';\nimport * as THREE from 'three';\n\n/**\n * Pre-compiles shaders and textures to reduce runtime jank.\n *\n * When added to a scene, this directive triggers `WebGLRenderer.compile()`\n * and uses a CubeCamera to ensure environment maps are also compiled.\n * This helps eliminate shader compilation stutters during initial rendering.\n *\n * @example\n * ```html\n * <!-- Preload entire scene -->\n * <ngts-preload [all]=\"true\" />\n *\n * <!-- Preload specific scene/camera -->\n * <ngts-preload [scene]=\"customScene\" [camera]=\"customCamera\" />\n * ```\n */\n@Directive({ selector: 'ngts-preload' })\nexport class NgtsPreload {\n\t/**\n\t * When `true`, temporarily makes all invisible objects visible\n\t * during compilation to ensure everything is preloaded.\n\t */\n\tall = model<boolean>();\n\n\t/**\n\t * Custom scene to preload. Defaults to the store's scene.\n\t */\n\tscene = model<THREE.Object3D | ElementRef<THREE.Object3D>>();\n\n\t/**\n\t * Custom camera to use for compilation. Defaults to the store's camera.\n\t */\n\tcamera = model<THREE.Camera | ElementRef<THREE.Camera>>();\n\n\tprivate store = injectStore();\n\n\tprivate trueScene = computed(() => {\n\t\tconst scene = this.scene();\n\t\tif (scene) return resolveRef(scene);\n\t\treturn this.store.scene();\n\t});\n\n\tprivate trueCamera = computed(() => {\n\t\tconst camera = this.camera();\n\t\tif (camera) return resolveRef(camera);\n\t\treturn this.store.camera();\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst invisible: THREE.Object3D[] = [];\n\n\t\t\tconst [all, scene, camera, gl] = [this.all(), this.trueScene(), this.trueCamera(), this.store.gl()];\n\n\t\t\tif (!scene || !camera) return;\n\n\t\t\tif (all) {\n\t\t\t\t// Find all invisible objects, store and then flip them\n\t\t\t\tscene.traverse((object) => {\n\t\t\t\t\tif (!object.visible) {\n\t\t\t\t\t\tinvisible.push(object);\n\t\t\t\t\t\tobject.visible = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Now compile the scene\n\t\t\tgl.compile(scene, camera);\n\n\t\t\t// And for good measure, hit it with a cube camera\n\t\t\tconst cubeRenderTarget = new THREE.WebGLCubeRenderTarget(128);\n\t\t\tconst cubeCamera = new THREE.CubeCamera(0.01, 100000, cubeRenderTarget);\n\t\t\tcubeCamera.update(gl, scene);\n\t\t\tcubeRenderTarget.dispose();\n\n\t\t\t// Flips these objects back\n\t\t\tinvisible.forEach((object) => (object.visible = false));\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { checkUpdate, extend, getInstanceState, is, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\nimport { MeshSurfaceSampler } from 'three-stdlib';\n\n/**\n * Data provided for each sampled point on a mesh surface.\n * @internal\n */\ninterface SamplePayload {\n\t/** The world-space position of the sample point */\n\tposition: THREE.Vector3;\n\t/** The interpolated normal at the sample point */\n\tnormal: THREE.Vector3;\n\t/** The interpolated vertex color at the sample point */\n\tcolor: THREE.Color;\n}\n\n/**\n * Transform function signature for customizing instance placement.\n *\n * @param payload - Sample data including position, normal, color, and transform objects\n * @param i - The index of the current sample (0 to count-1)\n */\nexport type TransformFn = (payload: TransformPayload, i: number) => void;\n\n/**\n * Extended sample payload including transform helpers.\n * Passed to the transform function for each sampled point.\n */\ninterface TransformPayload extends SamplePayload {\n\t/**\n\t * A dummy Object3D for calculating the transform matrix.\n\t * Modify its position, rotation, and scale - the matrix will be\n\t * applied to the corresponding instance automatically.\n\t */\n\tdummy: THREE.Object3D;\n\t/**\n\t * Reference to the source mesh being sampled.\n\t * Useful for accessing geometry attributes or applying parent transforms.\n\t */\n\tsampledMesh: THREE.Mesh;\n}\n\n/**\n * Creates a computed signal that samples points on a mesh surface.\n *\n * Uses THREE.MeshSurfaceSampler to distribute points across the mesh geometry.\n * Returns an InstancedBufferAttribute containing transform matrices for each sample,\n * suitable for use with InstancedMesh or custom instancing solutions.\n *\n * @param mesh - Factory returning the mesh to sample from\n * @param options - Sampling configuration\n * @param options.count - Factory returning number of samples (default: 16)\n * @param options.transform - Factory returning custom transform function\n * @param options.weight - Factory returning weight attribute name for biased sampling\n * @param options.instancedMesh - Factory returning InstancedMesh to update directly\n * @returns Computed signal yielding InstancedBufferAttribute with 4x4 matrices\n *\n * @example\n * ```typescript\n * const meshRef = viewChild<ElementRef<THREE.Mesh>>('mesh');\n * const instancesRef = viewChild<ElementRef<THREE.InstancedMesh>>('instances');\n *\n * const samples = surfaceSampler(\n * () => meshRef()?.nativeElement,\n * {\n * count: () => 1000,\n * instancedMesh: () => instancesRef()?.nativeElement,\n * transform: () => ({ dummy, position, normal }) => {\n * dummy.position.copy(position);\n * dummy.lookAt(position.clone().add(normal));\n * dummy.scale.setScalar(Math.random() * 0.5 + 0.5);\n * }\n * }\n * );\n * ```\n */\nexport function surfaceSampler(\n\tmesh: () => ElementRef<THREE.Mesh> | THREE.Mesh | null | undefined,\n\t{\n\t\tcount,\n\t\ttransform,\n\t\tweight,\n\t\tinstancedMesh,\n\t}: {\n\t\tcount?: () => number;\n\t\ttransform?: () => TransformFn | undefined;\n\t\tweight?: () => string | undefined;\n\t\tinstancedMesh?: () => ElementRef<THREE.InstancedMesh> | THREE.InstancedMesh | null | undefined;\n\t} = {},\n) {\n\tconst initialBufferAttribute = (() => {\n\t\tconst arr = Array.from({ length: count?.() ?? 16 }, () => [\n\t\t\t1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,\n\t\t]).flat();\n\t\treturn new THREE.InstancedBufferAttribute(Float32Array.from(arr), 16);\n\t})();\n\n\treturn computed(() => {\n\t\tconst currentMesh = resolveRef(mesh());\n\t\tif (!currentMesh) return initialBufferAttribute;\n\n\t\tconst instanceState = getInstanceState(currentMesh);\n\t\tif (!instanceState) return initialBufferAttribute;\n\n\t\tconst nonObjects = instanceState.nonObjects();\n\t\tif (\n\t\t\t!nonObjects ||\n\t\t\t!nonObjects.length ||\n\t\t\tnonObjects.every((nonObject) => !is.three<THREE.BufferGeometry>(nonObject, 'isBufferGeometry'))\n\t\t) {\n\t\t\treturn initialBufferAttribute;\n\t\t}\n\n\t\tconst sampler = new MeshSurfaceSampler(currentMesh);\n\t\tconst _count = count?.() ?? 16;\n\t\tconst _transform = transform?.();\n\t\tconst _weight = weight?.();\n\n\t\tif (_weight) {\n\t\t\tsampler.setWeightAttribute(_weight);\n\t\t}\n\n\t\tsampler.build();\n\n\t\tconst position = new THREE.Vector3();\n\t\tconst normal = new THREE.Vector3();\n\t\tconst color = new THREE.Color();\n\t\tconst dummy = new THREE.Object3D();\n\t\tconst instance = resolveRef(instancedMesh?.());\n\n\t\tcurrentMesh.updateMatrixWorld(true);\n\n\t\tfor (let i = 0; i < _count; i++) {\n\t\t\tsampler.sample(position, normal, color);\n\n\t\t\tif (typeof _transform === 'function') {\n\t\t\t\t_transform({ dummy, sampledMesh: currentMesh, position, normal, color }, i);\n\t\t\t} else {\n\t\t\t\tdummy.position.copy(position);\n\t\t\t}\n\n\t\t\tdummy.updateMatrix();\n\n\t\t\tif (instance) {\n\t\t\t\tinstance.setMatrixAt(i, dummy.matrix);\n\t\t\t}\n\n\t\t\tdummy.matrix.toArray(initialBufferAttribute.array, i * 16);\n\t\t}\n\n\t\tif (instance) {\n\t\t\tcheckUpdate(instance.instanceMatrix);\n\t\t}\n\n\t\tcheckUpdate(initialBufferAttribute);\n\n\t\treturn new THREE.InstancedBufferAttribute(initialBufferAttribute.array, initialBufferAttribute.itemSize).copy(\n\t\t\tinitialBufferAttribute,\n\t\t);\n\t});\n}\n\n/**\n * Configuration options for the NgtsSampler component.\n */\nexport interface NgtsSamplerOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Name of a vertex attribute to use for weighted sampling.\n\t * Higher values = more likely to be sampled. Useful for concentrating\n\t * instances in specific areas (e.g., based on vertex colors or custom data).\n\t *\n\t * @see https://threejs.org/docs/#examples/en/math/MeshSurfaceSampler.setWeightAttribute\n\t */\n\tweight?: string;\n\n\t/**\n\t * Custom transform function applied to each sampled instance.\n\t * Receives sample data and should mutate `payload.dummy` to set\n\t * position, rotation, and scale. The dummy's matrix is automatically\n\t * updated and applied after the function returns.\n\t */\n\ttransform?: TransformFn;\n\n\t/**\n\t * Number of samples to distribute across the mesh surface.\n\t * @default 16\n\t */\n\tcount: number;\n}\n\nconst defaultOptions: NgtsSamplerOptions = {\n\tcount: 16,\n};\n\n/**\n * Distributes instances across a mesh surface using MeshSurfaceSampler.\n *\n * This component samples points on a mesh and automatically updates an\n * InstancedMesh with the sampled transforms. Both the source mesh and\n * target instances can be provided as inputs or as children.\n *\n * @example\n * ```html\n * <!-- External mesh and instances -->\n * <ngt-mesh #sourceMesh>\n * <ngt-torus-knot-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n *\n * <ngts-sampler\n * [mesh]=\"sourceMesh\"\n * [instances]=\"instancesRef\"\n * [options]=\"{ count: 500, transform: scatterTransform }\"\n * >\n * <ngt-instanced-mesh #instancesRef [count]=\"500\">\n * <ngt-sphere-geometry [args]=\"[0.02]\" />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-instanced-mesh>\n * </ngts-sampler>\n * ```\n */\n@Component({\n\tselector: 'ngts-sampler',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSampler {\n\t/**\n\t * The mesh to sample points from.\n\t * If not provided, uses the first Mesh child of this component.\n\t */\n\tmesh = input<ElementRef<THREE.Mesh> | THREE.Mesh | null>(null);\n\n\t/**\n\t * The InstancedMesh to update with sampled transforms.\n\t * If not provided, uses the first InstancedMesh child of this component.\n\t */\n\tinstances = input<ElementRef<THREE.InstancedMesh> | THREE.InstancedMesh | null>(null);\n\n\t/**\n\t * Sampler configuration including count, weight attribute, and transform function.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['weight', 'transform', 'count']);\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate count = pick(this.options, 'count');\n\tprivate weight = pick(this.options, 'weight');\n\tprivate transform = pick(this.options, 'transform');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tconst meshToSample = computed(() => {\n\t\t\tconst group = this.groupRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(group);\n\t\t\tif (!instanceState) return null;\n\n\t\t\tconst mesh = resolveRef(this.mesh());\n\t\t\tif (mesh) return mesh;\n\n\t\t\tconst objects = instanceState.objects();\n\t\t\treturn objects.find((c) => is.three<THREE.Mesh>(c, 'isMesh'));\n\t\t});\n\n\t\tconst instancedMeshToSample = computed(() => {\n\t\t\tconst group = this.groupRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(group);\n\t\t\tif (!instanceState) return null;\n\n\t\t\tconst instances = resolveRef(this.instances());\n\t\t\tif (instances) return instances;\n\n\t\t\tconst objects = instanceState.objects();\n\t\t\treturn objects.find(\n\t\t\t\t(c) => !!Object.getOwnPropertyDescriptor(c, 'instanceMatrix'),\n\t\t\t) as unknown as THREE.InstancedMesh;\n\t\t});\n\n\t\t// NOTE: because surfaceSampler returns a computed, we need to consume\n\t\t// this computed in a Reactive Context (an effect) to ensure the inner logic of\n\t\t// surfaceSampler is run properly.\n\t\tconst sampler = surfaceSampler(meshToSample, {\n\t\t\tcount: this.count,\n\t\t\ttransform: this.transform,\n\t\t\tweight: this.weight,\n\t\t\tinstancedMesh: instancedMeshToSample,\n\t\t});\n\t\teffect(sampler);\n\t}\n}\n","import { NgtSize } from 'angular-three';\nimport * as THREE from 'three';\n\n// Reusable vectors to avoid allocations in hot paths\nconst tV0 = new THREE.Vector3();\nconst tV1 = new THREE.Vector3();\nconst tV2 = new THREE.Vector3();\n\n/**\n * Projects a 3D point to 2D screen coordinates.\n * @internal\n */\nfunction getPoint2(point3: THREE.Vector3, camera: THREE.Camera, size: NgtSize) {\n\tconst widthHalf = size.width / 2;\n\tconst heightHalf = size.height / 2;\n\tcamera.updateMatrixWorld(false);\n\tconst vector = point3.project(camera);\n\tvector.x = vector.x * widthHalf + widthHalf;\n\tvector.y = -(vector.y * heightHalf) + heightHalf;\n\treturn vector;\n}\n\n/**\n * Unprojects a 2D screen point back to 3D world coordinates.\n * @internal\n */\nfunction getPoint3(point2: THREE.Vector3, camera: THREE.Camera, size: NgtSize, zValue: number = 1) {\n\tconst vector = tV0.set((point2.x / size.width) * 2 - 1, -(point2.y / size.height) * 2 + 1, zValue);\n\tvector.unproject(camera);\n\treturn vector;\n}\n\n/**\n * Calculates a scale factor to maintain consistent pixel-size at a 3D position.\n *\n * Given a 3D point and a desired radius in pixels, computes how much to scale\n * an object so it appears that size on screen. Useful for keeping UI elements\n * or sprites at a consistent visual size regardless of distance from camera.\n *\n * @param point3 - The 3D world position to calculate scale for\n * @param radiusPx - Desired radius in screen pixels\n * @param camera - The camera used for projection\n * @param size - The viewport/canvas size\n * @returns Scale factor to apply to the object\n *\n * @example\n * ```typescript\n * beforeRender(({ camera, size }) => {\n * const scale = calculateScaleFactor(mesh.position, 50, camera, size);\n * mesh.scale.setScalar(scale);\n * });\n * ```\n */\nexport function calculateScaleFactor(point3: THREE.Vector3, radiusPx: number, camera: THREE.Camera, size: NgtSize) {\n\tconst point2 = getPoint2(tV2.copy(point3), camera, size);\n\tlet scale = 0;\n\tfor (let i = 0; i < 2; ++i) {\n\t\tconst point2off = tV1.copy(point2).setComponent(i, point2.getComponent(i) + radiusPx);\n\t\tconst point3off = getPoint3(point2off, camera, size, point2off.z);\n\t\tscale = Math.max(scale, point3.distanceTo(point3off));\n\t}\n\treturn scale;\n}\n","/*\n * Integration and compilation: @N8Programs\n * Inspired by:\n * https://github.com/mrdoob/three.js/blob/dev/examples/webgl_shadowmap_pcss.html\n * https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-17-efficient-soft-edged-shadows-using\n * https://developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf\n * https://github.com/mrdoob/three.js/blob/master/examples/webgl_shadowmap_pcss.html [spidersharma03]\n * https://spline.design/\n * Concept:\n * https://www.gamedev.net/tutorials/programming/graphics/contact-hardening-soft-shadows-made-fast-r4906/\n * Vogel Disk Implementation:\n * https://www.shadertoy.com/view/4l3yRM [ashalah]\n * High-Frequency Noise Implementation:\n * https://www.shadertoy.com/view/tt3fDH [spawner64]\n */\n\nimport { Directive, effect, input } from '@angular/core';\nimport { injectStore } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { getVersion } from './constants';\n\n/**\n * Options for configuring soft shadows using PCSS (Percentage-Closer Soft Shadows).\n */\nexport interface NgtsSoftShadowsOptions {\n\t/** Size of the light source (the larger the softer the light), default: 25 */\n\tsize: number;\n\t/** Number of samples (more samples less noise but more expensive), default: 10 */\n\tsamples: number;\n\t/** Depth focus, use it to shift the focal point (where the shadow is the sharpest), default: 0 (the beginning) */\n\tfocus: number;\n}\n\nconst defaultOptions: NgtsSoftShadowsOptions = {\n\tsize: 25,\n\tsamples: 10,\n\tfocus: 0,\n};\n\n/**\n * Generates PCSS shader code for Three.js < r182 (uses RGBA-packed depth)\n */\nfunction pcssLegacy(options: NgtsSoftShadowsOptions): string {\n\tconst { focus, size, samples } = options;\n\treturn `\n#define PENUMBRA_FILTER_SIZE float(${size})\n#define RGB_NOISE_FUNCTION(uv) (randRGB(uv))\nvec3 randRGB(vec2 uv) {\n return vec3(\n fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575),\n fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431),\n fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423)\n );\n}\n\nvec3 lowPassRandRGB(vec2 uv) {\n vec3 result = vec3(0);\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0));\n result *= 0.111111111;\n return result;\n}\n\nvec3 highPassRandRGB(vec2 uv) {\n return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5;\n}\n\nvec2 vogelDiskSample(int sampleIndex, int sampleCount, float angle) {\n const float goldenAngle = 2.399963f;\n float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount));\n float theta = float(sampleIndex) * goldenAngle + angle;\n float sine = sin(theta);\n float cosine = cos(theta);\n return vec2(cosine, sine) * r;\n}\n\nfloat penumbraSize( const in float zReceiver, const in float zBlocker ) {\n return (zReceiver - zBlocker) / zBlocker;\n}\n\nfloat findBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float blockerDepthSum = float(${focus});\n float blockers = 0.0;\n int j = 0;\n vec2 offset = vec2(0.);\n float depth = 0.;\n\n #pragma unroll_loop_start\n for(int i = 0; i < ${samples}; i ++) {\n offset = (vogelDiskSample(j, ${samples}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE;\n depth = unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) );\n if (depth < compare) {\n blockerDepthSum += depth;\n blockers++;\n }\n j++;\n }\n #pragma unroll_loop_end\n\n if (blockers > 0.0) {\n return blockerDepthSum / blockers;\n }\n return -1.0;\n}\n\nfloat vogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float shadow = 0.0f;\n int j = 0;\n vec2 vogelSample = vec2(0.0);\n vec2 offset = vec2(0.0);\n\n #pragma unroll_loop_start\n for (int i = 0; i < ${samples}; i++) {\n vogelSample = vogelDiskSample(j, ${samples}, angle) * texelSize;\n offset = vogelSample * (1.0 + filterRadius * float(${size}));\n shadow += step( zReceiver, unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) ) );\n j++;\n }\n #pragma unroll_loop_end\n\n return shadow * 1.0 / ${samples}.0;\n}\n\nfloat PCSS (sampler2D shadowMap, vec4 coords) {\n vec2 uv = coords.xy;\n float zReceiver = coords.z;\n float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2;\n float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver, angle);\n if (avgBlockerDepth == -1.0) {\n return 1.0;\n }\n float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth);\n return vogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle);\n}`;\n}\n\n/**\n * Generates PCSS shader code for Three.js >= r182 (uses native depth textures)\n */\nfunction pcssModern(options: NgtsSoftShadowsOptions): string {\n\tconst { focus, size, samples } = options;\n\treturn `\n#define PENUMBRA_FILTER_SIZE float(${size})\n#define RGB_NOISE_FUNCTION(uv) (randRGB(uv))\nvec3 randRGB(vec2 uv) {\n return vec3(\n fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575),\n fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431),\n fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423)\n );\n}\n\nvec3 lowPassRandRGB(vec2 uv) {\n vec3 result = vec3(0);\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0));\n result *= 0.111111111;\n return result;\n}\n\nvec3 highPassRandRGB(vec2 uv) {\n return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5;\n}\n\nvec2 pcssVogelDiskSample(int sampleIndex, int sampleCount, float angle) {\n const float goldenAngle = 2.399963f;\n float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount));\n float theta = float(sampleIndex) * goldenAngle + angle;\n float sine = sin(theta);\n float cosine = cos(theta);\n return vec2(cosine, sine) * r;\n}\n\nfloat penumbraSize( const in float zReceiver, const in float zBlocker ) {\n return (zReceiver - zBlocker) / zBlocker;\n}\n\nfloat findBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float blockerDepthSum = float(${focus});\n float blockers = 0.0;\n int j = 0;\n vec2 offset = vec2(0.);\n float depth = 0.;\n\n #pragma unroll_loop_start\n for(int i = 0; i < ${samples}; i ++) {\n offset = (pcssVogelDiskSample(j, ${samples}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE;\n depth = texture2D( shadowMap, uv + offset ).r;\n if (depth < compare) {\n blockerDepthSum += depth;\n blockers++;\n }\n j++;\n }\n #pragma unroll_loop_end\n\n if (blockers > 0.0) {\n return blockerDepthSum / blockers;\n }\n return -1.0;\n}\n\nfloat pcssVogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float shadow = 0.0f;\n int j = 0;\n vec2 vogelSample = vec2(0.0);\n vec2 offset = vec2(0.0);\n\n #pragma unroll_loop_start\n for (int i = 0; i < ${samples}; i++) {\n vogelSample = pcssVogelDiskSample(j, ${samples}, angle) * texelSize;\n offset = vogelSample * (1.0 + filterRadius * float(${size}));\n shadow += step( zReceiver, texture2D( shadowMap, uv + offset ).r );\n j++;\n }\n #pragma unroll_loop_end\n\n return shadow * 1.0 / ${samples}.0;\n}\n\nfloat PCSS (sampler2D shadowMap, vec4 coords, float shadowIntensity) {\n vec2 uv = coords.xy;\n float zReceiver = coords.z;\n float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2;\n float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver, angle);\n if (avgBlockerDepth == -1.0) {\n return 1.0;\n }\n float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth);\n float shadow = pcssVogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle);\n return mix( 1.0, shadow, shadowIntensity );\n}`;\n}\n\n/**\n * Generates the replacement getShadow function for r182+\n */\nfunction getShadowReplacement(): string {\n\treturn `float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\treturn PCSS( shadowMap, shadowCoord, shadowIntensity );\n\t\t\t}\n\t\t\treturn 1.0;\n\t\t}`;\n}\n\nfunction reset(gl: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera): void {\n\tscene.traverse((object) => {\n\t\tif ((object as THREE.Mesh).material) {\n\t\t\tgl.properties.remove((object as THREE.Mesh).material);\n\t\t\t((object as THREE.Mesh).material as THREE.Material).dispose?.();\n\t\t}\n\t});\n\tgl.info.programs!.length = 0;\n\tgl.compile(scene, camera);\n}\n\n/**\n * A directive that injects Percentage-Closer Soft Shadows (PCSS) into the scene.\n *\n * PCSS produces contact-hardening soft shadows where shadows are sharper near the\n * contact point and softer further away, creating more realistic shadow effects.\n *\n * @example\n * ```html\n * <ngts-soft-shadows [options]=\"{ size: 25, samples: 10, focus: 0 }\" />\n * ```\n */\n@Directive({ selector: 'ngts-soft-shadows' })\nexport class NgtsSoftShadows {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tconstructor() {\n\t\tconst store = injectStore();\n\n\t\teffect((onCleanup) => {\n\t\t\tconst { gl, scene, camera } = store.snapshot;\n\t\t\tconst options = this.options();\n\t\t\tconst version = getVersion();\n\n\t\t\tconst original = THREE.ShaderChunk.shadowmap_pars_fragment;\n\n\t\t\tif (version >= 182) {\n\t\t\t\t// Three.js r182+ uses native depth textures and has a different shader structure\n\t\t\t\t// We need to replace the getShadow function entirely\n\t\t\t\tconst pcssCode = pcssModern(options);\n\n\t\t\t\t// Find and replace the PCF getShadow function\n\t\t\t\tconst getShadowRegex =\n\t\t\t\t\t/(#if defined\\( SHADOWMAP_TYPE_PCF \\)\\s+float getShadow\\( sampler2DShadow shadowMap[^}]+\\})/s;\n\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = THREE.ShaderChunk.shadowmap_pars_fragment\n\t\t\t\t\t.replace('#ifdef USE_SHADOWMAP', '#ifdef USE_SHADOWMAP\\n' + pcssCode)\n\t\t\t\t\t.replace(getShadowRegex, `#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t${getShadowReplacement()}`);\n\t\t\t} else {\n\t\t\t\t// Three.js < r182 uses RGBA-packed depth\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = THREE.ShaderChunk.shadowmap_pars_fragment\n\t\t\t\t\t.replace('#ifdef USE_SHADOWMAP', '#ifdef USE_SHADOWMAP\\n' + pcssLegacy(options))\n\t\t\t\t\t.replace(\n\t\t\t\t\t\t'#if defined( SHADOWMAP_TYPE_PCF )',\n\t\t\t\t\t\t'\\nreturn PCSS(shadowMap, shadowCoord);\\n#if defined( SHADOWMAP_TYPE_PCF )',\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\treset(gl, scene, camera);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = original;\n\t\t\t\treset(gl, scene, camera);\n\t\t\t});\n\t\t});\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["defaultOptions"],"mappings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EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE;;;ACnS5C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-three-soba-misc.mjs","sources":["../../../../libs/soba/misc/src/lib/animations.ts","../../../../libs/soba/misc/src/lib/bake-shadows.ts","../../../../libs/soba/misc/src/lib/computed-attribute.ts","../../../../libs/soba/misc/src/lib/constants.ts","../../../../libs/soba/misc/src/lib/decal.ts","../../../../libs/soba/misc/src/lib/deprecated.ts","../../../../libs/soba/misc/src/lib/fbo.ts","../../../../libs/soba/misc/src/lib/depth-buffer.ts","../../../../libs/soba/misc/src/lib/html/utils.ts","../../../../libs/soba/misc/src/lib/html/html-content.ts","../../../../libs/soba/misc/src/lib/html/html.ts","../../../../libs/soba/misc/src/lib/intersect.ts","../../../../libs/soba/misc/src/lib/preload.ts","../../../../libs/soba/misc/src/lib/sampler.ts","../../../../libs/soba/misc/src/lib/scale-factor.ts","../../../../libs/soba/misc/src/lib/soft-shadows.ts","../../../../libs/soba/misc/src/angular-three-soba-misc.ts"],"sourcesContent":["import { computed, DestroyRef, ElementRef, inject, Injector, isSignal } from '@angular/core';\nimport { beforeRender, resolveRef } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Animation clip type with flexible name typing.\n * Allows consumers to pass in type-safe animation clips with custom name types.\n * @internal\n */\ntype NgtsAnimationClipWithoutName = Omit<THREE.AnimationClip, 'name'> & { name: any };\n\n/**\n * Extended animation clip type with proper clone signature.\n * Wraps THREE.AnimationClip with modified name and clone types for type safety.\n */\nexport type NgtsAnimationClip = Omit<NgtsAnimationClipWithoutName, 'clone'> & { clone: () => NgtsAnimationClip };\n\n/**\n * Type helper for creating a union of animation clips with specific names.\n * Useful for type-safe access to animations by name.\n *\n * @typeParam TAnimationNames - Union of animation name strings\n */\nexport type NgtsAnimationClips<TAnimationNames extends string> = {\n\t[Name in TAnimationNames]: Omit<NgtsAnimationClip, 'name'> & { name: Name };\n}[TAnimationNames];\n\n/**\n * API returned by the `animations` function.\n * Provides access to clips, mixer, action map, and ready state.\n *\n * @typeParam T - The animation clip type\n */\nexport type NgtsAnimationApi<T extends NgtsAnimationClip> = {\n\t/** Array of all animation clips */\n\tclips: T[];\n\t/** The THREE.AnimationMixer instance managing all animations */\n\tmixer: THREE.AnimationMixer;\n\t/** Array of animation names for easy iteration */\n\tnames: T['name'][];\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Whether the animations have finished initializing.\n\t\t\t * When `true`, the `actions` property is available.\n\t\t\t */\n\t\t\tget isReady(): true;\n\t\t\t/** Map of animation names to their corresponding AnimationAction instances */\n\t\t\tactions: { [key in T['name']]: THREE.AnimationAction };\n\t }\n\t| {\n\t\t\t/**\n\t\t\t * Whether the animations have finished initializing.\n\t\t\t * When `false`, the `actions` property is not yet available.\n\t\t\t */\n\t\t\tget isReady(): false;\n\t }\n);\n\n/**\n * Input type for the `animations` function.\n * Accepts either an array of clips or an object with an `animations` property.\n *\n * @typeParam TAnimation - The animation clip type\n */\nexport type NgtsAnimation<TAnimation extends NgtsAnimationClip = NgtsAnimationClip> =\n\t| TAnimation[]\n\t| { animations: TAnimation[] };\n\n/**\n * Creates an animation API for managing THREE.js animation clips on an object.\n *\n * Sets up an AnimationMixer, processes animation clips, and provides a reactive\n * API for controlling animations. The mixer is automatically updated each frame\n * and cleaned up on destroy.\n *\n * @param animationsFactory - Signal of animation clips or object with animations\n * @param object - The Object3D to attach animations to (or ref/factory returning one)\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns Animation API with clips, mixer, actions, and ready state\n *\n * @example\n * ```typescript\n * const gltf = injectGLTF(() => 'model.glb');\n * const api = animations(\n * () => gltf()?.animations,\n * () => gltf()?.scene\n * );\n *\n * effect(() => {\n * if (api.isReady) {\n * api.actions['walk'].play();\n * }\n * });\n * ```\n */\nexport function animations<TAnimation extends NgtsAnimationClip>(\n\tanimationsFactory: () => NgtsAnimation<TAnimation> | undefined | null,\n\tobject:\n\t\t| ElementRef<THREE.Object3D>\n\t\t| THREE.Object3D\n\t\t| (() => ElementRef<THREE.Object3D> | THREE.Object3D | undefined | null),\n\t{ injector }: { injector?: Injector } = {},\n): NgtsAnimationApi<TAnimation> {\n\treturn assertInjector(animations, injector, () => {\n\t\tconst mixer = new THREE.AnimationMixer(null!);\n\t\tbeforeRender(({ delta }) => {\n\t\t\tif (!mixer.getRoot()) return;\n\t\t\tmixer.update(delta);\n\t\t});\n\n\t\tlet cached = {} as Record<string, THREE.AnimationAction>;\n\t\tconst actions = {} as { [key in TAnimation['name']]: THREE.AnimationAction };\n\t\tconst clips = [] as NgtsAnimationApi<TAnimation>['clips'];\n\t\tconst names = [] as NgtsAnimationApi<TAnimation>['names'];\n\n\t\tconst actualObject = computed(() =>\n\t\t\tisSignal(object) || typeof object === 'function' ? resolveRef(object()) : resolveRef(object),\n\t\t);\n\n\t\tconst isReady = computed(() => {\n\t\t\tconst obj = actualObject() as THREE.Object3D | undefined;\n\t\t\tif (!obj) return false;\n\n\t\t\tObject.assign(mixer, { _root: obj });\n\n\t\t\tconst maybeAnimationClips = animationsFactory();\n\t\t\tif (!maybeAnimationClips) return;\n\n\t\t\tconst animationClips = Array.isArray(maybeAnimationClips)\n\t\t\t\t? maybeAnimationClips\n\t\t\t\t: maybeAnimationClips.animations;\n\n\t\t\tfor (let i = 0; i < animationClips.length; i++) {\n\t\t\t\tconst clip = animationClips[i];\n\n\t\t\t\tnames.push(clip.name);\n\t\t\t\tclips.push(clip);\n\n\t\t\t\tif (!actions[clip.name as TAnimation['name']]) {\n\t\t\t\t\tObject.defineProperty(actions, clip.name, {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tget: () => {\n\t\t\t\t\t\t\tif (!cached[clip.name]) {\n\t\t\t\t\t\t\t\tcached[clip.name] = mixer.clipAction(clip, obj);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn cached[clip.name];\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tconst obj = actualObject() as THREE.Object3D | undefined;\n\n\t\t\t// clear cached\n\t\t\tcached = {};\n\t\t\t// stop all actions\n\t\t\tmixer.stopAllAction();\n\t\t\t// uncache actions\n\t\t\tObject.values(actions).forEach((action) => {\n\t\t\t\tmixer.uncacheAction(action as THREE.AnimationClip, obj);\n\t\t\t});\n\t\t});\n\n\t\treturn {\n\t\t\tclips,\n\t\t\tmixer,\n\t\t\tactions,\n\t\t\tnames,\n\t\t\tget isReady() {\n\t\t\t\treturn isReady();\n\t\t\t},\n\t\t} as NgtsAnimationApi<TAnimation>;\n\t});\n}\n\n/**\n * @deprecated Use `animations` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see animations\n */\nexport const injectAnimations = animations;\n","import { Directive, effect } from '@angular/core';\nimport { injectStore } from 'angular-three';\n\n/**\n * Disables automatic shadow map updates for performance optimization.\n *\n * When added to the scene, this directive sets `shadowMap.autoUpdate` to `false`\n * and triggers a single `needsUpdate` to bake the current shadow state. This is\n * useful for static scenes where shadows don't need to update every frame.\n *\n * On cleanup, automatic shadow updates are restored.\n *\n * @example\n * ```html\n * <ngt-group>\n * <ngts-bake-shadows />\n * <!-- static meshes with shadows -->\n * </ngt-group>\n * ```\n */\n@Directive({ selector: 'ngts-bake-shadows' })\nexport class NgtsBakeShadows {\n\tconstructor() {\n\t\tconst store = injectStore();\n\t\teffect((onCleanup) => {\n\t\t\tconst gl = store.gl();\n\t\t\tgl.shadowMap.autoUpdate = false;\n\t\t\tgl.shadowMap.needsUpdate = true;\n\t\t\tonCleanup(() => {\n\t\t\t\tgl.shadowMap.autoUpdate = gl.shadowMap.needsUpdate = true;\n\t\t\t});\n\t\t});\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, getInstanceState } from 'angular-three';\nimport * as THREE from 'three';\n\n/**\n * Computes and attaches a custom BufferAttribute to a parent BufferGeometry.\n *\n * This component must be used as a child of a BufferGeometry. It calls the provided\n * `compute` function with the parent geometry and attaches the resulting attribute\n * under the specified name.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-box-geometry>\n * <ngts-computed-attribute\n * name=\"customAttribute\"\n * [compute]=\"computeCustomAttr\"\n * />\n * </ngt-box-geometry>\n * <ngt-mesh-basic-material />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * computeCustomAttr = (geometry: THREE.BufferGeometry) => {\n * const count = geometry.attributes['position'].count;\n * const data = new Float32Array(count);\n * // ... fill data\n * return new THREE.BufferAttribute(data, 1);\n * };\n * ```\n */\n@Component({\n\tselector: 'ngts-computed-attribute',\n\ttemplate: `\n\t\t<ngt-primitive #attribute *args=\"[bufferAttribute]\" [attach]=\"['attributes', name()]\" [parameters]=\"options()\">\n\t\t\t<ng-content />\n\t\t</ngt-primitive>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsComputedAttribute {\n\t/**\n\t * Function that computes the BufferAttribute from the parent geometry.\n\t * Called whenever the geometry or compute function changes.\n\t */\n\tcompute = input.required<(geometry: THREE.BufferGeometry) => THREE.BufferAttribute>();\n\n\t/**\n\t * The attribute name to attach to the geometry (e.g., 'uv2', 'customData').\n\t */\n\tname = input.required<string>();\n\n\t/**\n\t * Additional options to pass to the underlying buffer attribute.\n\t */\n\toptions = input({} as Partial<NgtThreeElements['ngt-buffer-geometry']>);\n\n\tprotected bufferAttribute = new THREE.BufferAttribute(new Float32Array(0), 1);\n\tattributeRef = viewChild<ElementRef<THREE.BufferAttribute>>('attribute');\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst bufferAttribute = this.attributeRef()?.nativeElement;\n\t\t\tif (!bufferAttribute) return;\n\n\t\t\tconst instanceState = getInstanceState(bufferAttribute);\n\t\t\tif (!instanceState) return;\n\n\t\t\tconst geometry = ((bufferAttribute as any).parent as THREE.BufferGeometry) ?? instanceState.parent();\n\n\t\t\tconst attribute = this.compute()(geometry);\n\t\t\tbufferAttribute.copy(attribute);\n\t\t});\n\t}\n}\n","import { REVISION } from 'three';\n\n/**\n * Retrieves the current THREE.js version as a numeric value.\n *\n * Parses the THREE.js REVISION constant, stripping any non-numeric characters\n * (e.g., 'r152' becomes 152).\n *\n * @returns The THREE.js version as an integer\n *\n * @example\n * ```typescript\n * if (getVersion() >= 150) {\n * // Use features available in r150+\n * }\n * ```\n */\nexport function getVersion() {\n\treturn parseInt(REVISION.replace(/\\D+/g, ''));\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { applyProps, extend, getInstanceState, is, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { AxesHelper, BoxGeometry, Mesh, MeshNormalMaterial } from 'three';\nimport { DecalGeometry } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsDecal component.\n */\nexport interface NgtsDecalOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Polygon offset factor to prevent z-fighting with the parent mesh.\n\t * More negative values push the decal further from the surface.\n\t * @default -10\n\t */\n\tpolygonOffsetFactor: number;\n\n\t/**\n\t * Whether to enable depth testing for the decal material.\n\t * Set to `false` to ensure decal is always visible.\n\t * @default false\n\t */\n\tdepthTest: boolean;\n\n\t/**\n\t * Shows a debug helper (box + axes) to visualize decal placement.\n\t * @default false\n\t */\n\tdebug: boolean;\n\n\t/**\n\t * Texture map to apply to the decal.\n\t */\n\tmap?: THREE.Texture | null;\n}\n\nconst defaultOptions: NgtsDecalOptions = {\n\tpolygonOffsetFactor: -10,\n\tdebug: false,\n\tdepthTest: false,\n};\n\n/**\n * Projects a texture decal onto a mesh surface using THREE.DecalGeometry.\n *\n * The decal automatically conforms to the parent mesh's geometry and\n * orients itself based on the surface normal at the specified position.\n * Can be used as a child of a mesh or reference an external mesh via input.\n *\n * @example\n * ```html\n * <!-- As child of mesh -->\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-standard-material />\n * <ngts-decal\n * [options]=\"{\n * position: [0, 0, 1],\n * scale: [0.5, 0.5, 0.5],\n * map: logoTexture\n * }\"\n * />\n * </ngt-mesh>\n *\n * <!-- With external mesh reference -->\n * <ngt-mesh #targetMesh>...</ngt-mesh>\n * <ngts-decal [mesh]=\"targetMesh\" [options]=\"{ ... }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-decal',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [parameters]=\"parameters()\">\n\t\t\t<ngt-value [rawValue]=\"true\" attach=\"material.transparent\" />\n\t\t\t<ngt-value [rawValue]=\"true\" attach=\"material.polygonOffset\" />\n\t\t\t<ngt-value [rawValue]=\"map()\" attach=\"material.map\" />\n\n\t\t\t<ng-content>\n\t\t\t\t<!-- we only want to pass through these material properties if they don't use a custom material -->\n\t\t\t\t<ngt-value [rawValue]=\"polygonOffsetFactor()\" attach=\"material.polygonOffsetFactor\" />\n\t\t\t\t<ngt-value [rawValue]=\"depthTest()\" attach=\"material.depthTest\" />\n\t\t\t</ng-content>\n\n\t\t\t@if (debug()) {\n\t\t\t\t<ngt-mesh #helper>\n\t\t\t\t\t<ngt-box-geometry />\n\t\t\t\t\t<ngt-mesh-normal-material wireframe />\n\t\t\t\t\t<ngt-axes-helper />\n\t\t\t\t</ngt-mesh>\n\t\t\t}\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsDecal {\n\t/**\n\t * Optional external mesh to project the decal onto.\n\t * If not provided, uses the parent mesh in the scene graph.\n\t */\n\tmesh = input<ElementRef<THREE.Mesh> | THREE.Mesh | null>();\n\n\t/**\n\t * Decal configuration options including position, scale, rotation, and material properties.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'debug',\n\t\t'map',\n\t\t'depthTest',\n\t\t'polygonOffsetFactor',\n\t\t'position',\n\t\t'scale',\n\t\t'rotation',\n\t]);\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\tprivate helperRef = viewChild<ElementRef<THREE.Mesh>>('helper');\n\n\tprotected map = pick(this.options, 'map');\n\tprotected depthTest = pick(this.options, 'depthTest');\n\tprotected polygonOffsetFactor = pick(this.options, 'polygonOffsetFactor');\n\tprotected debug = pick(this.options, 'debug');\n\tprivate position = pick(this.options, 'position');\n\tprivate rotation = pick(this.options, 'rotation');\n\tprivate scale = pick(this.options, 'scale');\n\n\tconstructor() {\n\t\textend({ Mesh, BoxGeometry, MeshNormalMaterial, AxesHelper });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst thisMesh = this.meshRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(thisMesh);\n\t\t\tif (!instanceState) return;\n\n\t\t\tconst parent = resolveRef(this.mesh()) || instanceState.parent();\n\n\t\t\tif (parent && !is.three<THREE.Mesh>(parent, 'isMesh')) {\n\t\t\t\tthrow new Error('<ngts-decal> must have a Mesh as parent or specify its \"mesh\" input');\n\t\t\t}\n\n\t\t\tif (!parent) return;\n\n\t\t\tconst parentInstanceState = getInstanceState(parent);\n\t\t\tif (!parentInstanceState) return;\n\n\t\t\t// track parent's children\n\t\t\tconst parentNonObjects = parentInstanceState.nonObjects();\n\t\t\tif (!parentNonObjects || !parentNonObjects.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if parent geometry doesn't have its attributes populated properly, we skip\n\t\t\tif (!parent.geometry?.attributes?.['position']) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [position, rotation, scale] = [this.position(), this.rotation(), this.scale()];\n\t\t\tconst state = {\n\t\t\t\tposition: new THREE.Vector3(),\n\t\t\t\trotation: new THREE.Euler(),\n\t\t\t\tscale: new THREE.Vector3(1, 1, 1),\n\t\t\t};\n\n\t\t\tapplyProps(state, { position, scale });\n\n\t\t\t// zero out the parents matrix world for this operation\n\t\t\tconst matrixWorld = parent.matrixWorld.clone();\n\t\t\tparent.matrixWorld.identity();\n\n\t\t\tif (!rotation || typeof rotation === 'number') {\n\t\t\t\tconst obj = new THREE.Object3D();\n\t\t\t\tobj.position.copy(state.position);\n\n\t\t\t\t// Thanks https://x.com/N8Programs !\n\t\t\t\tconst vertices = parent.geometry.attributes['position'].array;\n\t\t\t\tif (parent.geometry.attributes['normal'] === undefined) {\n\t\t\t\t\tparent.geometry.computeVertexNormals();\n\t\t\t\t}\n\t\t\t\tconst normal = parent.geometry.attributes['normal'].array;\n\t\t\t\tlet distance = Infinity;\n\t\t\t\tlet closestNormal = new THREE.Vector3();\n\t\t\t\tconst ox = obj.position.x;\n\t\t\t\tconst oy = obj.position.y;\n\t\t\t\tconst oz = obj.position.z;\n\t\t\t\tconst vLength = vertices.length;\n\t\t\t\tlet chosenIdx = -1;\n\t\t\t\tfor (let i = 0; i < vLength; i += 3) {\n\t\t\t\t\tconst x = vertices[i];\n\t\t\t\t\tconst y = vertices[i + 1];\n\t\t\t\t\tconst z = vertices[i + 2];\n\t\t\t\t\tconst xDiff = x - ox;\n\t\t\t\t\tconst yDiff = y - oy;\n\t\t\t\t\tconst zDiff = z - oz;\n\t\t\t\t\tconst distSquared = xDiff * xDiff + yDiff * yDiff + zDiff * zDiff;\n\t\t\t\t\tif (distSquared < distance) {\n\t\t\t\t\t\tdistance = distSquared;\n\t\t\t\t\t\tchosenIdx = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosestNormal.fromArray(normal, chosenIdx);\n\n\t\t\t\t// Get vector tangent to normal\n\t\t\t\tobj.lookAt(obj.position.clone().add(closestNormal));\n\t\t\t\tobj.rotateZ(Math.PI);\n\t\t\t\tobj.rotateY(Math.PI);\n\n\t\t\t\tif (typeof rotation === 'number') obj.rotateZ(rotation);\n\t\t\t\tapplyProps(state, { rotation: obj.rotation });\n\t\t\t} else {\n\t\t\t\tapplyProps(state, { rotation });\n\t\t\t}\n\n\t\t\tthisMesh.geometry = new DecalGeometry(parent, state.position, state.rotation, state.scale);\n\t\t\tconst helper = this.helperRef()?.nativeElement;\n\t\t\tif (helper) {\n\t\t\t\tapplyProps(helper, state);\n\t\t\t\t// Prevent the helpers from blocking rays\n\t\t\t\thelper.traverse((child) => (child.raycast = () => null));\n\t\t\t}\n\n\t\t\t// Reset parents matrix-world\n\t\t\tparent.matrixWorld = matrixWorld;\n\n\t\t\tonCleanup(() => {\n\t\t\t\tthisMesh.geometry.dispose();\n\t\t\t});\n\t\t});\n\t}\n}\n","import type * as THREE from 'three';\n\n/**\n * Sets the update range on a BufferAttribute for partial GPU uploads.\n *\n * Handles the API change in THREE.js r159 where `updateRange` was replaced\n * with `updateRanges` array and `addUpdateRange()` method.\n *\n * @deprecated This function handles legacy THREE.js API compatibility.\n * Consider using `attribute.addUpdateRange()` directly for r159+.\n *\n * @param attribute - The BufferAttribute to update\n * @param updateRange - Object specifying the range to update\n * @param updateRange.start - Starting index in the attribute array\n * @param updateRange.count - Number of elements to update\n *\n * @example\n * ```typescript\n * const positions = geometry.attributes['position'];\n * // Only update first 100 vertices\n * setUpdateRange(positions, { start: 0, count: 100 * 3 });\n * positions.needsUpdate = true;\n * ```\n */\nexport const setUpdateRange = (\n\tattribute: THREE.BufferAttribute,\n\tupdateRange: { start: number; count: number },\n): void => {\n\tif ('updateRanges' in attribute) {\n\t\t// attribute.updateRanges[0] = updateRange;\n\t\tattribute.addUpdateRange(updateRange.start, updateRange.count);\n\t} else {\n\t\tObject.assign(attribute, { updateRange });\n\t}\n};\n","import {\n\tDestroyRef,\n\tDirective,\n\tInjector,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n} from '@angular/core';\nimport { injectStore } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Parameters for creating a Frame Buffer Object (FBO).\n */\nexport interface NgtsFBOParams {\n\t/**\n\t * Width of the render target in pixels, or RenderTargetOptions if height is not provided.\n\t * Defaults to canvas width × device pixel ratio.\n\t */\n\twidth?: number | THREE.RenderTargetOptions;\n\n\t/**\n\t * Height of the render target in pixels.\n\t * Defaults to canvas height × device pixel ratio.\n\t */\n\theight?: number;\n\n\t/**\n\t * Additional THREE.RenderTargetOptions for the WebGLRenderTarget.\n\t */\n\tsettings?: THREE.RenderTargetOptions;\n}\n\n/**\n * Creates a WebGLRenderTarget (Frame Buffer Object) for off-screen rendering.\n *\n * Automatically sized to the canvas dimensions if width/height not specified.\n * The FBO is disposed on component destroy.\n *\n * @param params - Signal of FBO configuration\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns A THREE.WebGLRenderTarget instance\n *\n * @example\n * ```typescript\n * // Basic usage - sized to canvas\n * const renderTarget = fbo();\n *\n * // Custom size with multisampling\n * const target = fbo(() => ({\n * width: 512,\n * height: 512,\n * settings: { samples: 4 }\n * }));\n *\n * // Render to FBO\n * beforeRender(({ gl, scene, camera }) => {\n * gl.setRenderTarget(target);\n * gl.render(scene, camera);\n * gl.setRenderTarget(null);\n * });\n * ```\n */\nexport function fbo(params: () => NgtsFBOParams = () => ({}), { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(fbo, injector, () => {\n\t\tconst store = injectStore();\n\n\t\tconst width = computed(() => {\n\t\t\tconst { width } = params();\n\t\t\treturn typeof width === 'number' ? width : store.size.width() * store.viewport.dpr();\n\t\t});\n\n\t\tconst height = computed(() => {\n\t\t\tconst { height } = params();\n\t\t\treturn typeof height === 'number' ? height : store.size.height() * store.viewport.dpr();\n\t\t});\n\n\t\tconst settings = computed(() => {\n\t\t\tconst { width, settings } = params();\n\t\t\tconst _settings = (typeof width === 'number' ? settings : (width as THREE.RenderTargetOptions)) || {};\n\t\t\tif (_settings.samples === undefined) {\n\t\t\t\t_settings.samples = 0;\n\t\t\t}\n\t\t\treturn _settings;\n\t\t});\n\n\t\tconst target = (() => {\n\t\t\tconst [{ samples = 0, depth, ...targetSettings }, _width, _height] = [\n\t\t\t\tuntracked(settings),\n\t\t\t\tuntracked(width),\n\t\t\t\tuntracked(height),\n\t\t\t];\n\n\t\t\tconst target = new THREE.WebGLRenderTarget(_width, _height, {\n\t\t\t\tminFilter: THREE.LinearFilter,\n\t\t\t\tmagFilter: THREE.LinearFilter,\n\t\t\t\ttype: THREE.HalfFloatType,\n\t\t\t\t...targetSettings,\n\t\t\t});\n\n\t\t\tif (depth) {\n\t\t\t\ttarget.depthTexture = new THREE.DepthTexture(_width, _height, THREE.FloatType);\n\t\t\t}\n\n\t\t\ttarget.samples = samples;\n\t\t\treturn target;\n\t\t})();\n\n\t\teffect(() => {\n\t\t\tconst [{ samples = 0 }, _width, _height] = [settings(), width(), height()];\n\t\t\ttarget.setSize(_width, _height);\n\t\t\tif (samples) target.samples = samples;\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => target.dispose());\n\n\t\treturn target;\n\t});\n}\n\n/**\n * @deprecated Use `fbo` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see fbo\n */\nexport const injectFBO = fbo;\n\n/**\n * Structural directive for creating an FBO with template context.\n *\n * Provides the created WebGLRenderTarget as implicit context to the template.\n *\n * @example\n * ```html\n * <ng-template [fbo]=\"{ width: 512, height: 512 }\" let-target>\n * <!-- target is the WebGLRenderTarget -->\n * <ngt-mesh>\n * <ngt-plane-geometry />\n * <ngt-mesh-basic-material [map]=\"target.texture\" />\n * </ngt-mesh>\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[fbo]' })\nexport class NgtsFBO {\n\t/**\n\t * FBO configuration including width, height, and RenderTargetOptions.\n\t */\n\tfbo = input({} as { width: NgtsFBOParams['width']; height: NgtsFBOParams['height'] } & THREE.RenderTargetOptions);\n\n\tprivate template = inject(TemplateRef);\n\tprivate viewContainerRef = inject(ViewContainerRef);\n\n\tconstructor() {\n\t\tconst fboTarget = fbo(() => {\n\t\t\tconst { width, height, ...settings } = this.fbo();\n\t\t\treturn { width, height, settings };\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst ref = this.viewContainerRef.createEmbeddedView(this.template, { $implicit: fboTarget });\n\t\t\tref.detectChanges();\n\t\t\tonCleanup(() => void ref.destroy());\n\t\t});\n\t}\n\n\t/**\n\t * Type guard for template context.\n\t * Ensures the implicit context is typed as WebGLRenderTarget.\n\t */\n\tstatic ngTemplateContextGuard(_: NgtsFBO, ctx: unknown): ctx is { $implicit: ReturnType<typeof fbo> } {\n\t\treturn true;\n\t}\n}\n","import { computed, Injector } from '@angular/core';\nimport { beforeRender, injectStore } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { fbo } from './fbo';\n\n/**\n * Creates a depth buffer texture that captures scene depth information.\n *\n * Renders the scene to an off-screen FBO with a depth texture attachment,\n * which can be used for effects like soft particles, SSAO, or custom shaders.\n *\n * @param params - Signal of configuration options\n * @param params.size - Resolution of the depth buffer (default: 256, or canvas size if not specified)\n * @param params.frames - Number of frames to render (default: Infinity for continuous)\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @returns The DepthTexture from the FBO\n *\n * @example\n * ```typescript\n * // Create a depth buffer for post-processing\n * const depth = depthBuffer(() => ({ size: 512 }));\n *\n * // Use in a shader\n * effect(() => {\n * material.uniforms['depthTexture'].value = depth;\n * });\n * ```\n */\nexport function depthBuffer(\n\tparams: () => { size?: number; frames?: number } = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(depthBuffer, injector, () => {\n\t\tconst size = computed(() => params().size || 256);\n\t\tconst frames = computed(() => params().frames || Infinity);\n\n\t\tconst store = injectStore();\n\n\t\tconst w = computed(() => size() || store.size.width() * store.viewport.dpr());\n\t\tconst h = computed(() => size() || store.size.height() * store.viewport.dpr());\n\n\t\tconst depthConfig = computed(() => {\n\t\t\tconst depthTexture = new THREE.DepthTexture(w(), h());\n\t\t\tdepthTexture.format = THREE.DepthFormat;\n\t\t\tdepthTexture.type = THREE.UnsignedShortType;\n\t\t\treturn { depthTexture };\n\t\t});\n\n\t\tconst depthFBO = fbo(() => ({ width: w(), height: h(), settings: depthConfig() }));\n\n\t\tlet count = 0;\n\t\tbeforeRender(({ gl, scene, camera }) => {\n\t\t\tif (frames() === Infinity || count < frames()) {\n\t\t\t\tgl.setRenderTarget(depthFBO);\n\t\t\t\tgl.render(scene, camera);\n\t\t\t\tgl.setRenderTarget(null);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t});\n\n\t\treturn depthFBO.depthTexture;\n\t});\n}\n\n/**\n * @deprecated Use `depthBuffer` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see depthBuffer\n */\nexport const injectDepthBuffer = depthBuffer;\n","import { is } from 'angular-three';\nimport * as THREE from 'three';\n\n// Reusable vectors to avoid allocations in hot paths\nconst v1 = new THREE.Vector3();\nconst v2 = new THREE.Vector3();\nconst v3 = new THREE.Vector3();\nconst v4 = new THREE.Vector2();\n\n/**\n * Calculates the 2D screen position of a 3D object.\n *\n * Projects the object's world position through the camera to get\n * normalized device coordinates, then converts to pixel coordinates.\n *\n * @param el - The THREE.Object3D to project\n * @param camera - The camera to project through\n * @param size - The canvas size in pixels\n * @returns `[x, y]` screen coordinates in pixels (top-left origin)\n */\nexport function defaultCalculatePosition(\n\tel: THREE.Object3D,\n\tcamera: THREE.Camera,\n\tsize: { width: number; height: number },\n) {\n\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tobjectPos.project(camera);\n\tconst widthHalf = size.width / 2;\n\tconst heightHalf = size.height / 2;\n\treturn [objectPos.x * widthHalf + widthHalf, -(objectPos.y * heightHalf) + heightHalf];\n}\n\n/**\n * Function signature for custom position calculation.\n * @see defaultCalculatePosition\n */\nexport type CalculatePosition = typeof defaultCalculatePosition;\n\n/**\n * Determines if an object is behind the camera.\n *\n * Calculates the angle between the camera's forward direction and\n * the vector from camera to object. If > 90 degrees, object is behind.\n *\n * @param el - The object to check\n * @param camera - The camera reference\n * @returns `true` if the object is behind the camera\n */\nexport function isObjectBehindCamera(el: THREE.Object3D, camera: THREE.Camera) {\n\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\tconst deltaCamObj = objectPos.sub(cameraPos);\n\tconst camDir = camera.getWorldDirection(v3);\n\treturn deltaCamObj.angleTo(camDir) > Math.PI / 2;\n}\n\n/**\n * Checks if an object is visible (not occluded by other objects).\n *\n * Casts a ray from the camera through the object's screen position\n * and checks if any occluding objects are closer than the target.\n *\n * @param el - The object to check visibility for\n * @param camera - The camera reference\n * @param raycaster - Raycaster instance for intersection tests\n * @param occlude - Array of objects that can occlude the target\n * @returns `true` if the object is visible (not occluded)\n */\nexport function isObjectVisible(\n\tel: THREE.Object3D,\n\tcamera: THREE.Camera,\n\traycaster: THREE.Raycaster,\n\tocclude: THREE.Object3D[],\n) {\n\tconst elPos = v1.setFromMatrixPosition(el.matrixWorld);\n\tconst screenPos = elPos.clone();\n\tscreenPos.project(camera);\n\tv4.set(screenPos.x, screenPos.y);\n\traycaster.setFromCamera(v4, camera);\n\tconst intersects = raycaster.intersectObjects(occlude, true);\n\tif (intersects.length) {\n\t\tconst intersectionDistance = intersects[0].distance;\n\t\tconst pointDistance = elPos.distanceTo(raycaster.ray.origin);\n\t\treturn pointDistance < intersectionDistance;\n\t}\n\treturn true;\n}\n\n/**\n * Calculates a scale factor based on object distance from camera.\n *\n * For perspective cameras, returns a value that makes objects appear\n * the same size regardless of distance. For orthographic cameras,\n * returns the camera zoom level.\n *\n * @param el - The object to calculate scale for\n * @param camera - The camera reference\n * @returns Scale factor (smaller values for distant objects in perspective)\n */\nexport function objectScale(el: THREE.Object3D, camera: THREE.Camera) {\n\tif (is.three<THREE.OrthographicCamera>(camera, 'isOrthographicCamera')) return camera.zoom;\n\tif (is.three<THREE.PerspectiveCamera>(camera, 'isPerspectiveCamera')) {\n\t\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\t\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\t\tconst vFOV = (camera.fov * Math.PI) / 180;\n\t\tconst dist = objectPos.distanceTo(cameraPos);\n\t\tconst scaleFOV = 2 * Math.tan(vFOV / 2) * dist;\n\t\treturn 1 / scaleFOV;\n\t}\n\treturn 1;\n}\n\n/**\n * Calculates a z-index value based on object distance from camera.\n *\n * Maps the distance from camera (between near and far planes) to\n * the provided z-index range. Closer objects get higher z-index values.\n *\n * @param el - The object to calculate z-index for\n * @param camera - The camera reference (must be Perspective or Orthographic)\n * @param zIndexRange - `[max, min]` range to map distance to\n * @returns Calculated z-index, or `undefined` for unsupported camera types\n */\nexport function objectZIndex(el: THREE.Object3D, camera: THREE.Camera, zIndexRange: Array<number>) {\n\tif (\n\t\tis.three<THREE.PerspectiveCamera>(camera, 'isPerspectiveCamera') ||\n\t\tis.three<THREE.OrthographicCamera>(camera, 'isOrthographicCamera')\n\t) {\n\t\tconst objectPos = v1.setFromMatrixPosition(el.matrixWorld);\n\t\tconst cameraPos = v2.setFromMatrixPosition(camera.matrixWorld);\n\t\tconst dist = objectPos.distanceTo(cameraPos);\n\t\tconst A = (zIndexRange[1] - zIndexRange[0]) / (camera.far - camera.near);\n\t\tconst B = zIndexRange[1] - A * camera.far;\n\t\treturn Math.round(A * dist + B);\n\t}\n\treturn undefined;\n}\n\n/**\n * Clamps very small values to zero to avoid floating point precision issues in CSS.\n * @param value - The number to check\n * @returns `0` if value is smaller than 1e-10, otherwise the original value\n */\nexport function epsilon(value: number) {\n\treturn Math.abs(value) < 1e-10 ? 0 : value;\n}\n\n/**\n * Converts a THREE.Matrix4 to a CSS matrix3d() string.\n *\n * @param matrix - The 4x4 transformation matrix\n * @param multipliers - Array of 16 multipliers for each matrix element\n * @param prepend - Optional string to prepend (e.g., 'translate(-50%,-50%)')\n * @returns CSS matrix3d() transform string\n */\nexport function getCSSMatrix(matrix: THREE.Matrix4, multipliers: number[], prepend = '') {\n\tlet matrix3d = 'matrix3d(';\n\tfor (let i = 0; i !== 16; i++) {\n\t\tmatrix3d += epsilon(multipliers[i] * matrix.elements[i]) + (i !== 15 ? ',' : ')');\n\t}\n\treturn prepend + matrix3d;\n}\n\n/**\n * Converts camera's inverse world matrix to CSS matrix3d.\n * Applies Y-axis flip to account for CSS vs WebGL coordinate differences.\n */\nexport const getCameraCSSMatrix = ((multipliers: number[]) => {\n\treturn (matrix: THREE.Matrix4) => getCSSMatrix(matrix, multipliers);\n})([1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1]);\n\n/**\n * Converts object's world matrix to CSS matrix3d with centering and scaling.\n * Prepends translate(-50%,-50%) to center the element on the transform origin.\n *\n * @param matrix - The object's world matrix\n * @param factor - Scale factor derived from distanceFactor\n */\nexport const getObjectCSSMatrix = ((scaleMultipliers: (n: number) => number[]) => {\n\treturn (matrix: THREE.Matrix4, factor: number) =>\n\t\tgetCSSMatrix(matrix, scaleMultipliers(factor), 'translate(-50%,-50%)');\n})((f: number) => [1 / f, 1 / f, 1 / f, 1, -1 / f, -1 / f, -1 / f, -1, 1 / f, 1 / f, 1 / f, 1, 1, 1, 1, 1]);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tElementRef,\n\tinject,\n\tinput,\n\toutput,\n\tRenderer2,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, injectStore, is, NgtHTML, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { NgtsHTMLImpl } from './html';\nimport {\n\tCalculatePosition,\n\tdefaultCalculatePosition,\n\tepsilon,\n\tgetCameraCSSMatrix,\n\tgetObjectCSSMatrix,\n\tisObjectBehindCamera,\n\tisObjectVisible,\n\tobjectScale,\n\tobjectZIndex,\n} from './utils';\n\n/**\n * Valid CSS pointer-events property values.\n */\ntype PointerEventsProperties =\n\t| 'auto'\n\t| 'none'\n\t| 'visiblePainted'\n\t| 'visibleFill'\n\t| 'visibleStroke'\n\t| 'visible'\n\t| 'painted'\n\t| 'fill'\n\t| 'stroke'\n\t| 'all'\n\t| 'inherit';\n\n/**\n * Configuration options for the NgtsHTMLContent component.\n */\nexport interface NgtsHTMLContentOptions {\n\t/**\n\t * Epsilon for position/zoom change detection.\n\t * Lower values = more frequent updates.\n\t *\n\t * @default 0.001\n\t */\n\teps: number;\n\t/**\n\t * Range for automatic z-index calculation based on camera distance.\n\t * `[max, min]` - closer objects get higher z-index.\n\t *\n\t * @default [16777271, 0]\n\t */\n\tzIndexRange: [number, number];\n\t/**\n\t * Centers the HTML element on the projected point.\n\t * Applies `transform: translate3d(-50%, -50%, 0)`.\n\t *\n\t * @default false\n\t */\n\tcenter: boolean;\n\t/**\n\t * Prepends to parent instead of appending.\n\t * Useful for z-index stacking order control.\n\t *\n\t * @default false\n\t */\n\tprepend: boolean;\n\t/**\n\t * Makes the container fill the entire canvas size.\n\t * Useful for full-screen overlays anchored to a 3D point.\n\t *\n\t * @default false\n\t */\n\tfullscreen: boolean;\n\t/**\n\t * CSS class applied to the inner container div.\n\t */\n\tcontainerClass: string;\n\t/**\n\t * Inline styles applied to the inner container div.\n\t */\n\tcontainerStyle: Partial<CSSStyleDeclaration>;\n\t/**\n\t * CSS `pointer-events` value for the HTML content.\n\t * Set to `'none'` to allow clicking through to the canvas.\n\t *\n\t * @default 'auto'\n\t */\n\tpointerEvents: PointerEventsProperties;\n\t/**\n\t * Custom function to calculate screen position from 3D coordinates.\n\t *\n\t * @default defaultCalculatePosition\n\t */\n\tcalculatePosition: CalculatePosition;\n\t/**\n\t * When `true` (with `transform: true` on parent), HTML always faces the camera.\n\t * Similar to THREE.Sprite behavior.\n\t *\n\t * @default false\n\t */\n\tsprite: boolean;\n\t/**\n\t * Scales HTML based on distance from camera.\n\t * Higher values = larger HTML at same distance.\n\t * - In transform mode: affects CSS matrix scaling\n\t * - In non-transform mode: affects CSS scale transform\n\t */\n\tdistanceFactor?: number;\n\t/**\n\t * Custom parent element for the HTML content.\n\t * Defaults to the canvas container or `events.connected` element.\n\t */\n\tparent?: HTMLElement | ElementRef<HTMLElement>;\n}\n\nconst defaultHtmlContentOptions: NgtsHTMLContentOptions = {\n\teps: 0.001,\n\tzIndexRange: [16777271, 0],\n\tpointerEvents: 'auto',\n\tcalculatePosition: defaultCalculatePosition,\n\tcontainerClass: '',\n\tcontainerStyle: {},\n\tcenter: false,\n\tprepend: false,\n\tfullscreen: false,\n\tsprite: false,\n};\n\n/**\n * Renders HTML content positioned relative to a `NgtsHTML` anchor in 3D space.\n *\n * This component projects the parent THREE.Group's world position to screen\n * coordinates and uses CSS absolute positioning/transforms to overlay HTML\n * on the canvas.\n *\n * Must be used as a child of `ngts-html`. The host `div` element is the actual\n * positioned element. Extends `NgtHTML` to integrate with the custom renderer.\n *\n * @example\n * ```html\n * <ngts-html [options]=\"{ transform: true }\">\n * <!-- Basic label -->\n * <div [htmlContent]=\"{ distanceFactor: 10 }\">\n * <h1>Title</h1>\n * </div>\n * </ngts-html>\n *\n * <!-- With styling and interactivity -->\n * <ngts-html>\n * <div\n * [htmlContent]=\"{\n * center: true,\n * containerClass: 'tooltip',\n * pointerEvents: 'auto'\n * }\"\n * (click)=\"handleClick()\"\n * >\n * <button>Click me</button>\n * </div>\n * </ngts-html>\n *\n * <!-- Custom occlusion handling -->\n * <ngts-html [options]=\"{ occlude: true }\">\n * <div\n * [htmlContent]=\"{}\"\n * (occluded)=\"isHidden = $event\"\n * [class.faded]=\"isHidden\"\n * >\n * Content with custom occlusion handling\n * </div>\n * </ngts-html>\n * ```\n */\n@Component({\n\tselector: 'div[htmlContent]',\n\ttemplate: `\n\t\t@if (html.transform()) {\n\t\t\t<div\n\t\t\t\t#transformOuter\n\t\t\t\tstyle=\"position: absolute; top: 0; left: 0; transform-style: preserve-3d; pointer-events: none;\"\n\t\t\t\t[style.width.px]=\"size.width()\"\n\t\t\t\t[style.height.px]=\"size.height()\"\n\t\t\t>\n\t\t\t\t<div #transformInner style=\"position: absolute\" [style.pointer-events]=\"pointerEvents()\">\n\t\t\t\t\t<div #container [class]=\"containerClass()\" [style]=\"containerStyle()\">\n\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div\n\t\t\t\t#container\n\t\t\t\tstyle=\"position:absolute\"\n\t\t\t\t[style.transform]=\"center() ? 'translate3d(-50%,-50%,0)' : 'none'\"\n\t\t\t\t[style.top]=\"fullscreen() ? -size.height() / 2 + 'px' : 'unset'\"\n\t\t\t\t[style.left]=\"fullscreen() ? -size.width() / 2 + 'px' : 'unset'\"\n\t\t\t\t[style.width]=\"fullscreen() ? size.width() : 'unset'\"\n\t\t\t\t[style.height]=\"fullscreen() ? size.height() : 'unset'\"\n\t\t\t\t[class]=\"containerClass()\"\n\t\t\t\t[style]=\"containerStyle()\"\n\t\t\t>\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t</div>\n\t\t}\n\n\t\t<ng-template #content>\n\t\t\t<ng-content />\n\t\t</ng-template>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgTemplateOutlet],\n\thost: { 'data-ngts-html-content': '' },\n})\nexport class NgtsHTMLContent extends NgtHTML {\n\t/**\n\t * Content positioning and behavior options.\n\t * Aliased as `htmlContent` for use with the `[htmlContent]` attribute selector.\n\t */\n\toptions = input(defaultHtmlContentOptions, {\n\t\ttransform: mergeInputs(defaultHtmlContentOptions),\n\t\talias: 'htmlContent',\n\t});\n\n\t/**\n\t * Emits when occlusion state changes.\n\t * - `true` - HTML is occluded (hidden behind objects)\n\t * - `false` - HTML is visible\n\t *\n\t * If no listener is attached, visibility is handled automatically\n\t * via `display: none/block`. When subscribed, you control visibility.\n\t */\n\toccluded = output<boolean>();\n\n\t/** Reference to outer transform container (transform mode only) */\n\ttransformOuterRef = viewChild<ElementRef<HTMLDivElement>>('transformOuter');\n\t/** Reference to inner transform container (transform mode only) */\n\ttransformInnerRef = viewChild<ElementRef<HTMLDivElement>>('transformInner');\n\t/** Reference to the content container div */\n\tcontainerRef = viewChild<ElementRef<HTMLDivElement>>('container');\n\n\tprotected html = inject(NgtsHTMLImpl);\n\tprivate host = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate store = injectStore();\n\tprotected size = this.store.size;\n\n\tprivate parent = pick(this.options, 'parent');\n\tprivate zIndexRange = pick(this.options, 'zIndexRange');\n\tprivate calculatePosition = pick(this.options, 'calculatePosition');\n\tprivate prepend = pick(this.options, 'prepend');\n\tprotected center = pick(this.options, 'center');\n\tprotected fullscreen = pick(this.options, 'fullscreen');\n\tprotected pointerEvents = pick(this.options, 'pointerEvents');\n\tprotected containerClass = pick(this.options, 'containerClass');\n\tprotected containerStyle = pick(this.options, 'containerStyle');\n\n\tprivate target = computed(() => {\n\t\tconst parent = resolveRef(this.parent());\n\t\tif (parent) return parent;\n\t\treturn (this.store.events.connected?.() || this.store.gl.domElement.parentNode()) as HTMLElement;\n\t});\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst renderer = inject(Renderer2);\n\n\t\tlet isMeshSizeSet = false;\n\n\t\teffect(() => {\n\t\t\tconst [occlude, canvasEl, zIndexRange] = [\n\t\t\t\tthis.html.occlude(),\n\t\t\t\tthis.store.snapshot.gl.domElement,\n\t\t\t\tuntracked(this.zIndexRange),\n\t\t\t];\n\n\t\t\tif (occlude && occlude === 'blending') {\n\t\t\t\trenderer.setStyle(canvasEl, 'z-index', `${Math.floor(zIndexRange[0] / 2)}`);\n\t\t\t\trenderer.setStyle(canvasEl, 'position', 'absolute');\n\t\t\t\trenderer.setStyle(canvasEl, 'pointer-events', 'none');\n\t\t\t} else {\n\t\t\t\trenderer.removeStyle(canvasEl, 'z-index');\n\t\t\t\trenderer.removeStyle(canvasEl, 'position');\n\t\t\t\trenderer.removeStyle(canvasEl, 'pointer-events');\n\t\t\t}\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [transform, target, hostEl, prepend, scene, calculatePosition, group, size, camera] = [\n\t\t\t\tthis.html.transform(),\n\t\t\t\tthis.target(),\n\t\t\t\tthis.host.nativeElement,\n\t\t\t\tuntracked(this.prepend),\n\t\t\t\tthis.store.snapshot.scene,\n\t\t\t\tuntracked(this.calculatePosition),\n\t\t\t\tuntracked(this.html.groupRef).nativeElement,\n\t\t\t\tthis.store.snapshot.size,\n\t\t\t\tthis.store.snapshot.camera,\n\t\t\t];\n\n\t\t\tscene.updateMatrixWorld();\n\t\t\trenderer.setStyle(hostEl, 'position', 'absolute');\n\t\t\trenderer.setStyle(hostEl, 'top', '0');\n\t\t\trenderer.setStyle(hostEl, 'left', '0');\n\n\t\t\tif (transform) {\n\t\t\t\trenderer.setStyle(hostEl, 'pointer-events', 'none');\n\t\t\t\trenderer.setStyle(hostEl, 'overflow', 'hidden');\n\t\t\t\trenderer.removeStyle(hostEl, 'transform');\n\t\t\t\trenderer.removeStyle(hostEl, 'transform-origin');\n\t\t\t} else {\n\t\t\t\tconst vec = calculatePosition(group, camera, size);\n\t\t\t\trenderer.setStyle(hostEl, 'transform', `translate3d(${vec[0]}px,${vec[1]}px,0)`);\n\t\t\t\trenderer.setStyle(hostEl, 'transform-origin', '0 0');\n\t\t\t\trenderer.removeStyle(hostEl, 'pointer-events');\n\t\t\t\trenderer.removeStyle(hostEl, 'overflow');\n\t\t\t}\n\n\t\t\tif (prepend) target.prepend(hostEl);\n\t\t\telse target.appendChild(hostEl);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tif (target) target.removeChild(hostEl);\n\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst _ = [this.options(), this.html.options()];\n\t\t\tisMeshSizeSet = false;\n\t\t});\n\n\t\tlet visible = true;\n\t\tlet oldZoom = 0;\n\t\tlet oldPosition = [0, 0];\n\n\t\tbeforeRender(({ camera: rootCamera }) => {\n\t\t\tconst [\n\t\t\t\thostEl,\n\t\t\t\ttransformOuterEl,\n\t\t\t\ttransformInnerEl,\n\t\t\t\tgroup,\n\t\t\t\tocclusionMesh,\n\t\t\t\tocclusionGeometry,\n\t\t\t\tisRaycastOcclusion,\n\t\t\t\t{ camera, size, viewport, raycaster, scene },\n\t\t\t\t{ calculatePosition, eps, zIndexRange, sprite, distanceFactor },\n\t\t\t\t{ transform, occlude, scale },\n\t\t\t] = [\n\t\t\t\tthis.host.nativeElement,\n\t\t\t\tthis.transformOuterRef()?.nativeElement,\n\t\t\t\tthis.transformInnerRef()?.nativeElement,\n\t\t\t\tthis.html.groupRef().nativeElement,\n\t\t\t\tthis.html.occlusionMeshRef()?.nativeElement,\n\t\t\t\tthis.html.occlusionGeometryRef()?.nativeElement,\n\t\t\t\tthis.html.isRaycastOcclusion(),\n\t\t\t\tthis.store.snapshot,\n\t\t\t\tthis.options(),\n\t\t\t\tthis.html.options(),\n\t\t\t];\n\n\t\t\tif (group) {\n\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\tgroup.updateWorldMatrix(true, false);\n\t\t\t\tconst vec = transform ? oldPosition : calculatePosition(group, camera, size);\n\n\t\t\t\tif (\n\t\t\t\t\ttransform ||\n\t\t\t\t\tMath.abs(oldZoom - camera.zoom) > eps ||\n\t\t\t\t\tMath.abs(oldPosition[0] - vec[0]) > eps ||\n\t\t\t\t\tMath.abs(oldPosition[1] - vec[1]) > eps\n\t\t\t\t) {\n\t\t\t\t\tconst isBehindCamera = isObjectBehindCamera(group, camera);\n\t\t\t\t\tlet raytraceTarget: null | undefined | boolean | THREE.Object3D[] = false;\n\n\t\t\t\t\tif (isRaycastOcclusion) {\n\t\t\t\t\t\tif (Array.isArray(occlude)) {\n\t\t\t\t\t\t\traytraceTarget = occlude.map((item) => resolveRef(item)) as THREE.Object3D[];\n\t\t\t\t\t\t} else if (occlude !== 'blending') {\n\t\t\t\t\t\t\traytraceTarget = [scene];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst previouslyVisible = visible;\n\t\t\t\t\tif (raytraceTarget) {\n\t\t\t\t\t\tconst isVisible = isObjectVisible(group, camera, raycaster, raytraceTarget);\n\t\t\t\t\t\tvisible = isVisible && !isBehindCamera;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvisible = !isBehindCamera;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (previouslyVisible !== visible) {\n\t\t\t\t\t\tif (this.occluded['listeners']) this.occluded.emit(!visible);\n\t\t\t\t\t\telse renderer.setStyle(hostEl, 'display', visible ? 'block' : 'none');\n\t\t\t\t\t}\n\n\t\t\t\t\tconst halfRange = Math.floor(zIndexRange[0] / 2);\n\t\t\t\t\tconst zRange = occlude\n\t\t\t\t\t\t? isRaycastOcclusion //\n\t\t\t\t\t\t\t? [zIndexRange[0], halfRange]\n\t\t\t\t\t\t\t: [halfRange - 1, 0]\n\t\t\t\t\t\t: zIndexRange;\n\n\t\t\t\t\trenderer.setStyle(hostEl, 'z-index', `${objectZIndex(group, camera, zRange)}`);\n\n\t\t\t\t\tif (transform) {\n\t\t\t\t\t\tconst [widthHalf, heightHalf] = [size.width / 2, size.height / 2];\n\t\t\t\t\t\tconst fov = camera.projectionMatrix.elements[5] * heightHalf;\n\t\t\t\t\t\tconst { isOrthographicCamera, top, left, bottom, right } = camera as THREE.OrthographicCamera;\n\t\t\t\t\t\tconst cameraMatrix = getCameraCSSMatrix(camera.matrixWorldInverse);\n\t\t\t\t\t\tconst cameraTransform = isOrthographicCamera\n\t\t\t\t\t\t\t? `scale(${fov})translate(${epsilon(-(right + left) / 2)}px,${epsilon((top + bottom) / 2)}px)`\n\t\t\t\t\t\t\t: `translateZ(${fov}px)`;\n\t\t\t\t\t\tlet matrix = group.matrixWorld;\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tmatrix = camera.matrixWorldInverse\n\t\t\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t\t\t.transpose()\n\t\t\t\t\t\t\t\t.copyPosition(matrix)\n\t\t\t\t\t\t\t\t.scale(group.scale);\n\t\t\t\t\t\t\tmatrix.elements[3] = matrix.elements[7] = matrix.elements[11] = 0;\n\t\t\t\t\t\t\tmatrix.elements[15] = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'width', size.width + 'px');\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'height', size.height + 'px');\n\t\t\t\t\t\trenderer.setStyle(hostEl, 'perspective', isOrthographicCamera ? '' : `${fov}px`);\n\n\t\t\t\t\t\tif (transformOuterEl && transformInnerEl) {\n\t\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\t\ttransformOuterEl,\n\t\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t\t`${cameraTransform}${cameraMatrix}translate(${widthHalf}px,${heightHalf}px)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\t\ttransformInnerEl,\n\t\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t\tgetObjectCSSMatrix(matrix, 1 / ((distanceFactor || 10) / 400)),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst scale = distanceFactor === undefined ? 1 : objectScale(group, camera) * distanceFactor;\n\t\t\t\t\t\trenderer.setStyle(\n\t\t\t\t\t\t\thostEl,\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate3d(${vec[0]}px,${vec[1]}px,0) scale(${scale})`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toldPosition = vec;\n\t\t\t\t\toldZoom = camera.zoom;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isRaycastOcclusion && occlusionMesh && !isMeshSizeSet) {\n\t\t\t\tif (transform) {\n\t\t\t\t\tif (transformOuterEl) {\n\t\t\t\t\t\tconst el = transformOuterEl.children[0];\n\n\t\t\t\t\t\tif (el?.clientWidth && el?.clientHeight) {\n\t\t\t\t\t\t\tconst { isOrthographicCamera } = camera as THREE.OrthographicCamera;\n\n\t\t\t\t\t\t\tif (isOrthographicCamera || occlusionGeometry) {\n\t\t\t\t\t\t\t\tif (scale) {\n\t\t\t\t\t\t\t\t\tif (!Array.isArray(scale)) {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.setScalar(1 / (scale as number));\n\t\t\t\t\t\t\t\t\t} else if (is.three<THREE.Vector3>(scale, 'isVector3')) {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.copy(scale.clone().divideScalar(1));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tocclusionMesh.scale.set(1 / scale[0], 1 / scale[1], 1 / scale[2]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst ratio = (distanceFactor || 10) / 400;\n\t\t\t\t\t\t\t\tconst w = el.clientWidth * ratio;\n\t\t\t\t\t\t\t\tconst h = el.clientHeight * ratio;\n\n\t\t\t\t\t\t\t\tocclusionMesh.scale.set(w, h, 1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisMeshSizeSet = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst ele = hostEl.children[0];\n\n\t\t\t\t\tif (ele?.clientWidth && ele?.clientHeight) {\n\t\t\t\t\t\tconst ratio = 1 / viewport.factor;\n\t\t\t\t\t\tconst w = ele.clientWidth * ratio;\n\t\t\t\t\t\tconst h = ele.clientHeight * ratio;\n\n\t\t\t\t\t\tocclusionMesh.scale.set(w, h, 1);\n\n\t\t\t\t\t\tisMeshSizeSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tocclusionMesh.lookAt(rootCamera.position);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { extend, is, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry, ShaderMaterial } from 'three';\nimport { NgtsHTMLContent } from './html-content';\n\n/**\n * Configuration options for the NgtsHTML component.\n */\nexport interface NgtsHTMLOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Controls how HTML is hidden when behind other objects.\n\t * - `false` - No occlusion (default)\n\t * - `true` - Raycast against entire scene\n\t * - `'raycast'` - Same as `true`\n\t * - `'blending'` - Uses z-index blending (canvas becomes transparent)\n\t * - `Object3D[]` or `ElementRef<Object3D>[]` - Raycast against specific objects only\n\t */\n\tocclude: ElementRef<THREE.Object3D>[] | THREE.Object3D[] | boolean | 'raycast' | 'blending';\n\t/**\n\t * When `true`, uses CSS 3D transforms to position HTML in 3D space.\n\t * When `false`, projects 3D position to 2D screen coordinates.\n\t *\n\t * Transform mode enables proper 3D rotation/scaling but may have\n\t * performance implications with many elements.\n\t *\n\t * @default false\n\t */\n\ttransform: boolean;\n\t/**\n\t * Forward shadow casting to occlusion mesh.\n\t * Only used with blending occlusion mode.\n\t *\n\t * @default false\n\t */\n\tcastShadow: boolean;\n\t/**\n\t * Forward shadow receiving to occlusion mesh.\n\t * Only used with blending occlusion mode.\n\t *\n\t * @default false\n\t */\n\treceiveShadow: boolean;\n}\n\nconst defaultHtmlOptions: NgtsHTMLOptions = {\n\tocclude: false,\n\ttransform: false,\n\tcastShadow: false,\n\treceiveShadow: false,\n};\n\n/**\n * Creates a THREE.Group anchor point in the 3D scene for HTML overlay positioning.\n *\n * This component renders a THREE.Group that serves as the spatial reference\n * for `NgtsHTMLContent`. It can be placed standalone in the scene or\n * as a child of any THREE.Object3D (mesh, group, etc.).\n *\n * Must contain a `div[htmlContent]` child to render actual HTML content.\n * The Group's world position is used to calculate screen-space coordinates.\n *\n * @example\n * ```html\n * <!-- Attached to a mesh -->\n * <ngt-mesh [position]=\"[0, 2, 0]\">\n * <ngts-html [options]=\"{ transform: true }\">\n * <div [htmlContent]=\"{ distanceFactor: 10 }\">Label</div>\n * </ngts-html>\n * </ngt-mesh>\n *\n * <!-- Standalone in scene -->\n * <ngts-html [options]=\"{ position: [5, 5, 0] }\">\n * <div [htmlContent]=\"{}\">Floating UI</div>\n * </ngts-html>\n * ```\n */\n@Component({\n\tselector: 'ngts-html',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t@if (occlude() && !isRaycastOcclusion()) {\n\t\t\t\t<ngt-mesh #occlusionMesh [castShadow]=\"castShadow()\" [receiveShadow]=\"receiveShadow()\">\n\t\t\t\t\t<ng-content select=\"[data-occlusion-geometry]\">\n\t\t\t\t\t\t<ngt-plane-geometry #occlusionGeometry />\n\t\t\t\t\t</ng-content>\n\t\t\t\t\t<ng-content select=\"[data-occlusion-material]\">\n\t\t\t\t\t\t<ngt-shader-material\n\t\t\t\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t\t\t\t[vertexShader]=\"vertexShader()\"\n\t\t\t\t\t\t\t[fragmentShader]=\"fragmentShader()\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ng-content>\n\t\t\t\t</ngt-mesh>\n\t\t\t}\n\t\t</ngt-group>\n\n\t\t<ng-content />\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsHTMLImpl {\n\t/**\n\t * HTML anchor configuration including position, occlusion, and transform settings.\n\t */\n\toptions = input(defaultHtmlOptions, { transform: mergeInputs(defaultHtmlOptions) });\n\tprotected parameters = omit(this.options, ['occlude', 'castShadow', 'receiveShadow', 'transform']);\n\n\t/** Reference to the THREE.Group that serves as the 3D anchor point */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\t/** Reference to the occlusion mesh (when using blending occlusion mode) */\n\tocclusionMeshRef = viewChild<ElementRef<THREE.Mesh>>('occlusionMesh');\n\t/** Reference to the occlusion geometry */\n\tocclusionGeometryRef = viewChild<ElementRef<THREE.PlaneGeometry>>('occlusionGeometry');\n\n\tprotected castShadow = pick(this.options, 'castShadow');\n\tprotected receiveShadow = pick(this.options, 'receiveShadow');\n\t/** Current occlusion mode setting */\n\tocclude = pick(this.options, 'occlude');\n\t/** Whether CSS 3D transform mode is enabled */\n\ttransform = pick(this.options, 'transform');\n\n\tisRaycastOcclusion = computed(() => {\n\t\tconst occlude = this.occlude();\n\t\treturn (occlude && occlude !== 'blending') || (Array.isArray(occlude) && occlude.length && is.ref(occlude[0]));\n\t});\n\n\tprivate shaders = computed(() => {\n\t\tconst transform = this.transform();\n\t\tconst vertexShader = !transform\n\t\t\t? /* language=glsl glsl */ `\n /*\n This shader is from the THREE's SpriteMaterial.\n We need to turn the backing plane into a Sprite\n (make it always face the camera) if \"transfrom\"\n is false.\n */\n #include <common>\n\n void main() {\n vec2 center = vec2(0., 1.);\n float rotation = 0.0;\n\n // This is somewhat arbitrary, but it seems to work well\n // Need to figure out how to derive this dynamically if it even matters\n float size = 0.03;\n\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\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 bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;\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 mvPosition.xy += rotatedPosition;\n\n gl_Position = projectionMatrix * mvPosition;\n }\n `\n\t\t\t: undefined;\n\n\t\tconst fragmentShader = /* language=glsl glsl */ `\n void main() {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n `;\n\n\t\treturn { vertexShader, fragmentShader };\n\t});\n\n\tprotected vertexShader = pick(this.shaders, 'vertexShader');\n\tprotected fragmentShader = pick(this.shaders, 'fragmentShader');\n\n\tconstructor() {\n\t\textend({ Group, Mesh, PlaneGeometry, ShaderMaterial });\n\t}\n\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n}\n\n/**\n * Combined export of NgtsHTMLImpl and NgtsHTMLContent for convenient importing.\n *\n * @example\n * ```typescript\n * import { NgtsHTML } from 'angular-three-soba/misc';\n *\n * @Component({\n * imports: [NgtsHTML]\n * })\n * ```\n */\nexport const NgtsHTML = [NgtsHTMLImpl, NgtsHTMLContent] as const;\n","import { Directive, effect, ElementRef, inject, Injector, model, signal, WritableSignal } from '@angular/core';\nimport { addAfterEffect, addEffect, resolveRef } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Tracks whether an object is within the camera's view frustum.\n *\n * Uses THREE.js's built-in frustum culling by monitoring `onBeforeRender` calls.\n * When an object is visible to the camera, THREE calls `onBeforeRender`, which\n * this function uses to detect visibility state changes.\n *\n * @typeParam TObject - Type of THREE.Object3D being tracked\n * @param object - Signal of the object to track\n * @param options - Optional configuration\n * @param options.injector - Custom injector for dependency injection context\n * @param options.source - Writable signal to update (default: creates new signal)\n * @returns Read-only signal that emits `true` when object is in frustum\n *\n * @example\n * ```typescript\n * const meshRef = viewChild<ElementRef<THREE.Mesh>>('mesh');\n * const isVisible = intersect(() => meshRef());\n *\n * effect(() => {\n * if (isVisible()) {\n * // Object is in view - start expensive animations\n * }\n * });\n * ```\n */\nexport function intersect<TObject extends THREE.Object3D>(\n\tobject: () => ElementRef<TObject> | TObject | undefined | null,\n\t{ injector, source = signal(false) }: { injector?: Injector; source?: WritableSignal<boolean> } = {},\n) {\n\treturn assertInjector(intersect, injector, () => {\n\t\tlet check = false;\n\t\tlet temp = false;\n\n\t\teffect((onCleanup) => {\n\t\t\tconst obj = resolveRef(object());\n\t\t\tif (!obj) return;\n\n\t\t\t// Stamp out frustum check pre-emptively\n\t\t\tconst unsub1 = addEffect(() => {\n\t\t\t\tcheck = false;\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\t// If the object is inside the frustum three will call onRender\n\t\t\tconst oldOnRender = obj.onBeforeRender?.bind(obj);\n\t\t\tobj.onBeforeRender = () => (check = true);\n\n\t\t\t// Compare the check value against the temp value, if it differs set state\n\t\t\tconst unsub2 = addAfterEffect(() => {\n\t\t\t\tif (check !== temp) source.set((temp = check));\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\tonCleanup(() => {\n\t\t\t\tobj.onBeforeRender = oldOnRender;\n\t\t\t\tunsub1();\n\t\t\t\tunsub2();\n\t\t\t});\n\t\t});\n\n\t\treturn source.asReadonly();\n\t});\n}\n\n/**\n * @deprecated Use `intersect` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n * @see intersect\n */\nexport const injectIntersect = intersect;\n\n/**\n * Directive that tracks whether the host Object3D is in the camera frustum.\n *\n * Apply to any THREE.js element to get a two-way bound signal indicating\n * whether the object is currently visible to the camera.\n *\n * @example\n * ```html\n * <ngt-mesh [(intersect)]=\"isInView\">\n * <ngt-box-geometry />\n * <ngt-mesh-basic-material />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * isInView = signal(false);\n *\n * effect(() => {\n * console.log('Mesh visible:', this.isInView());\n * });\n * ```\n */\n@Directive({ selector: '[intersect]' })\nexport class NgtsIntersect {\n\t/**\n\t * Two-way bound signal indicating frustum intersection state.\n\t * `true` when object is visible, `false` when outside frustum.\n\t */\n\tintersect = model(false);\n\n\tconstructor() {\n\t\tconst host = inject<ElementRef<THREE.Object3D>>(ElementRef);\n\t\tintersect(() => host, { source: this.intersect });\n\t}\n}\n","import { computed, Directive, effect, ElementRef, model } from '@angular/core';\nimport { injectStore, resolveRef } from 'angular-three';\nimport * as THREE from 'three';\n\n/**\n * Pre-compiles shaders and textures to reduce runtime jank.\n *\n * When added to a scene, this directive triggers `WebGLRenderer.compile()`\n * and uses a CubeCamera to ensure environment maps are also compiled.\n * This helps eliminate shader compilation stutters during initial rendering.\n *\n * @example\n * ```html\n * <!-- Preload entire scene -->\n * <ngts-preload [all]=\"true\" />\n *\n * <!-- Preload specific scene/camera -->\n * <ngts-preload [scene]=\"customScene\" [camera]=\"customCamera\" />\n * ```\n */\n@Directive({ selector: 'ngts-preload' })\nexport class NgtsPreload {\n\t/**\n\t * When `true`, temporarily makes all invisible objects visible\n\t * during compilation to ensure everything is preloaded.\n\t */\n\tall = model<boolean>();\n\n\t/**\n\t * Custom scene to preload. Defaults to the store's scene.\n\t */\n\tscene = model<THREE.Object3D | ElementRef<THREE.Object3D>>();\n\n\t/**\n\t * Custom camera to use for compilation. Defaults to the store's camera.\n\t */\n\tcamera = model<THREE.Camera | ElementRef<THREE.Camera>>();\n\n\tprivate store = injectStore();\n\n\tprivate trueScene = computed(() => {\n\t\tconst scene = this.scene();\n\t\tif (scene) return resolveRef(scene);\n\t\treturn this.store.scene();\n\t});\n\n\tprivate trueCamera = computed(() => {\n\t\tconst camera = this.camera();\n\t\tif (camera) return resolveRef(camera);\n\t\treturn this.store.camera();\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst invisible: THREE.Object3D[] = [];\n\n\t\t\tconst [all, scene, camera, gl] = [this.all(), this.trueScene(), this.trueCamera(), this.store.gl()];\n\n\t\t\tif (!scene || !camera) return;\n\n\t\t\tif (all) {\n\t\t\t\t// Find all invisible objects, store and then flip them\n\t\t\t\tscene.traverse((object) => {\n\t\t\t\t\tif (!object.visible) {\n\t\t\t\t\t\tinvisible.push(object);\n\t\t\t\t\t\tobject.visible = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Now compile the scene\n\t\t\tgl.compile(scene, camera);\n\n\t\t\t// And for good measure, hit it with a cube camera\n\t\t\tconst cubeRenderTarget = new THREE.WebGLCubeRenderTarget(128);\n\t\t\tconst cubeCamera = new THREE.CubeCamera(0.01, 100000, cubeRenderTarget);\n\t\t\tcubeCamera.update(gl, scene);\n\t\t\tcubeRenderTarget.dispose();\n\n\t\t\t// Flips these objects back\n\t\t\tinvisible.forEach((object) => (object.visible = false));\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { checkUpdate, extend, getInstanceState, is, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\nimport { MeshSurfaceSampler } from 'three-stdlib';\n\n/**\n * Data provided for each sampled point on a mesh surface.\n * @internal\n */\ninterface SamplePayload {\n\t/** The world-space position of the sample point */\n\tposition: THREE.Vector3;\n\t/** The interpolated normal at the sample point */\n\tnormal: THREE.Vector3;\n\t/** The interpolated vertex color at the sample point */\n\tcolor: THREE.Color;\n}\n\n/**\n * Transform function signature for customizing instance placement.\n *\n * @param payload - Sample data including position, normal, color, and transform objects\n * @param i - The index of the current sample (0 to count-1)\n */\nexport type TransformFn = (payload: TransformPayload, i: number) => void;\n\n/**\n * Extended sample payload including transform helpers.\n * Passed to the transform function for each sampled point.\n */\ninterface TransformPayload extends SamplePayload {\n\t/**\n\t * A dummy Object3D for calculating the transform matrix.\n\t * Modify its position, rotation, and scale - the matrix will be\n\t * applied to the corresponding instance automatically.\n\t */\n\tdummy: THREE.Object3D;\n\t/**\n\t * Reference to the source mesh being sampled.\n\t * Useful for accessing geometry attributes or applying parent transforms.\n\t */\n\tsampledMesh: THREE.Mesh;\n}\n\n/**\n * Creates a computed signal that samples points on a mesh surface.\n *\n * Uses THREE.MeshSurfaceSampler to distribute points across the mesh geometry.\n * Returns an InstancedBufferAttribute containing transform matrices for each sample,\n * suitable for use with InstancedMesh or custom instancing solutions.\n *\n * @param mesh - Factory returning the mesh to sample from\n * @param options - Sampling configuration\n * @param options.count - Factory returning number of samples (default: 16)\n * @param options.transform - Factory returning custom transform function\n * @param options.weight - Factory returning weight attribute name for biased sampling\n * @param options.instancedMesh - Factory returning InstancedMesh to update directly\n * @returns Computed signal yielding InstancedBufferAttribute with 4x4 matrices\n *\n * @example\n * ```typescript\n * const meshRef = viewChild<ElementRef<THREE.Mesh>>('mesh');\n * const instancesRef = viewChild<ElementRef<THREE.InstancedMesh>>('instances');\n *\n * const samples = surfaceSampler(\n * () => meshRef()?.nativeElement,\n * {\n * count: () => 1000,\n * instancedMesh: () => instancesRef()?.nativeElement,\n * transform: () => ({ dummy, position, normal }) => {\n * dummy.position.copy(position);\n * dummy.lookAt(position.clone().add(normal));\n * dummy.scale.setScalar(Math.random() * 0.5 + 0.5);\n * }\n * }\n * );\n * ```\n */\nexport function surfaceSampler(\n\tmesh: () => ElementRef<THREE.Mesh> | THREE.Mesh | null | undefined,\n\t{\n\t\tcount,\n\t\ttransform,\n\t\tweight,\n\t\tinstancedMesh,\n\t}: {\n\t\tcount?: () => number;\n\t\ttransform?: () => TransformFn | undefined;\n\t\tweight?: () => string | undefined;\n\t\tinstancedMesh?: () => ElementRef<THREE.InstancedMesh> | THREE.InstancedMesh | null | undefined;\n\t} = {},\n) {\n\tconst initialBufferAttribute = (() => {\n\t\tconst arr = Array.from({ length: count?.() ?? 16 }, () => [\n\t\t\t1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,\n\t\t]).flat();\n\t\treturn new THREE.InstancedBufferAttribute(Float32Array.from(arr), 16);\n\t})();\n\n\treturn computed(() => {\n\t\tconst currentMesh = resolveRef(mesh());\n\t\tif (!currentMesh) return initialBufferAttribute;\n\n\t\tconst instanceState = getInstanceState(currentMesh);\n\t\tif (!instanceState) return initialBufferAttribute;\n\n\t\tconst nonObjects = instanceState.nonObjects();\n\t\tif (\n\t\t\t!nonObjects ||\n\t\t\t!nonObjects.length ||\n\t\t\tnonObjects.every((nonObject) => !is.three<THREE.BufferGeometry>(nonObject, 'isBufferGeometry'))\n\t\t) {\n\t\t\treturn initialBufferAttribute;\n\t\t}\n\n\t\tconst sampler = new MeshSurfaceSampler(currentMesh);\n\t\tconst _count = count?.() ?? 16;\n\t\tconst _transform = transform?.();\n\t\tconst _weight = weight?.();\n\n\t\tif (_weight) {\n\t\t\tsampler.setWeightAttribute(_weight);\n\t\t}\n\n\t\tsampler.build();\n\n\t\tconst position = new THREE.Vector3();\n\t\tconst normal = new THREE.Vector3();\n\t\tconst color = new THREE.Color();\n\t\tconst dummy = new THREE.Object3D();\n\t\tconst instance = resolveRef(instancedMesh?.());\n\n\t\tcurrentMesh.updateMatrixWorld(true);\n\n\t\tfor (let i = 0; i < _count; i++) {\n\t\t\tsampler.sample(position, normal, color);\n\n\t\t\tif (typeof _transform === 'function') {\n\t\t\t\t_transform({ dummy, sampledMesh: currentMesh, position, normal, color }, i);\n\t\t\t} else {\n\t\t\t\tdummy.position.copy(position);\n\t\t\t}\n\n\t\t\tdummy.updateMatrix();\n\n\t\t\tif (instance) {\n\t\t\t\tinstance.setMatrixAt(i, dummy.matrix);\n\t\t\t}\n\n\t\t\tdummy.matrix.toArray(initialBufferAttribute.array, i * 16);\n\t\t}\n\n\t\tif (instance) {\n\t\t\tcheckUpdate(instance.instanceMatrix);\n\t\t}\n\n\t\tcheckUpdate(initialBufferAttribute);\n\n\t\treturn new THREE.InstancedBufferAttribute(initialBufferAttribute.array, initialBufferAttribute.itemSize).copy(\n\t\t\tinitialBufferAttribute,\n\t\t);\n\t});\n}\n\n/**\n * Configuration options for the NgtsSampler component.\n */\nexport interface NgtsSamplerOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Name of a vertex attribute to use for weighted sampling.\n\t * Higher values = more likely to be sampled. Useful for concentrating\n\t * instances in specific areas (e.g., based on vertex colors or custom data).\n\t *\n\t * @see https://threejs.org/docs/#examples/en/math/MeshSurfaceSampler.setWeightAttribute\n\t */\n\tweight?: string;\n\n\t/**\n\t * Custom transform function applied to each sampled instance.\n\t * Receives sample data and should mutate `payload.dummy` to set\n\t * position, rotation, and scale. The dummy's matrix is automatically\n\t * updated and applied after the function returns.\n\t */\n\ttransform?: TransformFn;\n\n\t/**\n\t * Number of samples to distribute across the mesh surface.\n\t * @default 16\n\t */\n\tcount: number;\n}\n\nconst defaultOptions: NgtsSamplerOptions = {\n\tcount: 16,\n};\n\n/**\n * Distributes instances across a mesh surface using MeshSurfaceSampler.\n *\n * This component samples points on a mesh and automatically updates an\n * InstancedMesh with the sampled transforms. Both the source mesh and\n * target instances can be provided as inputs or as children.\n *\n * @example\n * ```html\n * <!-- External mesh and instances -->\n * <ngt-mesh #sourceMesh>\n * <ngt-torus-knot-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n *\n * <ngts-sampler\n * [mesh]=\"sourceMesh\"\n * [instances]=\"instancesRef\"\n * [options]=\"{ count: 500, transform: scatterTransform }\"\n * >\n * <ngt-instanced-mesh #instancesRef [count]=\"500\">\n * <ngt-sphere-geometry [args]=\"[0.02]\" />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-instanced-mesh>\n * </ngts-sampler>\n * ```\n */\n@Component({\n\tselector: 'ngts-sampler',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSampler {\n\t/**\n\t * The mesh to sample points from.\n\t * If not provided, uses the first Mesh child of this component.\n\t */\n\tmesh = input<ElementRef<THREE.Mesh> | THREE.Mesh | null>(null);\n\n\t/**\n\t * The InstancedMesh to update with sampled transforms.\n\t * If not provided, uses the first InstancedMesh child of this component.\n\t */\n\tinstances = input<ElementRef<THREE.InstancedMesh> | THREE.InstancedMesh | null>(null);\n\n\t/**\n\t * Sampler configuration including count, weight attribute, and transform function.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['weight', 'transform', 'count']);\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate count = pick(this.options, 'count');\n\tprivate weight = pick(this.options, 'weight');\n\tprivate transform = pick(this.options, 'transform');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tconst meshToSample = computed(() => {\n\t\t\tconst group = this.groupRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(group);\n\t\t\tif (!instanceState) return null;\n\n\t\t\tconst mesh = resolveRef(this.mesh());\n\t\t\tif (mesh) return mesh;\n\n\t\t\tconst objects = instanceState.objects();\n\t\t\treturn objects.find((c) => is.three<THREE.Mesh>(c, 'isMesh'));\n\t\t});\n\n\t\tconst instancedMeshToSample = computed(() => {\n\t\t\tconst group = this.groupRef().nativeElement;\n\t\t\tconst instanceState = getInstanceState(group);\n\t\t\tif (!instanceState) return null;\n\n\t\t\tconst instances = resolveRef(this.instances());\n\t\t\tif (instances) return instances;\n\n\t\t\tconst objects = instanceState.objects();\n\t\t\treturn objects.find(\n\t\t\t\t(c) => !!Object.getOwnPropertyDescriptor(c, 'instanceMatrix'),\n\t\t\t) as unknown as THREE.InstancedMesh;\n\t\t});\n\n\t\t// NOTE: because surfaceSampler returns a computed, we need to consume\n\t\t// this computed in a Reactive Context (an effect) to ensure the inner logic of\n\t\t// surfaceSampler is run properly.\n\t\tconst sampler = surfaceSampler(meshToSample, {\n\t\t\tcount: this.count,\n\t\t\ttransform: this.transform,\n\t\t\tweight: this.weight,\n\t\t\tinstancedMesh: instancedMeshToSample,\n\t\t});\n\t\teffect(sampler);\n\t}\n}\n","import { NgtSize } from 'angular-three';\nimport * as THREE from 'three';\n\n// Reusable vectors to avoid allocations in hot paths\nconst tV0 = new THREE.Vector3();\nconst tV1 = new THREE.Vector3();\nconst tV2 = new THREE.Vector3();\n\n/**\n * Projects a 3D point to 2D screen coordinates.\n * @internal\n */\nfunction getPoint2(point3: THREE.Vector3, camera: THREE.Camera, size: NgtSize) {\n\tconst widthHalf = size.width / 2;\n\tconst heightHalf = size.height / 2;\n\tcamera.updateMatrixWorld(false);\n\tconst vector = point3.project(camera);\n\tvector.x = vector.x * widthHalf + widthHalf;\n\tvector.y = -(vector.y * heightHalf) + heightHalf;\n\treturn vector;\n}\n\n/**\n * Unprojects a 2D screen point back to 3D world coordinates.\n * @internal\n */\nfunction getPoint3(point2: THREE.Vector3, camera: THREE.Camera, size: NgtSize, zValue: number = 1) {\n\tconst vector = tV0.set((point2.x / size.width) * 2 - 1, -(point2.y / size.height) * 2 + 1, zValue);\n\tvector.unproject(camera);\n\treturn vector;\n}\n\n/**\n * Calculates a scale factor to maintain consistent pixel-size at a 3D position.\n *\n * Given a 3D point and a desired radius in pixels, computes how much to scale\n * an object so it appears that size on screen. Useful for keeping UI elements\n * or sprites at a consistent visual size regardless of distance from camera.\n *\n * @param point3 - The 3D world position to calculate scale for\n * @param radiusPx - Desired radius in screen pixels\n * @param camera - The camera used for projection\n * @param size - The viewport/canvas size\n * @returns Scale factor to apply to the object\n *\n * @example\n * ```typescript\n * beforeRender(({ camera, size }) => {\n * const scale = calculateScaleFactor(mesh.position, 50, camera, size);\n * mesh.scale.setScalar(scale);\n * });\n * ```\n */\nexport function calculateScaleFactor(point3: THREE.Vector3, radiusPx: number, camera: THREE.Camera, size: NgtSize) {\n\tconst point2 = getPoint2(tV2.copy(point3), camera, size);\n\tlet scale = 0;\n\tfor (let i = 0; i < 2; ++i) {\n\t\tconst point2off = tV1.copy(point2).setComponent(i, point2.getComponent(i) + radiusPx);\n\t\tconst point3off = getPoint3(point2off, camera, size, point2off.z);\n\t\tscale = Math.max(scale, point3.distanceTo(point3off));\n\t}\n\treturn scale;\n}\n","/*\n * Integration and compilation: @N8Programs\n * Inspired by:\n * https://github.com/mrdoob/three.js/blob/dev/examples/webgl_shadowmap_pcss.html\n * https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-17-efficient-soft-edged-shadows-using\n * https://developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf\n * https://github.com/mrdoob/three.js/blob/master/examples/webgl_shadowmap_pcss.html [spidersharma03]\n * https://spline.design/\n * Concept:\n * https://www.gamedev.net/tutorials/programming/graphics/contact-hardening-soft-shadows-made-fast-r4906/\n * Vogel Disk Implementation:\n * https://www.shadertoy.com/view/4l3yRM [ashalah]\n * High-Frequency Noise Implementation:\n * https://www.shadertoy.com/view/tt3fDH [spawner64]\n */\n\nimport { Directive, effect, input } from '@angular/core';\nimport { injectStore } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { getVersion } from './constants';\n\n/**\n * Options for configuring soft shadows using PCSS (Percentage-Closer Soft Shadows).\n */\nexport interface NgtsSoftShadowsOptions {\n\t/** Size of the light source (the larger the softer the light), default: 25 */\n\tsize: number;\n\t/** Number of samples (more samples less noise but more expensive), default: 10 */\n\tsamples: number;\n\t/** Depth focus, use it to shift the focal point (where the shadow is the sharpest), default: 0 (the beginning) */\n\tfocus: number;\n}\n\nconst defaultOptions: NgtsSoftShadowsOptions = {\n\tsize: 25,\n\tsamples: 10,\n\tfocus: 0,\n};\n\n/**\n * Generates PCSS shader code for Three.js < r182 (uses RGBA-packed depth)\n */\nfunction pcssLegacy(options: NgtsSoftShadowsOptions): string {\n\tconst { focus, size, samples } = options;\n\treturn `\n#define PENUMBRA_FILTER_SIZE float(${size})\n#define RGB_NOISE_FUNCTION(uv) (randRGB(uv))\nvec3 randRGB(vec2 uv) {\n return vec3(\n fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575),\n fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431),\n fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423)\n );\n}\n\nvec3 lowPassRandRGB(vec2 uv) {\n vec3 result = vec3(0);\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0));\n result *= 0.111111111;\n return result;\n}\n\nvec3 highPassRandRGB(vec2 uv) {\n return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5;\n}\n\nvec2 vogelDiskSample(int sampleIndex, int sampleCount, float angle) {\n const float goldenAngle = 2.399963f;\n float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount));\n float theta = float(sampleIndex) * goldenAngle + angle;\n float sine = sin(theta);\n float cosine = cos(theta);\n return vec2(cosine, sine) * r;\n}\n\nfloat penumbraSize( const in float zReceiver, const in float zBlocker ) {\n return (zReceiver - zBlocker) / zBlocker;\n}\n\nfloat findBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float blockerDepthSum = float(${focus});\n float blockers = 0.0;\n int j = 0;\n vec2 offset = vec2(0.);\n float depth = 0.;\n\n #pragma unroll_loop_start\n for(int i = 0; i < ${samples}; i ++) {\n offset = (vogelDiskSample(j, ${samples}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE;\n depth = unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) );\n if (depth < compare) {\n blockerDepthSum += depth;\n blockers++;\n }\n j++;\n }\n #pragma unroll_loop_end\n\n if (blockers > 0.0) {\n return blockerDepthSum / blockers;\n }\n return -1.0;\n}\n\nfloat vogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float shadow = 0.0f;\n int j = 0;\n vec2 vogelSample = vec2(0.0);\n vec2 offset = vec2(0.0);\n\n #pragma unroll_loop_start\n for (int i = 0; i < ${samples}; i++) {\n vogelSample = vogelDiskSample(j, ${samples}, angle) * texelSize;\n offset = vogelSample * (1.0 + filterRadius * float(${size}));\n shadow += step( zReceiver, unpackRGBAToDepth( texture2D( shadowMap, uv + offset ) ) );\n j++;\n }\n #pragma unroll_loop_end\n\n return shadow * 1.0 / ${samples}.0;\n}\n\nfloat PCSS (sampler2D shadowMap, vec4 coords) {\n vec2 uv = coords.xy;\n float zReceiver = coords.z;\n float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2;\n float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver, angle);\n if (avgBlockerDepth == -1.0) {\n return 1.0;\n }\n float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth);\n return vogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle);\n}`;\n}\n\n/**\n * Generates PCSS shader code for Three.js >= r182 (uses native depth textures)\n */\nfunction pcssModern(options: NgtsSoftShadowsOptions): string {\n\tconst { focus, size, samples } = options;\n\treturn `\n#define PENUMBRA_FILTER_SIZE float(${size})\n#define RGB_NOISE_FUNCTION(uv) (randRGB(uv))\nvec3 randRGB(vec2 uv) {\n return vec3(\n fract(sin(dot(uv, vec2(12.75613, 38.12123))) * 13234.76575),\n fract(sin(dot(uv, vec2(19.45531, 58.46547))) * 43678.23431),\n fract(sin(dot(uv, vec2(23.67817, 78.23121))) * 93567.23423)\n );\n}\n\nvec3 lowPassRandRGB(vec2 uv) {\n vec3 result = vec3(0);\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(-1.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2( 0.0, +1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, -1.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, 0.0));\n result += RGB_NOISE_FUNCTION(uv + vec2(+1.0, +1.0));\n result *= 0.111111111;\n return result;\n}\n\nvec3 highPassRandRGB(vec2 uv) {\n return RGB_NOISE_FUNCTION(uv) - lowPassRandRGB(uv) + 0.5;\n}\n\nvec2 pcssVogelDiskSample(int sampleIndex, int sampleCount, float angle) {\n const float goldenAngle = 2.399963f;\n float r = sqrt(float(sampleIndex) + 0.5f) / sqrt(float(sampleCount));\n float theta = float(sampleIndex) * goldenAngle + angle;\n float sine = sin(theta);\n float cosine = cos(theta);\n return vec2(cosine, sine) * r;\n}\n\nfloat pcssPenumbraSize( const in float zReceiver, const in float zBlocker ) {\n return (zReceiver - zBlocker) / zBlocker;\n}\n\nfloat pcssFindBlocker(sampler2D shadowMap, vec2 uv, float compare, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float blockerDepthSum = float(${focus});\n float blockers = 0.0;\n int j = 0;\n vec2 offset = vec2(0.);\n float depth = 0.;\n\n #pragma unroll_loop_start\n for(int i = 0; i < ${samples}; i ++) {\n offset = (pcssVogelDiskSample(j, ${samples}, angle) * texelSize) * 2.0 * PENUMBRA_FILTER_SIZE;\n depth = texture2D( shadowMap, uv + offset ).r;\n if (depth < compare) {\n blockerDepthSum += depth;\n blockers++;\n }\n j++;\n }\n #pragma unroll_loop_end\n\n if (blockers > 0.0) {\n return blockerDepthSum / blockers;\n }\n return -1.0;\n}\n\nfloat pcssVogelFilter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius, float angle) {\n float texelSize = 1.0 / float(textureSize(shadowMap, 0).x);\n float shadow = 0.0f;\n int j = 0;\n vec2 vogelSample = vec2(0.0);\n vec2 offset = vec2(0.0);\n\n #pragma unroll_loop_start\n for (int i = 0; i < ${samples}; i++) {\n vogelSample = pcssVogelDiskSample(j, ${samples}, angle) * texelSize;\n offset = vogelSample * (1.0 + filterRadius * float(${size}));\n shadow += step( zReceiver, texture2D( shadowMap, uv + offset ).r );\n j++;\n }\n #pragma unroll_loop_end\n\n return shadow * 1.0 / ${samples}.0;\n}\n\nfloat PCSS (sampler2D shadowMap, vec4 coords, float shadowIntensity) {\n vec2 uv = coords.xy;\n float zReceiver = coords.z;\n float angle = highPassRandRGB(gl_FragCoord.xy).r * PI2;\n float avgBlockerDepth = pcssFindBlocker(shadowMap, uv, zReceiver, angle);\n if (avgBlockerDepth == -1.0) {\n return 1.0;\n }\n float penumbraRatio = pcssPenumbraSize(zReceiver, avgBlockerDepth);\n float shadow = pcssVogelFilter(shadowMap, uv, zReceiver, 1.25 * penumbraRatio, angle);\n return mix( 1.0, shadow, shadowIntensity );\n}`;\n}\n\nfunction reset(gl: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera): void {\n\tscene.traverse((object) => {\n\t\tif ((object as THREE.Mesh).material) {\n\t\t\tgl.properties.remove((object as THREE.Mesh).material);\n\t\t\t((object as THREE.Mesh).material as THREE.Material).dispose?.();\n\t\t}\n\t});\n\tgl.info.programs!.length = 0;\n\tgl.compile(scene, camera);\n}\n\n/**\n * A directive that injects Percentage-Closer Soft Shadows (PCSS) into the scene.\n *\n * PCSS produces contact-hardening soft shadows where shadows are sharper near the\n * contact point and softer further away, creating more realistic shadow effects.\n *\n * @example\n * ```html\n * <ngts-soft-shadows [options]=\"{ size: 25, samples: 10, focus: 0 }\" />\n * ```\n */\n@Directive({ selector: 'ngts-soft-shadows' })\nexport class NgtsSoftShadows {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tconstructor() {\n\t\tconst store = injectStore();\n\n\t\teffect((onCleanup) => {\n\t\t\tconst { gl, scene, camera } = store.snapshot;\n\t\t\tconst options = this.options();\n\t\t\tconst version = getVersion();\n\n\t\t\tconst original = THREE.ShaderChunk.shadowmap_pars_fragment;\n\n\t\t\tif (version >= 182) {\n\t\t\t\t// Three.js r182+ uses native depth textures and has a different shader structure.\n\t\t\t\t// The PCF path uses sampler2DShadow, but PCSS needs sampler2D for manual depth comparison.\n\t\t\t\t// We inject our PCSS code and replace the BASIC shadow type's getShadow function,\n\t\t\t\t// then also replace the PCF uniform declarations to use sampler2D instead of sampler2DShadow.\n\t\t\t\tconst pcssCode = pcssModern(options);\n\n\t\t\t\tlet shader = THREE.ShaderChunk.shadowmap_pars_fragment;\n\n\t\t\t\t// 1. Inject PCSS functions after USE_SHADOWMAP\n\t\t\t\tshader = shader.replace('#ifdef USE_SHADOWMAP', '#ifdef USE_SHADOWMAP\\n' + pcssCode);\n\n\t\t\t\t// 2. Replace sampler2DShadow with sampler2D for directional lights (PCF path)\n\t\t\t\tshader = shader.replace(\n\t\t\t\t\t/#if defined\\( SHADOWMAP_TYPE_PCF \\)\\s+uniform sampler2DShadow directionalShadowMap\\[ NUM_DIR_LIGHT_SHADOWS \\];/,\n\t\t\t\t\t`#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];`,\n\t\t\t\t);\n\n\t\t\t\t// 3. Replace sampler2DShadow with sampler2D for spot lights (PCF path)\n\t\t\t\tshader = shader.replace(\n\t\t\t\t\t/#if defined\\( SHADOWMAP_TYPE_PCF \\)\\s+uniform sampler2DShadow spotShadowMap\\[ NUM_SPOT_LIGHT_SHADOWS \\];/,\n\t\t\t\t\t`#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];`,\n\t\t\t\t);\n\n\t\t\t\t// 4. Replace the PCF getShadow function to use our PCSS\n\t\t\t\t// Match from the function signature to its closing brace\n\t\t\t\tconst getShadowPCFRegex =\n\t\t\t\t\t/(#if defined\\( SHADOWMAP_TYPE_PCF \\)\\s+float getShadow\\( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord \\) \\{[\\s\\S]*?return mix\\( 1\\.0, shadow, shadowIntensity \\);\\s*\\})/;\n\n\t\t\t\tshader = shader.replace(\n\t\t\t\t\tgetShadowPCFRegex,\n\t\t\t\t\t`#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\treturn PCSS( shadowMap, shadowCoord, shadowIntensity );\n\t\t\t}\n\t\t\treturn 1.0;\n\t\t}`,\n\t\t\t\t);\n\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = shader;\n\t\t\t} else {\n\t\t\t\t// Three.js < r182 uses RGBA-packed depth\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = THREE.ShaderChunk.shadowmap_pars_fragment\n\t\t\t\t\t.replace('#ifdef USE_SHADOWMAP', '#ifdef USE_SHADOWMAP\\n' + pcssLegacy(options))\n\t\t\t\t\t.replace(\n\t\t\t\t\t\t'#if defined( SHADOWMAP_TYPE_PCF )',\n\t\t\t\t\t\t'\\nreturn PCSS(shadowMap, shadowCoord);\\n#if defined( SHADOWMAP_TYPE_PCF )',\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\treset(gl, scene, camera);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tTHREE.ShaderChunk.shadowmap_pars_fragment = original;\n\t\t\t\treset(gl, scene, camera);\n\t\t\t});\n\t\t});\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["defaultOptions"],"mappings":";;;;;;;;;;AAsEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACG,SAAU,UAAU,CACzB,iBAAqE,EACrE,MAGyE,EACzE,EAAE,QAAQ,EAAA,GAA8B,EAAE,EAAA;AAE1C,IAAA,OAAO,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAK;QAChD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,IAAK,CAAC;AAC7C,QAAA,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,KAAI;AAC1B,YAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBAAE;AACtB,YAAA,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AACpB,QAAA,CAAC,CAAC;QAEF,IAAI,MAAM,GAAG,EAA2C;QACxD,MAAM,OAAO,GAAG,EAA4D;QAC5E,MAAM,KAAK,GAAG,EAA2C;QACzD,MAAM,KAAK,GAAG,EAA2C;AAEzD,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC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;iBAAO;;gBAEN,KAAK,CAAC,WAAW,CAAC,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC;qBAC5D,OAAO,CAAC,sBAAsB,EAAE,wBAAwB,GAAG,UAAU,CAAC,OAAO,CAAC;AAC9E,qBAAA,OAAO,CACP,mCAAmC,EACnC,2EAA2E,CAC3E;YACH;AAEA,YAAA,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC;YAExB,SAAS,CAAC,MAAK;AACd,gBAAA,KAAK,CAAC,WAAW,CAAC,uBAAuB,GAAG,QAAQ;AACpD,gBAAA,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC;AACzB,YAAA,CAAC,CAAC;AACH,QAAA,CAAC,CAAC;IACH;8GA7EY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE;;;ACnR5C;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -121,7 +121,7 @@ declare class NgtsLine {
|
|
|
121
121
|
* Configuration options for the line appearance and behavior.
|
|
122
122
|
*/
|
|
123
123
|
options: _angular_core.InputSignalWithTransform<NgtsLineOptions, "" | Partial<NgtsLineOptions>>;
|
|
124
|
-
protected parameters: _angular_core.Signal<Omit<NgtsLineOptions, "
|
|
124
|
+
protected parameters: _angular_core.Signal<Omit<NgtsLineOptions, "vertexColors" | "color" | "dashed" | "linewidth" | "lineWidth" | "segments">>;
|
|
125
125
|
/**
|
|
126
126
|
* Reference to the underlying Line2 or LineSegments2 Three.js object.
|
|
127
127
|
*/
|
|
@@ -313,43 +313,10 @@ declare class NgtsCatmullRomLine {
|
|
|
313
313
|
}[T]) => void)>)) | undefined;
|
|
314
314
|
dispose?: (((() => void) | Readonly<() => void> | null) & (((() => void) & (() => void)) | Readonly<(() => void) & (() => void)>)) | undefined;
|
|
315
315
|
parameters?: ((Partial<three_stdlib.Line2> | Readonly<Partial<three_stdlib.Line2>>) & (Partial<three_stdlib.LineMaterial> | Readonly<Partial<three_stdlib.LineMaterial>>)) | undefined;
|
|
316
|
-
geometry?: three_stdlib.LineGeometry | Readonly<three_stdlib.LineGeometry | undefined>;
|
|
317
|
-
material?: three_stdlib.LineMaterial | Readonly<three_stdlib.LineMaterial | undefined>;
|
|
318
|
-
isLine2?: true | undefined;
|
|
319
|
-
isLineSegments2?: true | undefined;
|
|
320
|
-
computeLineDistances?: (() => three_stdlib.Line2) | Readonly<(() => three_stdlib.Line2) | undefined>;
|
|
321
|
-
isMesh?: true | undefined;
|
|
322
|
-
morphTargetInfluences?: number[] | Readonly<number[] | undefined>;
|
|
323
|
-
morphTargetDictionary?: {
|
|
324
|
-
[key: string]: number;
|
|
325
|
-
} | Readonly<{
|
|
326
|
-
[key: string]: number;
|
|
327
|
-
} | undefined>;
|
|
328
|
-
count?: Readonly<number | undefined>;
|
|
329
|
-
updateMorphTargets?: (() => void) | Readonly<(() => void) | undefined>;
|
|
330
|
-
getVertexPosition?: ((index: number, target: THREE.Vector3) => THREE.Vector3) | Readonly<((index: number, target: THREE.Vector3) => THREE.Vector3) | undefined>;
|
|
331
316
|
color?: THREE.ColorRepresentation | undefined;
|
|
332
|
-
dashed?: boolean | undefined | undefined;
|
|
333
|
-
dashScale?: number | undefined | undefined;
|
|
334
|
-
dashSize?: number | undefined | undefined;
|
|
335
|
-
dashOffset?: number | undefined | undefined;
|
|
336
|
-
gapSize?: number | undefined | undefined;
|
|
337
|
-
opacity?: number | undefined;
|
|
338
|
-
isLineMaterial?: true | undefined;
|
|
339
|
-
linewidth?: number | undefined | undefined;
|
|
340
|
-
resolution?: (THREE.Vector2 & (number | THREE.Vector2 | [x: number, y: number] | Readonly<THREE.Vector2> | readonly [x: number, y: number])) | undefined;
|
|
341
|
-
alphaToCoverage?: boolean | undefined | undefined;
|
|
342
|
-
worldUnits?: boolean | undefined | undefined;
|
|
343
|
-
isShaderMaterial?: Readonly<boolean | undefined>;
|
|
344
|
-
setValues?: ((values?: THREE.ShaderMaterialParameters) => void) | Readonly<((values?: THREE.ShaderMaterialParameters) => void) | undefined>;
|
|
345
|
-
defines?: Record<string, unknown> | Readonly<Record<string, unknown> | undefined>;
|
|
346
|
-
isMaterial?: Readonly<boolean | undefined>;
|
|
347
|
-
version?: Readonly<number | undefined>;
|
|
348
|
-
onBeforeCompile?: ((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | Readonly<((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | undefined>;
|
|
349
|
-
customProgramCacheKey?: (() => string) | Readonly<(() => string) | undefined>;
|
|
350
|
-
needsUpdate?: Readonly<boolean | undefined>;
|
|
351
317
|
blending?: 0 | 1 | 2 | 3 | 4 | 5 | undefined;
|
|
352
318
|
side?: 0 | 1 | 2 | undefined;
|
|
319
|
+
opacity?: number | undefined;
|
|
353
320
|
transparent?: boolean | undefined;
|
|
354
321
|
alphaHash?: boolean | undefined;
|
|
355
322
|
blendSrc?: 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | undefined;
|
|
@@ -381,11 +348,45 @@ declare class NgtsCatmullRomLine {
|
|
|
381
348
|
polygonOffsetFactor?: number | undefined;
|
|
382
349
|
polygonOffsetUnits?: number | undefined;
|
|
383
350
|
dithering?: boolean | undefined;
|
|
351
|
+
alphaToCoverage?: boolean | undefined | undefined;
|
|
384
352
|
premultipliedAlpha?: boolean | undefined;
|
|
385
353
|
forceSinglePass?: boolean | undefined;
|
|
386
354
|
allowOverride?: boolean | undefined;
|
|
387
355
|
toneMapped?: boolean | undefined;
|
|
388
356
|
alphaTest?: number | undefined;
|
|
357
|
+
dashed?: boolean | undefined | undefined;
|
|
358
|
+
dashScale?: number | undefined | undefined;
|
|
359
|
+
dashSize?: number | undefined | undefined;
|
|
360
|
+
dashOffset?: number | undefined | undefined;
|
|
361
|
+
gapSize?: number | undefined | undefined;
|
|
362
|
+
linewidth?: number | undefined | undefined;
|
|
363
|
+
resolution?: (THREE.Vector2 & (number | THREE.Vector2 | [x: number, y: number] | Readonly<THREE.Vector2> | readonly [x: number, y: number])) | undefined;
|
|
364
|
+
wireframe?: boolean | undefined | undefined;
|
|
365
|
+
worldUnits?: boolean | undefined | undefined;
|
|
366
|
+
geometry?: three_stdlib.LineGeometry | Readonly<three_stdlib.LineGeometry | undefined>;
|
|
367
|
+
material?: three_stdlib.LineMaterial | Readonly<three_stdlib.LineMaterial | undefined>;
|
|
368
|
+
isLine2?: true | undefined;
|
|
369
|
+
isLineSegments2?: true | undefined;
|
|
370
|
+
computeLineDistances?: (() => three_stdlib.Line2) | Readonly<(() => three_stdlib.Line2) | undefined>;
|
|
371
|
+
isMesh?: true | undefined;
|
|
372
|
+
morphTargetInfluences?: number[] | Readonly<number[] | undefined>;
|
|
373
|
+
morphTargetDictionary?: {
|
|
374
|
+
[key: string]: number;
|
|
375
|
+
} | Readonly<{
|
|
376
|
+
[key: string]: number;
|
|
377
|
+
} | undefined>;
|
|
378
|
+
count?: Readonly<number | undefined>;
|
|
379
|
+
updateMorphTargets?: (() => void) | Readonly<(() => void) | undefined>;
|
|
380
|
+
getVertexPosition?: ((index: number, target: THREE.Vector3) => THREE.Vector3) | Readonly<((index: number, target: THREE.Vector3) => THREE.Vector3) | undefined>;
|
|
381
|
+
isLineMaterial?: true | undefined;
|
|
382
|
+
isShaderMaterial?: Readonly<boolean | undefined>;
|
|
383
|
+
setValues?: ((values?: THREE.ShaderMaterialParameters) => void) | Readonly<((values?: THREE.ShaderMaterialParameters) => void) | undefined>;
|
|
384
|
+
defines?: Record<string, unknown> | Readonly<Record<string, unknown> | undefined>;
|
|
385
|
+
isMaterial?: Readonly<boolean | undefined>;
|
|
386
|
+
version?: Readonly<number | undefined>;
|
|
387
|
+
onBeforeCompile?: ((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | Readonly<((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | undefined>;
|
|
388
|
+
customProgramCacheKey?: (() => string) | Readonly<(() => string) | undefined>;
|
|
389
|
+
needsUpdate?: Readonly<boolean | undefined>;
|
|
389
390
|
uniforms?: {
|
|
390
391
|
[uniform: string]: THREE.IUniform<any>;
|
|
391
392
|
} | Readonly<{
|
|
@@ -394,7 +395,6 @@ declare class NgtsCatmullRomLine {
|
|
|
394
395
|
uniformsGroups?: THREE.UniformsGroup[] | Readonly<THREE.UniformsGroup[] | undefined>;
|
|
395
396
|
vertexShader?: Readonly<string | undefined>;
|
|
396
397
|
fragmentShader?: Readonly<string | undefined>;
|
|
397
|
-
wireframe?: boolean | undefined | undefined;
|
|
398
398
|
wireframeLinewidth?: Readonly<number | undefined>;
|
|
399
399
|
fog?: Readonly<boolean | undefined>;
|
|
400
400
|
lights?: Readonly<boolean | undefined>;
|
|
@@ -610,42 +610,10 @@ declare class NgtsEdges {
|
|
|
610
610
|
dispose?: (((() => void) | Readonly<() => void> | null) & (((() => void) & (() => void)) | Readonly<(() => void) & (() => void)>)) | undefined;
|
|
611
611
|
parameters?: ((Partial<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>> | Readonly<Partial<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>>) & ((Partial<three_stdlib.Line2> | Readonly<Partial<three_stdlib.Line2>>) & (Partial<three_stdlib.LineMaterial> | Readonly<Partial<three_stdlib.LineMaterial>>))) | undefined;
|
|
612
612
|
__ngt_args__?: (([geometry?: THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap> | undefined, material?: THREE.Material | THREE.Material[] | undefined] | readonly [geometry?: THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap> | undefined, material?: THREE.Material | THREE.Material[] | undefined]) & (([geometry?: three_stdlib.LineGeometry | undefined, material?: three_stdlib.LineMaterial | undefined] | readonly [geometry?: three_stdlib.LineGeometry | undefined, material?: three_stdlib.LineMaterial | undefined]) & ([parameters?: LineMaterialParameters | undefined] | readonly [parameters?: LineMaterialParameters | undefined]))) | undefined;
|
|
613
|
-
material?: ((THREE.Material | THREE.Material[] | Readonly<THREE.Material> | readonly THREE.Material[]) & (three_stdlib.LineMaterial | Readonly<three_stdlib.LineMaterial>)) | undefined;
|
|
614
|
-
isLine2?: true | undefined;
|
|
615
|
-
isLineSegments2?: true | undefined;
|
|
616
|
-
computeLineDistances?: (() => three_stdlib.Line2) | Readonly<(() => three_stdlib.Line2) | undefined>;
|
|
617
|
-
isMesh?: true | undefined;
|
|
618
|
-
morphTargetInfluences?: number[] | Readonly<number[] | undefined>;
|
|
619
|
-
morphTargetDictionary?: {
|
|
620
|
-
[key: string]: number;
|
|
621
|
-
} | Readonly<{
|
|
622
|
-
[key: string]: number;
|
|
623
|
-
} | undefined>;
|
|
624
|
-
count?: Readonly<number | undefined>;
|
|
625
|
-
updateMorphTargets?: (() => void) | Readonly<(() => void) | undefined>;
|
|
626
|
-
getVertexPosition?: ((index: number, target: THREE.Vector3) => THREE.Vector3) | Readonly<((index: number, target: THREE.Vector3) => THREE.Vector3) | undefined>;
|
|
627
613
|
color?: THREE.ColorRepresentation | undefined;
|
|
628
|
-
dashed?: boolean | undefined | undefined;
|
|
629
|
-
dashScale?: number | undefined | undefined;
|
|
630
|
-
dashSize?: number | undefined | undefined;
|
|
631
|
-
dashOffset?: number | undefined | undefined;
|
|
632
|
-
gapSize?: number | undefined | undefined;
|
|
633
|
-
opacity?: number | undefined;
|
|
634
|
-
isLineMaterial?: true | undefined;
|
|
635
|
-
linewidth?: number | undefined | undefined;
|
|
636
|
-
resolution?: (THREE.Vector2 & (number | THREE.Vector2 | [x: number, y: number] | Readonly<THREE.Vector2> | readonly [x: number, y: number])) | undefined;
|
|
637
|
-
alphaToCoverage?: boolean | undefined | undefined;
|
|
638
|
-
worldUnits?: boolean | undefined | undefined;
|
|
639
|
-
isShaderMaterial?: Readonly<boolean | undefined>;
|
|
640
|
-
setValues?: ((values?: THREE.ShaderMaterialParameters) => void) | Readonly<((values?: THREE.ShaderMaterialParameters) => void) | undefined>;
|
|
641
|
-
defines?: Record<string, unknown> | Readonly<Record<string, unknown> | undefined>;
|
|
642
|
-
isMaterial?: Readonly<boolean | undefined>;
|
|
643
|
-
version?: Readonly<number | undefined>;
|
|
644
|
-
onBeforeCompile?: ((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | Readonly<((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | undefined>;
|
|
645
|
-
customProgramCacheKey?: (() => string) | Readonly<(() => string) | undefined>;
|
|
646
|
-
needsUpdate?: Readonly<boolean | undefined>;
|
|
647
614
|
blending?: 0 | 1 | 2 | 3 | 4 | 5 | undefined;
|
|
648
615
|
side?: 0 | 1 | 2 | undefined;
|
|
616
|
+
opacity?: number | undefined;
|
|
649
617
|
transparent?: boolean | undefined;
|
|
650
618
|
alphaHash?: boolean | undefined;
|
|
651
619
|
blendSrc?: 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | undefined;
|
|
@@ -677,11 +645,44 @@ declare class NgtsEdges {
|
|
|
677
645
|
polygonOffsetFactor?: number | undefined;
|
|
678
646
|
polygonOffsetUnits?: number | undefined;
|
|
679
647
|
dithering?: boolean | undefined;
|
|
648
|
+
alphaToCoverage?: boolean | undefined | undefined;
|
|
680
649
|
premultipliedAlpha?: boolean | undefined;
|
|
681
650
|
forceSinglePass?: boolean | undefined;
|
|
682
651
|
allowOverride?: boolean | undefined;
|
|
683
652
|
toneMapped?: boolean | undefined;
|
|
684
653
|
alphaTest?: number | undefined;
|
|
654
|
+
dashed?: boolean | undefined | undefined;
|
|
655
|
+
dashScale?: number | undefined | undefined;
|
|
656
|
+
dashSize?: number | undefined | undefined;
|
|
657
|
+
dashOffset?: number | undefined | undefined;
|
|
658
|
+
gapSize?: number | undefined | undefined;
|
|
659
|
+
linewidth?: number | undefined | undefined;
|
|
660
|
+
resolution?: (THREE.Vector2 & (number | THREE.Vector2 | [x: number, y: number] | Readonly<THREE.Vector2> | readonly [x: number, y: number])) | undefined;
|
|
661
|
+
wireframe?: boolean | undefined | undefined;
|
|
662
|
+
worldUnits?: boolean | undefined | undefined;
|
|
663
|
+
material?: ((THREE.Material | THREE.Material[] | Readonly<THREE.Material> | readonly THREE.Material[]) & (three_stdlib.LineMaterial | Readonly<three_stdlib.LineMaterial>)) | undefined;
|
|
664
|
+
isLine2?: true | undefined;
|
|
665
|
+
isLineSegments2?: true | undefined;
|
|
666
|
+
computeLineDistances?: (() => three_stdlib.Line2) | Readonly<(() => three_stdlib.Line2) | undefined>;
|
|
667
|
+
isMesh?: true | undefined;
|
|
668
|
+
morphTargetInfluences?: number[] | Readonly<number[] | undefined>;
|
|
669
|
+
morphTargetDictionary?: {
|
|
670
|
+
[key: string]: number;
|
|
671
|
+
} | Readonly<{
|
|
672
|
+
[key: string]: number;
|
|
673
|
+
} | undefined>;
|
|
674
|
+
count?: Readonly<number | undefined>;
|
|
675
|
+
updateMorphTargets?: (() => void) | Readonly<(() => void) | undefined>;
|
|
676
|
+
getVertexPosition?: ((index: number, target: THREE.Vector3) => THREE.Vector3) | Readonly<((index: number, target: THREE.Vector3) => THREE.Vector3) | undefined>;
|
|
677
|
+
isLineMaterial?: true | undefined;
|
|
678
|
+
isShaderMaterial?: Readonly<boolean | undefined>;
|
|
679
|
+
setValues?: ((values?: THREE.ShaderMaterialParameters) => void) | Readonly<((values?: THREE.ShaderMaterialParameters) => void) | undefined>;
|
|
680
|
+
defines?: Record<string, unknown> | Readonly<Record<string, unknown> | undefined>;
|
|
681
|
+
isMaterial?: Readonly<boolean | undefined>;
|
|
682
|
+
version?: Readonly<number | undefined>;
|
|
683
|
+
onBeforeCompile?: ((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | Readonly<((parameters: THREE.WebGLProgramParametersWithUniforms, renderer: THREE.WebGLRenderer) => void) | undefined>;
|
|
684
|
+
customProgramCacheKey?: (() => string) | Readonly<(() => string) | undefined>;
|
|
685
|
+
needsUpdate?: Readonly<boolean | undefined>;
|
|
685
686
|
uniforms?: {
|
|
686
687
|
[uniform: string]: THREE.IUniform<any>;
|
|
687
688
|
} | Readonly<{
|
|
@@ -690,7 +691,6 @@ declare class NgtsEdges {
|
|
|
690
691
|
uniformsGroups?: THREE.UniformsGroup[] | Readonly<THREE.UniformsGroup[] | undefined>;
|
|
691
692
|
vertexShader?: Readonly<string | undefined>;
|
|
692
693
|
fragmentShader?: Readonly<string | undefined>;
|
|
693
|
-
wireframe?: boolean | undefined | undefined;
|
|
694
694
|
wireframeLinewidth?: Readonly<number | undefined>;
|
|
695
695
|
fog?: Readonly<boolean | undefined>;
|
|
696
696
|
lights?: Readonly<boolean | undefined>;
|
|
@@ -1338,7 +1338,7 @@ declare class NgtsText {
|
|
|
1338
1338
|
* Configuration options for text appearance and behavior.
|
|
1339
1339
|
*/
|
|
1340
1340
|
options: _angular_core.InputSignalWithTransform<NgtsTextOptions, "" | Partial<NgtsTextOptions>>;
|
|
1341
|
-
protected parameters: _angular_core.Signal<Omit<NgtsTextOptions, "
|
|
1341
|
+
protected parameters: _angular_core.Signal<Omit<NgtsTextOptions, "font" | "fontSize" | "sdfGlyphSize" | "anchorX" | "anchorY" | "characters">>;
|
|
1342
1342
|
/**
|
|
1343
1343
|
* Emitted when the text has been synced and is ready for rendering.
|
|
1344
1344
|
* Returns the Troika Text mesh instance.
|
|
@@ -195,7 +195,7 @@ declare class NgtsMeshPortalMaterial {
|
|
|
195
195
|
* Configuration options for the portal material.
|
|
196
196
|
*/
|
|
197
197
|
options: _angular_core.InputSignalWithTransform<NgtsMeshPortalMaterialOptions, "" | Partial<NgtsMeshPortalMaterialOptions>>;
|
|
198
|
-
protected parameters: _angular_core.Signal<Omit<NgtsMeshPortalMaterialOptions, "resolution" | "blur" | "
|
|
198
|
+
protected parameters: _angular_core.Signal<Omit<NgtsMeshPortalMaterialOptions, "resolution" | "blur" | "worldUnits" | "eventPriority" | "renderPriority" | "events">>;
|
|
199
199
|
protected blur: _angular_core.Signal<number>;
|
|
200
200
|
protected eventPriority: _angular_core.Signal<number>;
|
|
201
201
|
protected renderPriority: _angular_core.Signal<number>;
|
|
@@ -418,7 +418,7 @@ declare class NgtsMeshRefractionMaterial {
|
|
|
418
418
|
* Configuration options for the refraction material.
|
|
419
419
|
*/
|
|
420
420
|
options: _angular_core.InputSignalWithTransform<NgtsMeshRefractionMaterialOptions, "" | Partial<NgtsMeshRefractionMaterialOptions>>;
|
|
421
|
-
protected parameters: _angular_core.Signal<Omit<NgtsMeshRefractionMaterialOptions, "
|
|
421
|
+
protected parameters: _angular_core.Signal<Omit<NgtsMeshRefractionMaterialOptions, "fastChroma" | "aberrationStrength">>;
|
|
422
422
|
private fastChroma;
|
|
423
423
|
protected aberrationStrength: _angular_core.Signal<number>;
|
|
424
424
|
/** Reference to the underlying MeshRefractionMaterial element. */
|
|
@@ -694,7 +694,7 @@ declare class NgtsHTMLImpl {
|
|
|
694
694
|
* HTML anchor configuration including position, occlusion, and transform settings.
|
|
695
695
|
*/
|
|
696
696
|
options: _angular_core.InputSignalWithTransform<NgtsHTMLOptions, "" | Partial<NgtsHTMLOptions>>;
|
|
697
|
-
protected parameters: _angular_core.Signal<Omit<NgtsHTMLOptions, "
|
|
697
|
+
protected parameters: _angular_core.Signal<Omit<NgtsHTMLOptions, "castShadow" | "receiveShadow" | "transform" | "occlude">>;
|
|
698
698
|
/** Reference to the THREE.Group that serves as the 3D anchor point */
|
|
699
699
|
groupRef: _angular_core.Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
|
|
700
700
|
/** Reference to the occlusion mesh (when using blending occlusion mode) */
|
|
@@ -704,7 +704,7 @@ declare class NgtsHTMLImpl {
|
|
|
704
704
|
protected castShadow: _angular_core.Signal<boolean>;
|
|
705
705
|
protected receiveShadow: _angular_core.Signal<boolean>;
|
|
706
706
|
/** Current occlusion mode setting */
|
|
707
|
-
occlude: _angular_core.Signal<boolean | THREE.Object3D<THREE.Object3DEventMap>[] | "
|
|
707
|
+
occlude: _angular_core.Signal<boolean | "raycast" | THREE.Object3D<THREE.Object3DEventMap>[] | "blending" | ElementRef<THREE.Object3D<THREE.Object3DEventMap>>[]>;
|
|
708
708
|
/** Whether CSS 3D transform mode is enabled */
|
|
709
709
|
transform: _angular_core.Signal<boolean>;
|
|
710
710
|
isRaycastOcclusion: _angular_core.Signal<boolean | 0>;
|
|
@@ -980,7 +980,7 @@ declare class NgtsSampler {
|
|
|
980
980
|
* Sampler configuration including count, weight attribute, and transform function.
|
|
981
981
|
*/
|
|
982
982
|
options: _angular_core.InputSignalWithTransform<NgtsSamplerOptions, "" | Partial<NgtsSamplerOptions>>;
|
|
983
|
-
protected parameters: _angular_core.Signal<Omit<NgtsSamplerOptions, "
|
|
983
|
+
protected parameters: _angular_core.Signal<Omit<NgtsSamplerOptions, "count" | "transform" | "weight">>;
|
|
984
984
|
groupRef: _angular_core.Signal<ElementRef<THREE.Group<THREE.Object3DEventMap>>>;
|
|
985
985
|
private count;
|
|
986
986
|
private weight;
|
|
@@ -340,7 +340,7 @@ declare class NgtsInstances {
|
|
|
340
340
|
*/
|
|
341
341
|
options: _angular_core.InputSignalWithTransform<NgtsInstancesOptions, "" | Partial<NgtsInstancesOptions>>;
|
|
342
342
|
/** @internal */
|
|
343
|
-
protected parameters: _angular_core.Signal<Omit<NgtsInstancesOptions, "
|
|
343
|
+
protected parameters: _angular_core.Signal<Omit<NgtsInstancesOptions, "limit" | "frames" | "range">>;
|
|
344
344
|
/**
|
|
345
345
|
* Reference to the underlying THREE.InstancedMesh element.
|
|
346
346
|
*/
|
|
@@ -544,7 +544,7 @@ declare class NgtsPointsInstances {
|
|
|
544
544
|
/**
|
|
545
545
|
* Computed parameters passed to the underlying Points object.
|
|
546
546
|
*/
|
|
547
|
-
parameters: _angular_core.Signal<Omit<NgtsPointsInstancesOptions, "
|
|
547
|
+
parameters: _angular_core.Signal<Omit<NgtsPointsInstancesOptions, "limit" | "range">>;
|
|
548
548
|
/**
|
|
549
549
|
* Reference to the underlying THREE.Points element.
|
|
550
550
|
*/
|
|
@@ -209,9 +209,9 @@ interface MeshRefractionMaterialOptions {
|
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
211
211
|
declare const MeshRefractionMaterial: (new (parameters?: (THREE.ShaderMaterialParameters & Partial<{
|
|
212
|
-
[name: string]: number | boolean | any[] | THREE.
|
|
212
|
+
[name: string]: number | boolean | any[] | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | THREE.Color | null;
|
|
213
213
|
}>) | undefined) => THREE.ShaderMaterial & {
|
|
214
|
-
[name: string]: number | boolean | any[] | THREE.
|
|
214
|
+
[name: string]: number | boolean | any[] | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | THREE.Color | null;
|
|
215
215
|
}) & {
|
|
216
216
|
key: string;
|
|
217
217
|
};
|