angular-three-soba 4.2.1 → 4.2.2
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-abstractions.mjs +98 -98
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +26 -26
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +32 -32
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-gizmos.mjs +119 -119
- package/fesm2022/angular-three-soba-gizmos.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +6 -6
- package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-materials.mjs +75 -75
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +70 -70
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performances.mjs +67 -67
- package/fesm2022/angular-three-soba-performances.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +257 -257
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba-stats.mjs +5 -5
- package/fesm2022/angular-three-soba-stats.mjs.map +1 -1
- package/package.json +3 -2
- package/types/angular-three-soba-misc.d.ts +6 -1
- package/types/angular-three-soba-staging.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-three-soba-staging.mjs","sources":["../../../../libs/soba/staging/src/lib/accumulative-shadows.ts","../../../../libs/soba/staging/src/lib/backdrop.ts","../../../../libs/soba/staging/src/lib/bb-anchor.ts","../../../../libs/soba/staging/src/lib/bounds.ts","../../../../libs/soba/staging/src/lib/camera-shake.ts","../../../../libs/soba/staging/src/lib/caustics.ts","../../../../libs/soba/staging/src/lib/center.ts","../../../../libs/soba/staging/src/lib/cloud.ts","../../../../libs/soba/staging/src/lib/contact-shadows.ts","../../../../libs/soba/staging/src/lib/environment/environment-resource.ts","../../../../libs/soba/staging/src/lib/environment/environment.ts","../../../../libs/soba/staging/src/lib/environment/inject-environment.ts","../../../../libs/soba/staging/src/lib/float.ts","../../../../libs/soba/staging/src/lib/lightformer.ts","../../../../libs/soba/staging/src/lib/mask.ts","../../../../libs/soba/staging/src/lib/matcap-texture.ts","../../../../libs/soba/staging/src/lib/normal-texture.ts","../../../../libs/soba/staging/src/lib/randomized-lights.ts","../../../../libs/soba/staging/src/lib/render-texture.ts","../../../../libs/soba/staging/src/lib/shadow.ts","../../../../libs/soba/staging/src/lib/sky.ts","../../../../libs/soba/staging/src/lib/sparkles.ts","../../../../libs/soba/staging/src/lib/spot-light.ts","../../../../libs/soba/staging/src/lib/stage.ts","../../../../libs/soba/staging/src/angular-three-soba-staging.ts"],"sourcesContent":["import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { NgtThreeElements, beforeRender, extend, getInstanceState, injectStore, omit, pick } from 'angular-three';\nimport { ProgressiveLightMap, SoftShadowMaterial } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsAccumulativeShadows component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsAccumulativeShadowsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames it can render. More frames yield cleaner results but take more time.\n\t * @default 40\n\t */\n\tframes: number;\n\t/**\n\t * If frames === Infinity, blend controls the refresh ratio.\n\t * @default 20\n\t */\n\tblend: number;\n\t/**\n\t * Limits the amount of frames rendered when frames === Infinity.\n\t * Useful for getting performance back once a movable scene has settled.\n\t * @default Infinity\n\t */\n\tlimit: number;\n\t/**\n\t * Scale of the shadow plane.\n\t * @default 10\n\t */\n\tscale: number;\n\t/**\n\t * When enabled, accumulates shadows over time which is more performant\n\t * but has visual regression compared to instant results.\n\t * @default false\n\t */\n\ttemporal?: boolean;\n\t/**\n\t * Opacity of the shadow plane.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Alpha test threshold for discarding pixels.\n\t * @default 0.75\n\t */\n\talphaTest: number;\n\t/**\n\t * Shadow color.\n\t * @default 'black'\n\t */\n\tcolor: string;\n\t/**\n\t * Color blend factor. Controls how much colors turn to black (0 is fully black).\n\t * @default 2\n\t */\n\tcolorBlend: number;\n\t/**\n\t * Buffer resolution for shadow rendering.\n\t * @default 1024\n\t */\n\tresolution: number;\n\t/**\n\t * Whether the texture is tone mapped.\n\t * @default true\n\t */\n\ttoneMapped: boolean;\n}\n\nconst defaultOptions: NgtsAccumulativeShadowsOptions = {\n\ttemporal: false,\n\tframes: 40,\n\tlimit: Infinity,\n\tblend: 20,\n\tscale: 10,\n\topacity: 1,\n\talphaTest: 0.75,\n\tcolor: 'black',\n\tcolorBlend: 2,\n\tresolution: 1024,\n\ttoneMapped: true,\n};\n\n/**\n * A component that renders soft, accumulative shadows by rendering the scene\n * multiple times from the light's perspective and blending the results.\n *\n * This creates high-quality soft shadows that can be accumulated over multiple\n * frames for better visual quality.\n *\n * @example\n * ```html\n * <ngts-accumulative-shadows [options]=\"{ temporal: true, frames: 100 }\">\n * <ngts-randomized-lights [options]=\"{ amount: 8, position: [5, 5, -10] }\" />\n * </ngts-accumulative-shadows>\n * ```\n */\n@Component({\n\tselector: 'ngts-accumulative-shadows',\n\ttemplate: `\n\t\t<ngt-group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #lights [traverse]=\"nullTraversal\">\n\t\t\t\t<ng-content />\n\t\t\t</ngt-group>\n\n\t\t\t<ngt-mesh #plane [scale]=\"scale()\" [rotation]=\"[-Math.PI / 2, 0, 0]\" receiveShadow>\n\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t<ngt-soft-shadow-material\n\t\t\t\t\t[depthWrite]=\"false\"\n\t\t\t\t\t[toneMapped]=\"toneMapped()\"\n\t\t\t\t\t[color]=\"color()\"\n\t\t\t\t\t[blend]=\"colorBlend()\"\n\t\t\t\t\t[map]=\"map()\"\n\t\t\t\t\ttransparent\n\t\t\t\t/>\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsAccumulativeShadows {\n\tprotected readonly nullTraversal = () => null;\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tparameters = omit(this.options, [\n\t\t'temporal',\n\t\t'frames',\n\t\t'limit',\n\t\t'blend',\n\t\t'scale',\n\t\t'opacity',\n\t\t'alphaTest',\n\t\t'color',\n\t\t'colorBlend',\n\t\t'resolution',\n\t\t'toneMapped',\n\t]);\n\n\tlightsRef = viewChild.required<ElementRef<THREE.Group>>('lights');\n\tplaneRef =\n\t\tviewChild.required<ElementRef<THREE.Mesh<THREE.PlaneGeometry, InstanceType<typeof SoftShadowMaterial>>>>(\n\t\t\t'plane',\n\t\t);\n\n\tprivate store = injectStore();\n\n\tprivate opacity = pick(this.options, 'opacity');\n\tprivate alphaTest = pick(this.options, 'alphaTest');\n\tprivate limit = pick(this.options, 'limit');\n\tprivate resolution = pick(this.options, 'resolution');\n\n\tprivate previousPLM: ProgressiveLightMap | undefined;\n\tprivate pLM = computed(() => {\n\t\tif (this.previousPLM) {\n\t\t\tthis.previousPLM.clear();\n\t\t}\n\t\treturn (this.previousPLM = new ProgressiveLightMap(this.store.gl(), this.store.scene(), this.resolution()));\n\t});\n\n\tprotected scale = pick(this.options, 'scale');\n\tprotected toneMapped = pick(this.options, 'toneMapped');\n\tprotected color = pick(this.options, 'color');\n\tprotected colorBlend = pick(this.options, 'colorBlend');\n\tprotected map = computed(() => this.pLM().progressiveLightMap2.texture);\n\n\tlightsMap = new Map<string, () => void>();\n\tprivate temporal = computed(() => !!this.options().temporal);\n\tprivate frames = computed(() => Math.max(2, this.options().frames));\n\tprivate blend = computed(() =>\n\t\tMath.max(2, this.options().frames === Infinity ? this.options().blend : this.options().frames),\n\t);\n\tprivate count = 0;\n\n\tconstructor() {\n\t\textend({ Group, SoftShadowMaterial, Mesh, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tthis.pLM().configure(this.planeRef().nativeElement);\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst sceneInstanceState = getInstanceState(this.store.scene());\n\t\t\tif (!sceneInstanceState) return;\n\n\t\t\t// track deps\n\t\t\tthis.planeRef();\n\t\t\tthis.options();\n\t\t\tsceneInstanceState.objects();\n\n\t\t\t// Reset internals, buffers, ...\n\t\t\tthis.reset();\n\t\t\t// Update lightmap\n\n\t\t\t// TODO: (chau) this is a hack. not sure why a timeout is needed here. if not PLM.update\n\t\t\t// is erroring out on some scenes.\n\t\t\tlet timeout: ReturnType<typeof setTimeout>;\n\n\t\t\tif (!this.temporal() && this.frames() !== Infinity) {\n\t\t\t\tconst blend = this.blend();\n\t\t\t\ttimeout = setTimeout(() => this.update(blend));\n\t\t\t}\n\n\t\t\tonCleanup(() => {\n\t\t\t\tif (timeout) clearTimeout(timeout);\n\t\t\t});\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst [frames, temporal, invalidate, limit] = [\n\t\t\t\tthis.frames(),\n\t\t\t\t!!this.temporal(),\n\t\t\t\tthis.store.snapshot.invalidate,\n\t\t\t\tthis.limit(),\n\t\t\t];\n\t\t\tif ((temporal || frames === Infinity) && this.count < frames && this.count < limit) {\n\t\t\t\tinvalidate();\n\t\t\t\tthis.update();\n\t\t\t\tthis.count++;\n\t\t\t}\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.previousPLM?.clear();\n\t\t});\n\t}\n\n\t/**\n\t * Gets the shadow plane mesh element.\n\t *\n\t * @returns The Three.js mesh element used for rendering shadows\n\t */\n\tgetMesh() {\n\t\treturn this.planeRef().nativeElement;\n\t}\n\n\t/**\n\t * Resets the accumulative shadow state.\n\t * Clears buffers, resets opacities, and sets the frame count to 0.\n\t */\n\treset() {\n\t\t// Clear buffers, reset opacities, set frame count to 0\n\t\tuntracked(this.pLM).clear();\n\t\tconst material = untracked(this.planeRef).nativeElement.material;\n\t\tmaterial.opacity = 0;\n\t\tmaterial.alphaTest = 0;\n\t\tthis.count = 0;\n\t}\n\n\t/**\n\t * Updates the shadow accumulation by rendering additional frames.\n\t *\n\t * @param frames - Number of frames to render in this update cycle\n\t */\n\tupdate(frames = 1) {\n\t\t// Adapt the opacity-blend ratio to the number of frames\n\t\tconst material = this.planeRef().nativeElement.material;\n\t\tif (!this.temporal()) {\n\t\t\tmaterial.opacity = this.opacity();\n\t\t\tmaterial.alphaTest = this.alphaTest();\n\t\t} else {\n\t\t\tmaterial.opacity = Math.min(this.opacity(), material.opacity + this.opacity() / this.blend());\n\t\t\tmaterial.alphaTest = Math.min(this.alphaTest(), material.alphaTest + this.alphaTest() / this.blend());\n\t\t}\n\n\t\t// Switch accumulative lights on\n\t\tthis.lightsRef().nativeElement.visible = true;\n\t\t// Collect scene lights and meshes\n\t\tthis.pLM().prepare();\n\n\t\t// Update the lightmap and the accumulative lights\n\t\tfor (let i = 0; i < frames; i++) {\n\t\t\tthis.lightsMap.forEach((lightUpdate) => lightUpdate());\n\t\t\tthis.pLM().update(this.store.snapshot.camera, this.blend());\n\t\t}\n\t\t// Switch lights off\n\t\tthis.lightsRef().nativeElement.visible = false;\n\t\t// Restore lights and meshes\n\t\tthis.pLM().finish();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { checkUpdate, extend, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry } from 'three';\n\nfunction easeInExpo(x: number) {\n\treturn x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n}\n\n/**\n * Configuration options for the NgtsBackdrop component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBackdropOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * The floor extension factor. Controls how far the backdrop extends on the floor.\n\t * @default 0.25\n\t */\n\tfloor: number;\n\t/**\n\t * Number of segments for the backdrop geometry. Higher values create smoother curves.\n\t * @default 20\n\t */\n\tsegments: number;\n\t/**\n\t * Whether the backdrop should receive shadows from other objects.\n\t * @default undefined\n\t */\n\treceiveShadow?: boolean;\n}\n\nconst defaultOptions: NgtsBackdropOptions = {\n\tfloor: 0.25,\n\tsegments: 20,\n};\n\n/**\n * A curved backdrop component that creates a seamless background surface.\n * The backdrop curves from vertical to horizontal using an exponential easing function,\n * creating a smooth transition perfect for product showcases or studio-like scenes.\n *\n * @example\n * ```html\n * <ngts-backdrop [options]=\"{ floor: 0.25, segments: 20, receiveShadow: true }\">\n * <ngt-mesh-standard-material color=\"#353540\" />\n * </ngts-backdrop>\n * ```\n */\n@Component({\n\tselector: 'ngts-backdrop',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-mesh [receiveShadow]=\"receiveShadow()\" [rotation]=\"[-Math.PI / 2, 0, Math.PI / 2]\">\n\t\t\t\t<ngt-plane-geometry #plane *args=\"[1, 1, segments(), segments()]\" />\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsBackdrop {\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['floor', 'segments', 'receiveShadow']);\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tplaneRef = viewChild<ElementRef<THREE.PlaneGeometry>>('plane');\n\n\tprotected receiveShadow = pick(this.options, 'receiveShadow');\n\tprotected segments = pick(this.options, 'segments');\n\tprivate floor = pick(this.options, 'floor');\n\n\tconstructor() {\n\t\textend({ Group, Mesh, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tconst plane = this.planeRef()?.nativeElement;\n\t\t\tif (!plane) return;\n\n\t\t\tconst [segments, floor] = [this.segments(), this.floor()];\n\n\t\t\tlet i = 0;\n\t\t\tconst offset = segments / segments / 2;\n\t\t\tconst position = plane.attributes['position'] as THREE.BufferAttribute;\n\t\t\tfor (let x = 0; x < segments + 1; x++) {\n\t\t\t\tfor (let y = 0; y < segments + 1; y++) {\n\t\t\t\t\tposition.setXYZ(\n\t\t\t\t\t\ti++,\n\t\t\t\t\t\tx / segments - offset + (x === 0 ? -floor : 0),\n\t\t\t\t\t\ty / segments - offset,\n\t\t\t\t\t\teaseInExpo(x / segments),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcheckUpdate(position);\n\t\t\tplane.computeVertexNormals();\n\t\t});\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { NgtThreeElements, NgtVector3, beforeRender, extend, getInstanceState, omit, vector3 } from 'angular-three';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\nconst boundingBox = new THREE.Box3();\nconst boundingBoxSize = new THREE.Vector3();\n\n/**\n * Configuration options for the NgtsBBAnchor component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBBAnchorOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * The anchor point relative to the parent's bounding box.\n\t * Values range from -1 to 1 for each axis, where:\n\t * - (-1, -1, -1) is the bottom-left-back corner\n\t * - (1, 1, 1) is the top-right-front corner\n\t * - (0, 0, 0) is the center\n\t */\n\tanchor: NgtVector3;\n}\n\n/**\n * A component that anchors its children relative to the parent's bounding box.\n * The anchor position is updated every frame based on the parent's current bounding box,\n * making it useful for attaching labels, UI elements, or other objects to dynamic meshes.\n *\n * The component automatically reattaches itself to the parent's parent to avoid\n * affecting the bounding box calculation.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngts-bb-anchor [options]=\"{ anchor: [1, 1, 1] }\">\n * <ngts-html>\n * <span>Top-right-front corner</span>\n * </ngts-html>\n * </ngts-bb-anchor>\n * </ngt-mesh>\n * ```\n */\n@Component({\n\tselector: 'ngts-bb-anchor',\n\ttemplate: `\n\t\t<ngt-group #bbAnchor [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 NgtsBBAnchor {\n\toptions = input.required<NgtsBBAnchorOptions>();\n\tparameters = omit(this.options, ['anchor']);\n\n\tbbAnchorRef = viewChild.required<ElementRef<THREE.Group>>('bbAnchor');\n\n\tprivate parent = signal<THREE.Object3D | null>(null);\n\tprivate anchor = vector3(this.options, 'anchor');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\t// Reattach group created by this component to the parent's parent,\n\t\t// so it becomes a sibling of its initial parent.\n\t\t// We do that so the children have no impact on a bounding box of a parent.\n\t\teffect(() => {\n\t\t\tconst bbAnchorInstanceState = getInstanceState(this.bbAnchorRef().nativeElement);\n\t\t\tconst bbAnchorParent = bbAnchorInstanceState?.parent();\n\t\t\tif (bbAnchorParent && 'parent' in bbAnchorParent) {\n\t\t\t\tthis.parent.set(bbAnchorParent as unknown as THREE.Object3D);\n\t\t\t\tbbAnchorParent['parent'].add(this.bbAnchorRef().nativeElement);\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst parent = this.parent();\n\t\t\tif (parent) {\n\t\t\t\tboundingBox.setFromObject(parent);\n\t\t\t\tboundingBox.getSize(boundingBoxSize);\n\n\t\t\t\tconst anchor = this.anchor();\n\t\t\t\tconst bbAnchor = this.bbAnchorRef().nativeElement;\n\n\t\t\t\tbbAnchor.position.set(\n\t\t\t\t\tparent.position.x + (boundingBoxSize.x * anchor.x) / 2,\n\t\t\t\t\tparent.position.y + (boundingBoxSize.y * anchor.y) / 2,\n\t\t\t\t\tparent.position.z + (boundingBoxSize.z * anchor.z) / 2,\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, injectStore, is, NgtThreeElements, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\ninterface ControlsProto {\n\tupdate(): void;\n\n\ttarget: THREE.Vector3;\n\tmaxDistance: number;\n\taddEventListener: (event: string, callback: (event: any) => void) => void;\n\tremoveEventListener: (event: string, callback: (event: any) => void) => void;\n}\n\nenum AnimationState {\n\tNONE = 0,\n\tSTART = 1,\n\tACTIVE = 2,\n}\n\nfunction interpolateFuncDefault(t: number) {\n\t// Imitates the previously used THREE.MathUtils.damp\n\treturn 1 - Math.exp(-5 * t) + 0.007 * t;\n}\n\n/**\n * Configuration options for the NgtsBounds component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBoundsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Maximum duration of the camera animation in seconds.\n\t * @default 1.0\n\t */\n\tmaxDuration: number;\n\t/**\n\t * Margin factor applied to the calculated camera distance.\n\t * Values > 1 add padding around the bounds.\n\t * @default 1.2\n\t */\n\tmargin: number;\n\t/**\n\t * When enabled, automatically recalculates bounds when children change.\n\t * @default false\n\t */\n\tobserve: boolean;\n\t/**\n\t * When enabled, automatically fits the camera to the bounds on initialization.\n\t * @default false\n\t */\n\tfit: boolean;\n\t/**\n\t * When enabled, automatically adjusts camera near/far planes to the bounds.\n\t * @default false\n\t */\n\tclip: boolean;\n\t/**\n\t * Custom interpolation function for camera animation.\n\t * Takes a value from 0 to 1 and returns an interpolated value.\n\t * @default Damping-based interpolation function\n\t */\n\tinterpolateFunc: (t: number) => number;\n}\n\nconst defaultOptions: NgtsBoundsOptions = {\n\tmaxDuration: 1.0,\n\tmargin: 1.2,\n\tinterpolateFunc: interpolateFuncDefault,\n\tclip: false,\n\tfit: false,\n\tobserve: false,\n};\n\n/**\n * A component that calculates the bounding box of its children and provides\n * methods to animate the camera to fit those bounds. Useful for focusing\n * the camera on specific objects or automatically framing content.\n *\n * Supports both perspective and orthographic cameras with appropriate\n * handling for each camera type.\n *\n * @example\n * ```html\n * <ngts-bounds [options]=\"{ fit: true, clip: true, observe: true }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-bounds>\n * ```\n */\n@Component({\n\tselector: 'ngts-bounds',\n\ttemplate: `\n\t\t<ngt-group #group>\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 NgtsBounds {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate store = injectStore();\n\n\tprivate clipOption = pick(this.options, 'clip');\n\tprivate fitOption = pick(this.options, 'fit');\n\tprivate observe = pick(this.options, 'observe');\n\n\tprivate origin = {\n\t\tcamPos: new THREE.Vector3(),\n\t\tcamRot: new THREE.Quaternion(),\n\t\tcamZoom: 1,\n\t};\n\tprivate goal = {\n\t\tcamPos: undefined as THREE.Vector3 | undefined,\n\t\tcamRot: undefined as THREE.Quaternion | undefined,\n\t\tcamZoom: undefined as number | undefined,\n\t\tcamUp: undefined as THREE.Vector3 | undefined,\n\t\ttarget: undefined as THREE.Vector3 | undefined,\n\t};\n\tprivate animationState = AnimationState.NONE;\n\n\t// represent animation state from 0 to 1\n\tprivate t = 0;\n\tprivate box = new THREE.Box3();\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [controls, camera] = [this.store.controls() as unknown as ControlsProto, this.store.snapshot.camera];\n\t\t\tif (!controls) return;\n\n\t\t\tconst callback = () => {\n\t\t\t\tif (this.goal.target && this.animationState !== AnimationState.NONE) {\n\t\t\t\t\tconst front = new THREE.Vector3().setFromMatrixColumn(camera.matrix, 2);\n\t\t\t\t\tconst d0 = this.origin.camPos.distanceTo(controls.target);\n\t\t\t\t\tconst d1 = (this.goal.camPos || this.origin.camPos).distanceTo(this.goal.target);\n\t\t\t\t\tconst d = (1 - this.t) * d0 + this.t * d1;\n\n\t\t\t\t\tcontrols.target.copy(camera.position).addScaledVector(front, -d);\n\t\t\t\t\tcontrols.update();\n\t\t\t\t}\n\n\t\t\t\tthis.animationState = AnimationState.NONE;\n\t\t\t};\n\n\t\t\tcontrols.addEventListener('start', callback);\n\t\t\tonCleanup(() => controls.removeEventListener('start', callback));\n\t\t});\n\n\t\tlet count = 0;\n\t\teffect(() => {\n\t\t\tconst [clip, fit, observe] = [\n\t\t\t\tthis.clipOption(),\n\t\t\t\tthis.fitOption(),\n\t\t\t\tthis.observe(),\n\t\t\t\tthis.store.size(),\n\t\t\t\tthis.store.camera(),\n\t\t\t\tthis.store.controls(),\n\t\t\t];\n\n\t\t\tif (observe || count++ === 0) {\n\t\t\t\tthis.refresh();\n\t\t\t\tif (fit) this.reset().fit();\n\t\t\t\tif (clip) this.clip();\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(({ delta }) => {\n\t\t\t// This [additional animation step START] is needed to guarantee that delta used in animation isn't absurdly high (2-3 seconds) which is actually possible if rendering happens on demand...\n\t\t\tif (this.animationState === AnimationState.START) {\n\t\t\t\tthis.animationState = AnimationState.ACTIVE;\n\t\t\t\tthis.store.snapshot.invalidate();\n\t\t\t} else if (this.animationState === AnimationState.ACTIVE) {\n\t\t\t\tconst [{ maxDuration, interpolateFunc }, camera, controls, invalidate] = [\n\t\t\t\t\tthis.options(),\n\t\t\t\t\tthis.store.snapshot.camera,\n\t\t\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\t\t\tthis.store.snapshot.invalidate,\n\t\t\t\t];\n\t\t\t\tthis.t += delta / maxDuration;\n\n\t\t\t\tif (this.t >= 1) {\n\t\t\t\t\tthis.goal.camPos && camera.position.copy(this.goal.camPos);\n\t\t\t\t\tthis.goal.camRot && camera.quaternion.copy(this.goal.camRot);\n\t\t\t\t\tthis.goal.camUp && camera.up.copy(this.goal.camUp);\n\t\t\t\t\tthis.goal.camZoom && is.orthographicCamera(camera) && (camera.zoom = this.goal.camZoom);\n\n\t\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\t\tcamera.updateProjectionMatrix();\n\n\t\t\t\t\tif (controls && this.goal.target) {\n\t\t\t\t\t\tcontrols.target.copy(this.goal.target);\n\t\t\t\t\t\tcontrols.update();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.animationState = AnimationState.NONE;\n\t\t\t\t} else {\n\t\t\t\t\tconst k = interpolateFunc(this.t);\n\n\t\t\t\t\tthis.goal.camPos && camera.position.lerpVectors(this.origin.camPos, this.goal.camPos, k);\n\t\t\t\t\tthis.goal.camRot && camera.quaternion.slerpQuaternions(this.origin.camRot, this.goal.camRot, k);\n\t\t\t\t\tthis.goal.camUp && camera.up.set(0, 1, 0).applyQuaternion(camera.quaternion);\n\t\t\t\t\tthis.goal.camZoom &&\n\t\t\t\t\t\tis.orthographicCamera(camera) &&\n\t\t\t\t\t\t(camera.zoom = (1 - k) * this.origin.camZoom + k * this.goal.camZoom);\n\n\t\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\tinvalidate();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Gets the current size information of the bounds.\n\t *\n\t * @returns An object containing the bounding box, size vector, center point, and calculated camera distance\n\t */\n\tgetSize() {\n\t\tconst [camera, { margin }] = [this.store.snapshot.camera, untracked(this.options)];\n\n\t\tconst boxSize = this.box.getSize(new THREE.Vector3());\n\t\tconst center = this.box.getCenter(new THREE.Vector3());\n\t\tconst maxSize = Math.max(boxSize.x, boxSize.y, boxSize.z);\n\t\tconst fitHeightDistance = is.orthographicCamera(camera)\n\t\t\t? maxSize * 4\n\t\t\t: maxSize / (2 * Math.atan((Math.PI * camera.fov) / 360));\n\t\tconst fitWidthDistance = is.orthographicCamera(camera) ? maxSize * 4 : fitHeightDistance / camera.aspect;\n\t\tconst distance = margin * Math.max(fitHeightDistance, fitWidthDistance);\n\n\t\treturn { box: this.box, size: boxSize, center, distance };\n\t}\n\n\t/**\n\t * Refreshes the bounding box calculation from the given object or the component's children.\n\t *\n\t * @param object - Optional object or Box3 to calculate bounds from. If not provided, uses the component's group.\n\t * @returns This instance for method chaining\n\t */\n\trefresh(object?: THREE.Object3D | THREE.Box3) {\n\t\tconst [group, camera] = [untracked(this.groupRef).nativeElement, this.store.snapshot.camera];\n\n\t\tif (is.three<THREE.Box3>(object, 'isBox3')) this.box.copy(object);\n\t\telse {\n\t\t\tconst target = object || group;\n\t\t\tif (!target) return this;\n\t\t\ttarget.updateWorldMatrix(true, true);\n\t\t\tthis.box.setFromObject(target);\n\t\t}\n\t\tif (this.box.isEmpty()) {\n\t\t\tconst max = camera.position.length() || 10;\n\t\t\tthis.box.setFromCenterAndSize(new THREE.Vector3(), new THREE.Vector3(max, max, max));\n\t\t}\n\n\t\tthis.origin.camPos.copy(camera.position);\n\t\tthis.origin.camRot.copy(camera.quaternion);\n\t\tis.orthographicCamera(camera) && (this.origin.camZoom = camera.zoom);\n\n\t\tthis.goal.camPos = undefined;\n\t\tthis.goal.camRot = undefined;\n\t\tthis.goal.camZoom = undefined;\n\t\tthis.goal.camUp = undefined;\n\t\tthis.goal.target = undefined;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Resets and animates the camera to fit the current bounds while maintaining\n\t * the current viewing direction.\n\t *\n\t * @returns This instance for method chaining\n\t */\n\treset() {\n\t\tconst [camera] = [this.store.snapshot.camera];\n\t\tconst { center, distance } = this.getSize();\n\n\t\tconst direction = camera.position.clone().sub(center).normalize();\n\t\tthis.goal.camPos = center.clone().addScaledVector(direction, distance);\n\t\tthis.goal.target = center.clone();\n\t\tconst mCamRot = new THREE.Matrix4().lookAt(this.goal.camPos, this.goal.target, camera.up);\n\t\tthis.goal.camRot = new THREE.Quaternion().setFromRotationMatrix(mCamRot);\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Animates the camera to a new position.\n\t *\n\t * @param position - Target position as a Vector3 or [x, y, z] array\n\t * @returns This instance for method chaining\n\t */\n\tmoveTo(position: THREE.Vector3 | [number, number, number]) {\n\t\tthis.goal.camPos = Array.isArray(position) ? new THREE.Vector3(...position) : position.clone();\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Animates the camera to look at a target position with optional up vector.\n\t *\n\t * @param params - Object containing target position and optional up vector\n\t * @param params.target - The point to look at as a Vector3 or [x, y, z] array\n\t * @param params.up - Optional up vector as a Vector3 or [x, y, z] array\n\t * @returns This instance for method chaining\n\t */\n\tlookAt({\n\t\ttarget,\n\t\tup,\n\t}: {\n\t\ttarget: THREE.Vector3 | [number, number, number];\n\t\tup?: THREE.Vector3 | [number, number, number];\n\t}) {\n\t\tconst [camera] = [this.store.snapshot.camera];\n\n\t\tthis.goal.target = Array.isArray(target) ? new THREE.Vector3(...target) : target.clone();\n\t\tif (up) {\n\t\t\tthis.goal.camUp = Array.isArray(up) ? new THREE.Vector3(...up) : up.clone();\n\t\t} else {\n\t\t\tthis.goal.camUp = camera.up.clone();\n\t\t}\n\t\tconst mCamRot = new THREE.Matrix4().lookAt(\n\t\t\tthis.goal.camPos || camera.position,\n\t\t\tthis.goal.target,\n\t\t\tthis.goal.camUp,\n\t\t);\n\t\tthis.goal.camRot = new THREE.Quaternion().setFromRotationMatrix(mCamRot);\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Fits the camera to the bounds by adjusting zoom (for orthographic cameras)\n\t * or position (for perspective cameras).\n\t *\n\t * For orthographic cameras, this only adjusts the zoom level while preserving position.\n\t * For perspective cameras, this behaves the same as reset().\n\t *\n\t * @returns This instance for method chaining\n\t */\n\tfit() {\n\t\tconst [camera, controls, { margin }] = [\n\t\t\tthis.store.snapshot.camera,\n\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\tuntracked(this.options),\n\t\t];\n\n\t\tif (!is.orthographicCamera(camera)) {\n\t\t\t// For non-orthographic cameras, fit should behave exactly like reset\n\t\t\treturn this.reset();\n\t\t}\n\n\t\t// For orthographic cameras, fit should only modify the zoom value\n\t\tlet maxHeight = 0;\n\t\tlet maxWidth = 0;\n\t\tconst vertices = [\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.min.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.max.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.min.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.max.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.max.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.max.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.min.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.min.y, this.box.min.z),\n\t\t];\n\n\t\t// Transform the center and each corner to camera space\n\t\tconst pos = this.goal.camPos || camera.position;\n\t\tconst target = this.goal.target || controls.target;\n\t\tconst up = this.goal.camUp || camera.up;\n\t\tconst mCamWInv = target\n\t\t\t? new THREE.Matrix4().lookAt(pos, target, up).setPosition(pos).invert()\n\t\t\t: camera.matrixWorldInverse;\n\t\tfor (const v of vertices) {\n\t\t\tv.applyMatrix4(mCamWInv);\n\t\t\tmaxHeight = Math.max(maxHeight, Math.abs(v.y));\n\t\t\tmaxWidth = Math.max(maxWidth, Math.abs(v.x));\n\t\t}\n\t\tmaxHeight *= 2;\n\t\tmaxWidth *= 2;\n\t\tconst zoomForHeight = (camera.top - camera.bottom) / maxHeight;\n\t\tconst zoomForWidth = (camera.right - camera.left) / maxWidth;\n\n\t\tthis.goal.camZoom = Math.min(zoomForHeight, zoomForWidth) / margin;\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adjusts the camera's near and far clipping planes based on the current bounds.\n\t * Also updates the controls' maxDistance if controls are present.\n\t *\n\t * @returns This instance for method chaining\n\t */\n\tclip() {\n\t\tconst [camera, controls, invalidate] = [\n\t\t\tthis.store.snapshot.camera,\n\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\tthis.store.snapshot.invalidate,\n\t\t];\n\t\tconst { distance } = this.getSize();\n\n\t\tcamera.near = distance / 100;\n\t\tcamera.far = distance * 100;\n\t\tcamera.updateProjectionMatrix();\n\n\t\tif (controls) {\n\t\t\tcontrols.maxDistance = distance * 10;\n\t\t\tcontrols.update();\n\t\t}\n\n\t\tinvalidate();\n\n\t\treturn this;\n\t}\n}\n","import { computed, Directive, effect, input } from '@angular/core';\nimport { beforeRender, injectStore } from 'angular-three';\nimport { CameraShake } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\n\n/**\n * Internal interface describing the camera controls protocol.\n * Used to detect and synchronize with orbit controls or similar camera control systems.\n *\n * @internal\n */\ninterface ControlsProto {\n\t/** Updates the controls state. */\n\tupdate(): void;\n\t/** The target point the camera is looking at. */\n\ttarget: THREE.Vector3;\n\t/** Adds an event listener for control events. */\n\taddEventListener: (event: string, callback: (event: any) => void) => void;\n\t/** Removes an event listener for control events. */\n\tremoveEventListener: (event: string, callback: (event: any) => void) => void;\n}\n\n/**\n * Configuration options for the NgtsCameraShake directive.\n * Provides settings for controlling camera shake intensity and frequency.\n *\n * Available options include:\n * - `intensity`: Overall shake strength multiplier (default: 1)\n * - `decayRate`: How quickly the shake fades out (default: 0.65)\n * - `maxYaw`: Maximum rotation on the y-axis in radians (default: 0.1)\n * - `maxPitch`: Maximum rotation on the x-axis in radians (default: 0.1)\n * - `maxRoll`: Maximum rotation on the z-axis in radians (default: 0.1)\n * - `yawFrequency`: Frequency of yaw oscillation (default: 0.1)\n * - `pitchFrequency`: Frequency of pitch oscillation (default: 0.1)\n * - `rollFrequency`: Frequency of roll oscillation (default: 0.1)\n */\nexport type NgtsCameraShakeOptions = Partial<\n\tOmit<CameraShake, 'object' | 'initialRotation' | 'updateInitialRotation' | 'update'>\n>;\n\nconst defaultOptions: NgtsCameraShakeOptions = {\n\tintensity: 1,\n\tdecayRate: 0.65,\n\tmaxYaw: 0.1,\n\tmaxPitch: 0.1,\n\tmaxRoll: 0.1,\n\tyawFrequency: 0.1,\n\tpitchFrequency: 0.1,\n\trollFrequency: 0.1,\n};\n\n/**\n * A directive that adds procedural camera shake effects using simplex noise.\n * Creates cinematic camera movements with configurable intensity, decay, and frequency\n * for yaw, pitch, and roll rotations.\n *\n * The shake is automatically synchronized with any attached camera controls,\n * updating the initial rotation when controls change.\n *\n * @example\n * ```html\n * <ngts-camera-shake\n * [options]=\"{ intensity: 1, maxYaw: 0.1, maxPitch: 0.1, maxRoll: 0.1 }\"\n * #shake=\"cameraShake\"\n * />\n * ```\n */\n@Directive({\n\tselector: 'ngts-camera-shake',\n\texportAs: 'cameraShake',\n})\nexport class NgtsCameraShake {\n\t/** Configuration options for the camera shake effect. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprivate store = injectStore();\n\n\t/**\n\t * The underlying CameraShake instance that performs the actual shake calculations.\n\t * Exposed for advanced usage such as manually triggering or stopping the shake.\n\t */\n\tcameraShaker = computed(() => new CameraShake(this.store.camera()));\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst defaultControls = this.store.controls() as unknown as ControlsProto;\n\t\t\tif (!defaultControls) return;\n\n\t\t\tconst cameraShaker = this.cameraShaker();\n\t\t\tconst callback = () => void cameraShaker.updateInitialRotation();\n\n\t\t\tdefaultControls.addEventListener('change', callback);\n\t\t\tcallback();\n\n\t\t\tonCleanup(() => void defaultControls.removeEventListener('change', callback));\n\t\t});\n\n\t\teffect(() => {\n\t\t\tObject.assign(this.cameraShaker(), this.options());\n\t\t});\n\n\t\tbeforeRender(({ delta, clock }) => {\n\t\t\tconst cameraShaker = this.cameraShaker();\n\t\t\tcameraShaker.update(delta, clock.elapsedTime);\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 { beforeRender, extend, getInstanceState, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { helper, NgtsEdges } from 'angular-three-soba/abstractions';\nimport { fbo } from 'angular-three-soba/misc';\nimport { CausticsProjectionMaterial, createCausticsUpdate } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, LineBasicMaterial, Mesh, OrthographicCamera, PlaneGeometry, Scene } from 'three';\n\nconst NORMAL_OPTIONS = {\n\tdepthBuffer: true,\n\tminFilter: THREE.LinearFilter,\n\tmagFilter: THREE.LinearFilter,\n\ttype: THREE.UnsignedByteType,\n};\n\nconst CAUSTIC_OPTIONS = {\n\tminFilter: THREE.LinearMipmapLinearFilter,\n\tmagFilter: THREE.LinearFilter,\n\ttype: THREE.FloatType,\n\tgenerateMipmaps: true,\n};\n\n/**\n * Configuration options for the NgtsCaustics component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCausticsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames to render. Set to Infinity for continuous runtime rendering.\n\t * @default 1\n\t */\n\tframes: number;\n\t/**\n\t * Enables visual debugging cues including camera helper to help stage the scene.\n\t * @default false\n\t */\n\tdebug: boolean;\n\t/**\n\t * When enabled, displays only caustics and hides the models.\n\t * @default false\n\t */\n\tcausticsOnly: boolean;\n\t/**\n\t * When enabled, includes back face rendering and enables the backsideIOR property.\n\t * @default false\n\t */\n\tbackside: boolean;\n\t/**\n\t * The Index of Refraction (IOR) value for front faces.\n\t * @default 1.1\n\t */\n\tior: number;\n\t/**\n\t * The Index of Refraction (IOR) value for back faces.\n\t * Only used when backside is enabled.\n\t * @default 1.1\n\t */\n\tbacksideIOR: number;\n\t/**\n\t * The world-space texel size for caustic calculations.\n\t * @default 0.3125\n\t */\n\tworldRadius: number;\n\t/**\n\t * Intensity of the projected caustics effect.\n\t * @default 0.05\n\t */\n\tintensity: number;\n\t/**\n\t * Color of the caustics effect.\n\t * @default 'white'\n\t */\n\tcolor: THREE.ColorRepresentation;\n\t/**\n\t * Buffer resolution for caustic texture rendering.\n\t * @default 2024\n\t */\n\tresolution: number;\n\t/**\n\t * Light source position or object. Can be a coordinate array or a reference to a Three.js object.\n\t * The light will point towards the contents' bounding box center.\n\t * @default [5, 5, 5]\n\t */\n\tlightSource:\n\t\t| [x: number, y: number, z: number]\n\t\t| ElementRef<THREE.Object3D | NgtThreeElements['ngt-object3D']>\n\t\t| THREE.Object3D\n\t\t| NgtThreeElements['ngt-object3D'];\n}\n\nconst defaultOptions: NgtsCausticsOptions = {\n\tframes: 1,\n\tdebug: false,\n\tcausticsOnly: false,\n\tbackside: false,\n\tior: 1.1,\n\tbacksideIOR: 1.1,\n\tworldRadius: 0.3125,\n\tintensity: 0.05,\n\tcolor: 'white',\n\tresolution: 2024,\n\tlightSource: [5, 5, 5],\n};\n\n/**\n * A component that renders realistic caustic light patterns on surfaces.\n * Caustics are the light patterns created when light is refracted or reflected\n * by curved transparent surfaces (like water or glass).\n *\n * The component renders the scene from a light's perspective to calculate\n * where light rays converge, then projects these patterns onto a plane.\n *\n * @example\n * ```html\n * <ngts-caustics [options]=\"{ frames: Infinity, intensity: 0.05, color: 'white' }\">\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-physical-material [transmission]=\"1\" [roughness]=\"0\" />\n * </ngt-mesh>\n * </ngts-caustics>\n * ```\n */\n@Component({\n\tselector: 'ngts-caustics',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-scene #scene>\n\t\t\t\t<ngt-orthographic-camera #camera [up]=\"[0, 1, 0]\" />\n\t\t\t\t<ng-content />\n\t\t\t</ngt-scene>\n\n\t\t\t<ngt-mesh #plane [renderOrder]=\"2\" [rotation]=\"[-Math.PI / 2, 0, 0]\">\n\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t<ngt-caustics-projection-material\n\t\t\t\t\ttransparent\n\t\t\t\t\t[color]=\"color()\"\n\t\t\t\t\t[causticsTexture]=\"causticsTarget.texture\"\n\t\t\t\t\t[causticsTextureB]=\"causticsTargetB.texture\"\n\t\t\t\t\t[blending]=\"CustomBlending\"\n\t\t\t\t\t[blendSrc]=\"OneFactor\"\n\t\t\t\t\t[blendDst]=\"SrcAlphaFactor\"\n\t\t\t\t\t[depthWrite]=\"false\"\n\t\t\t\t/>\n\n\t\t\t\t@if (debug()) {\n\t\t\t\t\t<ngts-edges>\n\t\t\t\t\t\t<ngt-line-basic-material color=\"#ffff00\" [toneMapped]=\"false\" />\n\t\t\t\t\t</ngts-edges>\n\t\t\t\t}\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsEdges],\n})\nexport class NgtsCaustics {\n\tprotected readonly Math = Math;\n\tprotected readonly CustomBlending = THREE.CustomBlending;\n\tprotected readonly OneFactor = THREE.OneFactor;\n\tprotected readonly SrcAlphaFactor = THREE.SrcAlphaFactor;\n\n\t/** Configuration options for the caustics effect. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'frames',\n\t\t'debug',\n\t\t'causticsOnly',\n\t\t'backside',\n\t\t'ior',\n\t\t'backsideIOR',\n\t\t'worldRadius',\n\t\t'intensity',\n\t\t'color',\n\t\t'resolution',\n\t\t'lightSource',\n\t]);\n\n\tprotected debug = pick(this.options, 'debug');\n\tprotected color = pick(this.options, 'color');\n\tprivate resolution = pick(this.options, 'resolution');\n\n\t/** Reference to the main group element containing the caustics setup. */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate sceneRef = viewChild.required<ElementRef<THREE.Scene>>('scene');\n\tprivate cameraRef = viewChild.required<ElementRef<THREE.OrthographicCamera>>('camera');\n\tprivate planeRef =\n\t\tviewChild.required<\n\t\t\tElementRef<THREE.Mesh<THREE.PlaneGeometry, InstanceType<typeof CausticsProjectionMaterial>>>\n\t\t>('plane');\n\n\tprivate normalTargetParams = computed(() => ({\n\t\twidth: this.resolution(),\n\t\theight: this.resolution(),\n\t\tsettings: NORMAL_OPTIONS,\n\t}));\n\n\t// Buffers for front and back faces\n\tprivate normalTarget = fbo(this.normalTargetParams);\n\tprivate normalTargetB = fbo(this.normalTargetParams);\n\n\tprivate causticsTargetParams = computed(() => ({\n\t\twidth: this.resolution(),\n\t\theight: this.resolution(),\n\t\tsettings: CAUSTIC_OPTIONS,\n\t}));\n\tprotected causticsTarget = fbo(this.causticsTargetParams);\n\tprotected causticsTargetB = fbo(this.causticsTargetParams);\n\n\tprivate cameraHelper = helper(\n\t\t() => (this.debug() ? this.cameraRef().nativeElement : null),\n\t\t() => THREE.CameraHelper,\n\t);\n\n\tconstructor() {\n\t\textend({\n\t\t\tCausticsProjectionMaterial,\n\t\t\tGroup,\n\t\t\tScene,\n\t\t\tMesh,\n\t\t\tPlaneGeometry,\n\t\t\tLineBasicMaterial,\n\t\t\tOrthographicCamera,\n\t\t});\n\n\t\teffect(() => {\n\t\t\t// track all changes\n\t\t\tconst [group, scene, plane] = [\n\t\t\t\tthis.groupRef().nativeElement,\n\t\t\t\tthis.sceneRef().nativeElement,\n\t\t\t\tthis.planeRef().nativeElement,\n\t\t\t\tthis.options(),\n\t\t\t];\n\t\t\tconst groupInstanceState = getInstanceState(group);\n\t\t\tconst sceneInstanceState = getInstanceState(scene);\n\t\t\tconst planeInstanceState = getInstanceState(plane);\n\n\t\t\tif (!groupInstanceState || !sceneInstanceState || !planeInstanceState) return;\n\n\t\t\tgroupInstanceState.objects();\n\t\t\tsceneInstanceState.objects();\n\t\t\tplaneInstanceState.objects();\n\t\t\tplaneInstanceState.nonObjects();\n\n\t\t\tgroup.updateWorldMatrix(false, true);\n\t\t});\n\n\t\tconst update = createCausticsUpdate(() => {\n\t\t\tconst { lightSource, ...rest } = this.options();\n\n\t\t\treturn {\n\t\t\t\tparams: Object.assign(rest, {\n\t\t\t\t\tlightSource: Array.isArray(lightSource)\n\t\t\t\t\t\t? new THREE.Vector3(...lightSource)\n\t\t\t\t\t\t: (resolveRef(lightSource) as THREE.Object3D),\n\t\t\t\t}),\n\t\t\t\tnormalTarget: this.normalTarget,\n\t\t\t\tnormalTargetB: this.normalTargetB,\n\t\t\t\tcausticsTarget: this.causticsTarget,\n\t\t\t\tcausticsTargetB: this.causticsTargetB,\n\t\t\t\tcamera: this.cameraRef().nativeElement,\n\t\t\t\tscene: this.sceneRef().nativeElement,\n\t\t\t\tgroup: this.groupRef().nativeElement,\n\t\t\t\tplane: this.planeRef().nativeElement,\n\t\t\t\thelper: this.cameraHelper(),\n\t\t\t};\n\t\t});\n\n\t\tbeforeRender(({ gl }) => update(gl));\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\toutput,\n\tviewChild,\n} from '@angular/core';\nimport { extend, getInstanceState, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * State object emitted by the NgtsCenter component when centering is complete.\n * Contains information about the centered content's dimensions and alignment.\n */\nexport interface NgtsCenterState {\n\t/**\n\t * The parent object above the Center component.\n\t */\n\tparent: THREE.Object3D;\n\t/**\n\t * The outermost container group of the Center component.\n\t */\n\tcontainer: THREE.Object3D;\n\t/**\n\t * The width of the bounding box.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the bounding box.\n\t */\n\theight: number;\n\t/**\n\t * The depth of the bounding box.\n\t */\n\tdepth: number;\n\t/**\n\t * The calculated bounding box of the content.\n\t */\n\tboundingBox: THREE.Box3;\n\t/**\n\t * The calculated bounding sphere of the content.\n\t */\n\tboundingSphere: THREE.Sphere;\n\t/**\n\t * The center point of the bounding box.\n\t */\n\tcenter: THREE.Vector3;\n\t/**\n\t * The vertical alignment offset applied.\n\t */\n\tverticalAlignment: number;\n\t/**\n\t * The horizontal alignment offset applied.\n\t */\n\thorizontalAlignment: number;\n\t/**\n\t * The depth alignment offset applied.\n\t */\n\tdepthAlignment: number;\n}\n\n/**\n * Configuration options for the NgtsCenter component.\n */\nexport interface NgtsCenterOptions {\n\t/**\n\t * Aligns content to the top of the bounding box.\n\t */\n\ttop?: boolean;\n\t/**\n\t * Aligns content to the right of the bounding box.\n\t */\n\tright?: boolean;\n\t/**\n\t * Aligns content to the bottom of the bounding box.\n\t */\n\tbottom?: boolean;\n\t/**\n\t * Aligns content to the left of the bounding box.\n\t */\n\tleft?: boolean;\n\t/**\n\t * Aligns content to the front of the bounding box.\n\t */\n\tfront?: boolean;\n\t/**\n\t * Aligns content to the back of the bounding box.\n\t */\n\tback?: boolean;\n\t/**\n\t * Disables centering on all axes.\n\t */\n\tdisable?: boolean;\n\t/**\n\t * Disables centering on the x-axis only.\n\t */\n\tdisableX?: boolean;\n\t/**\n\t * Disables centering on the y-axis only.\n\t */\n\tdisableY?: boolean;\n\t/**\n\t * Disables centering on the z-axis only.\n\t */\n\tdisableZ?: boolean;\n\t/**\n\t * Uses precise bounding box calculation.\n\t * @see https://threejs.org/docs/index.html?q=box3#api/en/math/Box3.setFromObject\n\t * @default true\n\t */\n\tprecise: boolean;\n\t/**\n\t * Optional cache key to prevent recalculation on every render.\n\t * Change this value to force a recalculation.\n\t * @default 0\n\t */\n\tcacheKey: any;\n\t/**\n\t * Optional object to compute the bounding box from instead of the children.\n\t */\n\tobject?: THREE.Object3D | null;\n}\n\nconst defaultOptions: Partial<NgtThreeElements['ngt-group']> & NgtsCenterOptions = {\n\tprecise: true,\n\tcacheKey: 0,\n};\n\n/**\n * A component that automatically centers its children within their bounding box.\n * Supports alignment options for positioning content relative to the bounding box edges.\n *\n * Emits a `centered` event with detailed information about the centering calculation,\n * including dimensions, bounding box, and alignment offsets.\n *\n * @example\n * ```html\n * <ngts-center [options]=\"{ top: true }\" (centered)=\"onCentered($event)\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-center>\n * ```\n */\n@Component({\n\tselector: 'ngts-center',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #outer>\n\t\t\t\t<ngt-group #inner>\n\t\t\t\t\t<ng-content />\n\t\t\t\t</ngt-group>\n\t\t\t</ngt-group>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsCenter {\n\t/** Configuration options for centering behavior. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'top',\n\t\t'right',\n\t\t'bottom',\n\t\t'left',\n\t\t'front',\n\t\t'back',\n\t\t'disable',\n\t\t'disableX',\n\t\t'disableY',\n\t\t'disableZ',\n\t\t'precise',\n\t\t'cacheKey',\n\t\t'object',\n\t]);\n\n\t/** Emits when centering calculation completes with dimension and alignment info. */\n\tcentered = output<NgtsCenterState>();\n\n\t/** Reference to the outer group element containing the centered content. */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate outerRef = viewChild.required<ElementRef<THREE.Group>>('outer');\n\tprivate innerRef = viewChild.required<ElementRef<THREE.Group>>('inner');\n\n\tprivate centerOptions = pick(this.options, [\n\t\t'top',\n\t\t'right',\n\t\t'bottom',\n\t\t'left',\n\t\t'front',\n\t\t'back',\n\t\t'disable',\n\t\t'disableX',\n\t\t'disableY',\n\t\t'disableZ',\n\t\t'precise',\n\t\t'cacheKey',\n\t\t'object',\n\t]);\n\n\tprivate box = new THREE.Box3();\n\tprivate center = new THREE.Vector3();\n\tprivate sphere = new THREE.Sphere();\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\teffect(() => {\n\t\t\tconst inner = this.innerRef().nativeElement;\n\t\t\tconst innerInstanceState = getInstanceState(inner);\n\t\t\tif (!innerInstanceState) return;\n\n\t\t\tconst children = [...innerInstanceState.objects(), ...innerInstanceState.nonObjects()];\n\t\t\tif (!children?.length) return;\n\n\t\t\tconst [\n\t\t\t\t{ precise, top, bottom, right, left, front, back, disable, disableZ, disableY, disableX, object },\n\t\t\t\tgroup,\n\t\t\t\touter,\n\t\t\t] = [this.centerOptions(), this.groupRef().nativeElement, this.outerRef().nativeElement];\n\n\t\t\touter.matrixWorld.identity();\n\t\t\tthis.box.setFromObject(object ?? inner, precise);\n\n\t\t\tconst width = this.box.max.x - this.box.min.x;\n\t\t\tconst height = this.box.max.y - this.box.min.y;\n\t\t\tconst depth = this.box.max.z - this.box.min.z;\n\n\t\t\tthis.box.getCenter(this.center);\n\t\t\tthis.box.getBoundingSphere(this.sphere);\n\n\t\t\tconst vAlign = top ? height / 2 : bottom ? -height / 2 : 0;\n\t\t\tconst hAlign = left ? -width / 2 : right ? width / 2 : 0;\n\t\t\tconst dAlign = front ? depth / 2 : back ? -depth / 2 : 0;\n\n\t\t\touter.position.set(\n\t\t\t\tdisable || disableX ? 0 : -this.center.x + hAlign,\n\t\t\t\tdisable || disableY ? 0 : -this.center.y + vAlign,\n\t\t\t\tdisable || disableZ ? 0 : -this.center.z + dAlign,\n\t\t\t);\n\n\t\t\tthis.centered.emit({\n\t\t\t\tparent: group.parent!,\n\t\t\t\tcontainer: group,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tdepth,\n\t\t\t\tboundingBox: this.box,\n\t\t\t\tboundingSphere: this.sphere,\n\t\t\t\tcenter: this.center,\n\t\t\t\tverticalAlignment: vAlign,\n\t\t\t\thorizontalAlignment: hAlign,\n\t\t\t\tdepthAlignment: dAlign,\n\t\t\t});\n\t\t});\n\t}\n}\n","import {\n\tafterEveryRender,\n\tafterRenderEffect,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinject,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport {\n\tapplyProps,\n\tbeforeRender,\n\tcheckUpdate,\n\textend,\n\tNgtArgs,\n\tNgtColor,\n\tNgtThreeElements,\n\tNgtVector3,\n\tomit,\n\tpick,\n} from 'angular-three';\nimport { textureResource } from 'angular-three-soba/loaders';\nimport { setUpdateRange } from 'angular-three-soba/misc';\nimport { CLOUD_URL } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, InstancedBufferAttribute, InstancedMesh, PlaneGeometry } from 'three';\n\n/**\n * Internal state object representing a single cloud segment.\n * Used by the cloud system to track individual particle properties.\n */\nexport interface NgtsCloudState {\n\t/**\n\t * Unique identifier for this cloud segment.\n\t */\n\tuuid: string;\n\t/**\n\t * Index of this segment within the cloud.\n\t */\n\tindex: number;\n\t/**\n\t * Total number of segments in the parent cloud.\n\t */\n\tsegments: number;\n\t/**\n\t * Distance from camera (used for depth sorting).\n\t */\n\tdist: number;\n\t/**\n\t * Transformation matrix for this segment.\n\t */\n\tmatrix: THREE.Matrix4;\n\t/**\n\t * Bounding box dimensions for segment distribution.\n\t */\n\tbounds: THREE.Vector3;\n\t/**\n\t * Position within the cloud bounds.\n\t */\n\tposition: THREE.Vector3;\n\t/**\n\t * Volume/size of this segment.\n\t */\n\tvolume: number;\n\t/**\n\t * Normalized distance from cloud center (0-1).\n\t */\n\tlength: number;\n\t/**\n\t * Reference to the parent group element.\n\t */\n\tref: ElementRef<THREE.Group>;\n\t/**\n\t * Animation speed multiplier.\n\t */\n\tspeed: number;\n\t/**\n\t * Growth animation factor.\n\t */\n\tgrowth: number;\n\t/**\n\t * Opacity of this segment.\n\t */\n\topacity: number;\n\t/**\n\t * Distance at which the segment starts fading.\n\t */\n\tfade: number;\n\t/**\n\t * Density factor for animation.\n\t */\n\tdensity: number;\n\t/**\n\t * Current rotation angle.\n\t */\n\trotation: number;\n\t/**\n\t * Rotation speed multiplier.\n\t */\n\trotationFactor: number;\n\t/**\n\t * Color of this segment.\n\t */\n\tcolor: THREE.Color;\n}\n\n/**\n * Configuration options for the NgtsClouds container component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCloudsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * URL to the cloud texture image.\n\t * @default CLOUD_URL (hosted on rawcdn.githack)\n\t */\n\ttexture: string;\n\t/**\n\t * Maximum number of cloud segments. Keep this tight to save memory.\n\t * @default 200\n\t */\n\tlimit: number;\n\t/**\n\t * Number of segments to render. If undefined, renders all segments.\n\t * @default undefined\n\t */\n\trange?: number;\n\t/**\n\t * The material class to use for cloud rendering.\n\t * @default THREE.MeshLambertMaterial\n\t */\n\tmaterial: typeof THREE.Material;\n\t/**\n\t * Whether to enable frustum culling for the cloud mesh.\n\t * @default true\n\t */\n\tfrustumCulled: boolean;\n}\n\nconst defaultCloudsOptions: NgtsCloudsOptions = {\n\tlimit: 200,\n\tmaterial: THREE.MeshLambertMaterial,\n\tfrustumCulled: true,\n\ttexture: CLOUD_URL,\n};\n\nconst parentMatrix = new THREE.Matrix4();\nconst translation = new THREE.Vector3();\nconst rotation = new THREE.Quaternion();\nconst cpos = new THREE.Vector3();\nconst cquat = new THREE.Quaternion();\nconst scale = new THREE.Vector3();\n\n/**\n * Container component for rendering volumetric clouds using instanced meshes.\n * Uses billboarded sprites that always face the camera and are depth-sorted\n * for correct transparency rendering.\n *\n * Should contain NgtsCloudInstance children to define individual cloud formations.\n *\n * @example\n * ```html\n * <ngts-clouds [options]=\"{ limit: 400 }\">\n * <ngts-cloud-instance [options]=\"{ segments: 40 }\" />\n * <ngts-cloud-instance [options]=\"{ segments: 20, position: [5, 0, 0] }\" />\n * </ngts-clouds>\n * ```\n */\n@Component({\n\tselector: 'ngts-clouds',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t\t<ngt-instanced-mesh\n\t\t\t\t#instances\n\t\t\t\t*args=\"[undefined, undefined, limit()]\"\n\t\t\t\t[matrixAutoUpdate]=\"false\"\n\t\t\t\t[frustumCulled]=\"frustumCulled()\"\n\t\t\t>\n\t\t\t\t<ngt-instanced-buffer-attribute\n\t\t\t\t\t*args=\"[colors(), 3]\"\n\t\t\t\t\t[usage]=\"DynamicDrawUsage\"\n\t\t\t\t\tattach=\"instanceColor\"\n\t\t\t\t/>\n\t\t\t\t<ngt-plane-geometry *args=\"imageBounds()\">\n\t\t\t\t\t<ngt-instanced-buffer-attribute\n\t\t\t\t\t\t*args=\"[opacities(), 1]\"\n\t\t\t\t\t\t[usage]=\"DynamicDrawUsage\"\n\t\t\t\t\t\tattach=\"attributes.cloudOpacity\"\n\t\t\t\t\t/>\n\t\t\t\t</ngt-plane-geometry>\n\t\t\t\t<ngt-primitive *args=\"[cloudMaterial()]\" [map]=\"cloudTexture.value()\" attach=\"material\" />\n\t\t\t</ngt-instanced-mesh>\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsClouds {\n\tprotected readonly DynamicDrawUsage = THREE.DynamicDrawUsage;\n\n\t/** Configuration options for the clouds container. */\n\toptions = input(defaultCloudsOptions, { transform: mergeInputs(defaultCloudsOptions) });\n\tprotected parameters = omit(this.options, ['material', 'texture', 'range', 'limit', 'frustumCulled']);\n\n\tprivate texture = pick(this.options, 'texture');\n\tprivate material = pick(this.options, 'material');\n\tprivate range = pick(this.options, 'range');\n\n\t/** Reference to the container group element. */\n\tcloudsRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate instancesRef = viewChild<ElementRef<THREE.InstancedMesh>>('instances');\n\n\tprotected limit = pick(this.options, 'limit');\n\tprotected frustumCulled = pick(this.options, 'frustumCulled');\n\n\tprotected opacities = computed(() => new Float32Array(Array.from({ length: this.limit() }, () => 1)));\n\tprotected colors = computed(() => new Float32Array(Array.from({ length: this.limit() }, () => [1, 1, 1]).flat()));\n\n\tprotected cloudTexture = textureResource(this.texture);\n\tprotected cloudMaterial = computed(() => {\n\t\tconst _CloudMaterial = class extends (this.material() as typeof THREE.Material) {\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tconst opaque_fragment =\n\t\t\t\t\tparseInt(THREE.REVISION.replace(/\\D+/g, '')) >= 154 ? 'opaque_fragment' : 'output_fragment';\n\t\t\t\tthis.onBeforeCompile = (shader) => {\n\t\t\t\t\tshader.vertexShader =\n\t\t\t\t\t\t`attribute float cloudOpacity;\n varying float vOpacity;\n ` +\n\t\t\t\t\t\tshader.vertexShader.replace(\n\t\t\t\t\t\t\t'#include <fog_vertex>',\n\t\t\t\t\t\t\t`#include <fog_vertex>\n vOpacity = cloudOpacity;\n `,\n\t\t\t\t\t\t);\n\t\t\t\t\tshader.fragmentShader =\n\t\t\t\t\t\t`varying float vOpacity;\n ` +\n\t\t\t\t\t\tshader.fragmentShader.replace(\n\t\t\t\t\t\t\t`#include <${opaque_fragment}>`,\n\t\t\t\t\t\t\t`#include <${opaque_fragment}>\n gl_FragColor = vec4(outgoingLight, diffuseColor.a * vOpacity);\n `,\n\t\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tconst _material = new _CloudMaterial();\n\t\t_material.transparent = true;\n\t\t_material.depthWrite = false;\n\t\tcheckUpdate(_material);\n\n\t\treturn _material;\n\t});\n\n\tprotected imageBounds = computed(() => {\n\t\tconst texture = this.cloudTexture.value();\n\t\tif (!texture) return [1, 1];\n\t\tconst [w, h] = [texture.image.width ?? 1, texture.image.height ?? 1];\n\t\tconst max = Math.max(w, h);\n\t\treturn [w / max, h / max];\n\t});\n\n\t/**\n\t * Array of cloud segment states managed by this container.\n\t * Updated by NgtsCloudInstance children when they mount/unmount.\n\t */\n\tclouds: Array<NgtsCloudState> = [];\n\n\tconstructor() {\n\t\textend({ Group, InstancedMesh, InstancedBufferAttribute, PlaneGeometry });\n\n\t\tafterEveryRender({\n\t\t\twrite: () => {\n\t\t\t\tconst instances = this.instancesRef()?.nativeElement;\n\t\t\t\tif (!instances) return;\n\n\t\t\t\tconst [limit, range] = [this.limit(), this.range()];\n\t\t\t\tconst count = Math.min(limit, range !== undefined ? range : limit, this.clouds.length);\n\t\t\t\tinstances.count = count;\n\t\t\t\tsetUpdateRange(instances.instanceMatrix, { start: 0, count: count * 16 });\n\t\t\t\tif (instances.instanceColor) {\n\t\t\t\t\tsetUpdateRange(instances.instanceColor, { start: 0, count: count * 3 });\n\t\t\t\t}\n\t\t\t\tsetUpdateRange(instances.geometry.attributes['cloudOpacity'] as THREE.BufferAttribute, {\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tcount: count,\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\tlet time = 0;\n\t\tlet index = 0;\n\t\tlet config: NgtsCloudState;\n\t\tconst qat = new THREE.Quaternion();\n\t\tconst dir = new THREE.Vector3(0, 0, 1);\n\t\tconst pos = new THREE.Vector3();\n\n\t\tbeforeRender(({ delta, clock, camera }) => {\n\t\t\tconst instances = this.instancesRef()?.nativeElement;\n\t\t\tif (!instances) return;\n\n\t\t\ttime = clock.elapsedTime;\n\t\t\tparentMatrix.copy(instances.matrixWorld).invert();\n\t\t\tcamera.matrixWorld.decompose(cpos, cquat, scale);\n\n\t\t\tfor (index = 0; index < this.clouds.length; index++) {\n\t\t\t\tconfig = this.clouds[index];\n\t\t\t\tconfig.ref.nativeElement.matrixWorld.decompose(translation, rotation, scale);\n\t\t\t\ttranslation.add(pos.copy(config.position).applyQuaternion(rotation).multiply(scale));\n\t\t\t\trotation\n\t\t\t\t\t.copy(cquat)\n\t\t\t\t\t.multiply(qat.setFromAxisAngle(dir, (config.rotation += delta * config.rotationFactor)));\n\t\t\t\tscale.multiplyScalar(\n\t\t\t\t\tconfig.volume + ((1 + Math.sin(time * config.density * config.speed)) / 2) * config.growth,\n\t\t\t\t);\n\t\t\t\tconfig.matrix.compose(translation, rotation, scale).premultiply(parentMatrix);\n\t\t\t\tconfig.dist = translation.distanceTo(cpos);\n\t\t\t}\n\n\t\t\t// depth-sort\n\t\t\tthis.clouds.sort((a, b) => b.dist - a.dist);\n\t\t\tconst opacities = instances.geometry.attributes['cloudOpacity'] as THREE.InstancedBufferAttribute;\n\t\t\tfor (index = 0; index < this.clouds.length; index++) {\n\t\t\t\tconfig = this.clouds[index];\n\t\t\t\topacities.array[index] =\n\t\t\t\t\tconfig.opacity * (config.dist < config.fade - 1 ? config.dist / config.fade : 1);\n\t\t\t\tinstances.setMatrixAt(index, config.matrix);\n\t\t\t\tinstances.setColorAt(index, config.color);\n\t\t\t}\n\n\t\t\t// update instance\n\t\t\tcheckUpdate(instances.geometry.attributes['cloudOpacity']);\n\t\t\tcheckUpdate(instances.instanceMatrix);\n\t\t\tif (instances.instanceColor) checkUpdate(instances.instanceColor);\n\t\t});\n\t}\n}\n\n/**\n * Configuration options for individual cloud formations.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCloudOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Random seed for consistent cloud generation.\n\t * @default Math.random()\n\t */\n\tseed: number;\n\t/**\n\t * Number of segments/particles in the cloud.\n\t * @default 20\n\t */\n\tsegments: number;\n\t/**\n\t * Bounding box dimensions for cloud distribution.\n\t * @default [5, 1, 1]\n\t */\n\tbounds: NgtVector3;\n\t/**\n\t * How segments are distributed within the bounds.\n\t * - 'inside': Segments are smaller at the edges\n\t * - 'outside': Segments are larger at the edges\n\t * - 'random': Random distribution\n\t * @default 'inside'\n\t */\n\tconcentrate: 'random' | 'inside' | 'outside';\n\t/**\n\t * General scale of the cloud segments.\n\t */\n\tscale?: NgtVector3;\n\t/**\n\t * Volume/thickness of the segments.\n\t * @default 6\n\t */\n\tvolume: number;\n\t/**\n\t * Minimum volume when distributing clouds.\n\t * @default 0.25\n\t */\n\tsmallestVolume: number;\n\t/**\n\t * Custom distribution function for precise control over segment placement.\n\t * Point values range from -1 to 1, volume from 0 to 1.\n\t * @default undefined\n\t */\n\tdistribute?: (cloud: NgtsCloudState, index: number) => { point: THREE.Vector3; volume?: number };\n\t/**\n\t * Growth factor for animated clouds (when speed > 0).\n\t * @default 4\n\t */\n\tgrowth: number;\n\t/**\n\t * Animation speed factor. Set to 0 to disable animation.\n\t * @default 0\n\t */\n\tspeed: number;\n\t/**\n\t * Camera distance at which segments start fading.\n\t * @default 10\n\t */\n\tfade: number;\n\t/**\n\t * Opacity of the cloud.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Color of the cloud.\n\t * @default '#ffffff'\n\t */\n\tcolor: NgtColor;\n}\n\nconst defaultCloudOptions: NgtsCloudOptions = {\n\tseed: Math.random(),\n\tsegments: 20,\n\tbounds: [5, 1, 1],\n\tconcentrate: 'inside',\n\tvolume: 6,\n\tsmallestVolume: 0.25,\n\tgrowth: 4,\n\tspeed: 0,\n\tfade: 10,\n\topacity: 1,\n\tcolor: '#ffffff',\n};\n\n/**\n * A cloud instance component that defines a single cloud formation.\n * Must be used within a NgtsClouds container.\n *\n * Each instance can have its own configuration for segments, bounds,\n * color, opacity, and animation settings.\n *\n * @example\n * ```html\n * <ngts-clouds>\n * <ngts-cloud-instance [options]=\"{ segments: 40, color: '#f0f0f0', speed: 0.4 }\" />\n * </ngts-clouds>\n * ```\n */\n@Component({\n\tselector: 'ngts-cloud-instance',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsCloudInstance {\n\t/** Configuration options for this cloud formation. */\n\toptions = input(defaultCloudOptions, { transform: mergeInputs(defaultCloudOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'bounds',\n\t\t'seed',\n\t\t'segments',\n\t\t'concentrate',\n\t\t'distribute',\n\t\t'growth',\n\t\t'volume',\n\t\t'smallestVolume',\n\t\t'speed',\n\t\t'fade',\n\t\t'opacity',\n\t\t'color',\n\t]);\n\n\tprivate cloudInstanceRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate uuid = THREE.MathUtils.generateUUID();\n\n\tprivate segments = pick(this.options, 'segments');\n\tprivate bounds = pick(this.options, 'bounds');\n\tprivate seed = pick(this.options, 'seed');\n\tprivate concentrate = pick(this.options, 'concentrate');\n\tprivate smallestVolume = pick(this.options, 'smallestVolume');\n\tprivate growth = pick(this.options, 'growth');\n\tprivate speed = pick(this.options, 'speed');\n\tprivate fade = pick(this.options, 'fade');\n\tprivate opacity = pick(this.options, 'opacity');\n\tprivate color = pick(this.options, 'color');\n\tprivate distribute = pick(this.options, 'distribute');\n\tprivate volume = pick(this.options, 'volume');\n\n\tprivate clouds = computed(() =>\n\t\tArray.from(\n\t\t\t{ length: this.segments() },\n\t\t\t(_, index) =>\n\t\t\t\t({\n\t\t\t\t\tsegments: this.segments(),\n\t\t\t\t\tuuid: this.uuid,\n\t\t\t\t\tbounds: new THREE.Vector3(1, 1, 1),\n\t\t\t\t\tposition: new THREE.Vector3(),\n\t\t\t\t\tindex,\n\t\t\t\t\tref: this.cloudInstanceRef(),\n\t\t\t\t\tdist: 0,\n\t\t\t\t\tmatrix: new THREE.Matrix4(),\n\t\t\t\t\tcolor: new THREE.Color(),\n\t\t\t\t\trotation: index * (Math.PI / this.segments()),\n\t\t\t\t}) as NgtsCloudState,\n\t\t),\n\t);\n\n\tprivate parent = inject(NgtsClouds);\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tafterRenderEffect({\n\t\t\twrite: () => {\n\t\t\t\tconst [\n\t\t\t\t\tclouds,\n\t\t\t\t\tconcentrate,\n\t\t\t\t\tbounds,\n\t\t\t\t\tfade,\n\t\t\t\t\tcolor,\n\t\t\t\t\topacity,\n\t\t\t\t\tgrowth,\n\t\t\t\t\tvolume,\n\t\t\t\t\tseed,\n\t\t\t\t\tsegments,\n\t\t\t\t\tspeed,\n\t\t\t\t\tdistribute,\n\t\t\t\t] = [\n\t\t\t\t\tthis.clouds(),\n\t\t\t\t\tthis.concentrate(),\n\t\t\t\t\tthis.bounds(),\n\t\t\t\t\tthis.fade(),\n\t\t\t\t\tthis.color(),\n\t\t\t\t\tthis.opacity(),\n\t\t\t\t\tthis.growth(),\n\t\t\t\t\tthis.volume(),\n\t\t\t\t\tthis.seed(),\n\t\t\t\t\tthis.segments(),\n\t\t\t\t\tthis.speed(),\n\t\t\t\t\tuntracked(this.distribute),\n\t\t\t\t];\n\n\t\t\t\tconst seedRef = { seed };\n\n\t\t\t\tclouds.forEach((cloud, index) => {\n\t\t\t\t\tapplyProps(cloud, {\n\t\t\t\t\t\tvolume,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tspeed,\n\t\t\t\t\t\tgrowth,\n\t\t\t\t\t\topacity,\n\t\t\t\t\t\tfade,\n\t\t\t\t\t\tbounds,\n\t\t\t\t\t\tdensity: Math.max(0.5, this.random(seedRef)),\n\t\t\t\t\t\trotationFactor: Math.max(0.2, 0.5 * this.random(seedRef)) * speed,\n\t\t\t\t\t});\n\n\t\t\t\t\t// only distribute randomly if there are multiple segments\n\t\t\t\t\tconst distributed = distribute?.(cloud, index);\n\t\t\t\t\tif (distributed || segments > 1) {\n\t\t\t\t\t\tcloud.position.copy(cloud.bounds).multiply(\n\t\t\t\t\t\t\tdistributed?.point ?? {\n\t\t\t\t\t\t\t\tx: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t\ty: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t\tz: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst xDiff = Math.abs(cloud.position.x);\n\t\t\t\t\tconst yDiff = Math.abs(cloud.position.y);\n\t\t\t\t\tconst zDiff = Math.abs(cloud.position.z);\n\t\t\t\t\tconst max = Math.max(xDiff, yDiff, zDiff);\n\n\t\t\t\t\tcloud.length = 1;\n\n\t\t\t\t\tif (xDiff === max) cloud.length -= xDiff / cloud.bounds.x;\n\t\t\t\t\tif (yDiff === max) cloud.length -= yDiff / cloud.bounds.y;\n\t\t\t\t\tif (zDiff === max) cloud.length -= zDiff / cloud.bounds.z;\n\n\t\t\t\t\tcloud.volume =\n\t\t\t\t\t\tdistributed?.volume ??\n\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\tMath.max(0, untracked(this.smallestVolume)),\n\t\t\t\t\t\t\tconcentrate === 'random'\n\t\t\t\t\t\t\t\t? this.random(seedRef)\n\t\t\t\t\t\t\t\t: concentrate === 'inside'\n\t\t\t\t\t\t\t\t\t? cloud.length\n\t\t\t\t\t\t\t\t\t: 1 - cloud.length,\n\t\t\t\t\t\t) * volume;\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\tafterRenderEffect({\n\t\t\twrite: (onCleanup) => {\n\t\t\t\tconst temp = this.clouds();\n\t\t\t\tthis.parent.clouds = [...this.parent.clouds, ...temp];\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tthis.parent.clouds = this.parent.clouds.filter((item) => item.uuid !== this.uuid);\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate random(ref: { seed: number }) {\n\t\tconst x = Math.sin(ref.seed++) * 10_000;\n\t\treturn x - Math.floor(x);\n\t}\n}\n\n/**\n * A convenience component that renders a single cloud.\n * Automatically wraps itself in a NgtsClouds container if not already inside one.\n *\n * Use this for simple single-cloud scenarios. For multiple clouds,\n * use NgtsClouds with NgtsCloudInstance children for better performance.\n *\n * @example\n * ```html\n * <ngts-cloud [options]=\"{ segments: 20, bounds: [5, 1, 1], color: 'white' }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-cloud',\n\ttemplate: `\n\t\t@if (parent) {\n\t\t\t<ngts-cloud-instance [options]=\"options()\">\n\t\t\t\t<ng-content />\n\t\t\t</ngts-cloud-instance>\n\t\t} @else {\n\t\t\t<ngts-clouds>\n\t\t\t\t<ngts-cloud-instance [options]=\"options()\">\n\t\t\t\t\t<ng-content />\n\t\t\t\t</ngts-cloud-instance>\n\t\t\t</ngts-clouds>\n\t\t}\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsCloudInstance, NgtsClouds],\n})\nexport class NgtsCloud {\n\t/** Configuration options for the cloud. */\n\toptions = input<Partial<NgtsCloudOptions>>(defaultCloudOptions);\n\tprotected parent = inject(NgtsClouds, { optional: true });\n\n\t/** Reference to the underlying NgtsCloudInstance component. */\n\tcloudRef = viewChild(NgtsCloudInstance);\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tcomputed,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, beforeRender, extend, injectStore, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, MeshBasicMaterial, OrthographicCamera } from 'three';\nimport { HorizontalBlurShader, VerticalBlurShader } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsContactShadows component.\n * Extends the standard ngt-group element options (excluding scale which has custom handling).\n */\nexport interface NgtsContactShadowsOptions extends Partial<Omit<NgtThreeElements['ngt-group'], 'scale'>> {\n\t/**\n\t * Opacity of the shadow.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Width of the shadow plane (before scaling).\n\t * @default 1\n\t */\n\twidth: number;\n\t/**\n\t * Height of the shadow plane (before scaling).\n\t * @default 1\n\t */\n\theight: number;\n\t/**\n\t * Blur amount for the shadow. Higher values create softer shadows.\n\t * @default 1\n\t */\n\tblur: number;\n\t/**\n\t * Near clipping plane for the shadow camera.\n\t * @default 0\n\t */\n\tnear: number;\n\t/**\n\t * Far clipping plane for the shadow camera.\n\t * @default 10\n\t */\n\tfar: number;\n\t/**\n\t * When enabled, applies an additional blur pass for smoother shadows.\n\t * @default true\n\t */\n\tsmooth: boolean;\n\t/**\n\t * Resolution of the shadow render target.\n\t * @default 512\n\t */\n\tresolution: number;\n\t/**\n\t * Number of frames to render. Use Infinity for continuous updates.\n\t * @default Infinity\n\t */\n\tframes: number;\n\t/**\n\t * Scale of the shadow plane. Can be a single number or [x, y] tuple.\n\t * @default 10\n\t */\n\tscale: number | [x: number, y: number];\n\t/**\n\t * Color of the shadow.\n\t * @default '#000000'\n\t */\n\tcolor: THREE.ColorRepresentation;\n\t/**\n\t * Whether the shadow writes to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultOptions: NgtsContactShadowsOptions = {\n\tscale: 10,\n\tframes: Infinity,\n\topacity: 1,\n\twidth: 1,\n\theight: 1,\n\tblur: 1,\n\tnear: 0,\n\tfar: 10,\n\tresolution: 512,\n\tsmooth: true,\n\tcolor: '#000000',\n\tdepthWrite: false,\n};\n\n/**\n * A component that renders soft contact shadows on a ground plane.\n * Uses a depth-based technique to render shadows from objects onto\n * a horizontal plane, creating realistic grounding effects.\n *\n * The shadows are rendered using an orthographic camera from above,\n * with optional blur passes for softness.\n *\n * @example\n * ```html\n * <ngts-contact-shadows\n * [options]=\"{ opacity: 0.5, scale: 10, blur: 2, far: 4, resolution: 256 }\"\n * [position]=\"[0, -0.5, 0]\"\n * />\n * ```\n */\n@Component({\n\tselector: 'ngts-contact-shadows',\n\ttemplate: `\n\t\t<ngt-group #contactShadows [rotation]=\"[Math.PI / 2, 0, 0]\" [parameters]=\"parameters()\">\n\t\t\t<ngt-mesh\n\t\t\t\t[scale]=\"[1, -1, 1]\"\n\t\t\t\t[rotation]=\"[-Math.PI / 2, 0, 0]\"\n\t\t\t\t[renderOrder]=\"renderOrder() ?? 0\"\n\t\t\t\t[geometry]=\"planeGeometry()\"\n\t\t\t>\n\t\t\t\t<ngt-mesh-basic-material\n\t\t\t\t\ttransparent\n\t\t\t\t\t[opacity]=\"opacity()\"\n\t\t\t\t\t[depthWrite]=\"depthWrite()\"\n\t\t\t\t\t[map]=\"texture()\"\n\t\t\t\t/>\n\t\t\t</ngt-mesh>\n\t\t\t<ngt-orthographic-camera *args=\"cameraArgs()\" #shadowsCamera />\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsContactShadows {\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'scale',\n\t\t'frames',\n\t\t'opacity',\n\t\t'width',\n\t\t'height',\n\t\t'blur',\n\t\t'near',\n\t\t'far',\n\t\t'resolution',\n\t\t'smooth',\n\t\t'color',\n\t\t'depthWrite',\n\t\t'renderOrder',\n\t]);\n\n\tcontactShadowsRef = viewChild.required<ElementRef<THREE.Group>>('contactShadows');\n\tprivate shadowsCameraRef = viewChild<ElementRef<THREE.OrthographicCamera>>('shadowsCamera');\n\n\tprivate store = injectStore();\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate scale = pick(this.options, 'scale');\n\n\tprivate scaledWidth = computed(() => {\n\t\tconst [width, scale] = [this.width(), this.scale()];\n\t\treturn width * (Array.isArray(scale) ? scale[0] : scale);\n\t});\n\n\tprivate scaledHeight = computed(() => {\n\t\tconst [height, scale] = [this.height(), this.scale()];\n\t\treturn height * (Array.isArray(scale) ? scale[1] : scale);\n\t});\n\n\tprivate resolution = pick(this.options, 'resolution');\n\tprivate color = pick(this.options, 'color');\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprivate smooth = pick(this.options, 'smooth');\n\tprivate frames = pick(this.options, 'frames');\n\tprivate blur = pick(this.options, 'blur');\n\n\tprivate renderTarget = computed(() => this.createRenderTarget(this.resolution()));\n\tprivate renderTargetBlur = computed(() => this.createRenderTarget(this.resolution()));\n\n\tprotected planeGeometry = computed(() =>\n\t\tnew THREE.PlaneGeometry(this.scaledWidth(), this.scaledHeight()).rotateX(Math.PI / 2),\n\t);\n\tprivate blurPlane = computed(() => new THREE.Mesh(this.planeGeometry()));\n\tprivate depthMaterial = computed(() => {\n\t\tconst color = new THREE.Color(this.color());\n\t\tconst material = new THREE.MeshDepthMaterial();\n\t\tmaterial.depthTest = material.depthWrite = false;\n\t\tmaterial.onBeforeCompile = (shader) => {\n\t\t\tshader.uniforms = { ...shader.uniforms, ucolor: { value: color } };\n\t\t\tshader.fragmentShader = shader.fragmentShader.replace(\n\t\t\t\t`void main() {`, //\n\t\t\t\t`uniform vec3 ucolor;\n void main() {\n `,\n\t\t\t);\n\t\t\tshader.fragmentShader = shader.fragmentShader.replace(\n\t\t\t\t'vec4( vec3( 1.0 - fragCoordZ ), opacity );',\n\t\t\t\t// Colorize the shadow, multiply by the falloff so that the center can remain darker\n\t\t\t\t'vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );',\n\t\t\t);\n\t\t};\n\t\treturn material;\n\t});\n\n\tprivate horizontalBlurMaterial = new THREE.ShaderMaterial({ ...HorizontalBlurShader, depthTest: false });\n\tprivate verticalBlurMaterial = new THREE.ShaderMaterial({ ...VerticalBlurShader, depthTest: false });\n\n\tprotected renderOrder = pick(this.options, 'renderOrder');\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected depthWrite = pick(this.options, 'depthWrite');\n\tprotected texture = pick(this.renderTarget, 'texture');\n\tprotected cameraArgs = computed(() => {\n\t\tconst [width, height, near, far] = [this.scaledWidth(), this.scaledHeight(), this.near(), this.far()];\n\t\treturn [-width / 2, width / 2, height / 2, -height / 2, near, far];\n\t});\n\n\tconstructor() {\n\t\textend({ Group, Mesh, MeshBasicMaterial, OrthographicCamera });\n\n\t\tlet count = 0;\n\t\tbeforeRender(() => {\n\t\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\t\tif (!shadowsCamera) return;\n\n\t\t\tconst frames = this.frames();\n\t\t\tif (frames === Infinity || count < frames) {\n\t\t\t\tthis.renderShadows();\n\t\t\t\tcount++;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate renderShadows() {\n\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\tif (!shadowsCamera) return;\n\n\t\tconst [blur, smooth, gl, scene, contactShadows, depthMaterial, renderTarget] = [\n\t\t\tthis.blur(),\n\t\t\tthis.smooth(),\n\t\t\tthis.store.snapshot.gl,\n\t\t\tthis.store.snapshot.scene,\n\t\t\tthis.contactShadowsRef().nativeElement,\n\t\t\tthis.depthMaterial(),\n\t\t\tthis.renderTarget(),\n\t\t];\n\n\t\tconst initialBackground = scene.background;\n\t\tconst initialOverrideMaterial = scene.overrideMaterial;\n\t\tconst initialClearAlpha = gl.getClearAlpha();\n\n\t\tcontactShadows.visible = false;\n\t\tscene.background = null;\n\t\tscene.overrideMaterial = depthMaterial;\n\t\tgl.setClearAlpha(0);\n\n\t\t// render to the render target to get the depths\n\t\tgl.setRenderTarget(renderTarget);\n\t\tgl.render(scene, shadowsCamera);\n\n\t\tthis.blurShadows(blur);\n\t\tif (smooth) this.blurShadows(blur * 0.4);\n\n\t\t// reset\n\t\tgl.setRenderTarget(null);\n\n\t\tcontactShadows.visible = true;\n\t\tscene.overrideMaterial = initialOverrideMaterial;\n\t\tscene.background = initialBackground;\n\t\tgl.setClearAlpha(initialClearAlpha);\n\t}\n\n\tprivate blurShadows(blur: number) {\n\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\tif (!shadowsCamera) return;\n\n\t\tconst [blurPlane, horizontalBlurMaterial, verticalBlurMaterial, renderTargetBlur, renderTarget, gl] = [\n\t\t\tthis.blurPlane(),\n\t\t\tthis.horizontalBlurMaterial,\n\t\t\tthis.verticalBlurMaterial,\n\t\t\tthis.renderTargetBlur(),\n\t\t\tthis.renderTarget(),\n\t\t\tthis.store.snapshot.gl,\n\t\t];\n\n\t\tblurPlane.visible = true;\n\t\tblurPlane.material = horizontalBlurMaterial;\n\t\thorizontalBlurMaterial.uniforms['tDiffuse'].value = renderTarget.texture;\n\t\thorizontalBlurMaterial.uniforms['h'].value = blur / 256;\n\t\tgl.setRenderTarget(renderTargetBlur);\n\t\tgl.render(blurPlane, shadowsCamera);\n\n\t\tblurPlane.material = verticalBlurMaterial;\n\t\tverticalBlurMaterial.uniforms['tDiffuse'].value = renderTargetBlur.texture;\n\t\tverticalBlurMaterial.uniforms['v'].value = blur / 256;\n\t\tgl.setRenderTarget(renderTarget);\n\t\tgl.render(blurPlane, shadowsCamera);\n\t\tblurPlane.visible = false;\n\t}\n\n\tprivate createRenderTarget(resolution: number) {\n\t\tconst renderTarget = new THREE.WebGLRenderTarget(resolution, resolution);\n\t\trenderTarget.texture.generateMipmaps = false;\n\t\treturn renderTarget;\n\t}\n}\n","import { computed, effect, Injector, signal, untracked } from '@angular/core';\nimport { GainMapLoader, HDRJPGLoader } from '@monogrid/gainmap-js';\nimport { injectStore, is, loaderResource, pick } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { EXRLoader, RGBELoader } from 'three-stdlib';\n\n/**\n * Available environment preset names mapped to their HDR file names.\n * These presets are hosted on the drei-assets CDN.\n */\nexport const ENVIRONMENT_PRESETS = {\n\tapartment: 'lebombo_1k.hdr',\n\tcity: 'potsdamer_platz_1k.hdr',\n\tdawn: 'kiara_1_dawn_1k.hdr',\n\tforest: 'forest_slope_1k.hdr',\n\tlobby: 'st_fagans_interior_1k.hdr',\n\tnight: 'dikhololo_night_1k.hdr',\n\tpark: 'rooitou_park_1k.hdr',\n\tstudio: 'studio_small_03_1k.hdr',\n\tsunset: 'venice_sunset_1k.hdr',\n\twarehouse: 'empty_warehouse_01_1k.hdr',\n};\n\n/**\n * Type representing available environment preset names.\n */\nexport type NgtsEnvironmentPresets = keyof typeof ENVIRONMENT_PRESETS;\n\nconst CUBEMAP_ROOT = 'https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/';\n\n/**\n * Options for loading environment textures.\n */\nexport interface NgtsEnvironmentResourceOptions {\n\t/**\n\t * Path(s) to environment file(s). Can be a single HDR/EXR file\n\t * or an array of 6 cube map faces.\n\t * @default ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png']\n\t */\n\tfiles: string | string[];\n\t/**\n\t * Base path prepended to file paths.\n\t * @default ''\n\t */\n\tpath: string;\n\t/**\n\t * Preset environment name. Overrides `files` and `path` when provided.\n\t */\n\tpreset?: NgtsEnvironmentPresets;\n\t/**\n\t * Callback to configure the loader before loading.\n\t */\n\textensions?: (loader: THREE.Loader) => void;\n\t/**\n\t * Color space for the loaded texture.\n\t * @default 'srgb' for cube maps, 'srgb-linear' for equirectangular maps\n\t */\n\tcolorSpace?: THREE.ColorSpace;\n}\n\nconst defaultFiles = ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png'];\n\n/**\n * Creates a reactive resource for loading environment textures.\n * Supports HDR, EXR, cube maps, and gainmap formats.\n *\n * @param options - Signal of environment resource options\n * @param config - Configuration object with optional injector\n * @returns Object containing the texture signal and underlying resource\n *\n * @example\n * ```typescript\n * const env = environmentResource(() => ({ preset: 'sunset' }));\n * // Access texture: env.texture()\n * ```\n */\nexport function environmentResource(\n\toptions: () => Partial<NgtsEnvironmentResourceOptions> = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(environmentResource, injector, () => {\n\t\tconst adjustedOptions = computed(() => {\n\t\t\tconst { preset, extensions, colorSpace, ...rest } = options();\n\t\t\tlet { files, path } = rest;\n\n\t\t\tif (files == null) {\n\t\t\t\tfiles = defaultFiles;\n\t\t\t}\n\n\t\t\tif (path == null) {\n\t\t\t\tpath = '';\n\t\t\t}\n\n\t\t\tif (preset) {\n\t\t\t\tvalidatePreset(preset);\n\t\t\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t\t\t\tpath = CUBEMAP_ROOT;\n\t\t\t}\n\n\t\t\treturn { files, preset, colorSpace, path, extensions };\n\t\t});\n\n\t\tconst files = pick(adjustedOptions, 'files');\n\t\tconst multiFile = computed(() => Array.isArray(files()));\n\t\tconst resultOptions = computed(() => getExtension(files()));\n\t\tconst extension = pick(resultOptions, 'extension');\n\t\tconst loader = computed(() => getLoader(extension()));\n\n\t\tconst store = injectStore();\n\n\t\tconst texture = signal<THREE.Texture | THREE.CubeTexture | null>(null);\n\n\t\teffect(() => {\n\t\t\tconst [_extension, _multiFile, _files] = [untracked(extension), untracked(multiFile), files()];\n\t\t\tif (_extension !== 'webp' && _extension !== 'jpg' && _extension !== 'jpeg') return;\n\t\t\tstore.gl().domElement.addEventListener(\n\t\t\t\t'webglcontextlost',\n\t\t\t\t() => {\n\t\t\t\t\t// @ts-expect-error - files is correctly passed\n\t\t\t\t\tloaderResource.clear(multiFile ? [_files] : _files);\n\t\t\t\t},\n\t\t\t\t{ once: true },\n\t\t\t);\n\t\t});\n\n\t\tconst resource = loaderResource(\n\t\t\tloader,\n\t\t\t// @ts-expect-error - ensure the files is an array\n\t\t\t() => {\n\t\t\t\tconst { files } = adjustedOptions();\n\t\t\t\treturn Array.isArray(files) ? [files] : files;\n\t\t\t},\n\t\t\t{\n\t\t\t\textensions: (loader) => {\n\t\t\t\t\tconst { extensions, path } = adjustedOptions();\n\t\t\t\t\tconst { extension } = resultOptions();\n\t\t\t\t\tif (extension === 'webp' || extension === 'jpg' || extension === 'jpeg') {\n\t\t\t\t\t\t// @ts-expect-error - Gainmap requires a renderer\n\t\t\t\t\t\tloader.setRenderer(store.gl());\n\t\t\t\t\t}\n\n\t\t\t\t\tloader.setPath?.(path);\n\t\t\t\t\tif (extensions) extensions(loader);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\n\t\teffect(() => {\n\t\t\tconst loaderResult = resource.value();\n\t\t\tif (!loaderResult) return;\n\n\t\t\tconst { extension, isCubeMap } = untracked(resultOptions);\n\t\t\tconst _multiFile = untracked(multiFile);\n\t\t\tconst { colorSpace } = untracked(adjustedOptions);\n\n\t\t\t// @ts-expect-error - ensure textureResult is a Texture or CubeTexture\n\t\t\tlet textureResult = (_multiFile ? loaderResult[0] : loaderResult) as Texture | CubeTexture;\n\n\t\t\t// NOTE: racing condition, we can skip this\n\t\t\t// we just said above that if multiFile is false, it is a single Texture\n\t\t\tif (\n\t\t\t\t!_multiFile &&\n\t\t\t\tArray.isArray(textureResult) &&\n\t\t\t\tis.three<THREE.CubeTexture>(textureResult[0], 'isCubeTexture')\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!is.three<THREE.CubeTexture>(textureResult, 'isCubeTexture') &&\n\t\t\t\t(extension === 'jpg' || extension === 'jpeg' || extension === 'webp')\n\t\t\t) {\n\t\t\t\ttextureResult = textureResult.renderTarget?.texture;\n\t\t\t}\n\n\t\t\ttextureResult.mapping = isCubeMap ? THREE.CubeReflectionMapping : THREE.EquirectangularReflectionMapping;\n\t\t\ttextureResult.colorSpace = colorSpace ?? (isCubeMap ? 'srgb' : 'srgb-linear');\n\n\t\t\ttexture.set(textureResult);\n\t\t});\n\n\t\treturn { texture: texture.asReadonly(), resource };\n\t});\n}\n\n/**\n * Preloads an environment texture for later use.\n * Note: Gainmap formats (webp, jpg, jpeg) are not supported for preloading.\n *\n * @param options - Environment resource options\n * @throws Error if gainmap format is detected or file extension is unrecognized\n */\nenvironmentResource.preload = (options: Partial<NgtsEnvironmentResourceOptions> = {}) => {\n\tlet { files, path } = options;\n\tconst { preset, extensions } = options;\n\n\tif (files == null) {\n\t\tfiles = defaultFiles;\n\t}\n\n\tif (path == null) {\n\t\tpath = '';\n\t}\n\n\tif (preset) {\n\t\tvalidatePreset(preset);\n\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t\tpath = CUBEMAP_ROOT;\n\t}\n\n\tconst { extension } = getExtension(files);\n\n\tif (extension === 'webp' || extension === 'jpg' || extension === 'jpeg') {\n\t\tthrow new Error('injectEnvironment: Preloading gainmaps is not supported');\n\t}\n\n\tconst loader = getLoader(extension);\n\tif (!loader) throw new Error('injectEnvironment: Unrecognized file extension: ' + files);\n\n\tloaderResource.preload(\n\t\tloader,\n\t\t// @ts-expect-error - files is correctly passed\n\t\tArray.isArray(files) ? [files] : files,\n\t\t(loader) => {\n\t\t\tloader.setPath?.(path);\n\t\t\tif (extensions) extensions(loader);\n\t\t},\n\t);\n};\n\n/**\n * Clears a preloaded environment texture from cache.\n *\n * @param clearOptions - Object containing files or preset to clear\n */\nenvironmentResource.clear = (clearOptions: { files?: string | string[]; preset?: NgtsEnvironmentPresets }) => {\n\tconst options = { files: defaultFiles, ...clearOptions };\n\tlet { files } = options;\n\tconst preset = options.preset;\n\n\tif (preset) {\n\t\tvalidatePreset(preset);\n\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t}\n\n\tloaderResource.clear(files);\n};\n\nfunction validatePreset(preset: string) {\n\tif (!(preset in ENVIRONMENT_PRESETS))\n\t\tthrow new Error('Preset must be one of: ' + Object.keys(ENVIRONMENT_PRESETS).join(', '));\n}\n\nfunction getExtension(files: string | string[]) {\n\tconst isCubeMap = Array.isArray(files) && files.length === 6;\n\tconst isGainmap = Array.isArray(files) && files.length === 3 && files.some((file) => file.endsWith('json'));\n\tconst firstEntry = Array.isArray(files) ? files[0] : files;\n\n\t// Everything else\n\tconst extension: string | false | undefined = isCubeMap\n\t\t? 'cube'\n\t\t: isGainmap\n\t\t\t? 'webp'\n\t\t\t: firstEntry.startsWith('data:application/exr')\n\t\t\t\t? 'exr'\n\t\t\t\t: firstEntry.startsWith('data:application/hdr')\n\t\t\t\t\t? 'hdr'\n\t\t\t\t\t: firstEntry.startsWith('data:image/jpeg')\n\t\t\t\t\t\t? 'jpg'\n\t\t\t\t\t\t: firstEntry.split('.').pop()?.split('?')?.shift()?.toLowerCase();\n\n\treturn { extension, isCubeMap, isGainmap };\n}\n\nfunction getLoader(extension: string | undefined) {\n\tconst loader =\n\t\textension === 'cube'\n\t\t\t? THREE.CubeTextureLoader\n\t\t\t: extension === 'hdr'\n\t\t\t\t? RGBELoader\n\t\t\t\t: extension === 'exr'\n\t\t\t\t\t? EXRLoader\n\t\t\t\t\t: extension === 'jpg' || extension === 'jpeg'\n\t\t\t\t\t\t? (HDRJPGLoader as unknown as typeof THREE.Loader)\n\t\t\t\t\t\t: extension === 'webp'\n\t\t\t\t\t\t\t? (GainMapLoader as unknown as typeof THREE.Loader)\n\t\t\t\t\t\t\t: null;\n\n\tif (!loader) {\n\t\tthrow new Error('injectEnvironment: Unrecognized file extension: ' + extension);\n\t}\n\n\treturn loader as typeof THREE.Loader;\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tcontentChild,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDestroyRef,\n\tDirective,\n\teffect,\n\tEffectRef,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tTemplateRef,\n\tviewChild,\n} from '@angular/core';\nimport { applyProps, beforeRender, extend, injectStore, is, NgtArgs, NgtEuler, NgtPortal, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { CubeCamera } from 'three';\nimport { GroundProjectedEnv } from 'three-stdlib';\nimport {\n\tenvironmentResource,\n\ttype NgtsEnvironmentPresets,\n\ttype NgtsEnvironmentResourceOptions,\n} from './environment-resource';\n\nfunction resolveScene(scene: THREE.Scene | ElementRef<THREE.Scene>) {\n\treturn is.ref(scene) ? scene.nativeElement : scene;\n}\n\nfunction setEnvProps(\n\tbackground: boolean | 'only',\n\tscene: THREE.Scene | ElementRef<THREE.Scene> | undefined,\n\tdefaultScene: THREE.Scene,\n\ttexture: THREE.Texture,\n\tsceneProps: Partial<NgtsEnvironmentOptions> = {},\n) {\n\tsceneProps.backgroundBlurriness ??= sceneProps.blur ?? 0;\n\tsceneProps.backgroundIntensity ??= 1;\n\tsceneProps.backgroundRotation ??= [0, 0, 0];\n\tsceneProps.environmentIntensity ??= 1;\n\tsceneProps.environmentRotation ??= [0, 0, 0];\n\n\tconst target = resolveScene(scene || defaultScene);\n\tconst oldbg = target.background;\n\tconst oldenv = target.environment;\n\tconst oldSceneProps = {\n\t\tbackgroundBlurriness: target.backgroundBlurriness,\n\t\tbackgroundIntensity: target.backgroundIntensity,\n\t\tbackgroundRotation: target.backgroundRotation?.clone?.() ?? [0, 0, 0],\n\t\tenvironmentIntensity: target.environmentIntensity,\n\t\tenvironmentRotation: target.environmentRotation?.clone?.() ?? [0, 0, 0],\n\t};\n\n\tif (background !== 'only') target.environment = texture;\n\tif (background) target.background = texture;\n\tapplyProps(target, sceneProps);\n\n\treturn () => {\n\t\tif (background !== 'only') target.environment = oldenv;\n\t\tif (background) target.background = oldbg;\n\t\tapplyProps(target, oldSceneProps);\n\t};\n}\n\n/**\n * Configuration options for the NgtsEnvironment component and related directives.\n */\nexport interface NgtsEnvironmentOptions extends Partial<NgtsEnvironmentResourceOptions> {\n\t/**\n\t * Number of frames to render the environment cube camera.\n\t * Use `Infinity` for continuous updates.\n\t * @default 1\n\t */\n\tframes?: number;\n\t/**\n\t * Near clipping plane for the cube camera.\n\t * @default 1\n\t */\n\tnear?: number;\n\t/**\n\t * Far clipping plane for the cube camera.\n\t * @default 1000\n\t */\n\tfar?: number;\n\t/**\n\t * Resolution of the cube render target.\n\t * @default 256\n\t */\n\tresolution?: number;\n\t/**\n\t * Whether to use the environment as background.\n\t * Set to `'only'` to only use as background without affecting environment lighting.\n\t * @default false\n\t */\n\tbackground?: boolean | 'only';\n\n\t/**\n\t * Background blur amount.\n\t * @deprecated Use `backgroundBlurriness` instead.\n\t */\n\tblur?: number;\n\t/**\n\t * Background blur amount (0 to 1).\n\t * @default 0\n\t */\n\tbackgroundBlurriness?: number;\n\t/**\n\t * Intensity of the background.\n\t * @default 1\n\t */\n\tbackgroundIntensity?: number;\n\t/**\n\t * Rotation of the background as Euler angles.\n\t * @default [0, 0, 0]\n\t */\n\tbackgroundRotation?: NgtEuler;\n\t/**\n\t * Intensity of the environment lighting.\n\t * @default 1\n\t */\n\tenvironmentIntensity?: number;\n\t/**\n\t * Rotation of the environment lighting as Euler angles.\n\t * @default [0, 0, 0]\n\t */\n\tenvironmentRotation?: NgtEuler;\n\n\t/**\n\t * Pre-loaded texture to use as environment map.\n\t */\n\tmap?: THREE.Texture;\n\t/**\n\t * Preset environment name from the available presets.\n\t */\n\tpreset?: NgtsEnvironmentPresets;\n\t/**\n\t * Target scene to apply the environment to.\n\t * If not provided, uses the default scene.\n\t */\n\tscene?: THREE.Scene | ElementRef<THREE.Scene>;\n\t/**\n\t * Configuration for ground-projected environment.\n\t * Set to `true` for defaults, or provide custom radius, height, and scale values.\n\t */\n\tground?: boolean | { radius?: number; height?: number; scale?: number };\n}\n\nconst defaultBackground: NgtsEnvironmentOptions = {\n\tbackground: false,\n};\n\n/**\n * Directive that applies a pre-loaded texture map as the scene environment.\n *\n * @example\n * ```html\n * <ngts-environment-map [options]=\"{ map: myTexture, background: true }\" />\n * ```\n */\n@Directive({ selector: 'ngts-environment-map' })\nexport class NgtsEnvironmentMap {\n\toptions = input(defaultBackground, { transform: mergeInputs(defaultBackground) });\n\tenvSet = output<void>();\n\n\tconstructor() {\n\t\tconst store = injectStore();\n\n\t\tconst _map = pick(this.options, 'map');\n\t\tconst _envConfig = computed(() => {\n\t\t\tconst {\n\t\t\t\tbackground = false,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t} = this.options();\n\n\t\t\treturn {\n\t\t\t\tbackground,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t};\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst map = _map();\n\t\t\tif (!map) return;\n\t\t\tconst { background = false, scene, ...config } = _envConfig();\n\t\t\tconst cleanup = setEnvProps(background, scene, store.scene(), map, config);\n\t\t\tthis.envSet.emit();\n\t\t\tonCleanup(() => cleanup());\n\t\t});\n\t}\n}\n\n/**\n * Directive that loads and applies an environment texture from files or presets.\n * Supports HDR, EXR, and cube map formats.\n *\n * @example\n * ```html\n * <ngts-environment-cube [options]=\"{ preset: 'sunset', background: true }\" />\n * ```\n */\n@Directive({ selector: 'ngts-environment-cube' })\nexport class NgtsEnvironmentCube {\n\toptions = input(defaultBackground, { transform: mergeInputs(defaultBackground) });\n\tenvSet = output<void>();\n\n\tprivate store = injectStore();\n\n\tprivate envConfig = computed(() => {\n\t\tconst {\n\t\t\tbackground = false,\n\t\t\tscene,\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t} = this.options();\n\n\t\treturn {\n\t\t\tbackground,\n\t\t\tscene,\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\tconst { texture: _texture } = environmentResource(this.options);\n\n\t\teffect((onCleanup) => {\n\t\t\tconst texture = _texture();\n\t\t\tif (!texture) return;\n\n\t\t\tconst { background = false, scene, ...config } = this.envConfig();\n\t\t\tconst cleanup = setEnvProps(background, scene, this.store.scene(), texture, config);\n\t\t\tthis.envSet.emit();\n\t\t\tonCleanup(() => cleanup());\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\t_texture()?.dispose();\n\t\t});\n\t}\n}\n\n/**\n * Component that creates a portal-based environment using a cube camera.\n * Renders custom content into a virtual scene and captures it as an environment map.\n *\n * @example\n * ```html\n * <ngts-environment-portal [options]=\"{ frames: Infinity }\">\n * <ng-template>\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-mesh>\n * </ng-template>\n * </ngts-environment-portal>\n * ```\n */\n@Component({\n\tselector: 'ngts-environment-portal',\n\ttemplate: `\n\t\t<ngt-portal [container]=\"virtualScene\">\n\t\t\t<ng-template portalContent let-injector=\"injector\">\n\t\t\t\t<ng-container\n\t\t\t\t\t[ngTemplateOutlet]=\"content()\"\n\t\t\t\t\t[ngTemplateOutletInjector]=\"injector\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ injector, container: virtualScene }\"\n\t\t\t\t/>\n\n\t\t\t\t<ngt-cube-camera #cubeCamera *args=\"cameraArgs()\" />\n\n\t\t\t\t@if (files() || preset()) {\n\t\t\t\t\t<ngts-environment-cube [options]=\"envCubeOptions()\" (envSet)=\"onEnvSet()\" />\n\t\t\t\t} @else if (map()) {\n\t\t\t\t\t<ngts-environment-map [options]=\"envMapOptions()\" (envSet)=\"onEnvSet()\" />\n\t\t\t\t}\n\t\t\t</ng-template>\n\t\t</ngt-portal>\n\t`,\n\timports: [NgtsEnvironmentCube, NgtsEnvironmentMap, NgtArgs, NgtPortal, NgTemplateOutlet],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironmentPortal {\n\tprivate defaultOptions: NgtsEnvironmentOptions = {\n\t\tnear: 1,\n\t\tfar: 1000,\n\t\tresolution: 256,\n\t\tframes: 1,\n\t\tbackground: false,\n\t};\n\toptions = input(this.defaultOptions, { transform: mergeInputs(this.defaultOptions) });\n\tcontent = input.required<TemplateRef<unknown>>();\n\tenvSet = output<void>();\n\n\tprivate injector = inject(Injector);\n\tprivate store = injectStore();\n\n\tprivate cameraRef = viewChild<ElementRef<THREE.CubeCamera>>('cubeCamera');\n\n\tprotected map = pick(this.options, 'map');\n\tprotected files = pick(this.options, 'files');\n\tprotected preset = pick(this.options, 'preset');\n\tprivate extensions = pick(this.options, 'extensions');\n\tprivate path = pick(this.options, 'path');\n\n\tprotected envMapOptions = computed(() => ({ background: true, map: this.map(), extensions: this.extensions() }));\n\tprotected envCubeOptions = computed(() => ({\n\t\tbackground: true,\n\t\tfiles: this.files(),\n\t\tpreset: this.preset(),\n\t\textensions: this.extensions(),\n\t\tpath: this.path(),\n\t}));\n\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprivate resolution = pick(this.options, 'resolution');\n\tprivate fbo = computed(() => {\n\t\tconst fbo = new THREE.WebGLCubeRenderTarget(this.resolution());\n\t\tfbo.texture.type = THREE.HalfFloatType;\n\t\treturn fbo;\n\t});\n\n\tprotected cameraArgs = computed(() => [this.near(), this.far(), this.fbo()]);\n\tprotected virtualScene = new THREE.Scene();\n\n\tprivate setEnvEffectRef?: EffectRef;\n\n\tconstructor() {\n\t\textend({ CubeCamera });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [files, preset, map] = [this.files(), this.preset(), this.map()];\n\t\t\t// NOTE: when there's none of this, we don't render cube or map so we need to setEnv here\n\t\t\tif (!!files || !!preset || !!map) return;\n\t\t\tconst cleanup = this.setPortalEnv();\n\t\t\tonCleanup(() => cleanup?.());\n\t\t});\n\n\t\tlet count = 1;\n\t\tbeforeRender(() => {\n\t\t\tconst frames = this.options().frames;\n\t\t\tif (frames === Infinity || (frames != null && count < frames)) {\n\t\t\t\tconst camera = this.cameraRef()?.nativeElement;\n\t\t\t\tif (camera) {\n\t\t\t\t\tcamera.update(this.store.snapshot.gl, this.virtualScene);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tif (this.setEnvEffectRef) this.setEnvEffectRef.destroy();\n\t\t});\n\t}\n\n\t// NOTE: we use onEnvSet here to ensure that EnvironmentCube or EnvironmentMap sets the env before the portal\n\tonEnvSet() {\n\t\tif (this.setEnvEffectRef) this.setEnvEffectRef.destroy();\n\t\tthis.setEnvEffectRef = effect(\n\t\t\t(onCleanup) => {\n\t\t\t\tconst cleanup = this.setPortalEnv();\n\t\t\t\tonCleanup(() => cleanup?.());\n\t\t\t},\n\t\t\t{ manualCleanup: true, injector: this.injector },\n\t\t);\n\t}\n\n\tprivate setPortalEnv() {\n\t\tconst camera = this.cameraRef();\n\t\tif (!camera?.nativeElement) return;\n\n\t\tconst [\n\t\t\t{\n\t\t\t\tframes,\n\t\t\t\tbackground = false,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t},\n\t\t\tgl,\n\t\t\tfbo,\n\t\t\tdefaultScene,\n\t\t] = [this.options(), this.store.gl(), this.fbo(), this.store.scene()];\n\n\t\tif (frames === 1) camera.nativeElement.update(gl, this.virtualScene);\n\t\tconst cleanup = setEnvProps(background, scene, defaultScene, fbo.texture, {\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t});\n\t\tthis.envSet.emit();\n\t\treturn cleanup;\n\t}\n}\n\n/**\n * Component that creates a ground-projected environment map.\n * Projects the environment onto a virtual ground plane for realistic reflections.\n *\n * @example\n * ```html\n * <ngts-environment-ground [options]=\"{ preset: 'sunset', ground: { height: 15, radius: 60 } }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-environment-ground',\n\ttemplate: `\n\t\t<ngts-environment-map [options]=\"envMapOptions()\" (envSet)=\"envSet.emit()\" />\n\t\t<ngt-ground-projected-env *args=\"args()\" [scale]=\"scale()\" [height]=\"height()\" [radius]=\"radius()\" />\n\t`,\n\timports: [NgtsEnvironmentMap, NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironmentGround {\n\toptions = input({} as NgtsEnvironmentOptions);\n\tenvSet = output<void>();\n\n\tprivate defaultEnvironment = environmentResource(this.options);\n\n\tprotected height = computed(() => (this.options().ground as any)?.height);\n\tprotected radius = computed(() => (this.options().ground as any)?.radius);\n\tprotected scale = computed(() => (this.options().ground as any)?.scale ?? 1000);\n\tprotected args = computed(() => [this.options().map || this.defaultEnvironment.texture()]);\n\tprotected envMapOptions = computed(() => {\n\t\tconst { map: _, ...options } = this.options();\n\t\tconst [map] = this.args();\n\t\treturn Object.assign(options, { map }) as NgtsEnvironmentOptions;\n\t});\n\n\tconstructor() {\n\t\textend({ GroundProjectedEnv });\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.defaultEnvironment.texture()?.dispose();\n\t\t});\n\t}\n}\n\n/**\n * Main environment component that sets up scene environment and background.\n * Automatically selects the appropriate sub-component based on provided options.\n *\n * @example\n * ```html\n * <!-- Using a preset -->\n * <ngts-environment [options]=\"{ preset: 'sunset', background: true }\" />\n *\n * <!-- Using a custom texture -->\n * <ngts-environment [options]=\"{ map: myTexture }\" />\n *\n * <!-- Using ground projection -->\n * <ngts-environment [options]=\"{ preset: 'park', ground: { height: 15 } }\" />\n *\n * <!-- Using portal with custom content -->\n * <ngts-environment [options]=\"{ background: true }\">\n * <ng-template>\n * <ngt-mesh><ngt-box-geometry /></ngt-mesh>\n * </ng-template>\n * </ngts-environment>\n * ```\n */\n@Component({\n\tselector: 'ngts-environment',\n\ttemplate: `\n\t\t@let _options = options();\n\t\t@let _content = content();\n\n\t\t@if (_options.ground) {\n\t\t\t<ngts-environment-ground [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t} @else if (_options.map) {\n\t\t\t<ngts-environment-map [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t} @else if (_content) {\n\t\t\t<ngts-environment-portal [options]=\"_options\" [content]=\"_content\" (envSet)=\"envSet.emit()\" />\n\t\t} @else {\n\t\t\t<ngts-environment-cube [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t}\n\t`,\n\timports: [NgtsEnvironmentCube, NgtsEnvironmentMap, NgtsEnvironmentPortal, NgtsEnvironmentGround],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironment {\n\toptions = input({} as NgtsEnvironmentOptions);\n\tcontent = contentChild(TemplateRef);\n\tenvSet = output<void>();\n}\n","import { Injector } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport {\n\tenvironmentResource,\n\ttype NgtsEnvironmentPresets,\n\ttype NgtsEnvironmentResourceOptions,\n} from './environment-resource';\n\n/**\n * Injects an environment texture resource into the current injection context.\n *\n * @deprecated Use `environmentResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param options - Signal of environment resource options\n * @param config - Configuration object with optional injector\n * @returns A signal containing the loaded texture\n *\n * @example\n * ```typescript\n * const texture = injectEnvironment(() => ({ preset: 'sunset' }));\n * ```\n */\nexport function injectEnvironment(\n\toptions: () => Partial<NgtsEnvironmentResourceOptions> = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(injectEnvironment, injector, () => {\n\t\tconst resource = environmentResource(options, { injector });\n\t\treturn resource.texture;\n\t});\n}\n\n/**\n * Preloads an environment texture.\n * @deprecated Use `environmentResource.preload` instead. Will be removed in v5.0.0.\n */\ninjectEnvironment.preload = (options: () => Partial<NgtsEnvironmentResourceOptions> = () => ({})) => {\n\tenvironmentResource.preload(options());\n};\n\n/**\n * Clears a preloaded environment texture from cache.\n * @deprecated Use `environmentResource.clear` instead. Will be removed in v5.0.0.\n */\ninjectEnvironment.clear = (clearOptions: { files?: string | string[]; preset?: NgtsEnvironmentPresets }) => {\n\tenvironmentResource.clear(clearOptions);\n};\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, NgtThreeElements, omit } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * Configuration options for the NgtsFloat component.\n */\nexport interface NgtsFloatOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Whether the floating animation is enabled.\n\t * @default true\n\t */\n\tenabled: boolean;\n\t/**\n\t * Animation speed multiplier.\n\t * @default 1\n\t */\n\tspeed: number;\n\t/**\n\t * Intensity of the rotation animation.\n\t * @default 1\n\t */\n\trotationIntensity: number;\n\t/**\n\t * Intensity of the floating (vertical movement) animation.\n\t * @default 1\n\t */\n\tfloatIntensity: number;\n\t/**\n\t * Range of the floating animation [min, max] in world units.\n\t * @default [-0.1, 0.1]\n\t */\n\tfloatingRange: [number?, number?];\n\t/**\n\t * Whether to call invalidate() on each frame for on-demand rendering.\n\t * @default false\n\t */\n\tautoInvalidate: boolean;\n}\n\nconst defaultOptions: NgtsFloatOptions = {\n\tenabled: true,\n\tspeed: 1,\n\trotationIntensity: 1,\n\tfloatIntensity: 1,\n\tfloatingRange: [-0.1, 0.1],\n\tautoInvalidate: false,\n};\n\n/**\n * Component that makes its children float and rotate with a gentle animation.\n * Useful for creating dreamy, floating effects on 3D objects.\n *\n * @example\n * ```html\n * <ngts-float [options]=\"{ speed: 2, floatIntensity: 2 }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-float>\n * ```\n */\n@Component({\n\tselector: 'ngts-float',\n\ttemplate: `\n\t\t<ngt-group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #float [matrixAutoUpdate]=\"false\">\n\t\t\t\t<ng-content />\n\t\t\t</ngt-group>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsFloat {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'enabled',\n\t\t'speed',\n\t\t'rotationIntensity',\n\t\t'floatIntensity',\n\t\t'floatingRange',\n\t\t'autoInvalidate',\n\t]);\n\n\tfloatRef = viewChild.required<ElementRef<THREE.Group>>('float');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tconst offset = Math.random() * 10000;\n\t\tbeforeRender(({ clock, invalidate }) => {\n\t\t\tconst [{ enabled, speed, rotationIntensity, floatingRange, floatIntensity, autoInvalidate }] = [\n\t\t\t\tthis.options(),\n\t\t\t];\n\t\t\tif (!enabled || speed === 0) return;\n\n\t\t\tif (autoInvalidate) invalidate();\n\n\t\t\tconst container = this.floatRef().nativeElement;\n\n\t\t\tconst offsetTime = offset + clock.elapsedTime;\n\t\t\tcontainer.rotation.x = (Math.cos((offsetTime / 4) * speed) / 8) * rotationIntensity;\n\t\t\tcontainer.rotation.y = (Math.sin((offsetTime / 4) * speed) / 8) * rotationIntensity;\n\t\t\tcontainer.rotation.z = (Math.sin((offsetTime / 4) * speed) / 20) * rotationIntensity;\n\n\t\t\tlet yPosition = Math.sin((offsetTime / 4) * speed) / 10;\n\t\t\tyPosition = THREE.MathUtils.mapLinear(\n\t\t\t\tyPosition,\n\t\t\t\t-0.1,\n\t\t\t\t0.1,\n\t\t\t\tfloatingRange[0] ?? -0.1,\n\t\t\t\tfloatingRange[1] ?? 0.1,\n\t\t\t);\n\t\t\tcontainer.position.y = yPosition * floatIntensity;\n\t\t\tcontainer.updateMatrix();\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 { applyProps, extend, NgtArgs, NgtThreeElements, NgtVector3, omit, pick, vector3 } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Mesh, MeshBasicMaterial, PlaneGeometry, RingGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsLightformer component.\n */\nexport interface NgtsLightformerOptions {\n\t/**\n\t * Texture map to apply to the lightformer.\n\t */\n\tmap?: THREE.Texture;\n\t/**\n\t * Whether the material should be tone mapped.\n\t * @default false\n\t */\n\ttoneMapped: boolean;\n\t/**\n\t * Color of the light emitted by the lightformer.\n\t * @default 'white'\n\t */\n\tcolor: string;\n\t/**\n\t * Shape of the lightformer geometry.\n\t * @default 'rect'\n\t */\n\tform: 'circle' | 'ring' | 'rect';\n\t/**\n\t * Scale of the lightformer. Can be uniform or per-axis.\n\t * @default 1\n\t */\n\tscale: number | [number, number, number] | [number, number];\n\t/**\n\t * Intensity multiplier for the light color.\n\t * @default 1\n\t */\n\tintensity: number;\n\t/**\n\t * Target position for the lightformer to look at.\n\t */\n\ttarget?: NgtVector3;\n}\n\nconst defaultOptions: Partial<Omit<NgtThreeElements['ngt-mesh'], 'scale'>> & NgtsLightformerOptions = {\n\ttoneMapped: false,\n\tcolor: 'white',\n\tform: 'rect',\n\tscale: 1,\n\tintensity: 1,\n};\n\n/**\n * Component for creating area lights in environment maps.\n * Renders a simple mesh that emits light, useful inside environment portals.\n *\n * @example\n * ```html\n * <ngts-lightformer [options]=\"{ form: 'circle', color: 'white', intensity: 2 }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-lightformer',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"fixedScale()\" [parameters]=\"parameters()\">\n\t\t\t<ng-content select=\"[data-lightformer-geometry]\">\n\t\t\t\t@switch (form()) {\n\t\t\t\t\t@case ('circle') {\n\t\t\t\t\t\t<ngt-ring-geometry *args=\"[0, 1, 64]\" />\n\t\t\t\t\t}\n\t\t\t\t\t@case ('ring') {\n\t\t\t\t\t\t<ngt-ring-geometry *args=\"[0.5, 1, 64]\" />\n\t\t\t\t\t}\n\t\t\t\t\t@case ('rect') {\n\t\t\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ng-content>\n\t\t\t<ng-content select=\"[data-lightformer-material]\">\n\t\t\t\t<ngt-mesh-basic-material #defaultMaterial [toneMapped]=\"toneMapped()\" [map]=\"map()\" [side]=\"side\" />\n\t\t\t</ng-content>\n\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsLightformer {\n\tprotected readonly side = THREE.DoubleSide;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['map', 'toneMapped', 'color', 'form', 'scale', 'intensity', 'target']);\n\n\tprivate intensity = pick(this.options, 'intensity');\n\tprivate color = pick(this.options, 'color');\n\tprivate target = vector3(this.options, 'target', true);\n\tprivate scale = pick(this.options, 'scale');\n\tprotected fixedScale = computed(() => {\n\t\tconst scale = this.scale();\n\t\treturn Array.isArray(scale) && scale.length === 2 ? [scale[0], scale[1], 1] : scale;\n\t});\n\tprotected form = pick(this.options, 'form');\n\tprotected toneMapped = pick(this.options, 'toneMapped');\n\tprotected map = pick(this.options, 'map');\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\tprivate defaultMaterialRef = viewChild<ElementRef<THREE.MeshBasicMaterial>>('defaultMaterial');\n\n\tconstructor() {\n\t\textend({ Mesh, MeshBasicMaterial, RingGeometry, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tconst material = this.defaultMaterialRef()?.nativeElement;\n\t\t\tif (!material) return;\n\n\t\t\tapplyProps(material, { color: this.color() });\n\t\t\tmaterial.color.multiplyScalar(this.intensity());\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst target = this.target();\n\t\t\tif (!target) return;\n\n\t\t\tconst mesh = this.meshRef().nativeElement;\n\t\t\tmesh.lookAt(target);\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\tnumberAttribute,\n\tviewChild,\n} from '@angular/core';\nimport { extend, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Mesh } from 'three';\n\n/**\n * Configuration options for the NgtsMask component.\n */\nexport interface NgtsMaskOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Whether to write color to the framebuffer.\n\t * @default false\n\t */\n\tcolorWrite: boolean;\n\t/**\n\t * Whether to write depth to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultOptions: NgtsMaskOptions = {\n\tcolorWrite: false,\n\tdepthWrite: false,\n};\n\n/**\n * Component that creates a stencil mask for selective rendering.\n * Objects inside the mask can be shown/hidden using the `mask()` function.\n *\n * @example\n * ```html\n * <ngts-mask [id]=\"1\">\n * <ngt-circle-geometry *args=\"[0.5, 64]\" />\n * </ngts-mask>\n *\n * <ngt-mesh [material]=\"maskedMaterial\">\n * <ngt-box-geometry />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * maskedMaterial = new THREE.MeshStandardMaterial({\n * ...mask(() => 1)()\n * });\n * ```\n */\n@Component({\n\tselector: 'ngts-mask',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [renderOrder]=\"-id()\" [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsMask {\n\tid = input(1, { transform: numberAttribute });\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprotected parameters = omit(this.options, ['colorWrite', 'depthWrite']);\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material>>>('mesh');\n\n\tprivate colorWrite = pick(this.options, 'colorWrite');\n\tprivate depthWrite = pick(this.options, 'depthWrite');\n\tprivate spread = computed(() => {\n\t\tconst [id, colorWrite, depthWrite] = [this.id(), this.colorWrite(), this.depthWrite()];\n\t\treturn {\n\t\t\tcolorWrite,\n\t\t\tdepthWrite,\n\t\t\tstencilWrite: true,\n\t\t\tstencilRef: id,\n\t\t\tstencilFunc: THREE.AlwaysStencilFunc,\n\t\t\tstencilFail: THREE.ReplaceStencilOp,\n\t\t\tstencilZFail: THREE.ReplaceStencilOp,\n\t\t\tstencilZPass: THREE.ReplaceStencilOp,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh });\n\n\t\teffect(() => {\n\t\t\tconst [mesh, spread] = [this.meshRef().nativeElement, this.spread()];\n\t\t\tObject.assign(mesh.material, spread);\n\t\t});\n\t}\n}\n\n/**\n * Creates stencil material properties for use with NgtsMask.\n * Apply the returned properties to a material to make it respect mask boundaries.\n *\n * @param id - Signal of the mask ID to match\n * @param inverse - Signal of whether to invert the mask (show outside instead of inside)\n * @returns A computed signal containing stencil properties to spread onto a material\n *\n * @example\n * ```typescript\n * // Show content only inside the mask\n * const insideMask = mask(() => 1);\n *\n * // Show content only outside the mask\n * const outsideMask = mask(() => 1, () => true);\n *\n * // Apply to material\n * Object.assign(myMaterial, insideMask());\n * ```\n */\nexport function mask(id: () => number, inverse: () => boolean = () => false) {\n\treturn computed(() => {\n\t\tconst [_id, _inverse] = [id(), inverse()];\n\t\treturn {\n\t\t\tstencilWrite: true,\n\t\t\tstencilRef: _id,\n\t\t\tstencilFunc: _inverse ? THREE.NotEqualStencilFunc : THREE.EqualStencilFunc,\n\t\t\tstencilFail: THREE.KeepStencilOp,\n\t\t\tstencilZFail: THREE.KeepStencilOp,\n\t\t\tstencilZPass: THREE.KeepStencilOp,\n\t\t};\n\t});\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tInjector,\n\tResourceRef,\n\tSignal,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { injectTexture, textureResource } from 'angular-three-soba/loaders';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\nfunction getFormatString(format: number) {\n\tswitch (format) {\n\t\tcase 64:\n\t\t\treturn '-64px';\n\t\tcase 128:\n\t\t\treturn '-128px';\n\t\tcase 256:\n\t\t\treturn '-256px';\n\t\tcase 512:\n\t\t\treturn '-512px';\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nconst LIST_URL = 'https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/matcaps.json';\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\n/**\n * Injects a matcap texture from the matcaps library.\n * Matcaps provide realistic lighting without actual lights in the scene.\n *\n * @deprecated Use `matcapTextureResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param id - Signal of matcap ID (number index or string hash)\n * @param config - Configuration options\n * @param config.format - Signal of texture resolution (64, 128, 256, 512, or 1024)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, texture signal, and numTot (total available matcaps)\n *\n * @example\n * ```typescript\n * const { texture } = injectMatcapTexture(() => 42);\n * ```\n */\nexport function injectMatcapTexture(\n\tid: () => number | string = () => 0,\n\t{\n\t\tformat = () => 1024,\n\t\tonLoad,\n\t\tinjector,\n\t}: { format?: () => number; onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector } = {},\n) {\n\treturn assertInjector(injectMatcapTexture, injector, () => {\n\t\tconst matcapList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tmatcapList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_MATCAP = computed(() => matcapList()[0]);\n\t\tconst numTot = computed(() => Object.keys(matcapList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn matcapList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst fileName = computed(() => `${fileHash() || DEFAULT_MATCAP()}${getFormatString(format())}.png`);\n\t\tconst url = computed(() => `${MATCAP_ROOT}/${format()}/${fileName()}`);\n\n\t\tconst matcapTexture = injectTexture(url, { onLoad });\n\n\t\treturn { url, texture: matcapTexture, numTot };\n\t});\n}\n\n/**\n * Creates a reactive resource for loading matcap textures.\n * Matcaps provide realistic lighting without actual lights in the scene.\n *\n * @param id - Signal of matcap ID (number index or string hash)\n * @param config - Configuration options\n * @param config.format - Signal of texture resolution (64, 128, 256, 512, or 1024)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, resource, and numTot (total available matcaps)\n *\n * @example\n * ```typescript\n * const { resource } = matcapTextureResource(() => 42);\n * // Access texture: resource.value()\n * ```\n */\nexport function matcapTextureResource(\n\tid: () => number | string = () => 0,\n\t{\n\t\tformat = () => 1024,\n\t\tonLoad,\n\t\tinjector,\n\t}: { format?: () => number; onLoad?: (texture: THREE.Texture) => void; injector?: Injector } = {},\n) {\n\treturn assertInjector(matcapTextureResource, injector, () => {\n\t\tconst matcapList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tmatcapList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_MATCAP = computed(() => matcapList()[0]);\n\t\tconst numTot = computed(() => Object.keys(matcapList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn matcapList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst fileName = computed(() => `${fileHash() || DEFAULT_MATCAP()}${getFormatString(format())}.png`);\n\t\tconst url = computed(() => `${MATCAP_ROOT}/${format()}/${fileName()}`);\n\n\t\tconst resource = textureResource(url, { onLoad });\n\t\treturn { url, resource, numTot };\n\t});\n}\n\n/**\n * Options for the NgtsMatcapTexture structural directive.\n */\nexport interface NgtsMatcapTextureOptions {\n\t/**\n\t * Matcap ID (number index or string hash).\n\t * @default 0\n\t */\n\tid?: number | string;\n\t/**\n\t * Texture resolution (64, 128, 256, 512, or 1024).\n\t * @default 1024\n\t */\n\tformat?: number;\n}\n\n/**\n * Structural directive for loading and using matcap textures in templates.\n * Provides the loaded texture resource through the template context.\n *\n * @example\n * ```html\n * <ng-template [matcapTexture]=\"{ id: 42, format: 512 }\" let-resource>\n * @if (resource.hasValue()) {\n * <ngt-mesh-matcap-material [matcap]=\"resource.value()\" />\n * }\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[matcapTexture]' })\nexport class NgtsMatcapTexture {\n\tmatcapTexture = input<NgtsMatcapTextureOptions>();\n\tmatcapTextureLoaded = input<(texture: THREE.Texture) => void>();\n\n\tprivate template = inject(TemplateRef);\n\tprivate vcr = inject(ViewContainerRef);\n\n\tprivate id = computed(() => this.matcapTexture()?.id ?? 0);\n\tprivate format = computed(() => this.matcapTexture()?.format ?? 1024);\n\n\tprivate ref?: EmbeddedViewRef<{ $implicit: Signal<THREE.Texture | null> }>;\n\n\tconstructor() {\n\t\tconst { resource } = matcapTextureResource(this.id, {\n\t\t\tformat: this.format,\n\t\t\tonLoad: this.matcapTextureLoaded(),\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.ref = this.vcr.createEmbeddedView(this.template, { $implicit: resource });\n\t\t\tthis.ref.detectChanges();\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.ref?.destroy();\n\t\t});\n\t}\n\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsMatcapTexture,\n\t\tctx: unknown,\n\t): ctx is { $implicit: ResourceRef<THREE.Texture | undefined> } {\n\t\treturn true;\n\t}\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tInjector,\n\tResourceRef,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { injectTexture, textureResource } from 'angular-three-soba/loaders';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\nconst NORMAL_ROOT = 'https://rawcdn.githack.com/pmndrs/drei-assets/7a3104997e1576f83472829815b00880d88b32fb';\nconst LIST_URL = 'https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/normals/normals.json';\n\n/**\n * Settings for normal texture configuration.\n */\ninterface NgtsNormalTextureSettings {\n\t/**\n\t * Texture repeat values [x, y].\n\t * @default [1, 1]\n\t */\n\trepeat?: number[];\n\t/**\n\t * Anisotropic filtering level.\n\t * @default 1\n\t */\n\tanisotropy?: number;\n\t/**\n\t * Texture offset values [x, y].\n\t * @default [0, 0]\n\t */\n\toffset?: number[];\n}\n\n/**\n * Injects a normal texture from the normals library.\n * Normal textures add surface detail without additional geometry.\n *\n * @deprecated Use `normalTextureResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param id - Signal of normal texture ID (number index or string hash)\n * @param config - Configuration options\n * @param config.settings - Signal of texture settings (repeat, anisotropy, offset)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, texture signal, and numTot (total available normal textures)\n *\n * @example\n * ```typescript\n * const { texture } = injectNormalTexture(() => 42, {\n * settings: () => ({ repeat: [2, 2] })\n * });\n * ```\n */\nexport function injectNormalTexture(\n\tid: () => string | number = () => 0,\n\t{\n\t\tsettings = () => ({}),\n\t\tonLoad,\n\t\tinjector,\n\t}: { settings?: () => NgtsNormalTextureSettings; onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector },\n) {\n\treturn assertInjector(injectNormalTexture, injector, () => {\n\t\tconst normalList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tnormalList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_NORMAL = computed(() => normalList()[0]);\n\t\tconst numTot = computed(() => Object.keys(normalList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn normalList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst imageName = computed(() => fileHash() || DEFAULT_NORMAL());\n\t\tconst url = computed(() => `${NORMAL_ROOT}/normals/${imageName()}`);\n\n\t\tconst normalTexture = injectTexture(url, { onLoad });\n\n\t\teffect(() => {\n\t\t\tconst texture = normalTexture();\n\t\t\tif (!texture) return;\n\n\t\t\tconst { anisotropy = 1, repeat = [1, 1], offset = [0, 0] } = settings();\n\t\t\ttexture.wrapS = texture.wrapT = THREE.RepeatWrapping;\n\t\t\ttexture.repeat = new THREE.Vector2(repeat[0], repeat[1]);\n\t\t\ttexture.offset = new THREE.Vector2(offset[0], offset[1]);\n\t\t\ttexture.anisotropy = anisotropy;\n\t\t});\n\n\t\treturn { url, texture: normalTexture, numTot };\n\t});\n}\n\n/**\n * Creates a reactive resource for loading normal textures.\n * Normal textures add surface detail without additional geometry.\n *\n * @param id - Signal of normal texture ID (number index or string hash)\n * @param config - Configuration options\n * @param config.settings - Signal of texture settings (repeat, anisotropy, offset)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, resource, and numTot (total available normal textures)\n *\n * @example\n * ```typescript\n * const { resource } = normalTextureResource(() => 42);\n * // Access texture: resource.value()\n * ```\n */\nexport function normalTextureResource(\n\tid: () => string | number = () => 0,\n\t{\n\t\tsettings = () => ({}),\n\t\tonLoad,\n\t\tinjector,\n\t}: { settings?: () => NgtsNormalTextureSettings; onLoad?: (texture: THREE.Texture) => void; injector?: Injector },\n) {\n\treturn assertInjector(normalTextureResource, injector, () => {\n\t\tconst normalList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tnormalList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_NORMAL = computed(() => normalList()[0]);\n\t\tconst numTot = computed(() => Object.keys(normalList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn normalList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst imageName = computed(() => fileHash() || DEFAULT_NORMAL());\n\t\tconst url = computed(() => `${NORMAL_ROOT}/normals/${imageName()}`);\n\n\t\tconst resource = textureResource(url, { onLoad });\n\n\t\teffect(() => {\n\t\t\tif (!resource.hasValue()) return;\n\n\t\t\tconst texture = resource.value();\n\t\t\tconst { anisotropy = 1, repeat = [1, 1], offset = [0, 0] } = settings();\n\n\t\t\ttexture.wrapS = texture.wrapT = THREE.RepeatWrapping;\n\t\t\ttexture.repeat = new THREE.Vector2(repeat[0], repeat[1]);\n\t\t\ttexture.offset = new THREE.Vector2(offset[0], offset[1]);\n\t\t\ttexture.anisotropy = anisotropy;\n\t\t});\n\n\t\treturn { url, resource, numTot };\n\t});\n}\n\n/**\n * Options for the NgtsNormalTexture structural directive.\n * Extends NgtsNormalTextureSettings with an ID property.\n */\nexport interface NgtsNormalTextureOptions extends NgtsNormalTextureSettings {\n\t/**\n\t * Normal texture ID (number index or string hash).\n\t * @default 0\n\t */\n\tid?: number | string;\n}\n\n/**\n * Structural directive for loading and using normal textures in templates.\n * Provides the loaded texture resource through the template context.\n *\n * @example\n * ```html\n * <ng-template [normalTexture]=\"{ id: 42, repeat: [2, 2] }\" let-resource>\n * @if (resource.hasValue()) {\n * <ngt-mesh-standard-material [normalMap]=\"resource.value()\" />\n * }\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[normalTexture]' })\nexport class NgtsNormalTexture {\n\tnormalTexture = input<NgtsNormalTextureOptions>();\n\tnormalTextureLoaded = input<(texture: THREE.Texture) => void>();\n\n\tprivate template = inject(TemplateRef);\n\tprivate vcr = inject(ViewContainerRef);\n\n\tprivate id = computed(() => this.normalTexture()?.id ?? 0);\n\tprivate settings = computed(() => {\n\t\tconst { id: _, ...settings } = this.normalTexture() || {};\n\t\treturn settings;\n\t});\n\n\tprivate ref?: EmbeddedViewRef<{ $implicit: ResourceRef<THREE.Texture | undefined> }>;\n\n\tconstructor() {\n\t\tconst { resource } = normalTextureResource(this.id, {\n\t\t\tsettings: this.settings,\n\t\t\tonLoad: this.normalTextureLoaded(),\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.ref = this.vcr.createEmbeddedView(this.template, { $implicit: resource });\n\t\t\tthis.ref.detectChanges();\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.ref?.destroy();\n\t\t});\n\t}\n\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsNormalTexture,\n\t\tctx: unknown,\n\t): ctx is { $implicit: ResourceRef<THREE.Texture | undefined> } {\n\t\treturn true;\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, extend, omit, pick } from 'angular-three';\nimport { getVersion } from 'angular-three-soba/misc';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { DirectionalLight, Group, OrthographicCamera, Vector2 } from 'three';\nimport { NgtsAccumulativeShadows } from './accumulative-shadows';\n\n/**\n * Configuration options for the NgtsRandomizedLights component.\n * Extends the base group element options from Three.js.\n */\nexport interface NgtsRandomizedLightsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames it will jiggle the lights.\n\t * Frames is context aware - if a provider like AccumulativeShadows exists, frames will be taken from there.\n\t * @default 1\n\t */\n\tframes: number;\n\t/**\n\t * Light position in 3D space.\n\t * @default [0, 0, 0]\n\t */\n\tposition: [x: number, y: number, z: number];\n\t/**\n\t * Radius of the jiggle. Higher values make softer light.\n\t * @default 1\n\t */\n\tradius: number;\n\t/**\n\t * Amount of directional lights to create.\n\t * @default 8\n\t */\n\tamount: number;\n\t/**\n\t * Light intensity. Distributed among all lights.\n\t * @default Math.PI (for Three.js >= 155) or 1\n\t */\n\tintensity: number;\n\t/**\n\t * Ambient occlusion factor. Lower values mean less AO, higher values mean more.\n\t * You can mix AO and directional light.\n\t * @default 0.5\n\t */\n\tambient: number;\n\t/**\n\t * Whether the lights cast shadows.\n\t * @default true\n\t */\n\tcastShadow: boolean;\n\t/**\n\t * Shadow bias to prevent shadow acne.\n\t * @default 0.001\n\t */\n\tbias: number;\n\t/**\n\t * Shadow map size in pixels.\n\t * @default 512\n\t */\n\tmapSize: number;\n\t/**\n\t * Size of the shadow camera frustum.\n\t * @default 5\n\t */\n\tsize: number;\n\t/**\n\t * Shadow camera near plane distance.\n\t * @default 0.5\n\t */\n\tnear: number;\n\t/**\n\t * Shadow camera far plane distance.\n\t * @default 500\n\t */\n\tfar: number;\n}\n\nconst defaultOptions: NgtsRandomizedLightsOptions = {\n\tcastShadow: true,\n\tbias: 0.001,\n\tmapSize: 512,\n\tsize: 5,\n\tnear: 0.5,\n\tfar: 500,\n\tframes: 1,\n\tposition: [0, 0, 0],\n\tradius: 1,\n\tamount: 8,\n\tintensity: getVersion() >= 155 ? Math.PI : 1,\n\tambient: 0.5,\n};\n\n/**\n * Creates multiple randomized directional lights that jiggle their positions each frame.\n * Used in combination with AccumulativeShadows to create soft, natural-looking shadows.\n *\n * Must be used as a child of NgtsAccumulativeShadows.\n *\n * @example\n * ```html\n * <ngts-accumulative-shadows>\n * <ngts-randomized-lights [options]=\"{ amount: 8, radius: 4, intensity: 1 }\" />\n * </ngts-accumulative-shadows>\n * ```\n */\n@Component({\n\tselector: 'ngts-randomized-lights',\n\ttemplate: `\n\t\t<ngt-group #lights [parameters]=\"parameters()\">\n\t\t\t@for (i of count(); track $index) {\n\t\t\t\t<ngt-directional-light [castShadow]=\"castShadow()\" [intensity]=\"intensity() / amount()\">\n\t\t\t\t\t<ngt-value [rawValue]=\"bias()\" attach=\"shadow.bias\" />\n\t\t\t\t\t<ngt-vector2 *args=\"shadowMapSize()\" attach=\"shadow.mapSize\" />\n\t\t\t\t\t<ngt-orthographic-camera *args=\"cameraArgs()\" attach=\"shadow.camera\" />\n\t\t\t\t</ngt-directional-light>\n\t\t\t}\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsRandomizedLights {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, Object.keys(defaultOptions) as Array<keyof NgtsRandomizedLightsOptions>);\n\n\tlightsRef = viewChild.required<ElementRef<THREE.Group>>('lights');\n\n\tprivate accumulativeShadows = inject(NgtsAccumulativeShadows);\n\n\tprotected castShadow = pick(this.options, 'castShadow');\n\tprotected bias = pick(this.options, 'bias');\n\tprotected intensity = pick(this.options, 'intensity');\n\tprotected amount = pick(this.options, 'amount');\n\n\tprivate mapSize = pick(this.options, 'mapSize');\n\tprotected shadowMapSize = computed(() => [this.mapSize(), this.mapSize()]);\n\n\tprivate position = pick(this.options, 'position');\n\tprivate length = computed(() => new THREE.Vector3(...this.position()).length());\n\n\tprotected count = computed(() => Array.from({ length: this.amount() }, (_, index) => index));\n\n\tprivate size = pick(this.options, 'size');\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprotected cameraArgs = computed(() => [\n\t\t-this.size(),\n\t\tthis.size(),\n\t\tthis.size(),\n\t\t-this.size(),\n\t\tthis.near(),\n\t\tthis.far(),\n\t]);\n\n\tconstructor() {\n\t\textend({ Group, DirectionalLight, OrthographicCamera, Vector2 });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst lights = this.lightsRef().nativeElement;\n\t\t\tthis.accumulativeShadows.lightsMap.set(lights.uuid, this.update.bind(this));\n\t\t\tonCleanup(() => this.accumulativeShadows.lightsMap.delete(lights.uuid));\n\t\t});\n\t}\n\n\t/**\n\t * Updates the positions of all randomized lights.\n\t * Called automatically by AccumulativeShadows each frame.\n\t * Randomizes light positions based on ambient and radius settings.\n\t */\n\tupdate() {\n\t\tlet light: THREE.Object3D | undefined;\n\t\tconst lights = this.lightsRef().nativeElement;\n\t\tif (lights) {\n\t\t\tconst [{ ambient, radius, position }, length] = [this.options(), this.length()];\n\n\t\t\tfor (let i = 0; i < lights.children.length; i++) {\n\t\t\t\tlight = lights.children[i];\n\t\t\t\tif (Math.random() > ambient) {\n\t\t\t\t\tlight.position.set(\n\t\t\t\t\t\tposition[0] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t\tposition[1] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t\tposition[2] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tconst lambda = Math.acos(2 * Math.random() - 1) - Math.PI / 2.0;\n\t\t\t\t\tconst phi = 2 * Math.PI * Math.random();\n\t\t\t\t\tlight.position.set(\n\t\t\t\t\t\tMath.cos(lambda) * Math.cos(phi) * length,\n\t\t\t\t\t\tMath.abs(Math.cos(lambda) * Math.sin(phi) * length),\n\t\t\t\t\t\tMath.sin(lambda) * length,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDirective,\n\tInjector,\n\tTemplateRef,\n\tcomputed,\n\tcontentChild,\n\teffect,\n\tinput,\n} from '@angular/core';\nimport {\n\tNgtArgs,\n\tNgtAttachable,\n\tNgtComputeFunction,\n\tNgtPortal,\n\tNgtThreeElements,\n\textend,\n\tgetInstanceState,\n\tinjectStore,\n\tis,\n\tomit,\n\tpick,\n} from 'angular-three';\nimport { fbo } from 'angular-three-soba/misc';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * Configuration options for the NgtsRenderTexture component.\n * Extends the base texture element options from Three.js.\n */\nexport interface NgtsRenderTextureOptions extends Partial<Omit<NgtThreeElements['ngt-texture'], 'attach'>> {\n\t/**\n\t * Width of the render texture in pixels.\n\t * @default viewport width\n\t */\n\twidth?: number;\n\t/**\n\t * Height of the render texture in pixels.\n\t * @default viewport height\n\t */\n\theight?: number;\n\t/**\n\t * Number of samples for multisampling anti-aliasing (MSAA).\n\t * @default 8\n\t */\n\tsamples: number;\n\t/**\n\t * Whether to use a stencil buffer.\n\t * @default false\n\t */\n\tstencilBuffer: boolean;\n\t/**\n\t * Whether to use a depth buffer.\n\t * @default true\n\t */\n\tdepthBuffer: boolean;\n\t/**\n\t * Whether to generate mipmaps for the texture.\n\t * @default false\n\t */\n\tgenerateMipmaps: boolean;\n\t/**\n\t * Render priority for the render loop subscription.\n\t * @default 0\n\t */\n\trenderPriority: number;\n\t/**\n\t * Event priority for pointer events.\n\t * @default 0\n\t */\n\teventPriority: number;\n\t/**\n\t * Number of frames to render. Set to Infinity for continuous rendering,\n\t * or a specific number to render only that many frames.\n\t * @default Infinity\n\t */\n\tframes: number;\n\t/**\n\t * Custom compute function for pointer event handling.\n\t * Used to transform pointer events for the virtual scene.\n\t */\n\tcompute?: (event: any, state: any, previous: any) => false | undefined;\n}\n\n/**\n * Internal directive that handles the render loop for the render texture.\n * Manages rendering the virtual scene to the FBO (Frame Buffer Object).\n *\n * @internal\n */\n@Directive({ selector: '[renderTextureContainer]' })\nexport class NgtsRenderTextureContainer {\n\t/** The WebGL render target (Frame Buffer Object) to render into. */\n\tfbo = input.required<THREE.WebGLRenderTarget>();\n\t/** Priority in the render loop. Higher values render later. */\n\trenderPriority = input.required<number>();\n\t/** Number of frames to render. Use Infinity for continuous rendering. */\n\tframes = input.required<number>();\n\n\tprivate store = injectStore();\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst [renderPriority, { internal }] = [this.renderPriority(), this.store()];\n\n\t\t\tlet count = 0;\n\t\t\tlet oldAutoClear: boolean;\n\t\t\tlet oldXrEnabled: boolean;\n\t\t\tlet oldRenderTarget: THREE.WebGLRenderTarget | null;\n\t\t\tlet oldIsPresenting: boolean;\n\n\t\t\tconst cleanup = internal.subscribe(\n\t\t\t\t({ gl, scene, camera }) => {\n\t\t\t\t\tconst [fbo, frames] = [this.fbo(), this.frames()];\n\t\t\t\t\t// NOTE: render the frames ^ 2\n\t\t\t\t\t// due to some race condition, we want to render double the frames here.\n\t\t\t\t\tif (frames === Infinity || count < frames * frames) {\n\t\t\t\t\t\toldAutoClear = gl.autoClear;\n\t\t\t\t\t\toldXrEnabled = gl.xr.enabled;\n\t\t\t\t\t\toldRenderTarget = gl.getRenderTarget();\n\t\t\t\t\t\toldIsPresenting = gl.xr.isPresenting;\n\t\t\t\t\t\tgl.autoClear = true;\n\t\t\t\t\t\tgl.xr.enabled = false;\n\t\t\t\t\t\tgl.xr.isPresenting = false;\n\t\t\t\t\t\tgl.setRenderTarget(fbo);\n\t\t\t\t\t\tgl.render(scene, camera);\n\t\t\t\t\t\tgl.setRenderTarget(oldRenderTarget);\n\t\t\t\t\t\tgl.autoClear = oldAutoClear;\n\t\t\t\t\t\tgl.xr.enabled = oldXrEnabled;\n\t\t\t\t\t\tgl.xr.isPresenting = oldIsPresenting;\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trenderPriority,\n\t\t\t\tthis.store,\n\t\t\t);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tcleanup();\n\t\t\t});\n\t\t});\n\t}\n}\n\nconst defaultOptions: NgtsRenderTextureOptions = {\n\tsamples: 8,\n\trenderPriority: 0,\n\teventPriority: 0,\n\tframes: Infinity,\n\tstencilBuffer: false,\n\tdepthBuffer: true,\n\tgenerateMipmaps: false,\n};\n\n/**\n * Structural directive for defining the content to be rendered into the texture.\n * Provides type-safe template context with access to the virtual scene container and injector.\n *\n * @example\n * ```html\n * <ngts-render-texture>\n * <ng-template renderTextureContent let-container=\"container\">\n * <ngt-mesh>...</ngt-mesh>\n * </ng-template>\n * </ngts-render-texture>\n * ```\n */\n@Directive({ selector: 'ng-template[renderTextureContent]' })\nexport class NgtsRenderTextureContent {\n\t/**\n\t * Type guard for template context.\n\t *\n\t * @param _ - The directive instance\n\t * @param ctx - The template context to check\n\t * @returns Type predicate for the template context\n\t */\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsRenderTextureContent,\n\t\tctx: unknown,\n\t): ctx is { container: THREE.Object3D; injector: Injector } {\n\t\treturn true;\n\t}\n}\n\nlet incrementId = 0;\n\n/**\n * Renders a scene into a texture that can be used as a map on materials.\n * Creates a virtual scene with its own camera and renders it to an offscreen buffer.\n * Supports interactive raycasting through UV coordinate transformation.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-plane-geometry />\n * <ngt-mesh-standard-material>\n * <ngts-render-texture attach=\"map\">\n * <ng-template renderTextureContent>\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-mesh>\n * </ng-template>\n * </ngts-render-texture>\n * </ngt-mesh-standard-material>\n * </ngt-mesh>\n * ```\n */\n@Component({\n\tselector: 'ngts-render-texture',\n\ttemplate: `\n\t\t<ngt-portal [container]=\"virtualScene\" [state]=\"{ events: { compute: compute(), priority: eventPriority() } }\">\n\t\t\t<ng-template portalContent let-injector=\"injector\">\n\t\t\t\t<ng-container\n\t\t\t\t\trenderTextureContainer\n\t\t\t\t\t[fbo]=\"fbo\"\n\t\t\t\t\t[renderPriority]=\"renderPriority()\"\n\t\t\t\t\t[frames]=\"frames()\"\n\t\t\t\t\t[ngTemplateOutlet]=\"content()\"\n\t\t\t\t\t[ngTemplateOutletInjector]=\"injector\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ container: virtualScene, injector }\"\n\t\t\t\t>\n\t\t\t\t\t<ngt-group (pointerover)=\"(undefined)\" />\n\t\t\t\t</ng-container>\n\t\t\t</ng-template>\n\t\t</ngt-portal>\n\n\t\t<ngt-primitive *args=\"[fbo.texture]\" [attach]=\"attach()\" [parameters]=\"parameters()\" />\n\t`,\n\timports: [NgtPortal, NgtsRenderTextureContainer, NgtArgs, NgTemplateOutlet],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsRenderTextureImpl {\n\t/** Property path to attach the texture (e.g., 'map', 'envMap', 'alphaMap'). */\n\tattach = input<NgtAttachable>('map');\n\t/** Configuration options for the render texture. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'samples',\n\t\t'renderPriority',\n\t\t'eventPriority',\n\t\t'frames',\n\t\t'stencilBuffer',\n\t\t'depthBuffer',\n\t\t'generateMipmaps',\n\t\t'compute',\n\t\t'width',\n\t\t'height',\n\t]);\n\n\tcontent = contentChild.required(NgtsRenderTextureContent, { read: TemplateRef });\n\n\tprivate store = injectStore();\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate samples = pick(this.options, 'samples');\n\tprivate stencilBuffer = pick(this.options, 'stencilBuffer');\n\tprivate depthBuffer = pick(this.options, 'depthBuffer');\n\tprivate generateMipmaps = pick(this.options, 'generateMipmaps');\n\tprivate computeFn = pick(this.options, 'compute');\n\n\tprivate fboParams = computed(() => ({\n\t\twidth: (this.width() || this.store.size.width()) * this.store.viewport.dpr(),\n\t\theight: (this.height() || this.store.size.height()) * this.store.viewport.dpr(),\n\t\tsettings: {\n\t\t\tsamples: this.samples(),\n\t\t\tdepthBuffer: this.depthBuffer(),\n\t\t\tstencilBuffer: this.stencilBuffer(),\n\t\t\tgenerateMipmaps: this.generateMipmaps(),\n\t\t},\n\t}));\n\n\tprotected renderPriority = pick(this.options, 'renderPriority');\n\tprotected frames = pick(this.options, 'frames');\n\tprotected fbo = fbo(this.fboParams);\n\tprotected virtualScene = (() => {\n\t\tconst scene = new THREE.Scene();\n\t\tscene.name = `ngts-render-texture-virtual-scene-${incrementId++}`;\n\t\treturn scene;\n\t})();\n\tprotected eventPriority = pick(this.options, 'eventPriority');\n\tprotected compute = computed(() => this.computeFn() || this.uvCompute);\n\n\tprivate uvCompute: NgtComputeFunction = (event, root, previous) => {\n\t\tconst fbo = this.fbo;\n\t\tif (!fbo) return;\n\t\tconst state = root.snapshot;\n\t\tconst previousState = previous?.snapshot;\n\n\t\t// Since this is only a texture it does not have an easy way to obtain the parent, which we\n\t\t// need to transform event coordinates to local coordinates. We use ngt internals to find the\n\t\t// next Object3D.\n\t\tlet parent = getInstanceState(fbo.texture)?.parent();\n\t\twhile (parent && !is.three<THREE.Object3D>(parent, 'isObject3D')) {\n\t\t\tparent = getInstanceState(parent)?.parent();\n\t\t}\n\n\t\tif (!parent) return;\n\t\t// First we call the previous state-onion-layers compute, this is what makes it possible to nest portals\n\t\tif (previousState && !previousState.raycaster.camera) {\n\t\t\tpreviousState.events.compute?.(event, previous, previous.snapshot.previousRoot);\n\t\t}\n\t\t// We run a quick check against the parent, if it isn't hit there's no need to raycast at all\n\t\tconst [intersection] = previousState?.raycaster.intersectObject(parent) || [];\n\t\tif (!intersection) return;\n\t\t// We take that hits uv coords, set up this layers raycaster, et voilà, we have raycasting on arbitrary surfaces\n\t\tconst uv = intersection.uv;\n\t\tif (!uv) return;\n\t\tstate.raycaster.setFromCamera(state.pointer.set(uv.x * 2 - 1, uv.y * 2 - 1), state.camera);\n\t};\n\n\tconstructor() {\n\t\textend({ Group });\n\t}\n}\n\n/**\n * Tuple of components required for the render texture feature.\n * Import this array to use render texture functionality.\n *\n * @example\n * ```typescript\n * @Component({\n * imports: [NgtsRenderTexture],\n * // ...\n * })\n * ```\n */\nexport const NgtsRenderTexture = [NgtsRenderTextureImpl, NgtsRenderTextureContent] as const;\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDOCUMENT,\n\tinject,\n\tinput,\n} from '@angular/core';\nimport { extend, NgtArgs, NgtColor, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { CanvasTexture, Mesh, MeshBasicMaterial, PlaneGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsShadow component.\n * Extends the base mesh element options from Three.js.\n */\nexport interface NgtsShadowOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Position of the color stop in the radial gradient (0-1).\n\t * Lower values create a smaller, sharper shadow center.\n\t * @default 0.0\n\t */\n\tcolorStop: number;\n\t/**\n\t * Whether the shadow is affected by fog.\n\t * @default false\n\t */\n\tfog: boolean;\n\t/**\n\t * Color of the shadow.\n\t * @default 'black'\n\t */\n\tcolor: NgtColor;\n\t/**\n\t * Opacity of the shadow (0-1).\n\t * @default 0.5\n\t */\n\topacity: number;\n\t/**\n\t * Whether to write to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultShadowOptions: NgtsShadowOptions = {\n\tfog: false,\n\tdepthWrite: false,\n\tcolorStop: 0.0,\n\tcolor: 'black',\n\topacity: 0.5,\n};\n\n/**\n * Renders a simple circular drop shadow using a canvas-generated radial gradient texture.\n * Creates a flat plane with a transparent gradient that simulates a soft shadow.\n *\n * @example\n * ```html\n * <ngts-shadow [options]=\"{ color: 'black', opacity: 0.5, scale: [2, 2, 1] }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-shadow',\n\ttemplate: `\n\t\t<ngt-mesh [renderOrder]=\"renderOrder()\" [rotation.x]=\"-Math.PI / 2\" [parameters]=\"parameters()\">\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[opacity]=\"opacity()\"\n\t\t\t\t[fog]=\"fog()\"\n\t\t\t\t[depthWrite]=\"depthWrite()\"\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t>\n\t\t\t\t<ngt-canvas-texture *args=\"[canvas()]\" attach=\"map\" />\n\t\t\t</ngt-mesh-basic-material>\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsShadow {\n\tprotected readonly Math = Math;\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** Configuration options for the shadow appearance. */\n\toptions = input(defaultShadowOptions, { transform: mergeInputs(defaultShadowOptions) });\n\tprotected parameters = omit(this.options, ['colorStop', 'fog', 'color', 'opacity', 'depthWrite', 'renderOrder']);\n\n\tprivate document = inject(DOCUMENT);\n\n\tprotected renderOrder = pick(this.options, 'renderOrder');\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected fog = pick(this.options, 'fog');\n\tprotected depthWrite = pick(this.options, 'depthWrite');\n\n\tprivate color = pick(this.options, 'color');\n\tprivate colorStop = pick(this.options, 'colorStop');\n\n\tprotected canvas = computed(() => {\n\t\tconst [color, colorStop] = [this.color(), this.colorStop()];\n\n\t\tconst canvas = this.document.createElement('canvas');\n\t\tcanvas.width = 128;\n\t\tcanvas.height = 128;\n\t\tconst context = canvas.getContext('2d') as CanvasRenderingContext2D;\n\t\tconst gradient = context.createRadialGradient(\n\t\t\tcanvas.width / 2,\n\t\t\tcanvas.height / 2,\n\t\t\t0,\n\t\t\tcanvas.width / 2,\n\t\t\tcanvas.height / 2,\n\t\t\tcanvas.width / 2,\n\t\t);\n\t\tconst colorArgs = Array.isArray(color) ? color : [color];\n\t\tgradient.addColorStop(colorStop, new THREE.Color(...colorArgs).getStyle());\n\t\tgradient.addColorStop(1, 'rgba(0,0,0,0)');\n\t\tcontext.fillStyle = gradient;\n\t\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\t\treturn canvas;\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial, CanvasTexture });\n\t}\n}\n","import { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input } from '@angular/core';\nimport { NgtArgs, NgtThreeElements, NgtVector3, omit, pick, vector3 } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Sky } from 'three-stdlib';\n\n/**\n * Calculates the sun position from inclination and azimuth angles.\n *\n * @param inclination - Vertical angle of the sun (0-1, where 0.5 is horizon)\n * @param azimuth - Horizontal angle of the sun (0-1, representing full rotation)\n * @param vector - Optional vector to store the result (creates new if not provided)\n * @returns The calculated sun position vector\n */\nexport function calcPosFromAngles(inclination: number, azimuth: number, vector: THREE.Vector3 = new THREE.Vector3()) {\n\tconst theta = Math.PI * (inclination - 0.5);\n\tconst phi = 2 * Math.PI * (azimuth - 0.5);\n\n\tvector.x = Math.cos(phi);\n\tvector.y = Math.sin(theta);\n\tvector.z = Math.sin(phi);\n\n\treturn vector;\n}\n\n/**\n * Configuration options for the NgtsSky component.\n * Extends the base mesh element options from Three.js.\n */\nexport interface NgtsSkyOptions extends Partial<Omit<NgtThreeElements['ngt-mesh'], 'scale'>> {\n\t/**\n\t * Distance of the sky sphere from the camera.\n\t * @default 1000\n\t */\n\tdistance: number;\n\t/**\n\t * Vertical angle of the sun (0-1, where 0.5 is horizon).\n\t * Values above 0.5 place sun above horizon, below places it below.\n\t * @default 0.6\n\t */\n\tinclination: number;\n\t/**\n\t * Horizontal angle of the sun (0-1, representing full rotation).\n\t * @default 0.1\n\t */\n\tazimuth: number;\n\t/**\n\t * Mie scattering coefficient. Controls haze and sun disc intensity.\n\t * @default 0.005\n\t */\n\tmieCoefficient: number;\n\t/**\n\t * Mie scattering directional parameter. Controls sun disc size.\n\t * @default 0.8\n\t */\n\tmieDirectionalG: number;\n\t/**\n\t * Rayleigh scattering coefficient. Higher values create bluer skies.\n\t * @default 0.5\n\t */\n\trayleigh: number;\n\t/**\n\t * Atmospheric turbidity. Higher values create hazier atmospheres.\n\t * @default 10\n\t */\n\tturbidity: number;\n\t/**\n\t * Direct sun position vector. If provided, overrides inclination/azimuth.\n\t */\n\tsunPosition?: NgtVector3;\n}\n\nconst defaultOptions: NgtsSkyOptions = {\n\tdistance: 1000,\n\tinclination: 0.6,\n\tazimuth: 0.1,\n\tmieCoefficient: 0.005,\n\tmieDirectionalG: 0.8,\n\trayleigh: 0.5,\n\tturbidity: 10,\n};\n\n/**\n * Renders a procedural sky dome using atmospheric scattering simulation.\n * Based on the Three.js Sky shader which simulates realistic sky colors based on sun position.\n *\n * @example\n * ```html\n * <ngts-sky [options]=\"{ turbidity: 10, rayleigh: 2, inclination: 0.5 }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-sky',\n\ttemplate: `\n\t\t<ngt-primitive\n\t\t\t*args=\"[sky]\"\n\t\t\t[parameters]=\"parameters()\"\n\t\t\t[scale]=\"scale()\"\n\t\t\t[material.uniforms.mieCoefficient.value]=\"mieCoefficient()\"\n\t\t\t[material.uniforms.mieDirectionalG.value]=\"mieDirectionalG()\"\n\t\t\t[material.uniforms.rayleigh.value]=\"rayleigh()\"\n\t\t\t[material.uniforms.sunPosition.value]=\"calculatedSunPosition()\"\n\t\t\t[material.uniforms.turbidity.value]=\"turbidity()\"\n\t\t>\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 NgtsSky {\n\t/** Configuration options for the sky appearance. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'distance',\n\t\t'inclination',\n\t\t'azimuth',\n\t\t'sunPosition',\n\t\t'turbidity',\n\t\t'mieCoefficient',\n\t\t'mieDirectionalG',\n\t\t'sunPosition',\n\t]);\n\n\tprivate distance = pick(this.options, 'distance');\n\tprotected turbidity = pick(this.options, 'turbidity');\n\tprotected mieCoefficient = pick(this.options, 'mieCoefficient');\n\tprotected mieDirectionalG = pick(this.options, 'mieDirectionalG');\n\tprotected rayleigh = pick(this.options, 'rayleigh');\n\n\tprotected scale = computed(() => new THREE.Vector3().setScalar(this.distance()));\n\n\tprivate inclination = pick(this.options, 'inclination');\n\tprivate azimuth = pick(this.options, 'azimuth');\n\tprivate sunPosition = vector3(this.options, 'sunPosition', true);\n\tprotected calculatedSunPosition = computed(() => {\n\t\tconst sunPosition = this.sunPosition();\n\t\tif (sunPosition) return sunPosition;\n\t\treturn calcPosFromAngles(this.inclination(), this.azimuth());\n\t});\n\n\tprotected sky = new Sky();\n}\n","import { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input } from '@angular/core';\nimport { beforeRender, injectStore, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { Sparkles, type SparklesProps } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\n\n/**\n * Configuration options for the NgtsSparkles component.\n * Combines Three.js points element options with sparkle-specific properties.\n */\nexport type NgtsSparklesOptions = Partial<NgtThreeElements['ngt-points']> & SparklesProps;\n\n/**\n * Default options for the sparkles effect.\n * @default { count: 100, speed: 1, opacity: 1, scale: 1, noise: 1 }\n */\nconst defaultSparklesOptions: NgtsSparklesOptions = {\n\tcount: 100,\n\tspeed: 1,\n\topacity: 1,\n\tscale: 1,\n\tnoise: 1,\n};\n\n/**\n * Renders animated sparkle particles floating in 3D space.\n * Creates a magical, sparkling effect using GPU-accelerated points.\n *\n * @example\n * ```html\n * <ngts-sparkles [options]=\"{ count: 50, scale: 2, size: 6, speed: 0.4, color: 'gold' }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-sparkles',\n\ttemplate: `\n\t\t<ngt-primitive *args=\"[sparkles()]\" [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-primitive>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSparkles {\n\t/** Configuration options for the sparkles effect. */\n\toptions = input(defaultSparklesOptions, { transform: mergeInputs(defaultSparklesOptions) });\n\tprotected parameters = omit(this.options, ['noise', 'count', 'speed', 'opacity', 'scale', 'size', 'color']);\n\tprivate sparklesOptions = pick(this.options, ['noise', 'count', 'speed', 'opacity', 'scale', 'size', 'color']);\n\n\tprivate store = injectStore();\n\n\t/**\n\t * The underlying Sparkles instance containing the points geometry and material.\n\t * Exposes the Three.js Points object for advanced manipulation.\n\t */\n\tsparkles = computed(() => {\n\t\tconst s = new Sparkles(this.sparklesOptions());\n\t\ts.setPixelRatio(this.store.snapshot.viewport.dpr);\n\t\treturn s;\n\t});\n\n\tconstructor() {\n\t\tbeforeRender(({ clock }) => {\n\t\t\tthis.sparkles().update(clock.elapsedTime);\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, injectStore, is, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { NgtsHelper } from 'angular-three-soba/abstractions';\nimport { SpotLightMaterial } from 'angular-three-soba/vanilla-exports';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, MeshBasicMaterial, PlaneGeometry, RepeatWrapping, SpotLight } from 'three';\nimport { FullScreenQuad } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsSpotLight component.\n * Extends the base spot light element options from Three.js.\n */\nexport interface NgtsSpotLightOptions extends Partial<NgtThreeElements['ngt-spot-light']> {\n\t/**\n\t * Depth texture for soft volumetric lighting. Set to null to disable.\n\t * @default null\n\t */\n\tdepthBuffer: THREE.DepthTexture | null;\n\t/**\n\t * Light attenuation factor. Controls how quickly light fades.\n\t * @default 5\n\t */\n\tattenuation?: number;\n\t/**\n\t * Power of the light cone angle falloff.\n\t * @default 5\n\t */\n\tanglePower?: number;\n\t/**\n\t * Radius of the light cone at the top (near the light source).\n\t * @default 0.1\n\t */\n\tradiusTop?: number;\n\t/**\n\t * Radius of the light cone at the bottom (far from the light source).\n\t * @default angle * 7\n\t */\n\tradiusBottom?: number;\n\t/**\n\t * Opacity of the volumetric light cone.\n\t * @default 1\n\t */\n\topacity?: number;\n\t/**\n\t * Color of the light.\n\t * @default 'white'\n\t */\n\tcolor?: THREE.ColorRepresentation;\n\t/**\n\t * Whether to render the volumetric light cone mesh.\n\t * @default true\n\t */\n\tvolumetric?: boolean;\n\t/**\n\t * Whether to show the SpotLightHelper for debugging.\n\t * @default false\n\t */\n\tdebug?: boolean;\n}\n\n/**\n * Configuration options for the volumetric mesh component.\n * Same as NgtsSpotLightOptions but without the volumetric toggle.\n */\nexport type NgtsVolumetricMeshOptions = Omit<NgtsSpotLightOptions, 'volumetric'>;\n\nconst defaultVolumetricMeshOptions: NgtsVolumetricMeshOptions = {\n\topacity: 1,\n\tdistance: 5,\n\tangle: 0.15,\n\tattenuation: 5,\n\tanglePower: 5,\n\tcolor: 'white',\n\tdepthBuffer: null,\n};\n\n/**\n * Renders the volumetric light cone mesh for the spot light effect.\n * Creates a cylinder geometry that visualizes the light beam with proper attenuation.\n *\n * @internal Used internally by NgtsSpotLight\n */\n@Component({\n\tselector: 'ngts-volumetric-mesh',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [geometry]=\"geometry()\" [raycast]=\"null\">\n\t\t\t<ngt-primitive\n\t\t\t\t*args=\"[material]\"\n\t\t\t\tattach=\"material\"\n\t\t\t\t[uniforms.opacity.value]=\"opacity()\"\n\t\t\t\t[uniforms.lightColor.value]=\"color()\"\n\t\t\t\t[uniforms.attenuation.value]=\"attenuation()\"\n\t\t\t\t[uniforms.anglePower.value]=\"anglePower()\"\n\t\t\t\t[uniforms.depth.value]=\"depthBuffer()\"\n\t\t\t\t[uniforms.cameraNear.value]=\"camera.near()\"\n\t\t\t\t[uniforms.cameraFar.value]=\"camera.far()\"\n\t\t\t\t[uniforms.resolution.value]=\"depthBuffer() ? [size.width() * dpr(), size.height() * dpr()] : [0, 0]\"\n\t\t\t/>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsVolumetricMesh {\n\t/** Configuration options for the volumetric mesh. */\n\toptions = input(defaultVolumetricMeshOptions, { transform: mergeInputs(defaultVolumetricMeshOptions) });\n\n\t/** Reference to the underlying mesh element. */\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\n\tprivate store = injectStore();\n\tprotected size = this.store.size;\n\tprotected dpr = this.store.viewport.dpr;\n\tprotected camera = this.store.camera;\n\n\tprivate radiusTop = pick(this.options, 'radiusTop');\n\tprivate radiusBottom = pick(this.options, 'radiusBottom');\n\tprivate angle = pick(this.options, 'angle');\n\tprivate distance = pick(this.options, 'distance');\n\n\tprivate normalizedRadiusTop = computed(() => (this.radiusTop() === undefined ? 0.1 : this.radiusTop()));\n\tprivate normalizedRadiusBottom = computed(() =>\n\t\tthis.radiusBottom() === undefined ? this.angle()! * 7 : this.radiusBottom(),\n\t);\n\n\tprotected material = new SpotLightMaterial();\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected color = pick(this.options, 'color');\n\tprotected attenuation = pick(this.options, 'attenuation');\n\tprotected anglePower = pick(this.options, 'anglePower');\n\tprotected depthBuffer = pick(this.options, 'depthBuffer');\n\n\tprotected geometry = computed(() => {\n\t\tconst geometry = new THREE.CylinderGeometry(\n\t\t\tthis.normalizedRadiusTop(),\n\t\t\tthis.normalizedRadiusBottom(),\n\t\t\tthis.distance(),\n\t\t\t128,\n\t\t\t64,\n\t\t\ttrue,\n\t\t);\n\t\tgeometry.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -this.distance()! / 2, 0));\n\t\tgeometry.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));\n\t\treturn geometry;\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh });\n\n\t\tconst vec = new THREE.Vector3();\n\n\t\tbeforeRender(() => {\n\t\t\tconst mesh = this.meshRef().nativeElement;\n\t\t\tconst material = this.material;\n\n\t\t\tmaterial.uniforms['spotPosition'].value.copy(mesh.getWorldPosition(vec));\n\t\t\tif (mesh.parent) {\n\t\t\t\tmesh.lookAt((mesh.parent as any).target.getWorldPosition(vec));\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Shared logic for spot light shadow components.\n * Handles shadow map sizing and mesh positioning to follow the spot light target.\n *\n * @param spotLight - Reference to the parent spot light element\n * @param mesh - Reference to the shadow mesh element\n * @param width - Shadow map width\n * @param height - Shadow map height\n * @param distance - Distance factor for shadow placement\n * @param injector - Optional injector for dependency injection\n *\n * @internal\n */\nfunction spotLightCommon(\n\tspotLight: () => ElementRef<THREE.SpotLight> | null,\n\tmesh: () => ElementRef<Mesh> | null,\n\twidth: () => number,\n\theight: () => number,\n\tdistance: () => number,\n\tinjector?: Injector,\n) {\n\tassertInjector(spotLightCommon, injector, () => {\n\t\tconst pos = new THREE.Vector3();\n\t\tconst dir = new THREE.Vector3();\n\n\t\teffect(() => {\n\t\t\tconst [_spotLight, _width, _height] = [spotLight()?.nativeElement, width(), height()];\n\t\t\tif (!_spotLight) return;\n\t\t\tif (is.three<THREE.SpotLight>(_spotLight, 'isSpotLight')) {\n\t\t\t\t_spotLight.shadow.mapSize.set(_width, _height);\n\t\t\t\tif (_spotLight.shadow.map) {\n\t\t\t\t\t_spotLight.shadow.map.setSize(_width, _height);\n\t\t\t\t}\n\t\t\t\t_spotLight.shadow.needsUpdate = true;\n\t\t\t} else {\n\t\t\t\tthrow new Error('NgtsSpotLightShadow must be a child of a NgtsSpotLight');\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst [_spotLight, _mesh] = [spotLight()?.nativeElement, mesh()?.nativeElement];\n\t\t\tif (!_spotLight || !_mesh) return;\n\n\t\t\tconst A = _spotLight.position;\n\t\t\tconst B = _spotLight.target.position;\n\n\t\t\tdir.copy(B).sub(A);\n\t\t\tconst len = dir.length();\n\t\t\tdir.normalize().multiplyScalar(len * distance());\n\t\t\tpos.copy(A).add(dir);\n\n\t\t\t_mesh.position.copy(pos);\n\t\t\t_mesh.lookAt(_spotLight.target.position);\n\t\t});\n\t});\n}\n\n/**\n * Configuration options for shadow mesh components.\n *\n * @internal\n */\ninterface NgtsShadowMeshOptions {\n\t/**\n\t * Distance factor for shadow placement along the light direction.\n\t * @default 0.4\n\t */\n\tdistance: number;\n\t/**\n\t * Alpha test threshold for shadow transparency.\n\t * @default 0.5\n\t */\n\talphaTest: number;\n\t/**\n\t * Scale of the shadow mesh.\n\t * @default 1\n\t */\n\tscale: number;\n\t/**\n\t * Width of the shadow map in pixels.\n\t * @default 512\n\t */\n\twidth: number;\n\t/**\n\t * Height of the shadow map in pixels.\n\t * @default 512\n\t */\n\theight: number;\n\t/**\n\t * Texture to use as the shadow alpha map.\n\t */\n\tmap?: THREE.Texture;\n}\n\nconst defaultSpotLightShadowOptions: NgtsShadowMeshOptions = {\n\tdistance: 0.4,\n\talphaTest: 0.5,\n\tscale: 1,\n\twidth: 512,\n\theight: 512,\n};\n\n/**\n * Shadow component that uses a custom shader to generate procedural shadow patterns.\n * Renders the shader output to a texture used as an alpha map for the shadow mesh.\n *\n * @internal Used internally by NgtsSpotLightShadow\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow-shader',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"scale()\" castShadow>\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t[alphaTest]=\"alphaTest()\"\n\t\t\t\t[alphaMap]=\"texture()\"\n\t\t\t\t[opacity]=\"debug() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh-basic-material>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadowShader {\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** GLSL shader code for generating the shadow pattern. */\n\tshader = input.required<string>();\n\t/** Configuration options for the shadow mesh. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n\n\t/** Reference to the shadow mesh element. */\n\tmeshRef = viewChild.required<ElementRef<Mesh>>('mesh');\n\n\tprivate spotLight = inject(NgtsSpotLight);\n\tprotected debug = this.spotLight.debug;\n\n\tprotected scale = pick(this.options, 'scale');\n\tprotected alphaTest = pick(this.options, 'alphaTest');\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate map = pick(this.options, 'map');\n\tprivate distance = pick(this.options, 'distance');\n\n\tprivate renderTarget = computed(() => {\n\t\treturn new THREE.WebGLRenderTarget(this.width(), this.height(), {\n\t\t\tformat: THREE.RGBAFormat,\n\t\t\tstencilBuffer: false,\n\t\t\t// depthTexture: null!\n\t\t});\n\t});\n\n\tprotected texture = computed(() => {\n\t\tconst renderTarget = this.renderTarget();\n\t\trenderTarget.texture.wrapT = renderTarget.texture.wrapS = THREE.RepeatWrapping;\n\t\treturn renderTarget.texture;\n\t});\n\n\tprivate fsQuad = computed(() => {\n\t\treturn new FullScreenQuad(\n\t\t\tnew THREE.ShaderMaterial({\n\t\t\t\tuniforms: this.uniforms,\n\t\t\t\tvertexShader: /* language=glsl glsl */ `\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n\t\t\t\tfragmentShader: this.shader(),\n\t\t\t}),\n\t\t);\n\t});\n\n\tprivate uniforms = {\n\t\tuShadowMap: { value: undefined as THREE.Texture | undefined },\n\t\tuTime: { value: 0 },\n\t};\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial });\n\n\t\tspotLightCommon(this.spotLight.spotLightRef, this.meshRef, this.width, this.height, this.distance);\n\n\t\teffect(() => {\n\t\t\tthis.uniforms.uShadowMap.value = this.map();\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst fsQuad = this.fsQuad();\n\t\t\tonCleanup(() => {\n\t\t\t\tfsQuad.material.dispose();\n\t\t\t\tfsQuad.dispose();\n\t\t\t});\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst renderTarget = this.renderTarget();\n\t\t\tonCleanup(() => {\n\t\t\t\trenderTarget.dispose();\n\t\t\t});\n\t\t});\n\n\t\tbeforeRender(({ gl, delta }) => {\n\t\t\tthis.uniforms.uTime.value += delta;\n\n\t\t\tgl.setRenderTarget(this.renderTarget());\n\t\t\tthis.fsQuad().render(gl);\n\t\t\tgl.setRenderTarget(null);\n\t\t});\n\t}\n}\n\n/**\n * Shadow component that uses a provided texture directly as the alpha map.\n * Simpler alternative to the shader-based shadow when custom patterns aren't needed.\n *\n * @internal Used internally by NgtsSpotLightShadow\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow-no-shader',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"scale()\" castShadow>\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t[alphaTest]=\"alphaTest()\"\n\t\t\t\t[alphaMap]=\"map()\"\n\t\t\t\t[opacity]=\"debug() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh-basic-material>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadowNoShader {\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** Configuration options for the shadow mesh. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n\n\t/** Reference to the shadow mesh element. */\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\n\tprivate spotLight = inject(NgtsSpotLight);\n\tprotected debug = this.spotLight.debug;\n\n\tprotected alphaTest = pick(this.options, 'alphaTest');\n\tprotected scale = pick(this.options, 'scale');\n\tprotected map = computed(() => {\n\t\tconst map = this.options().map;\n\t\tif (map) {\n\t\t\tmap.wrapS = map.wrapT = RepeatWrapping;\n\t\t}\n\t\treturn map;\n\t});\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate distance = pick(this.options, 'distance');\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial });\n\n\t\tspotLightCommon(this.spotLight.spotLightRef, this.meshRef, this.width, this.height, this.distance);\n\t}\n}\n\n/**\n * Casts shaped shadows from a spot light using a projected texture or shader.\n * Must be used as a child of NgtsSpotLight.\n *\n * @example\n * ```html\n * <ngts-spot-light>\n * <ngts-spot-light-shadow [options]=\"{ map: shadowTexture, scale: 4 }\" />\n * </ngts-spot-light>\n * ```\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow',\n\ttemplate: `\n\t\t@if (shader(); as shader) {\n\t\t\t<ngts-spot-light-shadow-shader [shader]=\"shader\" [options]=\"options()\" />\n\t\t} @else {\n\t\t\t<ngts-spot-light-shadow-no-shader [options]=\"options()\" />\n\t\t}\n\t`,\n\timports: [NgtsSpotLightShadowShader, NgtsSpotLightShadowNoShader],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadow {\n\t/** Optional GLSL shader code for custom shadow patterns. If not provided, uses texture-based shadows. */\n\tshader = input<string>();\n\t/** Configuration options for the shadow. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n}\n\nconst defaultOptions: NgtsSpotLightOptions = {\n\topacity: 1,\n\tcolor: 'white',\n\tdistance: 5,\n\tangle: 0.15,\n\tattenuation: 5,\n\tanglePower: 5,\n\tvolumetric: true,\n\tdebug: false,\n\tdepthBuffer: null,\n};\n\n/**\n * Enhanced spot light with optional volumetric lighting effect.\n * Creates a visible light cone that simulates light scattering through atmosphere or dust.\n *\n * @example\n * ```html\n * <ngts-spot-light\n * [options]=\"{\n * position: [0, 5, 0],\n * angle: 0.5,\n * intensity: 1,\n * color: 'white',\n * volumetric: true\n * }\"\n * />\n * ```\n */\n@Component({\n\tselector: 'ngts-spot-light',\n\ttemplate: `\n\t\t<ngt-group>\n\t\t\t<ngt-spot-light\n\t\t\t\t#spotLight\n\t\t\t\t[angle]=\"angle()\"\n\t\t\t\t[color]=\"color()\"\n\t\t\t\t[distance]=\"distance()\"\n\t\t\t\tcastShadow\n\t\t\t\t[parameters]=\"parameters()\"\n\t\t\t>\n\t\t\t\t@if (volumetric()) {\n\t\t\t\t\t<ngts-volumetric-mesh [options]=\"volumetricOptions()\" />\n\t\t\t\t}\n\n\t\t\t\t@if (debug()) {\n\t\t\t\t\t<ngts-helper [type]=\"SpotLightHelper\" />\n\t\t\t\t}\n\t\t\t</ngt-spot-light>\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsVolumetricMesh, NgtsHelper],\n})\nexport class NgtsSpotLight {\n\tprotected readonly SpotLightHelper = THREE.SpotLightHelper;\n\n\t/** Configuration options for the spot light. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'opacity',\n\t\t'radiusTop',\n\t\t'radiusBottom',\n\t\t'depthBuffer',\n\t\t'color',\n\t\t'distance',\n\t\t'angle',\n\t\t'attenuation',\n\t\t'anglePower',\n\t\t'volumetric',\n\t\t'debug',\n\t]);\n\tprotected volumetricOptions = pick(this.options, [\n\t\t'opacity',\n\t\t'radiusTop',\n\t\t'radiusBottom',\n\t\t'depthBuffer',\n\t\t'color',\n\t\t'distance',\n\t\t'angle',\n\t\t'attenuation',\n\t\t'anglePower',\n\t\t'debug',\n\t]);\n\n\t/** Reference to the underlying spot light element. */\n\tspotLightRef = viewChild.required<ElementRef<THREE.SpotLight>>('spotLight');\n\n\t/** Whether debug mode is enabled (shows SpotLightHelper). */\n\tdebug = pick(this.options, 'debug');\n\tprotected angle = pick(this.options, 'angle');\n\tprotected color = pick(this.options, 'color');\n\tprotected distance = pick(this.options, 'distance');\n\tprotected volumetric = pick(this.options, 'volumetric');\n\n\tconstructor() {\n\t\textend({ Group, SpotLight });\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDirective,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { extend, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport { AmbientLight, Group, PointLight, SpotLight, Vector2 } from 'three';\nimport { NgtsAccumulativeShadows, NgtsAccumulativeShadowsOptions } from './accumulative-shadows';\nimport { NgtsBounds } from './bounds';\nimport { NgtsCenter, NgtsCenterOptions, NgtsCenterState } from './center';\nimport { NgtsContactShadows, NgtsContactShadowsOptions } from './contact-shadows';\nimport { NgtsEnvironment, NgtsEnvironmentOptions } from './environment/environment';\nimport { type NgtsEnvironmentPresets } from './environment/environment-resource';\nimport { NgtsRandomizedLights, NgtsRandomizedLightsOptions } from './randomized-lights';\n\n/**\n * Predefined lighting presets for the stage.\n * Each preset defines main and fill light positions as [x, y, z] multipliers of the scene radius.\n */\nconst presets = {\n\trembrandt: { main: [1, 2, 1], fill: [-2, -0.5, -2] },\n\tportrait: { main: [-1, 2, 0.5], fill: [-1, 0.5, -1.5] },\n\tupfront: { main: [0, 2, 1], fill: [-1, 0.5, -1.5] },\n\tsoft: { main: [-2, 4, 4], fill: [-1, 0.5, -1.5] },\n} as const;\n\n/**\n * Configuration options for stage shadows.\n * Combines options from both accumulative and contact shadow components.\n */\ntype NgtsStageShadowsOptions = Partial<NgtsAccumulativeShadowsOptions> &\n\tPartial<NgtsRandomizedLightsOptions> &\n\tPartial<NgtsContactShadowsOptions> & {\n\t\t/**\n\t\t * Type of shadow to use.\n\t\t * 'contact' - Fast, simple contact shadows.\n\t\t * 'accumulative' - Soft, accumulated shadows from multiple samples.\n\t\t */\n\t\ttype: 'contact' | 'accumulative';\n\t\t/**\n\t\t * Vertical offset for the shadow plane.\n\t\t * @default 0\n\t\t */\n\t\toffset: number;\n\t\t/**\n\t\t * Shadow bias to prevent shadow acne.\n\t\t * @default -0.0001\n\t\t */\n\t\tbias: number;\n\t\t/**\n\t\t * Shadow normal bias.\n\t\t * @default 0\n\t\t */\n\t\tnormalBias: number;\n\t\t/**\n\t\t * Shadow map size in pixels.\n\t\t * @default 1024\n\t\t */\n\t\tsize: number;\n\t};\n\n/**\n * Configuration options for the NgtsStage component.\n * Extends the base group element options from Three.js.\n */\nexport interface NgtsStageOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Lighting preset or custom light configuration.\n\t * Available presets: 'rembrandt', 'portrait', 'upfront', 'soft'.\n\t * Or provide custom { main: [x, y, z], fill: [x, y, z] } positions.\n\t * @default 'rembrandt'\n\t */\n\tpreset:\n\t\t| 'rembrandt'\n\t\t| 'portrait'\n\t\t| 'upfront'\n\t\t| 'soft'\n\t\t| { main: [x: number, y: number, z: number]; fill: [x: number, y: number, z: number] };\n\t/**\n\t * Shadow configuration. Can be:\n\t * - false: No shadows\n\t * - 'contact': Simple contact shadows\n\t * - 'accumulative': Soft accumulated shadows\n\t * - NgtsStageShadowsOptions: Full shadow configuration\n\t * @default 'contact'\n\t */\n\tshadows: boolean | 'contact' | 'accumulative' | NgtsStageShadowsOptions;\n\t/**\n\t * Whether to automatically adjust the camera to fit the content.\n\t * Can be a boolean or a number representing the margin.\n\t * @default true\n\t */\n\tadjustCamera: boolean | number;\n\t/**\n\t * Environment map configuration.\n\t * Can be a preset name, full environment options, or null to disable.\n\t * @default 'city'\n\t */\n\tenvironment: NgtsEnvironmentPresets | Partial<NgtsEnvironmentOptions> | null;\n\t/**\n\t * Overall lighting intensity multiplier.\n\t * @default 0.5\n\t */\n\tintensity: number;\n\t/**\n\t * Options for centering the content within the stage.\n\t */\n\tcenter?: Partial<NgtsCenterOptions>;\n}\n\nconst defaultOptions: NgtsStageOptions = {\n\tpreset: 'rembrandt',\n\tshadows: 'contact',\n\tadjustCamera: true,\n\tenvironment: 'city',\n\tintensity: 0.5,\n};\n\n/**\n * Internal directive that triggers camera refitting when the stage radius changes.\n *\n * @internal\n */\n@Directive({ selector: 'ngts-stage-refit' })\nexport class NgtsStageRefit {\n\t/** Current radius of the scene bounds, used to trigger camera refit. */\n\tradius = input.required<number>();\n\t/** Whether automatic camera adjustment is enabled. */\n\tadjustCamera = input.required<boolean>();\n\n\tconstructor() {\n\t\tconst bounds = inject(NgtsBounds);\n\n\t\teffect(() => {\n\t\t\tconst [, adjustCamera] = [this.radius(), this.adjustCamera()];\n\t\t\tif (adjustCamera) bounds.refresh().clip().fit();\n\t\t});\n\t}\n}\n\n/**\n * A complete stage setup for presenting 3D models with lighting, shadows, and environment.\n * Automatically centers content, sets up professional lighting presets, and configures shadows.\n *\n * This is a convenience component that combines:\n * - Bounds for auto-fitting the camera\n * - Center for centering content\n * - Environment map for reflections\n * - Contact or accumulative shadows\n * - Three-point lighting setup\n *\n * @example\n * ```html\n * <ngts-stage [options]=\"{ preset: 'rembrandt', shadows: 'contact', environment: 'city' }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-stage>\n * ```\n */\n@Component({\n\tselector: 'ngts-stage',\n\ttemplate: `\n\t\t<ngt-ambient-light [intensity]=\"intensity() / 3\" />\n\t\t<ngt-spot-light\n\t\t\t[penumbra]=\"1\"\n\t\t\t[position]=\"[config().main[0] * radius(), config().main[1] * radius(), config().main[2] * radius()]\"\n\t\t\t[intensity]=\"intensity() * 2\"\n\t\t\t[castShadow]=\"!!shadows()\"\n\t\t>\n\t\t\t<ngt-value [rawValue]=\"shadowBias()\" attach=\"shadow.bias\" />\n\t\t\t<ngt-value [rawValue]=\"normalBias()\" attach=\"shadow.normalBias\" />\n\t\t\t<ngt-vector2 *args=\"[shadowSize(), shadowSize()]\" attach=\"shadow.mapSize\" />\n\t\t</ngt-spot-light>\n\t\t<ngt-point-light\n\t\t\t[position]=\"[config().fill[0] * radius(), config().fill[1] * radius(), config().fill[2] * radius()]\"\n\t\t\t[intensity]=\"intensity()\"\n\t\t/>\n\n\t\t<ngts-bounds [options]=\"boundsOptions()\">\n\t\t\t<ngts-stage-refit [radius]=\"radius()\" [adjustCamera]=\"!!adjustCamera()\" />\n\t\t\t<ngts-center [options]=\"centerOptions()\" (centered)=\"onCenter($event)\">\n\t\t\t\t<ng-content />\n\t\t\t</ngts-center>\n\t\t</ngts-bounds>\n\n\t\t<ngt-group [position]=\"[0, -height() / 2 - shadowOffset() / 2, 0]\">\n\t\t\t@if (contactShadow()) {\n\t\t\t\t<ngts-contact-shadows [options]=\"shadowOptions()\" />\n\t\t\t}\n\n\t\t\t@if (accumulativeShadow()) {\n\t\t\t\t<ngts-accumulative-shadows [options]=\"shadowOptions()\">\n\t\t\t\t\t<ngts-randomized-lights [options]=\"randomizedLightsOptions()\" />\n\t\t\t\t</ngts-accumulative-shadows>\n\t\t\t}\n\t\t</ngt-group>\n\n\t\t@if (environment()) {\n\t\t\t<ngts-environment [options]=\"environmentOptions()\" />\n\t\t}\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [\n\t\tNgtArgs,\n\t\tNgtsBounds,\n\t\tNgtsStageRefit,\n\t\tNgtsCenter,\n\t\tNgtsContactShadows,\n\t\tNgtsAccumulativeShadows,\n\t\tNgtsEnvironment,\n\t\tNgtsRandomizedLights,\n\t],\n})\nexport class NgtsStage {\n\t/** Configuration options for the stage setup. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprivate parameters = omit(this.options, [\n\t\t'preset',\n\t\t'shadows',\n\t\t'adjustCamera',\n\t\t'environment',\n\t\t'intensity',\n\t\t'center',\n\t]);\n\n\t/** Emits when the content has been centered, providing the calculated dimensions. */\n\tcentered = output<NgtsCenterState>();\n\n\tprivate dims = signal({ radius: 0, width: 0, height: 0, depth: 0 });\n\tprotected radius = pick(this.dims, 'radius');\n\tprotected height = pick(this.dims, 'height');\n\n\tprivate center = pick(this.options, 'center');\n\tprotected adjustCamera = pick(this.options, 'adjustCamera');\n\tprivate margin = computed(() => Number(this.adjustCamera()));\n\tprotected intensity = pick(this.options, 'intensity');\n\tprotected shadows = pick(this.options, 'shadows');\n\tprotected environment = pick(this.options, 'environment');\n\tprivate preset = pick(this.options, 'preset');\n\n\tprotected config = computed(() => {\n\t\tconst preset = this.preset();\n\t\treturn typeof preset === 'string' ? presets[preset] : preset;\n\t});\n\n\tprotected shadowBias = computed(() => (this.shadows() as NgtsStageShadowsOptions).bias ?? -0.0001);\n\tprotected normalBias = computed(() => (this.shadows() as NgtsStageShadowsOptions).normalBias ?? 0);\n\tprotected shadowSize = computed(() => (this.shadows() as NgtsStageShadowsOptions).size ?? 1024);\n\tprotected shadowOffset = computed(() => (this.shadows() as NgtsStageShadowsOptions).offset ?? 0);\n\tprotected contactShadow = computed(\n\t\t() => this.shadows() === 'contact' || (this.shadows() as NgtsStageShadowsOptions)?.type === 'contact',\n\t);\n\tprotected accumulativeShadow = computed(\n\t\t() => this.shadows() === 'accumulative' || (this.shadows() as NgtsStageShadowsOptions)?.type === 'accumulative',\n\t);\n\tprotected shadowOptions = computed(() => {\n\t\tconst shadows = this.shadows() as NgtsStageShadowsOptions;\n\n\t\tif (this.contactShadow()) {\n\t\t\treturn { scale: this.radius() * 4, far: this.radius(), blur: 2, ...shadows };\n\t\t}\n\n\t\tif (this.accumulativeShadow()) {\n\t\t\treturn {\n\t\t\t\ttemporal: true,\n\t\t\t\tframes: 100,\n\t\t\t\talphaTest: 0.9,\n\t\t\t\ttoneMapped: true,\n\t\t\t\tscale: this.radius() * 4,\n\t\t\t\t...shadows,\n\t\t\t};\n\t\t}\n\n\t\treturn typeof shadows === 'object' ? shadows : {};\n\t});\n\tprotected randomizedLightsOptions = computed(() => {\n\t\tif (!this.accumulativeShadow()) return {};\n\t\tconst shadows = this.shadows() as NgtsStageShadowsOptions;\n\t\treturn {\n\t\t\tamount: shadows.amount ?? 8,\n\t\t\tradius: shadows.radius ?? this.radius(),\n\t\t\tambient: shadows.ambient ?? 0.5,\n\t\t\tintensity: shadows.intensity ?? 1,\n\t\t\tposition: [\n\t\t\t\tthis.config().main[0] * this.radius(),\n\t\t\t\tthis.config().main[1] * this.radius(),\n\t\t\t\tthis.config().main[2] * this.radius(),\n\t\t\t],\n\t\t\tsize: this.radius() * 4,\n\t\t\tbias: -this.shadowBias(),\n\t\t\tmapSize: this.shadowSize(),\n\t\t} as Partial<NgtsRandomizedLightsOptions>;\n\t});\n\tprotected environmentOptions = computed(() => {\n\t\tconst environment = this.environment();\n\t\treturn !environment ? {} : typeof environment === 'string' ? { preset: environment } : environment;\n\t});\n\n\tprotected boundsOptions = computed(() => ({\n\t\tfit: !!this.adjustCamera(),\n\t\tclip: !!this.adjustCamera(),\n\t\tmargin: this.margin(),\n\t\tobserve: true,\n\t\t...this.parameters(),\n\t}));\n\tprotected centerOptions = computed(\n\t\t() =>\n\t\t\t({\n\t\t\t\t...(this.center() || {}),\n\t\t\t\tposition: [0, this.shadowOffset() / 2, 0],\n\t\t\t}) as Partial<NgtsCenterOptions>,\n\t);\n\n\tconstructor() {\n\t\textend({ AmbientLight, SpotLight, PointLight, Group, Vector2 });\n\t}\n\n\t/**\n\t * Handles the centered event from NgtsCenter.\n\t * Updates internal dimensions and emits the centered event.\n\t *\n\t * @param $event - The center state containing dimensions and bounding sphere\n\t */\n\tonCenter($event: NgtsCenterState) {\n\t\tconst { width, height, depth, boundingSphere } = $event;\n\t\tthis.dims.set({ radius: boundingSphere.radius, width, height, depth });\n\t\tthis.centered.emit($event);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["defaultOptions","LIST_URL"],"mappings":";;;;;;;;;;;;;;;;AAmFA,MAAMA,gBAAc,GAAmC;AACtD,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,UAAU,EAAE,IAAI;CAChB;AAED;;;;;;;;;;;;;AAaG;MAyBU,uBAAuB,CAAA;AAsDnC,IAAA,WAAA,GAAA;AArDmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,IAAI;QAC1B,IAAA,CAAA,IAAI,GAAG,IAAI;AAE9B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,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AAA,aAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAClB,uBAAuB,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACvB,eAAe,uGACf,oBAAoB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAvDrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCT,CAAA,CAAA;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE;wBACR,OAAO;wBACP,UAAU;wBACV,cAAc;wBACd,UAAU;wBACV,kBAAkB;wBAClB,uBAAuB;wBACvB,eAAe;wBACf,oBAAoB;AACpB,qBAAA;AACD,iBAAA;;;AC/ND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-three-soba-staging.mjs","sources":["../../../../libs/soba/staging/src/lib/accumulative-shadows.ts","../../../../libs/soba/staging/src/lib/backdrop.ts","../../../../libs/soba/staging/src/lib/bb-anchor.ts","../../../../libs/soba/staging/src/lib/bounds.ts","../../../../libs/soba/staging/src/lib/camera-shake.ts","../../../../libs/soba/staging/src/lib/caustics.ts","../../../../libs/soba/staging/src/lib/center.ts","../../../../libs/soba/staging/src/lib/cloud.ts","../../../../libs/soba/staging/src/lib/contact-shadows.ts","../../../../libs/soba/staging/src/lib/environment/environment-resource.ts","../../../../libs/soba/staging/src/lib/environment/environment.ts","../../../../libs/soba/staging/src/lib/environment/inject-environment.ts","../../../../libs/soba/staging/src/lib/float.ts","../../../../libs/soba/staging/src/lib/lightformer.ts","../../../../libs/soba/staging/src/lib/mask.ts","../../../../libs/soba/staging/src/lib/matcap-texture.ts","../../../../libs/soba/staging/src/lib/normal-texture.ts","../../../../libs/soba/staging/src/lib/randomized-lights.ts","../../../../libs/soba/staging/src/lib/render-texture.ts","../../../../libs/soba/staging/src/lib/shadow.ts","../../../../libs/soba/staging/src/lib/sky.ts","../../../../libs/soba/staging/src/lib/sparkles.ts","../../../../libs/soba/staging/src/lib/spot-light.ts","../../../../libs/soba/staging/src/lib/stage.ts","../../../../libs/soba/staging/src/angular-three-soba-staging.ts"],"sourcesContent":["import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { NgtThreeElements, beforeRender, extend, getInstanceState, injectStore, omit, pick } from 'angular-three';\nimport { ProgressiveLightMap, SoftShadowMaterial } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsAccumulativeShadows component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsAccumulativeShadowsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames it can render. More frames yield cleaner results but take more time.\n\t * @default 40\n\t */\n\tframes: number;\n\t/**\n\t * If frames === Infinity, blend controls the refresh ratio.\n\t * @default 20\n\t */\n\tblend: number;\n\t/**\n\t * Limits the amount of frames rendered when frames === Infinity.\n\t * Useful for getting performance back once a movable scene has settled.\n\t * @default Infinity\n\t */\n\tlimit: number;\n\t/**\n\t * Scale of the shadow plane.\n\t * @default 10\n\t */\n\tscale: number;\n\t/**\n\t * When enabled, accumulates shadows over time which is more performant\n\t * but has visual regression compared to instant results.\n\t * @default false\n\t */\n\ttemporal?: boolean;\n\t/**\n\t * Opacity of the shadow plane.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Alpha test threshold for discarding pixels.\n\t * @default 0.75\n\t */\n\talphaTest: number;\n\t/**\n\t * Shadow color.\n\t * @default 'black'\n\t */\n\tcolor: string;\n\t/**\n\t * Color blend factor. Controls how much colors turn to black (0 is fully black).\n\t * @default 2\n\t */\n\tcolorBlend: number;\n\t/**\n\t * Buffer resolution for shadow rendering.\n\t * @default 1024\n\t */\n\tresolution: number;\n\t/**\n\t * Whether the texture is tone mapped.\n\t * @default true\n\t */\n\ttoneMapped: boolean;\n}\n\nconst defaultOptions: NgtsAccumulativeShadowsOptions = {\n\ttemporal: false,\n\tframes: 40,\n\tlimit: Infinity,\n\tblend: 20,\n\tscale: 10,\n\topacity: 1,\n\talphaTest: 0.75,\n\tcolor: 'black',\n\tcolorBlend: 2,\n\tresolution: 1024,\n\ttoneMapped: true,\n};\n\n/**\n * A component that renders soft, accumulative shadows by rendering the scene\n * multiple times from the light's perspective and blending the results.\n *\n * This creates high-quality soft shadows that can be accumulated over multiple\n * frames for better visual quality.\n *\n * @example\n * ```html\n * <ngts-accumulative-shadows [options]=\"{ temporal: true, frames: 100 }\">\n * <ngts-randomized-lights [options]=\"{ amount: 8, position: [5, 5, -10] }\" />\n * </ngts-accumulative-shadows>\n * ```\n */\n@Component({\n\tselector: 'ngts-accumulative-shadows',\n\ttemplate: `\n\t\t<ngt-group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #lights [traverse]=\"nullTraversal\">\n\t\t\t\t<ng-content />\n\t\t\t</ngt-group>\n\n\t\t\t<ngt-mesh #plane [scale]=\"scale()\" [rotation]=\"[-Math.PI / 2, 0, 0]\" receiveShadow>\n\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t<ngt-soft-shadow-material\n\t\t\t\t\t[depthWrite]=\"false\"\n\t\t\t\t\t[toneMapped]=\"toneMapped()\"\n\t\t\t\t\t[color]=\"color()\"\n\t\t\t\t\t[blend]=\"colorBlend()\"\n\t\t\t\t\t[map]=\"map()\"\n\t\t\t\t\ttransparent\n\t\t\t\t/>\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsAccumulativeShadows {\n\tprotected readonly nullTraversal = () => null;\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tparameters = omit(this.options, [\n\t\t'temporal',\n\t\t'frames',\n\t\t'limit',\n\t\t'blend',\n\t\t'scale',\n\t\t'opacity',\n\t\t'alphaTest',\n\t\t'color',\n\t\t'colorBlend',\n\t\t'resolution',\n\t\t'toneMapped',\n\t]);\n\n\tlightsRef = viewChild.required<ElementRef<THREE.Group>>('lights');\n\tplaneRef =\n\t\tviewChild.required<ElementRef<THREE.Mesh<THREE.PlaneGeometry, InstanceType<typeof SoftShadowMaterial>>>>(\n\t\t\t'plane',\n\t\t);\n\n\tprivate store = injectStore();\n\n\tprivate opacity = pick(this.options, 'opacity');\n\tprivate alphaTest = pick(this.options, 'alphaTest');\n\tprivate limit = pick(this.options, 'limit');\n\tprivate resolution = pick(this.options, 'resolution');\n\n\tprivate previousPLM: ProgressiveLightMap | undefined;\n\tprivate pLM = computed(() => {\n\t\tif (this.previousPLM) {\n\t\t\tthis.previousPLM.clear();\n\t\t}\n\t\treturn (this.previousPLM = new ProgressiveLightMap(this.store.gl(), this.store.scene(), this.resolution()));\n\t});\n\n\tprotected scale = pick(this.options, 'scale');\n\tprotected toneMapped = pick(this.options, 'toneMapped');\n\tprotected color = pick(this.options, 'color');\n\tprotected colorBlend = pick(this.options, 'colorBlend');\n\tprotected map = computed(() => this.pLM().progressiveLightMap2.texture);\n\n\tlightsMap = new Map<string, () => void>();\n\tprivate temporal = computed(() => !!this.options().temporal);\n\tprivate frames = computed(() => Math.max(2, this.options().frames));\n\tprivate blend = computed(() =>\n\t\tMath.max(2, this.options().frames === Infinity ? this.options().blend : this.options().frames),\n\t);\n\tprivate count = 0;\n\n\tconstructor() {\n\t\textend({ Group, SoftShadowMaterial, Mesh, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tthis.pLM().configure(this.planeRef().nativeElement);\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst sceneInstanceState = getInstanceState(this.store.scene());\n\t\t\tif (!sceneInstanceState) return;\n\n\t\t\t// track deps\n\t\t\tthis.planeRef();\n\t\t\tthis.options();\n\t\t\tsceneInstanceState.objects();\n\n\t\t\t// Reset internals, buffers, ...\n\t\t\tthis.reset();\n\t\t\t// Update lightmap\n\n\t\t\t// TODO: (chau) this is a hack. not sure why a timeout is needed here. if not PLM.update\n\t\t\t// is erroring out on some scenes.\n\t\t\tlet timeout: ReturnType<typeof setTimeout>;\n\n\t\t\tif (!this.temporal() && this.frames() !== Infinity) {\n\t\t\t\tconst blend = this.blend();\n\t\t\t\ttimeout = setTimeout(() => this.update(blend));\n\t\t\t}\n\n\t\t\tonCleanup(() => {\n\t\t\t\tif (timeout) clearTimeout(timeout);\n\t\t\t});\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst [frames, temporal, invalidate, limit] = [\n\t\t\t\tthis.frames(),\n\t\t\t\t!!this.temporal(),\n\t\t\t\tthis.store.snapshot.invalidate,\n\t\t\t\tthis.limit(),\n\t\t\t];\n\t\t\tif ((temporal || frames === Infinity) && this.count < frames && this.count < limit) {\n\t\t\t\tinvalidate();\n\t\t\t\tthis.update();\n\t\t\t\tthis.count++;\n\t\t\t}\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.previousPLM?.clear();\n\t\t});\n\t}\n\n\t/**\n\t * Gets the shadow plane mesh element.\n\t *\n\t * @returns The Three.js mesh element used for rendering shadows\n\t */\n\tgetMesh() {\n\t\treturn this.planeRef().nativeElement;\n\t}\n\n\t/**\n\t * Resets the accumulative shadow state.\n\t * Clears buffers, resets opacities, and sets the frame count to 0.\n\t */\n\treset() {\n\t\t// Clear buffers, reset opacities, set frame count to 0\n\t\tuntracked(this.pLM).clear();\n\t\tconst material = untracked(this.planeRef).nativeElement.material;\n\t\tmaterial.opacity = 0;\n\t\tmaterial.alphaTest = 0;\n\t\tthis.count = 0;\n\t}\n\n\t/**\n\t * Updates the shadow accumulation by rendering additional frames.\n\t *\n\t * @param frames - Number of frames to render in this update cycle\n\t */\n\tupdate(frames = 1) {\n\t\t// Adapt the opacity-blend ratio to the number of frames\n\t\tconst material = this.planeRef().nativeElement.material;\n\t\tif (!this.temporal()) {\n\t\t\tmaterial.opacity = this.opacity();\n\t\t\tmaterial.alphaTest = this.alphaTest();\n\t\t} else {\n\t\t\tmaterial.opacity = Math.min(this.opacity(), material.opacity + this.opacity() / this.blend());\n\t\t\tmaterial.alphaTest = Math.min(this.alphaTest(), material.alphaTest + this.alphaTest() / this.blend());\n\t\t}\n\n\t\t// Switch accumulative lights on\n\t\tthis.lightsRef().nativeElement.visible = true;\n\t\t// Collect scene lights and meshes\n\t\tthis.pLM().prepare();\n\n\t\t// Update the lightmap and the accumulative lights\n\t\tfor (let i = 0; i < frames; i++) {\n\t\t\tthis.lightsMap.forEach((lightUpdate) => lightUpdate());\n\t\t\tthis.pLM().update(this.store.snapshot.camera, this.blend());\n\t\t}\n\t\t// Switch lights off\n\t\tthis.lightsRef().nativeElement.visible = false;\n\t\t// Restore lights and meshes\n\t\tthis.pLM().finish();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { checkUpdate, extend, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, PlaneGeometry } from 'three';\n\nfunction easeInExpo(x: number) {\n\treturn x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n}\n\n/**\n * Configuration options for the NgtsBackdrop component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBackdropOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * The floor extension factor. Controls how far the backdrop extends on the floor.\n\t * @default 0.25\n\t */\n\tfloor: number;\n\t/**\n\t * Number of segments for the backdrop geometry. Higher values create smoother curves.\n\t * @default 20\n\t */\n\tsegments: number;\n\t/**\n\t * Whether the backdrop should receive shadows from other objects.\n\t * @default undefined\n\t */\n\treceiveShadow?: boolean;\n}\n\nconst defaultOptions: NgtsBackdropOptions = {\n\tfloor: 0.25,\n\tsegments: 20,\n};\n\n/**\n * A curved backdrop component that creates a seamless background surface.\n * The backdrop curves from vertical to horizontal using an exponential easing function,\n * creating a smooth transition perfect for product showcases or studio-like scenes.\n *\n * @example\n * ```html\n * <ngts-backdrop [options]=\"{ floor: 0.25, segments: 20, receiveShadow: true }\">\n * <ngt-mesh-standard-material color=\"#353540\" />\n * </ngts-backdrop>\n * ```\n */\n@Component({\n\tselector: 'ngts-backdrop',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-mesh [receiveShadow]=\"receiveShadow()\" [rotation]=\"[-Math.PI / 2, 0, Math.PI / 2]\">\n\t\t\t\t<ngt-plane-geometry #plane *args=\"[1, 1, segments(), segments()]\" />\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsBackdrop {\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['floor', 'segments', 'receiveShadow']);\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tplaneRef = viewChild<ElementRef<THREE.PlaneGeometry>>('plane');\n\n\tprotected receiveShadow = pick(this.options, 'receiveShadow');\n\tprotected segments = pick(this.options, 'segments');\n\tprivate floor = pick(this.options, 'floor');\n\n\tconstructor() {\n\t\textend({ Group, Mesh, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tconst plane = this.planeRef()?.nativeElement;\n\t\t\tif (!plane) return;\n\n\t\t\tconst [segments, floor] = [this.segments(), this.floor()];\n\n\t\t\tlet i = 0;\n\t\t\tconst offset = segments / segments / 2;\n\t\t\tconst position = plane.attributes['position'] as THREE.BufferAttribute;\n\t\t\tfor (let x = 0; x < segments + 1; x++) {\n\t\t\t\tfor (let y = 0; y < segments + 1; y++) {\n\t\t\t\t\tposition.setXYZ(\n\t\t\t\t\t\ti++,\n\t\t\t\t\t\tx / segments - offset + (x === 0 ? -floor : 0),\n\t\t\t\t\t\ty / segments - offset,\n\t\t\t\t\t\teaseInExpo(x / segments),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcheckUpdate(position);\n\t\t\tplane.computeVertexNormals();\n\t\t});\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { NgtThreeElements, NgtVector3, beforeRender, extend, getInstanceState, omit, vector3 } from 'angular-three';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\nconst boundingBox = new THREE.Box3();\nconst boundingBoxSize = new THREE.Vector3();\n\n/**\n * Configuration options for the NgtsBBAnchor component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBBAnchorOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * The anchor point relative to the parent's bounding box.\n\t * Values range from -1 to 1 for each axis, where:\n\t * - (-1, -1, -1) is the bottom-left-back corner\n\t * - (1, 1, 1) is the top-right-front corner\n\t * - (0, 0, 0) is the center\n\t */\n\tanchor: NgtVector3;\n}\n\n/**\n * A component that anchors its children relative to the parent's bounding box.\n * The anchor position is updated every frame based on the parent's current bounding box,\n * making it useful for attaching labels, UI elements, or other objects to dynamic meshes.\n *\n * The component automatically reattaches itself to the parent's parent to avoid\n * affecting the bounding box calculation.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngts-bb-anchor [options]=\"{ anchor: [1, 1, 1] }\">\n * <ngts-html>\n * <span>Top-right-front corner</span>\n * </ngts-html>\n * </ngts-bb-anchor>\n * </ngt-mesh>\n * ```\n */\n@Component({\n\tselector: 'ngts-bb-anchor',\n\ttemplate: `\n\t\t<ngt-group #bbAnchor [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 NgtsBBAnchor {\n\toptions = input.required<NgtsBBAnchorOptions>();\n\tparameters = omit(this.options, ['anchor']);\n\n\tbbAnchorRef = viewChild.required<ElementRef<THREE.Group>>('bbAnchor');\n\n\tprivate parent = signal<THREE.Object3D | null>(null);\n\tprivate anchor = vector3(this.options, 'anchor');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\t// Reattach group created by this component to the parent's parent,\n\t\t// so it becomes a sibling of its initial parent.\n\t\t// We do that so the children have no impact on a bounding box of a parent.\n\t\teffect(() => {\n\t\t\tconst bbAnchorInstanceState = getInstanceState(this.bbAnchorRef().nativeElement);\n\t\t\tconst bbAnchorParent = bbAnchorInstanceState?.parent();\n\t\t\tif (bbAnchorParent && 'parent' in bbAnchorParent) {\n\t\t\t\tthis.parent.set(bbAnchorParent as unknown as THREE.Object3D);\n\t\t\t\tbbAnchorParent['parent'].add(this.bbAnchorRef().nativeElement);\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst parent = this.parent();\n\t\t\tif (parent) {\n\t\t\t\tboundingBox.setFromObject(parent);\n\t\t\t\tboundingBox.getSize(boundingBoxSize);\n\n\t\t\t\tconst anchor = this.anchor();\n\t\t\t\tconst bbAnchor = this.bbAnchorRef().nativeElement;\n\n\t\t\t\tbbAnchor.position.set(\n\t\t\t\t\tparent.position.x + (boundingBoxSize.x * anchor.x) / 2,\n\t\t\t\t\tparent.position.y + (boundingBoxSize.y * anchor.y) / 2,\n\t\t\t\t\tparent.position.z + (boundingBoxSize.z * anchor.z) / 2,\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, injectStore, is, NgtThreeElements, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\ninterface ControlsProto {\n\tupdate(): void;\n\n\ttarget: THREE.Vector3;\n\tmaxDistance: number;\n\taddEventListener: (event: string, callback: (event: any) => void) => void;\n\tremoveEventListener: (event: string, callback: (event: any) => void) => void;\n}\n\nenum AnimationState {\n\tNONE = 0,\n\tSTART = 1,\n\tACTIVE = 2,\n}\n\nfunction interpolateFuncDefault(t: number) {\n\t// Imitates the previously used THREE.MathUtils.damp\n\treturn 1 - Math.exp(-5 * t) + 0.007 * t;\n}\n\n/**\n * Configuration options for the NgtsBounds component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsBoundsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Maximum duration of the camera animation in seconds.\n\t * @default 1.0\n\t */\n\tmaxDuration: number;\n\t/**\n\t * Margin factor applied to the calculated camera distance.\n\t * Values > 1 add padding around the bounds.\n\t * @default 1.2\n\t */\n\tmargin: number;\n\t/**\n\t * When enabled, automatically recalculates bounds when children change.\n\t * @default false\n\t */\n\tobserve: boolean;\n\t/**\n\t * When enabled, automatically fits the camera to the bounds on initialization.\n\t * @default false\n\t */\n\tfit: boolean;\n\t/**\n\t * When enabled, automatically adjusts camera near/far planes to the bounds.\n\t * @default false\n\t */\n\tclip: boolean;\n\t/**\n\t * Custom interpolation function for camera animation.\n\t * Takes a value from 0 to 1 and returns an interpolated value.\n\t * @default Damping-based interpolation function\n\t */\n\tinterpolateFunc: (t: number) => number;\n}\n\nconst defaultOptions: NgtsBoundsOptions = {\n\tmaxDuration: 1.0,\n\tmargin: 1.2,\n\tinterpolateFunc: interpolateFuncDefault,\n\tclip: false,\n\tfit: false,\n\tobserve: false,\n};\n\n/**\n * A component that calculates the bounding box of its children and provides\n * methods to animate the camera to fit those bounds. Useful for focusing\n * the camera on specific objects or automatically framing content.\n *\n * Supports both perspective and orthographic cameras with appropriate\n * handling for each camera type.\n *\n * @example\n * ```html\n * <ngts-bounds [options]=\"{ fit: true, clip: true, observe: true }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-bounds>\n * ```\n */\n@Component({\n\tselector: 'ngts-bounds',\n\ttemplate: `\n\t\t<ngt-group #group>\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 NgtsBounds {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate store = injectStore();\n\n\tprivate clipOption = pick(this.options, 'clip');\n\tprivate fitOption = pick(this.options, 'fit');\n\tprivate observe = pick(this.options, 'observe');\n\n\tprivate origin = {\n\t\tcamPos: new THREE.Vector3(),\n\t\tcamRot: new THREE.Quaternion(),\n\t\tcamZoom: 1,\n\t};\n\tprivate goal = {\n\t\tcamPos: undefined as THREE.Vector3 | undefined,\n\t\tcamRot: undefined as THREE.Quaternion | undefined,\n\t\tcamZoom: undefined as number | undefined,\n\t\tcamUp: undefined as THREE.Vector3 | undefined,\n\t\ttarget: undefined as THREE.Vector3 | undefined,\n\t};\n\tprivate animationState = AnimationState.NONE;\n\n\t// represent animation state from 0 to 1\n\tprivate t = 0;\n\tprivate box = new THREE.Box3();\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [controls, camera] = [this.store.controls() as unknown as ControlsProto, this.store.snapshot.camera];\n\t\t\tif (!controls) return;\n\n\t\t\tconst callback = () => {\n\t\t\t\tif (this.goal.target && this.animationState !== AnimationState.NONE) {\n\t\t\t\t\tconst front = new THREE.Vector3().setFromMatrixColumn(camera.matrix, 2);\n\t\t\t\t\tconst d0 = this.origin.camPos.distanceTo(controls.target);\n\t\t\t\t\tconst d1 = (this.goal.camPos || this.origin.camPos).distanceTo(this.goal.target);\n\t\t\t\t\tconst d = (1 - this.t) * d0 + this.t * d1;\n\n\t\t\t\t\tcontrols.target.copy(camera.position).addScaledVector(front, -d);\n\t\t\t\t\tcontrols.update();\n\t\t\t\t}\n\n\t\t\t\tthis.animationState = AnimationState.NONE;\n\t\t\t};\n\n\t\t\tcontrols.addEventListener('start', callback);\n\t\t\tonCleanup(() => controls.removeEventListener('start', callback));\n\t\t});\n\n\t\tlet count = 0;\n\t\teffect(() => {\n\t\t\tconst [clip, fit, observe] = [\n\t\t\t\tthis.clipOption(),\n\t\t\t\tthis.fitOption(),\n\t\t\t\tthis.observe(),\n\t\t\t\tthis.store.size(),\n\t\t\t\tthis.store.camera(),\n\t\t\t\tthis.store.controls(),\n\t\t\t];\n\n\t\t\tif (observe || count++ === 0) {\n\t\t\t\tthis.refresh();\n\t\t\t\tif (fit) this.reset().fit();\n\t\t\t\tif (clip) this.clip();\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(({ delta }) => {\n\t\t\t// This [additional animation step START] is needed to guarantee that delta used in animation isn't absurdly high (2-3 seconds) which is actually possible if rendering happens on demand...\n\t\t\tif (this.animationState === AnimationState.START) {\n\t\t\t\tthis.animationState = AnimationState.ACTIVE;\n\t\t\t\tthis.store.snapshot.invalidate();\n\t\t\t} else if (this.animationState === AnimationState.ACTIVE) {\n\t\t\t\tconst [{ maxDuration, interpolateFunc }, camera, controls, invalidate] = [\n\t\t\t\t\tthis.options(),\n\t\t\t\t\tthis.store.snapshot.camera,\n\t\t\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\t\t\tthis.store.snapshot.invalidate,\n\t\t\t\t];\n\t\t\t\tthis.t += delta / maxDuration;\n\n\t\t\t\tif (this.t >= 1) {\n\t\t\t\t\tthis.goal.camPos && camera.position.copy(this.goal.camPos);\n\t\t\t\t\tthis.goal.camRot && camera.quaternion.copy(this.goal.camRot);\n\t\t\t\t\tthis.goal.camUp && camera.up.copy(this.goal.camUp);\n\t\t\t\t\tthis.goal.camZoom && is.orthographicCamera(camera) && (camera.zoom = this.goal.camZoom);\n\n\t\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\t\tcamera.updateProjectionMatrix();\n\n\t\t\t\t\tif (controls && this.goal.target) {\n\t\t\t\t\t\tcontrols.target.copy(this.goal.target);\n\t\t\t\t\t\tcontrols.update();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.animationState = AnimationState.NONE;\n\t\t\t\t} else {\n\t\t\t\t\tconst k = interpolateFunc(this.t);\n\n\t\t\t\t\tthis.goal.camPos && camera.position.lerpVectors(this.origin.camPos, this.goal.camPos, k);\n\t\t\t\t\tthis.goal.camRot && camera.quaternion.slerpQuaternions(this.origin.camRot, this.goal.camRot, k);\n\t\t\t\t\tthis.goal.camUp && camera.up.set(0, 1, 0).applyQuaternion(camera.quaternion);\n\t\t\t\t\tthis.goal.camZoom &&\n\t\t\t\t\t\tis.orthographicCamera(camera) &&\n\t\t\t\t\t\t(camera.zoom = (1 - k) * this.origin.camZoom + k * this.goal.camZoom);\n\n\t\t\t\t\tcamera.updateMatrixWorld();\n\t\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\tinvalidate();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Gets the current size information of the bounds.\n\t *\n\t * @returns An object containing the bounding box, size vector, center point, and calculated camera distance\n\t */\n\tgetSize() {\n\t\tconst [camera, { margin }] = [this.store.snapshot.camera, untracked(this.options)];\n\n\t\tconst boxSize = this.box.getSize(new THREE.Vector3());\n\t\tconst center = this.box.getCenter(new THREE.Vector3());\n\t\tconst maxSize = Math.max(boxSize.x, boxSize.y, boxSize.z);\n\t\tconst fitHeightDistance = is.orthographicCamera(camera)\n\t\t\t? maxSize * 4\n\t\t\t: maxSize / (2 * Math.atan((Math.PI * camera.fov) / 360));\n\t\tconst fitWidthDistance = is.orthographicCamera(camera) ? maxSize * 4 : fitHeightDistance / camera.aspect;\n\t\tconst distance = margin * Math.max(fitHeightDistance, fitWidthDistance);\n\n\t\treturn { box: this.box, size: boxSize, center, distance };\n\t}\n\n\t/**\n\t * Refreshes the bounding box calculation from the given object or the component's children.\n\t *\n\t * @param object - Optional object or Box3 to calculate bounds from. If not provided, uses the component's group.\n\t * @returns This instance for method chaining\n\t */\n\trefresh(object?: THREE.Object3D | THREE.Box3) {\n\t\tconst [group, camera] = [untracked(this.groupRef).nativeElement, this.store.snapshot.camera];\n\n\t\tif (is.three<THREE.Box3>(object, 'isBox3')) this.box.copy(object);\n\t\telse {\n\t\t\tconst target = object || group;\n\t\t\tif (!target) return this;\n\t\t\ttarget.updateWorldMatrix(true, true);\n\t\t\tthis.box.setFromObject(target);\n\t\t}\n\t\tif (this.box.isEmpty()) {\n\t\t\tconst max = camera.position.length() || 10;\n\t\t\tthis.box.setFromCenterAndSize(new THREE.Vector3(), new THREE.Vector3(max, max, max));\n\t\t}\n\n\t\tthis.origin.camPos.copy(camera.position);\n\t\tthis.origin.camRot.copy(camera.quaternion);\n\t\tis.orthographicCamera(camera) && (this.origin.camZoom = camera.zoom);\n\n\t\tthis.goal.camPos = undefined;\n\t\tthis.goal.camRot = undefined;\n\t\tthis.goal.camZoom = undefined;\n\t\tthis.goal.camUp = undefined;\n\t\tthis.goal.target = undefined;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Resets and animates the camera to fit the current bounds while maintaining\n\t * the current viewing direction.\n\t *\n\t * @returns This instance for method chaining\n\t */\n\treset() {\n\t\tconst [camera] = [this.store.snapshot.camera];\n\t\tconst { center, distance } = this.getSize();\n\n\t\tconst direction = camera.position.clone().sub(center).normalize();\n\t\tthis.goal.camPos = center.clone().addScaledVector(direction, distance);\n\t\tthis.goal.target = center.clone();\n\t\tconst mCamRot = new THREE.Matrix4().lookAt(this.goal.camPos, this.goal.target, camera.up);\n\t\tthis.goal.camRot = new THREE.Quaternion().setFromRotationMatrix(mCamRot);\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Animates the camera to a new position.\n\t *\n\t * @param position - Target position as a Vector3 or [x, y, z] array\n\t * @returns This instance for method chaining\n\t */\n\tmoveTo(position: THREE.Vector3 | [number, number, number]) {\n\t\tthis.goal.camPos = Array.isArray(position) ? new THREE.Vector3(...position) : position.clone();\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Animates the camera to look at a target position with optional up vector.\n\t *\n\t * @param params - Object containing target position and optional up vector\n\t * @param params.target - The point to look at as a Vector3 or [x, y, z] array\n\t * @param params.up - Optional up vector as a Vector3 or [x, y, z] array\n\t * @returns This instance for method chaining\n\t */\n\tlookAt({\n\t\ttarget,\n\t\tup,\n\t}: {\n\t\ttarget: THREE.Vector3 | [number, number, number];\n\t\tup?: THREE.Vector3 | [number, number, number];\n\t}) {\n\t\tconst [camera] = [this.store.snapshot.camera];\n\n\t\tthis.goal.target = Array.isArray(target) ? new THREE.Vector3(...target) : target.clone();\n\t\tif (up) {\n\t\t\tthis.goal.camUp = Array.isArray(up) ? new THREE.Vector3(...up) : up.clone();\n\t\t} else {\n\t\t\tthis.goal.camUp = camera.up.clone();\n\t\t}\n\t\tconst mCamRot = new THREE.Matrix4().lookAt(\n\t\t\tthis.goal.camPos || camera.position,\n\t\t\tthis.goal.target,\n\t\t\tthis.goal.camUp,\n\t\t);\n\t\tthis.goal.camRot = new THREE.Quaternion().setFromRotationMatrix(mCamRot);\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Fits the camera to the bounds by adjusting zoom (for orthographic cameras)\n\t * or position (for perspective cameras).\n\t *\n\t * For orthographic cameras, this only adjusts the zoom level while preserving position.\n\t * For perspective cameras, this behaves the same as reset().\n\t *\n\t * @returns This instance for method chaining\n\t */\n\tfit() {\n\t\tconst [camera, controls, { margin }] = [\n\t\t\tthis.store.snapshot.camera,\n\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\tuntracked(this.options),\n\t\t];\n\n\t\tif (!is.orthographicCamera(camera)) {\n\t\t\t// For non-orthographic cameras, fit should behave exactly like reset\n\t\t\treturn this.reset();\n\t\t}\n\n\t\t// For orthographic cameras, fit should only modify the zoom value\n\t\tlet maxHeight = 0;\n\t\tlet maxWidth = 0;\n\t\tconst vertices = [\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.min.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.max.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.min.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.min.x, this.box.max.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.max.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.max.y, this.box.min.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.min.y, this.box.max.z),\n\t\t\tnew THREE.Vector3(this.box.max.x, this.box.min.y, this.box.min.z),\n\t\t];\n\n\t\t// Transform the center and each corner to camera space\n\t\tconst pos = this.goal.camPos || camera.position;\n\t\tconst target = this.goal.target || controls.target;\n\t\tconst up = this.goal.camUp || camera.up;\n\t\tconst mCamWInv = target\n\t\t\t? new THREE.Matrix4().lookAt(pos, target, up).setPosition(pos).invert()\n\t\t\t: camera.matrixWorldInverse;\n\t\tfor (const v of vertices) {\n\t\t\tv.applyMatrix4(mCamWInv);\n\t\t\tmaxHeight = Math.max(maxHeight, Math.abs(v.y));\n\t\t\tmaxWidth = Math.max(maxWidth, Math.abs(v.x));\n\t\t}\n\t\tmaxHeight *= 2;\n\t\tmaxWidth *= 2;\n\t\tconst zoomForHeight = (camera.top - camera.bottom) / maxHeight;\n\t\tconst zoomForWidth = (camera.right - camera.left) / maxWidth;\n\n\t\tthis.goal.camZoom = Math.min(zoomForHeight, zoomForWidth) / margin;\n\n\t\tthis.animationState = AnimationState.START;\n\t\tthis.t = 0;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adjusts the camera's near and far clipping planes based on the current bounds.\n\t * Also updates the controls' maxDistance if controls are present.\n\t *\n\t * @returns This instance for method chaining\n\t */\n\tclip() {\n\t\tconst [camera, controls, invalidate] = [\n\t\t\tthis.store.snapshot.camera,\n\t\t\tthis.store.snapshot.controls as unknown as ControlsProto,\n\t\t\tthis.store.snapshot.invalidate,\n\t\t];\n\t\tconst { distance } = this.getSize();\n\n\t\tcamera.near = distance / 100;\n\t\tcamera.far = distance * 100;\n\t\tcamera.updateProjectionMatrix();\n\n\t\tif (controls) {\n\t\t\tcontrols.maxDistance = distance * 10;\n\t\t\tcontrols.update();\n\t\t}\n\n\t\tinvalidate();\n\n\t\treturn this;\n\t}\n}\n","import { computed, Directive, effect, input } from '@angular/core';\nimport { beforeRender, injectStore } from 'angular-three';\nimport { CameraShake } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\n\n/**\n * Internal interface describing the camera controls protocol.\n * Used to detect and synchronize with orbit controls or similar camera control systems.\n *\n * @internal\n */\ninterface ControlsProto {\n\t/** Updates the controls state. */\n\tupdate(): void;\n\t/** The target point the camera is looking at. */\n\ttarget: THREE.Vector3;\n\t/** Adds an event listener for control events. */\n\taddEventListener: (event: string, callback: (event: any) => void) => void;\n\t/** Removes an event listener for control events. */\n\tremoveEventListener: (event: string, callback: (event: any) => void) => void;\n}\n\n/**\n * Configuration options for the NgtsCameraShake directive.\n * Provides settings for controlling camera shake intensity and frequency.\n *\n * Available options include:\n * - `intensity`: Overall shake strength multiplier (default: 1)\n * - `decayRate`: How quickly the shake fades out (default: 0.65)\n * - `maxYaw`: Maximum rotation on the y-axis in radians (default: 0.1)\n * - `maxPitch`: Maximum rotation on the x-axis in radians (default: 0.1)\n * - `maxRoll`: Maximum rotation on the z-axis in radians (default: 0.1)\n * - `yawFrequency`: Frequency of yaw oscillation (default: 0.1)\n * - `pitchFrequency`: Frequency of pitch oscillation (default: 0.1)\n * - `rollFrequency`: Frequency of roll oscillation (default: 0.1)\n */\nexport type NgtsCameraShakeOptions = Partial<\n\tOmit<CameraShake, 'object' | 'initialRotation' | 'updateInitialRotation' | 'update'>\n>;\n\nconst defaultOptions: NgtsCameraShakeOptions = {\n\tintensity: 1,\n\tdecayRate: 0.65,\n\tmaxYaw: 0.1,\n\tmaxPitch: 0.1,\n\tmaxRoll: 0.1,\n\tyawFrequency: 0.1,\n\tpitchFrequency: 0.1,\n\trollFrequency: 0.1,\n};\n\n/**\n * A directive that adds procedural camera shake effects using simplex noise.\n * Creates cinematic camera movements with configurable intensity, decay, and frequency\n * for yaw, pitch, and roll rotations.\n *\n * The shake is automatically synchronized with any attached camera controls,\n * updating the initial rotation when controls change.\n *\n * @example\n * ```html\n * <ngts-camera-shake\n * [options]=\"{ intensity: 1, maxYaw: 0.1, maxPitch: 0.1, maxRoll: 0.1 }\"\n * #shake=\"cameraShake\"\n * />\n * ```\n */\n@Directive({\n\tselector: 'ngts-camera-shake',\n\texportAs: 'cameraShake',\n})\nexport class NgtsCameraShake {\n\t/** Configuration options for the camera shake effect. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprivate store = injectStore();\n\n\t/**\n\t * The underlying CameraShake instance that performs the actual shake calculations.\n\t * Exposed for advanced usage such as manually triggering or stopping the shake.\n\t */\n\tcameraShaker = computed(() => new CameraShake(this.store.camera()));\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst defaultControls = this.store.controls() as unknown as ControlsProto;\n\t\t\tif (!defaultControls) return;\n\n\t\t\tconst cameraShaker = this.cameraShaker();\n\t\t\tconst callback = () => void cameraShaker.updateInitialRotation();\n\n\t\t\tdefaultControls.addEventListener('change', callback);\n\t\t\tcallback();\n\n\t\t\tonCleanup(() => void defaultControls.removeEventListener('change', callback));\n\t\t});\n\n\t\teffect(() => {\n\t\t\tObject.assign(this.cameraShaker(), this.options());\n\t\t});\n\n\t\tbeforeRender(({ delta, clock }) => {\n\t\t\tconst cameraShaker = this.cameraShaker();\n\t\t\tcameraShaker.update(delta, clock.elapsedTime);\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 { beforeRender, extend, getInstanceState, NgtThreeElements, omit, pick, resolveRef } from 'angular-three';\nimport { helper, NgtsEdges } from 'angular-three-soba/abstractions';\nimport { fbo } from 'angular-three-soba/misc';\nimport { CausticsProjectionMaterial, createCausticsUpdate } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, LineBasicMaterial, Mesh, OrthographicCamera, PlaneGeometry, Scene } from 'three';\n\nconst NORMAL_OPTIONS = {\n\tdepth: true,\n\tminFilter: THREE.LinearFilter,\n\tmagFilter: THREE.LinearFilter,\n\ttype: THREE.UnsignedByteType,\n};\n\nconst CAUSTIC_OPTIONS = {\n\tminFilter: THREE.LinearMipmapLinearFilter,\n\tmagFilter: THREE.LinearFilter,\n\ttype: THREE.FloatType,\n\tgenerateMipmaps: true,\n};\n\n/**\n * Configuration options for the NgtsCaustics component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCausticsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames to render. Set to Infinity for continuous runtime rendering.\n\t * @default 1\n\t */\n\tframes: number;\n\t/**\n\t * Enables visual debugging cues including camera helper to help stage the scene.\n\t * @default false\n\t */\n\tdebug: boolean;\n\t/**\n\t * When enabled, displays only caustics and hides the models.\n\t * @default false\n\t */\n\tcausticsOnly: boolean;\n\t/**\n\t * When enabled, includes back face rendering and enables the backsideIOR property.\n\t * @default false\n\t */\n\tbackside: boolean;\n\t/**\n\t * The Index of Refraction (IOR) value for front faces.\n\t * @default 1.1\n\t */\n\tior: number;\n\t/**\n\t * The Index of Refraction (IOR) value for back faces.\n\t * Only used when backside is enabled.\n\t * @default 1.1\n\t */\n\tbacksideIOR: number;\n\t/**\n\t * The world-space texel size for caustic calculations.\n\t * @default 0.3125\n\t */\n\tworldRadius: number;\n\t/**\n\t * Intensity of the projected caustics effect.\n\t * @default 0.05\n\t */\n\tintensity: number;\n\t/**\n\t * Color of the caustics effect.\n\t * @default 'white'\n\t */\n\tcolor: THREE.ColorRepresentation;\n\t/**\n\t * Buffer resolution for caustic texture rendering.\n\t * @default 2024\n\t */\n\tresolution: number;\n\t/**\n\t * Light source position or object. Can be a coordinate array or a reference to a Three.js object.\n\t * The light will point towards the contents' bounding box center.\n\t * @default [5, 5, 5]\n\t */\n\tlightSource:\n\t\t| [x: number, y: number, z: number]\n\t\t| ElementRef<THREE.Object3D | NgtThreeElements['ngt-object3D']>\n\t\t| THREE.Object3D\n\t\t| NgtThreeElements['ngt-object3D'];\n}\n\nconst defaultOptions: NgtsCausticsOptions = {\n\tframes: 1,\n\tdebug: false,\n\tcausticsOnly: false,\n\tbackside: false,\n\tior: 1.1,\n\tbacksideIOR: 1.1,\n\tworldRadius: 0.3125,\n\tintensity: 0.05,\n\tcolor: 'white',\n\tresolution: 2024,\n\tlightSource: [5, 5, 5],\n};\n\n/**\n * A component that renders realistic caustic light patterns on surfaces.\n * Caustics are the light patterns created when light is refracted or reflected\n * by curved transparent surfaces (like water or glass).\n *\n * The component renders the scene from a light's perspective to calculate\n * where light rays converge, then projects these patterns onto a plane.\n *\n * @example\n * ```html\n * <ngts-caustics [options]=\"{ frames: Infinity, intensity: 0.05, color: 'white' }\">\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-physical-material [transmission]=\"1\" [roughness]=\"0\" />\n * </ngt-mesh>\n * </ngts-caustics>\n * ```\n */\n@Component({\n\tselector: 'ngts-caustics',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-scene #scene>\n\t\t\t\t<ngt-orthographic-camera #camera [up]=\"[0, 1, 0]\" />\n\t\t\t\t<ng-content />\n\t\t\t</ngt-scene>\n\n\t\t\t<ngt-mesh #plane [renderOrder]=\"2\" [rotation]=\"[-Math.PI / 2, 0, 0]\">\n\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t<ngt-caustics-projection-material\n\t\t\t\t\ttransparent\n\t\t\t\t\t[color]=\"color()\"\n\t\t\t\t\t[causticsTexture]=\"causticsTarget.texture\"\n\t\t\t\t\t[causticsTextureB]=\"causticsTargetB.texture\"\n\t\t\t\t\t[blending]=\"CustomBlending\"\n\t\t\t\t\t[blendSrc]=\"OneFactor\"\n\t\t\t\t\t[blendDst]=\"SrcAlphaFactor\"\n\t\t\t\t\t[depthWrite]=\"false\"\n\t\t\t\t/>\n\n\t\t\t\t@if (debug()) {\n\t\t\t\t\t<ngts-edges>\n\t\t\t\t\t\t<ngt-line-basic-material color=\"#ffff00\" [toneMapped]=\"false\" />\n\t\t\t\t\t</ngts-edges>\n\t\t\t\t}\n\t\t\t</ngt-mesh>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsEdges],\n})\nexport class NgtsCaustics {\n\tprotected readonly Math = Math;\n\tprotected readonly CustomBlending = THREE.CustomBlending;\n\tprotected readonly OneFactor = THREE.OneFactor;\n\tprotected readonly SrcAlphaFactor = THREE.SrcAlphaFactor;\n\n\t/** Configuration options for the caustics effect. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'frames',\n\t\t'debug',\n\t\t'causticsOnly',\n\t\t'backside',\n\t\t'ior',\n\t\t'backsideIOR',\n\t\t'worldRadius',\n\t\t'intensity',\n\t\t'color',\n\t\t'resolution',\n\t\t'lightSource',\n\t]);\n\n\tprotected debug = pick(this.options, 'debug');\n\tprotected color = pick(this.options, 'color');\n\tprivate resolution = pick(this.options, 'resolution');\n\n\t/** Reference to the main group element containing the caustics setup. */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate sceneRef = viewChild.required<ElementRef<THREE.Scene>>('scene');\n\tprivate cameraRef = viewChild.required<ElementRef<THREE.OrthographicCamera>>('camera');\n\tprivate planeRef =\n\t\tviewChild.required<\n\t\t\tElementRef<THREE.Mesh<THREE.PlaneGeometry, InstanceType<typeof CausticsProjectionMaterial>>>\n\t\t>('plane');\n\n\tprivate normalTargetParams = computed(() => ({\n\t\twidth: this.resolution(),\n\t\theight: this.resolution(),\n\t\tsettings: NORMAL_OPTIONS,\n\t}));\n\n\t// Buffers for front and back faces\n\tprivate normalTarget = fbo(this.normalTargetParams);\n\tprivate normalTargetB = fbo(this.normalTargetParams);\n\n\tprivate causticsTargetParams = computed(() => ({\n\t\twidth: this.resolution(),\n\t\theight: this.resolution(),\n\t\tsettings: CAUSTIC_OPTIONS,\n\t}));\n\tprotected causticsTarget = fbo(this.causticsTargetParams);\n\tprotected causticsTargetB = fbo(this.causticsTargetParams);\n\n\tprivate cameraHelper = helper(\n\t\t() => (this.debug() ? this.cameraRef().nativeElement : null),\n\t\t() => THREE.CameraHelper,\n\t);\n\n\tconstructor() {\n\t\textend({\n\t\t\tCausticsProjectionMaterial,\n\t\t\tGroup,\n\t\t\tScene,\n\t\t\tMesh,\n\t\t\tPlaneGeometry,\n\t\t\tLineBasicMaterial,\n\t\t\tOrthographicCamera,\n\t\t});\n\n\t\teffect(() => {\n\t\t\t// track all changes\n\t\t\tconst [group, scene, plane] = [\n\t\t\t\tthis.groupRef().nativeElement,\n\t\t\t\tthis.sceneRef().nativeElement,\n\t\t\t\tthis.planeRef().nativeElement,\n\t\t\t\tthis.options(),\n\t\t\t];\n\t\t\tconst groupInstanceState = getInstanceState(group);\n\t\t\tconst sceneInstanceState = getInstanceState(scene);\n\t\t\tconst planeInstanceState = getInstanceState(plane);\n\n\t\t\tif (!groupInstanceState || !sceneInstanceState || !planeInstanceState) return;\n\n\t\t\tgroupInstanceState.objects();\n\t\t\tsceneInstanceState.objects();\n\t\t\tplaneInstanceState.objects();\n\t\t\tplaneInstanceState.nonObjects();\n\n\t\t\tgroup.updateWorldMatrix(false, true);\n\t\t});\n\n\t\tconst update = createCausticsUpdate(() => {\n\t\t\tconst { lightSource, ...rest } = this.options();\n\n\t\t\treturn {\n\t\t\t\tparams: Object.assign(rest, {\n\t\t\t\t\tlightSource: Array.isArray(lightSource)\n\t\t\t\t\t\t? new THREE.Vector3(...lightSource)\n\t\t\t\t\t\t: (resolveRef(lightSource) as THREE.Object3D),\n\t\t\t\t}),\n\t\t\t\tnormalTarget: this.normalTarget,\n\t\t\t\tnormalTargetB: this.normalTargetB,\n\t\t\t\tcausticsTarget: this.causticsTarget,\n\t\t\t\tcausticsTargetB: this.causticsTargetB,\n\t\t\t\tcamera: this.cameraRef().nativeElement,\n\t\t\t\tscene: this.sceneRef().nativeElement,\n\t\t\t\tgroup: this.groupRef().nativeElement,\n\t\t\t\tplane: this.planeRef().nativeElement,\n\t\t\t\thelper: this.cameraHelper(),\n\t\t\t};\n\t\t});\n\n\t\tbeforeRender(({ gl }) => update(gl));\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinput,\n\toutput,\n\tviewChild,\n} from '@angular/core';\nimport { extend, getInstanceState, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * State object emitted by the NgtsCenter component when centering is complete.\n * Contains information about the centered content's dimensions and alignment.\n */\nexport interface NgtsCenterState {\n\t/**\n\t * The parent object above the Center component.\n\t */\n\tparent: THREE.Object3D;\n\t/**\n\t * The outermost container group of the Center component.\n\t */\n\tcontainer: THREE.Object3D;\n\t/**\n\t * The width of the bounding box.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the bounding box.\n\t */\n\theight: number;\n\t/**\n\t * The depth of the bounding box.\n\t */\n\tdepth: number;\n\t/**\n\t * The calculated bounding box of the content.\n\t */\n\tboundingBox: THREE.Box3;\n\t/**\n\t * The calculated bounding sphere of the content.\n\t */\n\tboundingSphere: THREE.Sphere;\n\t/**\n\t * The center point of the bounding box.\n\t */\n\tcenter: THREE.Vector3;\n\t/**\n\t * The vertical alignment offset applied.\n\t */\n\tverticalAlignment: number;\n\t/**\n\t * The horizontal alignment offset applied.\n\t */\n\thorizontalAlignment: number;\n\t/**\n\t * The depth alignment offset applied.\n\t */\n\tdepthAlignment: number;\n}\n\n/**\n * Configuration options for the NgtsCenter component.\n */\nexport interface NgtsCenterOptions {\n\t/**\n\t * Aligns content to the top of the bounding box.\n\t */\n\ttop?: boolean;\n\t/**\n\t * Aligns content to the right of the bounding box.\n\t */\n\tright?: boolean;\n\t/**\n\t * Aligns content to the bottom of the bounding box.\n\t */\n\tbottom?: boolean;\n\t/**\n\t * Aligns content to the left of the bounding box.\n\t */\n\tleft?: boolean;\n\t/**\n\t * Aligns content to the front of the bounding box.\n\t */\n\tfront?: boolean;\n\t/**\n\t * Aligns content to the back of the bounding box.\n\t */\n\tback?: boolean;\n\t/**\n\t * Disables centering on all axes.\n\t */\n\tdisable?: boolean;\n\t/**\n\t * Disables centering on the x-axis only.\n\t */\n\tdisableX?: boolean;\n\t/**\n\t * Disables centering on the y-axis only.\n\t */\n\tdisableY?: boolean;\n\t/**\n\t * Disables centering on the z-axis only.\n\t */\n\tdisableZ?: boolean;\n\t/**\n\t * Uses precise bounding box calculation.\n\t * @see https://threejs.org/docs/index.html?q=box3#api/en/math/Box3.setFromObject\n\t * @default true\n\t */\n\tprecise: boolean;\n\t/**\n\t * Optional cache key to prevent recalculation on every render.\n\t * Change this value to force a recalculation.\n\t * @default 0\n\t */\n\tcacheKey: any;\n\t/**\n\t * Optional object to compute the bounding box from instead of the children.\n\t */\n\tobject?: THREE.Object3D | null;\n}\n\nconst defaultOptions: Partial<NgtThreeElements['ngt-group']> & NgtsCenterOptions = {\n\tprecise: true,\n\tcacheKey: 0,\n};\n\n/**\n * A component that automatically centers its children within their bounding box.\n * Supports alignment options for positioning content relative to the bounding box edges.\n *\n * Emits a `centered` event with detailed information about the centering calculation,\n * including dimensions, bounding box, and alignment offsets.\n *\n * @example\n * ```html\n * <ngts-center [options]=\"{ top: true }\" (centered)=\"onCentered($event)\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-center>\n * ```\n */\n@Component({\n\tselector: 'ngts-center',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #outer>\n\t\t\t\t<ngt-group #inner>\n\t\t\t\t\t<ng-content />\n\t\t\t\t</ngt-group>\n\t\t\t</ngt-group>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsCenter {\n\t/** Configuration options for centering behavior. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'top',\n\t\t'right',\n\t\t'bottom',\n\t\t'left',\n\t\t'front',\n\t\t'back',\n\t\t'disable',\n\t\t'disableX',\n\t\t'disableY',\n\t\t'disableZ',\n\t\t'precise',\n\t\t'cacheKey',\n\t\t'object',\n\t]);\n\n\t/** Emits when centering calculation completes with dimension and alignment info. */\n\tcentered = output<NgtsCenterState>();\n\n\t/** Reference to the outer group element containing the centered content. */\n\tgroupRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate outerRef = viewChild.required<ElementRef<THREE.Group>>('outer');\n\tprivate innerRef = viewChild.required<ElementRef<THREE.Group>>('inner');\n\n\tprivate centerOptions = pick(this.options, [\n\t\t'top',\n\t\t'right',\n\t\t'bottom',\n\t\t'left',\n\t\t'front',\n\t\t'back',\n\t\t'disable',\n\t\t'disableX',\n\t\t'disableY',\n\t\t'disableZ',\n\t\t'precise',\n\t\t'cacheKey',\n\t\t'object',\n\t]);\n\n\tprivate box = new THREE.Box3();\n\tprivate center = new THREE.Vector3();\n\tprivate sphere = new THREE.Sphere();\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\teffect(() => {\n\t\t\tconst inner = this.innerRef().nativeElement;\n\t\t\tconst innerInstanceState = getInstanceState(inner);\n\t\t\tif (!innerInstanceState) return;\n\n\t\t\tconst children = [...innerInstanceState.objects(), ...innerInstanceState.nonObjects()];\n\t\t\tif (!children?.length) return;\n\n\t\t\tconst [\n\t\t\t\t{ precise, top, bottom, right, left, front, back, disable, disableZ, disableY, disableX, object },\n\t\t\t\tgroup,\n\t\t\t\touter,\n\t\t\t] = [this.centerOptions(), this.groupRef().nativeElement, this.outerRef().nativeElement];\n\n\t\t\touter.matrixWorld.identity();\n\t\t\tthis.box.setFromObject(object ?? inner, precise);\n\n\t\t\tconst width = this.box.max.x - this.box.min.x;\n\t\t\tconst height = this.box.max.y - this.box.min.y;\n\t\t\tconst depth = this.box.max.z - this.box.min.z;\n\n\t\t\tthis.box.getCenter(this.center);\n\t\t\tthis.box.getBoundingSphere(this.sphere);\n\n\t\t\tconst vAlign = top ? height / 2 : bottom ? -height / 2 : 0;\n\t\t\tconst hAlign = left ? -width / 2 : right ? width / 2 : 0;\n\t\t\tconst dAlign = front ? depth / 2 : back ? -depth / 2 : 0;\n\n\t\t\touter.position.set(\n\t\t\t\tdisable || disableX ? 0 : -this.center.x + hAlign,\n\t\t\t\tdisable || disableY ? 0 : -this.center.y + vAlign,\n\t\t\t\tdisable || disableZ ? 0 : -this.center.z + dAlign,\n\t\t\t);\n\n\t\t\tthis.centered.emit({\n\t\t\t\tparent: group.parent!,\n\t\t\t\tcontainer: group,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tdepth,\n\t\t\t\tboundingBox: this.box,\n\t\t\t\tboundingSphere: this.sphere,\n\t\t\t\tcenter: this.center,\n\t\t\t\tverticalAlignment: vAlign,\n\t\t\t\thorizontalAlignment: hAlign,\n\t\t\t\tdepthAlignment: dAlign,\n\t\t\t});\n\t\t});\n\t}\n}\n","import {\n\tafterEveryRender,\n\tafterRenderEffect,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinject,\n\tinput,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport {\n\tapplyProps,\n\tbeforeRender,\n\tcheckUpdate,\n\textend,\n\tNgtArgs,\n\tNgtColor,\n\tNgtThreeElements,\n\tNgtVector3,\n\tomit,\n\tpick,\n} from 'angular-three';\nimport { textureResource } from 'angular-three-soba/loaders';\nimport { setUpdateRange } from 'angular-three-soba/misc';\nimport { CLOUD_URL } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, InstancedBufferAttribute, InstancedMesh, PlaneGeometry } from 'three';\n\n/**\n * Internal state object representing a single cloud segment.\n * Used by the cloud system to track individual particle properties.\n */\nexport interface NgtsCloudState {\n\t/**\n\t * Unique identifier for this cloud segment.\n\t */\n\tuuid: string;\n\t/**\n\t * Index of this segment within the cloud.\n\t */\n\tindex: number;\n\t/**\n\t * Total number of segments in the parent cloud.\n\t */\n\tsegments: number;\n\t/**\n\t * Distance from camera (used for depth sorting).\n\t */\n\tdist: number;\n\t/**\n\t * Transformation matrix for this segment.\n\t */\n\tmatrix: THREE.Matrix4;\n\t/**\n\t * Bounding box dimensions for segment distribution.\n\t */\n\tbounds: THREE.Vector3;\n\t/**\n\t * Position within the cloud bounds.\n\t */\n\tposition: THREE.Vector3;\n\t/**\n\t * Volume/size of this segment.\n\t */\n\tvolume: number;\n\t/**\n\t * Normalized distance from cloud center (0-1).\n\t */\n\tlength: number;\n\t/**\n\t * Reference to the parent group element.\n\t */\n\tref: ElementRef<THREE.Group>;\n\t/**\n\t * Animation speed multiplier.\n\t */\n\tspeed: number;\n\t/**\n\t * Growth animation factor.\n\t */\n\tgrowth: number;\n\t/**\n\t * Opacity of this segment.\n\t */\n\topacity: number;\n\t/**\n\t * Distance at which the segment starts fading.\n\t */\n\tfade: number;\n\t/**\n\t * Density factor for animation.\n\t */\n\tdensity: number;\n\t/**\n\t * Current rotation angle.\n\t */\n\trotation: number;\n\t/**\n\t * Rotation speed multiplier.\n\t */\n\trotationFactor: number;\n\t/**\n\t * Color of this segment.\n\t */\n\tcolor: THREE.Color;\n}\n\n/**\n * Configuration options for the NgtsClouds container component.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCloudsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * URL to the cloud texture image.\n\t * @default CLOUD_URL (hosted on rawcdn.githack)\n\t */\n\ttexture: string;\n\t/**\n\t * Maximum number of cloud segments. Keep this tight to save memory.\n\t * @default 200\n\t */\n\tlimit: number;\n\t/**\n\t * Number of segments to render. If undefined, renders all segments.\n\t * @default undefined\n\t */\n\trange?: number;\n\t/**\n\t * The material class to use for cloud rendering.\n\t * @default THREE.MeshLambertMaterial\n\t */\n\tmaterial: typeof THREE.Material;\n\t/**\n\t * Whether to enable frustum culling for the cloud mesh.\n\t * @default true\n\t */\n\tfrustumCulled: boolean;\n}\n\nconst defaultCloudsOptions: NgtsCloudsOptions = {\n\tlimit: 200,\n\tmaterial: THREE.MeshLambertMaterial,\n\tfrustumCulled: true,\n\ttexture: CLOUD_URL,\n};\n\nconst parentMatrix = new THREE.Matrix4();\nconst translation = new THREE.Vector3();\nconst rotation = new THREE.Quaternion();\nconst cpos = new THREE.Vector3();\nconst cquat = new THREE.Quaternion();\nconst scale = new THREE.Vector3();\n\n/**\n * Container component for rendering volumetric clouds using instanced meshes.\n * Uses billboarded sprites that always face the camera and are depth-sorted\n * for correct transparency rendering.\n *\n * Should contain NgtsCloudInstance children to define individual cloud formations.\n *\n * @example\n * ```html\n * <ngts-clouds [options]=\"{ limit: 400 }\">\n * <ngts-cloud-instance [options]=\"{ segments: 40 }\" />\n * <ngts-cloud-instance [options]=\"{ segments: 20, position: [5, 0, 0] }\" />\n * </ngts-clouds>\n * ```\n */\n@Component({\n\tselector: 'ngts-clouds',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t\t<ngt-instanced-mesh\n\t\t\t\t#instances\n\t\t\t\t*args=\"[undefined, undefined, limit()]\"\n\t\t\t\t[matrixAutoUpdate]=\"false\"\n\t\t\t\t[frustumCulled]=\"frustumCulled()\"\n\t\t\t>\n\t\t\t\t<ngt-instanced-buffer-attribute\n\t\t\t\t\t*args=\"[colors(), 3]\"\n\t\t\t\t\t[usage]=\"DynamicDrawUsage\"\n\t\t\t\t\tattach=\"instanceColor\"\n\t\t\t\t/>\n\t\t\t\t<ngt-plane-geometry *args=\"imageBounds()\">\n\t\t\t\t\t<ngt-instanced-buffer-attribute\n\t\t\t\t\t\t*args=\"[opacities(), 1]\"\n\t\t\t\t\t\t[usage]=\"DynamicDrawUsage\"\n\t\t\t\t\t\tattach=\"attributes.cloudOpacity\"\n\t\t\t\t\t/>\n\t\t\t\t</ngt-plane-geometry>\n\t\t\t\t<ngt-primitive *args=\"[cloudMaterial()]\" [map]=\"cloudTexture.value()\" attach=\"material\" />\n\t\t\t</ngt-instanced-mesh>\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsClouds {\n\tprotected readonly DynamicDrawUsage = THREE.DynamicDrawUsage;\n\n\t/** Configuration options for the clouds container. */\n\toptions = input(defaultCloudsOptions, { transform: mergeInputs(defaultCloudsOptions) });\n\tprotected parameters = omit(this.options, ['material', 'texture', 'range', 'limit', 'frustumCulled']);\n\n\tprivate texture = pick(this.options, 'texture');\n\tprivate material = pick(this.options, 'material');\n\tprivate range = pick(this.options, 'range');\n\n\t/** Reference to the container group element. */\n\tcloudsRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\tprivate instancesRef = viewChild<ElementRef<THREE.InstancedMesh>>('instances');\n\n\tprotected limit = pick(this.options, 'limit');\n\tprotected frustumCulled = pick(this.options, 'frustumCulled');\n\n\tprotected opacities = computed(() => new Float32Array(Array.from({ length: this.limit() }, () => 1)));\n\tprotected colors = computed(() => new Float32Array(Array.from({ length: this.limit() }, () => [1, 1, 1]).flat()));\n\n\tprotected cloudTexture = textureResource(this.texture);\n\tprotected cloudMaterial = computed(() => {\n\t\tconst _CloudMaterial = class extends (this.material() as typeof THREE.Material) {\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tconst opaque_fragment =\n\t\t\t\t\tparseInt(THREE.REVISION.replace(/\\D+/g, '')) >= 154 ? 'opaque_fragment' : 'output_fragment';\n\t\t\t\tthis.onBeforeCompile = (shader) => {\n\t\t\t\t\tshader.vertexShader =\n\t\t\t\t\t\t`attribute float cloudOpacity;\n varying float vOpacity;\n ` +\n\t\t\t\t\t\tshader.vertexShader.replace(\n\t\t\t\t\t\t\t'#include <fog_vertex>',\n\t\t\t\t\t\t\t`#include <fog_vertex>\n vOpacity = cloudOpacity;\n `,\n\t\t\t\t\t\t);\n\t\t\t\t\tshader.fragmentShader =\n\t\t\t\t\t\t`varying float vOpacity;\n ` +\n\t\t\t\t\t\tshader.fragmentShader.replace(\n\t\t\t\t\t\t\t`#include <${opaque_fragment}>`,\n\t\t\t\t\t\t\t`#include <${opaque_fragment}>\n gl_FragColor = vec4(outgoingLight, diffuseColor.a * vOpacity);\n `,\n\t\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tconst _material = new _CloudMaterial();\n\t\t_material.transparent = true;\n\t\t_material.depthWrite = false;\n\t\tcheckUpdate(_material);\n\n\t\treturn _material;\n\t});\n\n\tprotected imageBounds = computed(() => {\n\t\tconst texture = this.cloudTexture.value();\n\t\tif (!texture) return [1, 1];\n\t\tconst [w, h] = [texture.image.width ?? 1, texture.image.height ?? 1];\n\t\tconst max = Math.max(w, h);\n\t\treturn [w / max, h / max];\n\t});\n\n\t/**\n\t * Array of cloud segment states managed by this container.\n\t * Updated by NgtsCloudInstance children when they mount/unmount.\n\t */\n\tclouds: Array<NgtsCloudState> = [];\n\n\tconstructor() {\n\t\textend({ Group, InstancedMesh, InstancedBufferAttribute, PlaneGeometry });\n\n\t\tafterEveryRender({\n\t\t\twrite: () => {\n\t\t\t\tconst instances = this.instancesRef()?.nativeElement;\n\t\t\t\tif (!instances) return;\n\n\t\t\t\tconst [limit, range] = [this.limit(), this.range()];\n\t\t\t\tconst count = Math.min(limit, range !== undefined ? range : limit, this.clouds.length);\n\t\t\t\tinstances.count = count;\n\t\t\t\tsetUpdateRange(instances.instanceMatrix, { start: 0, count: count * 16 });\n\t\t\t\tif (instances.instanceColor) {\n\t\t\t\t\tsetUpdateRange(instances.instanceColor, { start: 0, count: count * 3 });\n\t\t\t\t}\n\t\t\t\tsetUpdateRange(instances.geometry.attributes['cloudOpacity'] as THREE.BufferAttribute, {\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tcount: count,\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\tlet time = 0;\n\t\tlet index = 0;\n\t\tlet config: NgtsCloudState;\n\t\tconst qat = new THREE.Quaternion();\n\t\tconst dir = new THREE.Vector3(0, 0, 1);\n\t\tconst pos = new THREE.Vector3();\n\n\t\tbeforeRender(({ delta, clock, camera }) => {\n\t\t\tconst instances = this.instancesRef()?.nativeElement;\n\t\t\tif (!instances) return;\n\n\t\t\ttime = clock.elapsedTime;\n\t\t\tparentMatrix.copy(instances.matrixWorld).invert();\n\t\t\tcamera.matrixWorld.decompose(cpos, cquat, scale);\n\n\t\t\tfor (index = 0; index < this.clouds.length; index++) {\n\t\t\t\tconfig = this.clouds[index];\n\t\t\t\tconfig.ref.nativeElement.matrixWorld.decompose(translation, rotation, scale);\n\t\t\t\ttranslation.add(pos.copy(config.position).applyQuaternion(rotation).multiply(scale));\n\t\t\t\trotation\n\t\t\t\t\t.copy(cquat)\n\t\t\t\t\t.multiply(qat.setFromAxisAngle(dir, (config.rotation += delta * config.rotationFactor)));\n\t\t\t\tscale.multiplyScalar(\n\t\t\t\t\tconfig.volume + ((1 + Math.sin(time * config.density * config.speed)) / 2) * config.growth,\n\t\t\t\t);\n\t\t\t\tconfig.matrix.compose(translation, rotation, scale).premultiply(parentMatrix);\n\t\t\t\tconfig.dist = translation.distanceTo(cpos);\n\t\t\t}\n\n\t\t\t// depth-sort\n\t\t\tthis.clouds.sort((a, b) => b.dist - a.dist);\n\t\t\tconst opacities = instances.geometry.attributes['cloudOpacity'] as THREE.InstancedBufferAttribute;\n\t\t\tfor (index = 0; index < this.clouds.length; index++) {\n\t\t\t\tconfig = this.clouds[index];\n\t\t\t\topacities.array[index] =\n\t\t\t\t\tconfig.opacity * (config.dist < config.fade - 1 ? config.dist / config.fade : 1);\n\t\t\t\tinstances.setMatrixAt(index, config.matrix);\n\t\t\t\tinstances.setColorAt(index, config.color);\n\t\t\t}\n\n\t\t\t// update instance\n\t\t\tcheckUpdate(instances.geometry.attributes['cloudOpacity']);\n\t\t\tcheckUpdate(instances.instanceMatrix);\n\t\t\tif (instances.instanceColor) checkUpdate(instances.instanceColor);\n\t\t});\n\t}\n}\n\n/**\n * Configuration options for individual cloud formations.\n * Extends the standard ngt-group element options.\n */\nexport interface NgtsCloudOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Random seed for consistent cloud generation.\n\t * @default Math.random()\n\t */\n\tseed: number;\n\t/**\n\t * Number of segments/particles in the cloud.\n\t * @default 20\n\t */\n\tsegments: number;\n\t/**\n\t * Bounding box dimensions for cloud distribution.\n\t * @default [5, 1, 1]\n\t */\n\tbounds: NgtVector3;\n\t/**\n\t * How segments are distributed within the bounds.\n\t * - 'inside': Segments are smaller at the edges\n\t * - 'outside': Segments are larger at the edges\n\t * - 'random': Random distribution\n\t * @default 'inside'\n\t */\n\tconcentrate: 'random' | 'inside' | 'outside';\n\t/**\n\t * General scale of the cloud segments.\n\t */\n\tscale?: NgtVector3;\n\t/**\n\t * Volume/thickness of the segments.\n\t * @default 6\n\t */\n\tvolume: number;\n\t/**\n\t * Minimum volume when distributing clouds.\n\t * @default 0.25\n\t */\n\tsmallestVolume: number;\n\t/**\n\t * Custom distribution function for precise control over segment placement.\n\t * Point values range from -1 to 1, volume from 0 to 1.\n\t * @default undefined\n\t */\n\tdistribute?: (cloud: NgtsCloudState, index: number) => { point: THREE.Vector3; volume?: number };\n\t/**\n\t * Growth factor for animated clouds (when speed > 0).\n\t * @default 4\n\t */\n\tgrowth: number;\n\t/**\n\t * Animation speed factor. Set to 0 to disable animation.\n\t * @default 0\n\t */\n\tspeed: number;\n\t/**\n\t * Camera distance at which segments start fading.\n\t * @default 10\n\t */\n\tfade: number;\n\t/**\n\t * Opacity of the cloud.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Color of the cloud.\n\t * @default '#ffffff'\n\t */\n\tcolor: NgtColor;\n}\n\nconst defaultCloudOptions: NgtsCloudOptions = {\n\tseed: Math.random(),\n\tsegments: 20,\n\tbounds: [5, 1, 1],\n\tconcentrate: 'inside',\n\tvolume: 6,\n\tsmallestVolume: 0.25,\n\tgrowth: 4,\n\tspeed: 0,\n\tfade: 10,\n\topacity: 1,\n\tcolor: '#ffffff',\n};\n\n/**\n * A cloud instance component that defines a single cloud formation.\n * Must be used within a NgtsClouds container.\n *\n * Each instance can have its own configuration for segments, bounds,\n * color, opacity, and animation settings.\n *\n * @example\n * ```html\n * <ngts-clouds>\n * <ngts-cloud-instance [options]=\"{ segments: 40, color: '#f0f0f0', speed: 0.4 }\" />\n * </ngts-clouds>\n * ```\n */\n@Component({\n\tselector: 'ngts-cloud-instance',\n\ttemplate: `\n\t\t<ngt-group #group [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsCloudInstance {\n\t/** Configuration options for this cloud formation. */\n\toptions = input(defaultCloudOptions, { transform: mergeInputs(defaultCloudOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'bounds',\n\t\t'seed',\n\t\t'segments',\n\t\t'concentrate',\n\t\t'distribute',\n\t\t'growth',\n\t\t'volume',\n\t\t'smallestVolume',\n\t\t'speed',\n\t\t'fade',\n\t\t'opacity',\n\t\t'color',\n\t]);\n\n\tprivate cloudInstanceRef = viewChild.required<ElementRef<THREE.Group>>('group');\n\n\tprivate uuid = THREE.MathUtils.generateUUID();\n\n\tprivate segments = pick(this.options, 'segments');\n\tprivate bounds = pick(this.options, 'bounds');\n\tprivate seed = pick(this.options, 'seed');\n\tprivate concentrate = pick(this.options, 'concentrate');\n\tprivate smallestVolume = pick(this.options, 'smallestVolume');\n\tprivate growth = pick(this.options, 'growth');\n\tprivate speed = pick(this.options, 'speed');\n\tprivate fade = pick(this.options, 'fade');\n\tprivate opacity = pick(this.options, 'opacity');\n\tprivate color = pick(this.options, 'color');\n\tprivate distribute = pick(this.options, 'distribute');\n\tprivate volume = pick(this.options, 'volume');\n\n\tprivate clouds = computed(() =>\n\t\tArray.from(\n\t\t\t{ length: this.segments() },\n\t\t\t(_, index) =>\n\t\t\t\t({\n\t\t\t\t\tsegments: this.segments(),\n\t\t\t\t\tuuid: this.uuid,\n\t\t\t\t\tbounds: new THREE.Vector3(1, 1, 1),\n\t\t\t\t\tposition: new THREE.Vector3(),\n\t\t\t\t\tindex,\n\t\t\t\t\tref: this.cloudInstanceRef(),\n\t\t\t\t\tdist: 0,\n\t\t\t\t\tmatrix: new THREE.Matrix4(),\n\t\t\t\t\tcolor: new THREE.Color(),\n\t\t\t\t\trotation: index * (Math.PI / this.segments()),\n\t\t\t\t}) as NgtsCloudState,\n\t\t),\n\t);\n\n\tprivate parent = inject(NgtsClouds);\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tafterRenderEffect({\n\t\t\twrite: () => {\n\t\t\t\tconst [\n\t\t\t\t\tclouds,\n\t\t\t\t\tconcentrate,\n\t\t\t\t\tbounds,\n\t\t\t\t\tfade,\n\t\t\t\t\tcolor,\n\t\t\t\t\topacity,\n\t\t\t\t\tgrowth,\n\t\t\t\t\tvolume,\n\t\t\t\t\tseed,\n\t\t\t\t\tsegments,\n\t\t\t\t\tspeed,\n\t\t\t\t\tdistribute,\n\t\t\t\t] = [\n\t\t\t\t\tthis.clouds(),\n\t\t\t\t\tthis.concentrate(),\n\t\t\t\t\tthis.bounds(),\n\t\t\t\t\tthis.fade(),\n\t\t\t\t\tthis.color(),\n\t\t\t\t\tthis.opacity(),\n\t\t\t\t\tthis.growth(),\n\t\t\t\t\tthis.volume(),\n\t\t\t\t\tthis.seed(),\n\t\t\t\t\tthis.segments(),\n\t\t\t\t\tthis.speed(),\n\t\t\t\t\tuntracked(this.distribute),\n\t\t\t\t];\n\n\t\t\t\tconst seedRef = { seed };\n\n\t\t\t\tclouds.forEach((cloud, index) => {\n\t\t\t\t\tapplyProps(cloud, {\n\t\t\t\t\t\tvolume,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tspeed,\n\t\t\t\t\t\tgrowth,\n\t\t\t\t\t\topacity,\n\t\t\t\t\t\tfade,\n\t\t\t\t\t\tbounds,\n\t\t\t\t\t\tdensity: Math.max(0.5, this.random(seedRef)),\n\t\t\t\t\t\trotationFactor: Math.max(0.2, 0.5 * this.random(seedRef)) * speed,\n\t\t\t\t\t});\n\n\t\t\t\t\t// only distribute randomly if there are multiple segments\n\t\t\t\t\tconst distributed = distribute?.(cloud, index);\n\t\t\t\t\tif (distributed || segments > 1) {\n\t\t\t\t\t\tcloud.position.copy(cloud.bounds).multiply(\n\t\t\t\t\t\t\tdistributed?.point ?? {\n\t\t\t\t\t\t\t\tx: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t\ty: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t\tz: this.random(seedRef) * 2 - 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst xDiff = Math.abs(cloud.position.x);\n\t\t\t\t\tconst yDiff = Math.abs(cloud.position.y);\n\t\t\t\t\tconst zDiff = Math.abs(cloud.position.z);\n\t\t\t\t\tconst max = Math.max(xDiff, yDiff, zDiff);\n\n\t\t\t\t\tcloud.length = 1;\n\n\t\t\t\t\tif (xDiff === max) cloud.length -= xDiff / cloud.bounds.x;\n\t\t\t\t\tif (yDiff === max) cloud.length -= yDiff / cloud.bounds.y;\n\t\t\t\t\tif (zDiff === max) cloud.length -= zDiff / cloud.bounds.z;\n\n\t\t\t\t\tcloud.volume =\n\t\t\t\t\t\tdistributed?.volume ??\n\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\tMath.max(0, untracked(this.smallestVolume)),\n\t\t\t\t\t\t\tconcentrate === 'random'\n\t\t\t\t\t\t\t\t? this.random(seedRef)\n\t\t\t\t\t\t\t\t: concentrate === 'inside'\n\t\t\t\t\t\t\t\t\t? cloud.length\n\t\t\t\t\t\t\t\t\t: 1 - cloud.length,\n\t\t\t\t\t\t) * volume;\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\tafterRenderEffect({\n\t\t\twrite: (onCleanup) => {\n\t\t\t\tconst temp = this.clouds();\n\t\t\t\tthis.parent.clouds = [...this.parent.clouds, ...temp];\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tthis.parent.clouds = this.parent.clouds.filter((item) => item.uuid !== this.uuid);\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate random(ref: { seed: number }) {\n\t\tconst x = Math.sin(ref.seed++) * 10_000;\n\t\treturn x - Math.floor(x);\n\t}\n}\n\n/**\n * A convenience component that renders a single cloud.\n * Automatically wraps itself in a NgtsClouds container if not already inside one.\n *\n * Use this for simple single-cloud scenarios. For multiple clouds,\n * use NgtsClouds with NgtsCloudInstance children for better performance.\n *\n * @example\n * ```html\n * <ngts-cloud [options]=\"{ segments: 20, bounds: [5, 1, 1], color: 'white' }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-cloud',\n\ttemplate: `\n\t\t@if (parent) {\n\t\t\t<ngts-cloud-instance [options]=\"options()\">\n\t\t\t\t<ng-content />\n\t\t\t</ngts-cloud-instance>\n\t\t} @else {\n\t\t\t<ngts-clouds>\n\t\t\t\t<ngts-cloud-instance [options]=\"options()\">\n\t\t\t\t\t<ng-content />\n\t\t\t\t</ngts-cloud-instance>\n\t\t\t</ngts-clouds>\n\t\t}\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsCloudInstance, NgtsClouds],\n})\nexport class NgtsCloud {\n\t/** Configuration options for the cloud. */\n\toptions = input<Partial<NgtsCloudOptions>>(defaultCloudOptions);\n\tprotected parent = inject(NgtsClouds, { optional: true });\n\n\t/** Reference to the underlying NgtsCloudInstance component. */\n\tcloudRef = viewChild(NgtsCloudInstance);\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tcomputed,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, beforeRender, extend, injectStore, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, MeshBasicMaterial, OrthographicCamera } from 'three';\nimport { HorizontalBlurShader, VerticalBlurShader } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsContactShadows component.\n * Extends the standard ngt-group element options (excluding scale which has custom handling).\n */\nexport interface NgtsContactShadowsOptions extends Partial<Omit<NgtThreeElements['ngt-group'], 'scale'>> {\n\t/**\n\t * Opacity of the shadow.\n\t * @default 1\n\t */\n\topacity: number;\n\t/**\n\t * Width of the shadow plane (before scaling).\n\t * @default 1\n\t */\n\twidth: number;\n\t/**\n\t * Height of the shadow plane (before scaling).\n\t * @default 1\n\t */\n\theight: number;\n\t/**\n\t * Blur amount for the shadow. Higher values create softer shadows.\n\t * @default 1\n\t */\n\tblur: number;\n\t/**\n\t * Near clipping plane for the shadow camera.\n\t * @default 0\n\t */\n\tnear: number;\n\t/**\n\t * Far clipping plane for the shadow camera.\n\t * @default 10\n\t */\n\tfar: number;\n\t/**\n\t * When enabled, applies an additional blur pass for smoother shadows.\n\t * @default true\n\t */\n\tsmooth: boolean;\n\t/**\n\t * Resolution of the shadow render target.\n\t * @default 512\n\t */\n\tresolution: number;\n\t/**\n\t * Number of frames to render. Use Infinity for continuous updates.\n\t * @default Infinity\n\t */\n\tframes: number;\n\t/**\n\t * Scale of the shadow plane. Can be a single number or [x, y] tuple.\n\t * @default 10\n\t */\n\tscale: number | [x: number, y: number];\n\t/**\n\t * Color of the shadow.\n\t * @default '#000000'\n\t */\n\tcolor: THREE.ColorRepresentation;\n\t/**\n\t * Whether the shadow writes to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultOptions: NgtsContactShadowsOptions = {\n\tscale: 10,\n\tframes: Infinity,\n\topacity: 1,\n\twidth: 1,\n\theight: 1,\n\tblur: 1,\n\tnear: 0,\n\tfar: 10,\n\tresolution: 512,\n\tsmooth: true,\n\tcolor: '#000000',\n\tdepthWrite: false,\n};\n\n/**\n * A component that renders soft contact shadows on a ground plane.\n * Uses a depth-based technique to render shadows from objects onto\n * a horizontal plane, creating realistic grounding effects.\n *\n * The shadows are rendered using an orthographic camera from above,\n * with optional blur passes for softness.\n *\n * @example\n * ```html\n * <ngts-contact-shadows\n * [options]=\"{ opacity: 0.5, scale: 10, blur: 2, far: 4, resolution: 256 }\"\n * [position]=\"[0, -0.5, 0]\"\n * />\n * ```\n */\n@Component({\n\tselector: 'ngts-contact-shadows',\n\ttemplate: `\n\t\t<ngt-group #contactShadows [rotation]=\"[Math.PI / 2, 0, 0]\" [parameters]=\"parameters()\">\n\t\t\t<ngt-mesh\n\t\t\t\t[scale]=\"[1, -1, 1]\"\n\t\t\t\t[rotation]=\"[-Math.PI / 2, 0, 0]\"\n\t\t\t\t[renderOrder]=\"renderOrder() ?? 0\"\n\t\t\t\t[geometry]=\"planeGeometry()\"\n\t\t\t>\n\t\t\t\t<ngt-mesh-basic-material\n\t\t\t\t\ttransparent\n\t\t\t\t\t[opacity]=\"opacity()\"\n\t\t\t\t\t[depthWrite]=\"depthWrite()\"\n\t\t\t\t\t[map]=\"texture()\"\n\t\t\t\t/>\n\t\t\t</ngt-mesh>\n\t\t\t<ngt-orthographic-camera *args=\"cameraArgs()\" #shadowsCamera />\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsContactShadows {\n\tprotected readonly Math = Math;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'scale',\n\t\t'frames',\n\t\t'opacity',\n\t\t'width',\n\t\t'height',\n\t\t'blur',\n\t\t'near',\n\t\t'far',\n\t\t'resolution',\n\t\t'smooth',\n\t\t'color',\n\t\t'depthWrite',\n\t\t'renderOrder',\n\t]);\n\n\tcontactShadowsRef = viewChild.required<ElementRef<THREE.Group>>('contactShadows');\n\tprivate shadowsCameraRef = viewChild<ElementRef<THREE.OrthographicCamera>>('shadowsCamera');\n\n\tprivate store = injectStore();\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate scale = pick(this.options, 'scale');\n\n\tprivate scaledWidth = computed(() => {\n\t\tconst [width, scale] = [this.width(), this.scale()];\n\t\treturn width * (Array.isArray(scale) ? scale[0] : scale);\n\t});\n\n\tprivate scaledHeight = computed(() => {\n\t\tconst [height, scale] = [this.height(), this.scale()];\n\t\treturn height * (Array.isArray(scale) ? scale[1] : scale);\n\t});\n\n\tprivate resolution = pick(this.options, 'resolution');\n\tprivate color = pick(this.options, 'color');\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprivate smooth = pick(this.options, 'smooth');\n\tprivate frames = pick(this.options, 'frames');\n\tprivate blur = pick(this.options, 'blur');\n\n\tprivate renderTarget = computed(() => this.createRenderTarget(this.resolution()));\n\tprivate renderTargetBlur = computed(() => this.createRenderTarget(this.resolution()));\n\n\tprotected planeGeometry = computed(() =>\n\t\tnew THREE.PlaneGeometry(this.scaledWidth(), this.scaledHeight()).rotateX(Math.PI / 2),\n\t);\n\tprivate blurPlane = computed(() => new THREE.Mesh(this.planeGeometry()));\n\tprivate depthMaterial = computed(() => {\n\t\tconst color = new THREE.Color(this.color());\n\t\tconst material = new THREE.MeshDepthMaterial();\n\t\tmaterial.depthTest = material.depthWrite = false;\n\t\tmaterial.onBeforeCompile = (shader) => {\n\t\t\tshader.uniforms = { ...shader.uniforms, ucolor: { value: color } };\n\t\t\tshader.fragmentShader = shader.fragmentShader.replace(\n\t\t\t\t`void main() {`, //\n\t\t\t\t`uniform vec3 ucolor;\n void main() {\n `,\n\t\t\t);\n\t\t\tshader.fragmentShader = shader.fragmentShader.replace(\n\t\t\t\t'vec4( vec3( 1.0 - fragCoordZ ), opacity );',\n\t\t\t\t// Colorize the shadow, multiply by the falloff so that the center can remain darker\n\t\t\t\t'vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );',\n\t\t\t);\n\t\t};\n\t\treturn material;\n\t});\n\n\tprivate horizontalBlurMaterial = new THREE.ShaderMaterial({ ...HorizontalBlurShader, depthTest: false });\n\tprivate verticalBlurMaterial = new THREE.ShaderMaterial({ ...VerticalBlurShader, depthTest: false });\n\n\tprotected renderOrder = pick(this.options, 'renderOrder');\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected depthWrite = pick(this.options, 'depthWrite');\n\tprotected texture = pick(this.renderTarget, 'texture');\n\tprotected cameraArgs = computed(() => {\n\t\tconst [width, height, near, far] = [this.scaledWidth(), this.scaledHeight(), this.near(), this.far()];\n\t\treturn [-width / 2, width / 2, height / 2, -height / 2, near, far];\n\t});\n\n\tconstructor() {\n\t\textend({ Group, Mesh, MeshBasicMaterial, OrthographicCamera });\n\n\t\tlet count = 0;\n\t\tbeforeRender(() => {\n\t\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\t\tif (!shadowsCamera) return;\n\n\t\t\tconst frames = this.frames();\n\t\t\tif (frames === Infinity || count < frames) {\n\t\t\t\tthis.renderShadows();\n\t\t\t\tcount++;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate renderShadows() {\n\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\tif (!shadowsCamera) return;\n\n\t\tconst [blur, smooth, gl, scene, contactShadows, depthMaterial, renderTarget] = [\n\t\t\tthis.blur(),\n\t\t\tthis.smooth(),\n\t\t\tthis.store.snapshot.gl,\n\t\t\tthis.store.snapshot.scene,\n\t\t\tthis.contactShadowsRef().nativeElement,\n\t\t\tthis.depthMaterial(),\n\t\t\tthis.renderTarget(),\n\t\t];\n\n\t\tconst initialBackground = scene.background;\n\t\tconst initialOverrideMaterial = scene.overrideMaterial;\n\t\tconst initialClearAlpha = gl.getClearAlpha();\n\n\t\tcontactShadows.visible = false;\n\t\tscene.background = null;\n\t\tscene.overrideMaterial = depthMaterial;\n\t\tgl.setClearAlpha(0);\n\n\t\t// render to the render target to get the depths\n\t\tgl.setRenderTarget(renderTarget);\n\t\tgl.render(scene, shadowsCamera);\n\n\t\tthis.blurShadows(blur);\n\t\tif (smooth) this.blurShadows(blur * 0.4);\n\n\t\t// reset\n\t\tgl.setRenderTarget(null);\n\n\t\tcontactShadows.visible = true;\n\t\tscene.overrideMaterial = initialOverrideMaterial;\n\t\tscene.background = initialBackground;\n\t\tgl.setClearAlpha(initialClearAlpha);\n\t}\n\n\tprivate blurShadows(blur: number) {\n\t\tconst shadowsCamera = this.shadowsCameraRef()?.nativeElement;\n\t\tif (!shadowsCamera) return;\n\n\t\tconst [blurPlane, horizontalBlurMaterial, verticalBlurMaterial, renderTargetBlur, renderTarget, gl] = [\n\t\t\tthis.blurPlane(),\n\t\t\tthis.horizontalBlurMaterial,\n\t\t\tthis.verticalBlurMaterial,\n\t\t\tthis.renderTargetBlur(),\n\t\t\tthis.renderTarget(),\n\t\t\tthis.store.snapshot.gl,\n\t\t];\n\n\t\tblurPlane.visible = true;\n\t\tblurPlane.material = horizontalBlurMaterial;\n\t\thorizontalBlurMaterial.uniforms['tDiffuse'].value = renderTarget.texture;\n\t\thorizontalBlurMaterial.uniforms['h'].value = blur / 256;\n\t\tgl.setRenderTarget(renderTargetBlur);\n\t\tgl.render(blurPlane, shadowsCamera);\n\n\t\tblurPlane.material = verticalBlurMaterial;\n\t\tverticalBlurMaterial.uniforms['tDiffuse'].value = renderTargetBlur.texture;\n\t\tverticalBlurMaterial.uniforms['v'].value = blur / 256;\n\t\tgl.setRenderTarget(renderTarget);\n\t\tgl.render(blurPlane, shadowsCamera);\n\t\tblurPlane.visible = false;\n\t}\n\n\tprivate createRenderTarget(resolution: number) {\n\t\tconst renderTarget = new THREE.WebGLRenderTarget(resolution, resolution);\n\t\trenderTarget.texture.generateMipmaps = false;\n\t\treturn renderTarget;\n\t}\n}\n","import { computed, effect, Injector, signal, untracked } from '@angular/core';\nimport { GainMapLoader, HDRJPGLoader } from '@monogrid/gainmap-js';\nimport { injectStore, is, loaderResource, pick } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { EXRLoader, RGBELoader } from 'three-stdlib';\n\n/**\n * Available environment preset names mapped to their HDR file names.\n * These presets are hosted on the drei-assets CDN.\n */\nexport const ENVIRONMENT_PRESETS = {\n\tapartment: 'lebombo_1k.hdr',\n\tcity: 'potsdamer_platz_1k.hdr',\n\tdawn: 'kiara_1_dawn_1k.hdr',\n\tforest: 'forest_slope_1k.hdr',\n\tlobby: 'st_fagans_interior_1k.hdr',\n\tnight: 'dikhololo_night_1k.hdr',\n\tpark: 'rooitou_park_1k.hdr',\n\tstudio: 'studio_small_03_1k.hdr',\n\tsunset: 'venice_sunset_1k.hdr',\n\twarehouse: 'empty_warehouse_01_1k.hdr',\n};\n\n/**\n * Type representing available environment preset names.\n */\nexport type NgtsEnvironmentPresets = keyof typeof ENVIRONMENT_PRESETS;\n\nconst CUBEMAP_ROOT = 'https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/';\n\n/**\n * Options for loading environment textures.\n */\nexport interface NgtsEnvironmentResourceOptions {\n\t/**\n\t * Path(s) to environment file(s). Can be a single HDR/EXR file\n\t * or an array of 6 cube map faces.\n\t * @default ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png']\n\t */\n\tfiles: string | string[];\n\t/**\n\t * Base path prepended to file paths.\n\t * @default ''\n\t */\n\tpath: string;\n\t/**\n\t * Preset environment name. Overrides `files` and `path` when provided.\n\t */\n\tpreset?: NgtsEnvironmentPresets;\n\t/**\n\t * Callback to configure the loader before loading.\n\t */\n\textensions?: (loader: THREE.Loader) => void;\n\t/**\n\t * Color space for the loaded texture.\n\t * @default 'srgb' for cube maps, 'srgb-linear' for equirectangular maps\n\t */\n\tcolorSpace?: THREE.ColorSpace;\n}\n\nconst defaultFiles = ['/px.png', '/nx.png', '/py.png', '/ny.png', '/pz.png', '/nz.png'];\n\n/**\n * Creates a reactive resource for loading environment textures.\n * Supports HDR, EXR, cube maps, and gainmap formats.\n *\n * @param options - Signal of environment resource options\n * @param config - Configuration object with optional injector\n * @returns Object containing the texture signal and underlying resource\n *\n * @example\n * ```typescript\n * const env = environmentResource(() => ({ preset: 'sunset' }));\n * // Access texture: env.texture()\n * ```\n */\nexport function environmentResource(\n\toptions: () => Partial<NgtsEnvironmentResourceOptions> = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(environmentResource, injector, () => {\n\t\tconst adjustedOptions = computed(() => {\n\t\t\tconst { preset, extensions, colorSpace, ...rest } = options();\n\t\t\tlet { files, path } = rest;\n\n\t\t\tif (files == null) {\n\t\t\t\tfiles = defaultFiles;\n\t\t\t}\n\n\t\t\tif (path == null) {\n\t\t\t\tpath = '';\n\t\t\t}\n\n\t\t\tif (preset) {\n\t\t\t\tvalidatePreset(preset);\n\t\t\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t\t\t\tpath = CUBEMAP_ROOT;\n\t\t\t}\n\n\t\t\treturn { files, preset, colorSpace, path, extensions };\n\t\t});\n\n\t\tconst files = pick(adjustedOptions, 'files');\n\t\tconst multiFile = computed(() => Array.isArray(files()));\n\t\tconst resultOptions = computed(() => getExtension(files()));\n\t\tconst extension = pick(resultOptions, 'extension');\n\t\tconst loader = computed(() => getLoader(extension()));\n\n\t\tconst store = injectStore();\n\n\t\tconst texture = signal<THREE.Texture | THREE.CubeTexture | null>(null);\n\n\t\teffect(() => {\n\t\t\tconst [_extension, _multiFile, _files] = [untracked(extension), untracked(multiFile), files()];\n\t\t\tif (_extension !== 'webp' && _extension !== 'jpg' && _extension !== 'jpeg') return;\n\t\t\tstore.gl().domElement.addEventListener(\n\t\t\t\t'webglcontextlost',\n\t\t\t\t() => {\n\t\t\t\t\t// @ts-expect-error - files is correctly passed\n\t\t\t\t\tloaderResource.clear(multiFile ? [_files] : _files);\n\t\t\t\t},\n\t\t\t\t{ once: true },\n\t\t\t);\n\t\t});\n\n\t\tconst resource = loaderResource(\n\t\t\tloader,\n\t\t\t// @ts-expect-error - ensure the files is an array\n\t\t\t() => {\n\t\t\t\tconst { files } = adjustedOptions();\n\t\t\t\treturn Array.isArray(files) ? [files] : files;\n\t\t\t},\n\t\t\t{\n\t\t\t\textensions: (loader) => {\n\t\t\t\t\tconst { extensions, path } = adjustedOptions();\n\t\t\t\t\tconst { extension } = resultOptions();\n\t\t\t\t\tif (extension === 'webp' || extension === 'jpg' || extension === 'jpeg') {\n\t\t\t\t\t\t// @ts-expect-error - Gainmap requires a renderer\n\t\t\t\t\t\tloader.setRenderer(store.gl());\n\t\t\t\t\t}\n\n\t\t\t\t\tloader.setPath?.(path);\n\t\t\t\t\tif (extensions) extensions(loader);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\n\t\teffect(() => {\n\t\t\tconst loaderResult = resource.value();\n\t\t\tif (!loaderResult) return;\n\n\t\t\tconst { extension, isCubeMap } = untracked(resultOptions);\n\t\t\tconst _multiFile = untracked(multiFile);\n\t\t\tconst { colorSpace } = untracked(adjustedOptions);\n\n\t\t\t// @ts-expect-error - ensure textureResult is a Texture or CubeTexture\n\t\t\tlet textureResult = (_multiFile ? loaderResult[0] : loaderResult) as Texture | CubeTexture;\n\n\t\t\t// NOTE: racing condition, we can skip this\n\t\t\t// we just said above that if multiFile is false, it is a single Texture\n\t\t\tif (\n\t\t\t\t!_multiFile &&\n\t\t\t\tArray.isArray(textureResult) &&\n\t\t\t\tis.three<THREE.CubeTexture>(textureResult[0], 'isCubeTexture')\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!is.three<THREE.CubeTexture>(textureResult, 'isCubeTexture') &&\n\t\t\t\t(extension === 'jpg' || extension === 'jpeg' || extension === 'webp')\n\t\t\t) {\n\t\t\t\ttextureResult = textureResult.renderTarget?.texture;\n\t\t\t}\n\n\t\t\ttextureResult.mapping = isCubeMap ? THREE.CubeReflectionMapping : THREE.EquirectangularReflectionMapping;\n\t\t\ttextureResult.colorSpace = colorSpace ?? (isCubeMap ? 'srgb' : 'srgb-linear');\n\n\t\t\ttexture.set(textureResult);\n\t\t});\n\n\t\treturn { texture: texture.asReadonly(), resource };\n\t});\n}\n\n/**\n * Preloads an environment texture for later use.\n * Note: Gainmap formats (webp, jpg, jpeg) are not supported for preloading.\n *\n * @param options - Environment resource options\n * @throws Error if gainmap format is detected or file extension is unrecognized\n */\nenvironmentResource.preload = (options: Partial<NgtsEnvironmentResourceOptions> = {}) => {\n\tlet { files, path } = options;\n\tconst { preset, extensions } = options;\n\n\tif (files == null) {\n\t\tfiles = defaultFiles;\n\t}\n\n\tif (path == null) {\n\t\tpath = '';\n\t}\n\n\tif (preset) {\n\t\tvalidatePreset(preset);\n\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t\tpath = CUBEMAP_ROOT;\n\t}\n\n\tconst { extension } = getExtension(files);\n\n\tif (extension === 'webp' || extension === 'jpg' || extension === 'jpeg') {\n\t\tthrow new Error('injectEnvironment: Preloading gainmaps is not supported');\n\t}\n\n\tconst loader = getLoader(extension);\n\tif (!loader) throw new Error('injectEnvironment: Unrecognized file extension: ' + files);\n\n\tloaderResource.preload(\n\t\tloader,\n\t\t// @ts-expect-error - files is correctly passed\n\t\tArray.isArray(files) ? [files] : files,\n\t\t(loader) => {\n\t\t\tloader.setPath?.(path);\n\t\t\tif (extensions) extensions(loader);\n\t\t},\n\t);\n};\n\n/**\n * Clears a preloaded environment texture from cache.\n *\n * @param clearOptions - Object containing files or preset to clear\n */\nenvironmentResource.clear = (clearOptions: { files?: string | string[]; preset?: NgtsEnvironmentPresets }) => {\n\tconst options = { files: defaultFiles, ...clearOptions };\n\tlet { files } = options;\n\tconst preset = options.preset;\n\n\tif (preset) {\n\t\tvalidatePreset(preset);\n\t\tfiles = ENVIRONMENT_PRESETS[preset];\n\t}\n\n\tloaderResource.clear(files);\n};\n\nfunction validatePreset(preset: string) {\n\tif (!(preset in ENVIRONMENT_PRESETS))\n\t\tthrow new Error('Preset must be one of: ' + Object.keys(ENVIRONMENT_PRESETS).join(', '));\n}\n\nfunction getExtension(files: string | string[]) {\n\tconst isCubeMap = Array.isArray(files) && files.length === 6;\n\tconst isGainmap = Array.isArray(files) && files.length === 3 && files.some((file) => file.endsWith('json'));\n\tconst firstEntry = Array.isArray(files) ? files[0] : files;\n\n\t// Everything else\n\tconst extension: string | false | undefined = isCubeMap\n\t\t? 'cube'\n\t\t: isGainmap\n\t\t\t? 'webp'\n\t\t\t: firstEntry.startsWith('data:application/exr')\n\t\t\t\t? 'exr'\n\t\t\t\t: firstEntry.startsWith('data:application/hdr')\n\t\t\t\t\t? 'hdr'\n\t\t\t\t\t: firstEntry.startsWith('data:image/jpeg')\n\t\t\t\t\t\t? 'jpg'\n\t\t\t\t\t\t: firstEntry.split('.').pop()?.split('?')?.shift()?.toLowerCase();\n\n\treturn { extension, isCubeMap, isGainmap };\n}\n\nfunction getLoader(extension: string | undefined) {\n\tconst loader =\n\t\textension === 'cube'\n\t\t\t? THREE.CubeTextureLoader\n\t\t\t: extension === 'hdr'\n\t\t\t\t? RGBELoader\n\t\t\t\t: extension === 'exr'\n\t\t\t\t\t? EXRLoader\n\t\t\t\t\t: extension === 'jpg' || extension === 'jpeg'\n\t\t\t\t\t\t? (HDRJPGLoader as unknown as typeof THREE.Loader)\n\t\t\t\t\t\t: extension === 'webp'\n\t\t\t\t\t\t\t? (GainMapLoader as unknown as typeof THREE.Loader)\n\t\t\t\t\t\t\t: null;\n\n\tif (!loader) {\n\t\tthrow new Error('injectEnvironment: Unrecognized file extension: ' + extension);\n\t}\n\n\treturn loader as typeof THREE.Loader;\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tcontentChild,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDestroyRef,\n\tDirective,\n\teffect,\n\tEffectRef,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tTemplateRef,\n\tviewChild,\n} from '@angular/core';\nimport { applyProps, beforeRender, extend, injectStore, is, NgtArgs, NgtEuler, NgtPortal, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { CubeCamera } from 'three';\nimport { GroundProjectedEnv } from 'three-stdlib';\nimport {\n\tenvironmentResource,\n\ttype NgtsEnvironmentPresets,\n\ttype NgtsEnvironmentResourceOptions,\n} from './environment-resource';\n\nfunction resolveScene(scene: THREE.Scene | ElementRef<THREE.Scene>) {\n\treturn is.ref(scene) ? scene.nativeElement : scene;\n}\n\nfunction setEnvProps(\n\tbackground: boolean | 'only',\n\tscene: THREE.Scene | ElementRef<THREE.Scene> | undefined,\n\tdefaultScene: THREE.Scene,\n\ttexture: THREE.Texture,\n\tsceneProps: Partial<NgtsEnvironmentOptions> = {},\n) {\n\tsceneProps.backgroundBlurriness ??= sceneProps.blur ?? 0;\n\tsceneProps.backgroundIntensity ??= 1;\n\tsceneProps.backgroundRotation ??= [0, 0, 0];\n\tsceneProps.environmentIntensity ??= 1;\n\tsceneProps.environmentRotation ??= [0, 0, 0];\n\n\tconst target = resolveScene(scene || defaultScene);\n\tconst oldbg = target.background;\n\tconst oldenv = target.environment;\n\tconst oldSceneProps = {\n\t\tbackgroundBlurriness: target.backgroundBlurriness,\n\t\tbackgroundIntensity: target.backgroundIntensity,\n\t\tbackgroundRotation: target.backgroundRotation?.clone?.() ?? [0, 0, 0],\n\t\tenvironmentIntensity: target.environmentIntensity,\n\t\tenvironmentRotation: target.environmentRotation?.clone?.() ?? [0, 0, 0],\n\t};\n\n\tif (background !== 'only') target.environment = texture;\n\tif (background) target.background = texture;\n\tapplyProps(target, sceneProps);\n\n\treturn () => {\n\t\tif (background !== 'only') target.environment = oldenv;\n\t\tif (background) target.background = oldbg;\n\t\tapplyProps(target, oldSceneProps);\n\t};\n}\n\n/**\n * Configuration options for the NgtsEnvironment component and related directives.\n */\nexport interface NgtsEnvironmentOptions extends Partial<NgtsEnvironmentResourceOptions> {\n\t/**\n\t * Number of frames to render the environment cube camera.\n\t * Use `Infinity` for continuous updates.\n\t * @default 1\n\t */\n\tframes?: number;\n\t/**\n\t * Near clipping plane for the cube camera.\n\t * @default 1\n\t */\n\tnear?: number;\n\t/**\n\t * Far clipping plane for the cube camera.\n\t * @default 1000\n\t */\n\tfar?: number;\n\t/**\n\t * Resolution of the cube render target.\n\t * @default 256\n\t */\n\tresolution?: number;\n\t/**\n\t * Whether to use the environment as background.\n\t * Set to `'only'` to only use as background without affecting environment lighting.\n\t * @default false\n\t */\n\tbackground?: boolean | 'only';\n\n\t/**\n\t * Background blur amount.\n\t * @deprecated Use `backgroundBlurriness` instead.\n\t */\n\tblur?: number;\n\t/**\n\t * Background blur amount (0 to 1).\n\t * @default 0\n\t */\n\tbackgroundBlurriness?: number;\n\t/**\n\t * Intensity of the background.\n\t * @default 1\n\t */\n\tbackgroundIntensity?: number;\n\t/**\n\t * Rotation of the background as Euler angles.\n\t * @default [0, 0, 0]\n\t */\n\tbackgroundRotation?: NgtEuler;\n\t/**\n\t * Intensity of the environment lighting.\n\t * @default 1\n\t */\n\tenvironmentIntensity?: number;\n\t/**\n\t * Rotation of the environment lighting as Euler angles.\n\t * @default [0, 0, 0]\n\t */\n\tenvironmentRotation?: NgtEuler;\n\n\t/**\n\t * Pre-loaded texture to use as environment map.\n\t */\n\tmap?: THREE.Texture;\n\t/**\n\t * Preset environment name from the available presets.\n\t */\n\tpreset?: NgtsEnvironmentPresets;\n\t/**\n\t * Target scene to apply the environment to.\n\t * If not provided, uses the default scene.\n\t */\n\tscene?: THREE.Scene | ElementRef<THREE.Scene>;\n\t/**\n\t * Configuration for ground-projected environment.\n\t * Set to `true` for defaults, or provide custom radius, height, and scale values.\n\t */\n\tground?: boolean | { radius?: number; height?: number; scale?: number };\n}\n\nconst defaultBackground: NgtsEnvironmentOptions = {\n\tbackground: false,\n};\n\n/**\n * Directive that applies a pre-loaded texture map as the scene environment.\n *\n * @example\n * ```html\n * <ngts-environment-map [options]=\"{ map: myTexture, background: true }\" />\n * ```\n */\n@Directive({ selector: 'ngts-environment-map' })\nexport class NgtsEnvironmentMap {\n\toptions = input(defaultBackground, { transform: mergeInputs(defaultBackground) });\n\tenvSet = output<void>();\n\n\tconstructor() {\n\t\tconst store = injectStore();\n\n\t\tconst _map = pick(this.options, 'map');\n\t\tconst _envConfig = computed(() => {\n\t\t\tconst {\n\t\t\t\tbackground = false,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t} = this.options();\n\n\t\t\treturn {\n\t\t\t\tbackground,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t};\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst map = _map();\n\t\t\tif (!map) return;\n\t\t\tconst { background = false, scene, ...config } = _envConfig();\n\t\t\tconst cleanup = setEnvProps(background, scene, store.scene(), map, config);\n\t\t\tthis.envSet.emit();\n\t\t\tonCleanup(() => cleanup());\n\t\t});\n\t}\n}\n\n/**\n * Directive that loads and applies an environment texture from files or presets.\n * Supports HDR, EXR, and cube map formats.\n *\n * @example\n * ```html\n * <ngts-environment-cube [options]=\"{ preset: 'sunset', background: true }\" />\n * ```\n */\n@Directive({ selector: 'ngts-environment-cube' })\nexport class NgtsEnvironmentCube {\n\toptions = input(defaultBackground, { transform: mergeInputs(defaultBackground) });\n\tenvSet = output<void>();\n\n\tprivate store = injectStore();\n\n\tprivate envConfig = computed(() => {\n\t\tconst {\n\t\t\tbackground = false,\n\t\t\tscene,\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t} = this.options();\n\n\t\treturn {\n\t\t\tbackground,\n\t\t\tscene,\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\tconst { texture: _texture } = environmentResource(this.options);\n\n\t\teffect((onCleanup) => {\n\t\t\tconst texture = _texture();\n\t\t\tif (!texture) return;\n\n\t\t\tconst { background = false, scene, ...config } = this.envConfig();\n\t\t\tconst cleanup = setEnvProps(background, scene, this.store.scene(), texture, config);\n\t\t\tthis.envSet.emit();\n\t\t\tonCleanup(() => cleanup());\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\t_texture()?.dispose();\n\t\t});\n\t}\n}\n\n/**\n * Component that creates a portal-based environment using a cube camera.\n * Renders custom content into a virtual scene and captures it as an environment map.\n *\n * @example\n * ```html\n * <ngts-environment-portal [options]=\"{ frames: Infinity }\">\n * <ng-template>\n * <ngt-mesh>\n * <ngt-sphere-geometry />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-mesh>\n * </ng-template>\n * </ngts-environment-portal>\n * ```\n */\n@Component({\n\tselector: 'ngts-environment-portal',\n\ttemplate: `\n\t\t<ngt-portal [container]=\"virtualScene\">\n\t\t\t<ng-template portalContent let-injector=\"injector\">\n\t\t\t\t<ng-container\n\t\t\t\t\t[ngTemplateOutlet]=\"content()\"\n\t\t\t\t\t[ngTemplateOutletInjector]=\"injector\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ injector, container: virtualScene }\"\n\t\t\t\t/>\n\n\t\t\t\t<ngt-cube-camera #cubeCamera *args=\"cameraArgs()\" />\n\n\t\t\t\t@if (files() || preset()) {\n\t\t\t\t\t<ngts-environment-cube [options]=\"envCubeOptions()\" (envSet)=\"onEnvSet()\" />\n\t\t\t\t} @else if (map()) {\n\t\t\t\t\t<ngts-environment-map [options]=\"envMapOptions()\" (envSet)=\"onEnvSet()\" />\n\t\t\t\t}\n\t\t\t</ng-template>\n\t\t</ngt-portal>\n\t`,\n\timports: [NgtsEnvironmentCube, NgtsEnvironmentMap, NgtArgs, NgtPortal, NgTemplateOutlet],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironmentPortal {\n\tprivate defaultOptions: NgtsEnvironmentOptions = {\n\t\tnear: 1,\n\t\tfar: 1000,\n\t\tresolution: 256,\n\t\tframes: 1,\n\t\tbackground: false,\n\t};\n\toptions = input(this.defaultOptions, { transform: mergeInputs(this.defaultOptions) });\n\tcontent = input.required<TemplateRef<unknown>>();\n\tenvSet = output<void>();\n\n\tprivate injector = inject(Injector);\n\tprivate store = injectStore();\n\n\tprivate cameraRef = viewChild<ElementRef<THREE.CubeCamera>>('cubeCamera');\n\n\tprotected map = pick(this.options, 'map');\n\tprotected files = pick(this.options, 'files');\n\tprotected preset = pick(this.options, 'preset');\n\tprivate extensions = pick(this.options, 'extensions');\n\tprivate path = pick(this.options, 'path');\n\n\tprotected envMapOptions = computed(() => ({ background: true, map: this.map(), extensions: this.extensions() }));\n\tprotected envCubeOptions = computed(() => ({\n\t\tbackground: true,\n\t\tfiles: this.files(),\n\t\tpreset: this.preset(),\n\t\textensions: this.extensions(),\n\t\tpath: this.path(),\n\t}));\n\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprivate resolution = pick(this.options, 'resolution');\n\tprivate fbo = computed(() => {\n\t\tconst fbo = new THREE.WebGLCubeRenderTarget(this.resolution());\n\t\tfbo.texture.type = THREE.HalfFloatType;\n\t\treturn fbo;\n\t});\n\n\tprotected cameraArgs = computed(() => [this.near(), this.far(), this.fbo()]);\n\tprotected virtualScene = new THREE.Scene();\n\n\tprivate setEnvEffectRef?: EffectRef;\n\n\tconstructor() {\n\t\textend({ CubeCamera });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst [files, preset, map] = [this.files(), this.preset(), this.map()];\n\t\t\t// NOTE: when there's none of this, we don't render cube or map so we need to setEnv here\n\t\t\tif (!!files || !!preset || !!map) return;\n\t\t\tconst cleanup = this.setPortalEnv();\n\t\t\tonCleanup(() => cleanup?.());\n\t\t});\n\n\t\tlet count = 1;\n\t\tbeforeRender(() => {\n\t\t\tconst frames = this.options().frames;\n\t\t\tif (frames === Infinity || (frames != null && count < frames)) {\n\t\t\t\tconst camera = this.cameraRef()?.nativeElement;\n\t\t\t\tif (camera) {\n\t\t\t\t\tcamera.update(this.store.snapshot.gl, this.virtualScene);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tif (this.setEnvEffectRef) this.setEnvEffectRef.destroy();\n\t\t});\n\t}\n\n\t// NOTE: we use onEnvSet here to ensure that EnvironmentCube or EnvironmentMap sets the env before the portal\n\tonEnvSet() {\n\t\tif (this.setEnvEffectRef) this.setEnvEffectRef.destroy();\n\t\tthis.setEnvEffectRef = effect(\n\t\t\t(onCleanup) => {\n\t\t\t\tconst cleanup = this.setPortalEnv();\n\t\t\t\tonCleanup(() => cleanup?.());\n\t\t\t},\n\t\t\t{ manualCleanup: true, injector: this.injector },\n\t\t);\n\t}\n\n\tprivate setPortalEnv() {\n\t\tconst camera = this.cameraRef();\n\t\tif (!camera?.nativeElement) return;\n\n\t\tconst [\n\t\t\t{\n\t\t\t\tframes,\n\t\t\t\tbackground = false,\n\t\t\t\tscene,\n\t\t\t\tblur,\n\t\t\t\tbackgroundBlurriness,\n\t\t\t\tbackgroundIntensity,\n\t\t\t\tbackgroundRotation,\n\t\t\t\tenvironmentIntensity,\n\t\t\t\tenvironmentRotation,\n\t\t\t},\n\t\t\tgl,\n\t\t\tfbo,\n\t\t\tdefaultScene,\n\t\t] = [this.options(), this.store.gl(), this.fbo(), this.store.scene()];\n\n\t\tif (frames === 1) camera.nativeElement.update(gl, this.virtualScene);\n\t\tconst cleanup = setEnvProps(background, scene, defaultScene, fbo.texture, {\n\t\t\tblur,\n\t\t\tbackgroundBlurriness,\n\t\t\tbackgroundIntensity,\n\t\t\tbackgroundRotation,\n\t\t\tenvironmentIntensity,\n\t\t\tenvironmentRotation,\n\t\t});\n\t\tthis.envSet.emit();\n\t\treturn cleanup;\n\t}\n}\n\n/**\n * Component that creates a ground-projected environment map.\n * Projects the environment onto a virtual ground plane for realistic reflections.\n *\n * @example\n * ```html\n * <ngts-environment-ground [options]=\"{ preset: 'sunset', ground: { height: 15, radius: 60 } }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-environment-ground',\n\ttemplate: `\n\t\t<ngts-environment-map [options]=\"envMapOptions()\" (envSet)=\"envSet.emit()\" />\n\t\t<ngt-ground-projected-env *args=\"args()\" [scale]=\"scale()\" [height]=\"height()\" [radius]=\"radius()\" />\n\t`,\n\timports: [NgtsEnvironmentMap, NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironmentGround {\n\toptions = input({} as NgtsEnvironmentOptions);\n\tenvSet = output<void>();\n\n\tprivate defaultEnvironment = environmentResource(this.options);\n\n\tprotected height = computed(() => (this.options().ground as any)?.height);\n\tprotected radius = computed(() => (this.options().ground as any)?.radius);\n\tprotected scale = computed(() => (this.options().ground as any)?.scale ?? 1000);\n\tprotected args = computed(() => [this.options().map || this.defaultEnvironment.texture()]);\n\tprotected envMapOptions = computed(() => {\n\t\tconst { map: _, ...options } = this.options();\n\t\tconst [map] = this.args();\n\t\treturn Object.assign(options, { map }) as NgtsEnvironmentOptions;\n\t});\n\n\tconstructor() {\n\t\textend({ GroundProjectedEnv });\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.defaultEnvironment.texture()?.dispose();\n\t\t});\n\t}\n}\n\n/**\n * Main environment component that sets up scene environment and background.\n * Automatically selects the appropriate sub-component based on provided options.\n *\n * @example\n * ```html\n * <!-- Using a preset -->\n * <ngts-environment [options]=\"{ preset: 'sunset', background: true }\" />\n *\n * <!-- Using a custom texture -->\n * <ngts-environment [options]=\"{ map: myTexture }\" />\n *\n * <!-- Using ground projection -->\n * <ngts-environment [options]=\"{ preset: 'park', ground: { height: 15 } }\" />\n *\n * <!-- Using portal with custom content -->\n * <ngts-environment [options]=\"{ background: true }\">\n * <ng-template>\n * <ngt-mesh><ngt-box-geometry /></ngt-mesh>\n * </ng-template>\n * </ngts-environment>\n * ```\n */\n@Component({\n\tselector: 'ngts-environment',\n\ttemplate: `\n\t\t@let _options = options();\n\t\t@let _content = content();\n\n\t\t@if (_options.ground) {\n\t\t\t<ngts-environment-ground [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t} @else if (_options.map) {\n\t\t\t<ngts-environment-map [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t} @else if (_content) {\n\t\t\t<ngts-environment-portal [options]=\"_options\" [content]=\"_content\" (envSet)=\"envSet.emit()\" />\n\t\t} @else {\n\t\t\t<ngts-environment-cube [options]=\"_options\" (envSet)=\"envSet.emit()\" />\n\t\t}\n\t`,\n\timports: [NgtsEnvironmentCube, NgtsEnvironmentMap, NgtsEnvironmentPortal, NgtsEnvironmentGround],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsEnvironment {\n\toptions = input({} as NgtsEnvironmentOptions);\n\tcontent = contentChild(TemplateRef);\n\tenvSet = output<void>();\n}\n","import { Injector } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport {\n\tenvironmentResource,\n\ttype NgtsEnvironmentPresets,\n\ttype NgtsEnvironmentResourceOptions,\n} from './environment-resource';\n\n/**\n * Injects an environment texture resource into the current injection context.\n *\n * @deprecated Use `environmentResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param options - Signal of environment resource options\n * @param config - Configuration object with optional injector\n * @returns A signal containing the loaded texture\n *\n * @example\n * ```typescript\n * const texture = injectEnvironment(() => ({ preset: 'sunset' }));\n * ```\n */\nexport function injectEnvironment(\n\toptions: () => Partial<NgtsEnvironmentResourceOptions> = () => ({}),\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(injectEnvironment, injector, () => {\n\t\tconst resource = environmentResource(options, { injector });\n\t\treturn resource.texture;\n\t});\n}\n\n/**\n * Preloads an environment texture.\n * @deprecated Use `environmentResource.preload` instead. Will be removed in v5.0.0.\n */\ninjectEnvironment.preload = (options: () => Partial<NgtsEnvironmentResourceOptions> = () => ({})) => {\n\tenvironmentResource.preload(options());\n};\n\n/**\n * Clears a preloaded environment texture from cache.\n * @deprecated Use `environmentResource.clear` instead. Will be removed in v5.0.0.\n */\ninjectEnvironment.clear = (clearOptions: { files?: string | string[]; preset?: NgtsEnvironmentPresets }) => {\n\tenvironmentResource.clear(clearOptions);\n};\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tElementRef,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, NgtThreeElements, omit } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * Configuration options for the NgtsFloat component.\n */\nexport interface NgtsFloatOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Whether the floating animation is enabled.\n\t * @default true\n\t */\n\tenabled: boolean;\n\t/**\n\t * Animation speed multiplier.\n\t * @default 1\n\t */\n\tspeed: number;\n\t/**\n\t * Intensity of the rotation animation.\n\t * @default 1\n\t */\n\trotationIntensity: number;\n\t/**\n\t * Intensity of the floating (vertical movement) animation.\n\t * @default 1\n\t */\n\tfloatIntensity: number;\n\t/**\n\t * Range of the floating animation [min, max] in world units.\n\t * @default [-0.1, 0.1]\n\t */\n\tfloatingRange: [number?, number?];\n\t/**\n\t * Whether to call invalidate() on each frame for on-demand rendering.\n\t * @default false\n\t */\n\tautoInvalidate: boolean;\n}\n\nconst defaultOptions: NgtsFloatOptions = {\n\tenabled: true,\n\tspeed: 1,\n\trotationIntensity: 1,\n\tfloatIntensity: 1,\n\tfloatingRange: [-0.1, 0.1],\n\tautoInvalidate: false,\n};\n\n/**\n * Component that makes its children float and rotate with a gentle animation.\n * Useful for creating dreamy, floating effects on 3D objects.\n *\n * @example\n * ```html\n * <ngts-float [options]=\"{ speed: 2, floatIntensity: 2 }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-float>\n * ```\n */\n@Component({\n\tselector: 'ngts-float',\n\ttemplate: `\n\t\t<ngt-group [parameters]=\"parameters()\">\n\t\t\t<ngt-group #float [matrixAutoUpdate]=\"false\">\n\t\t\t\t<ng-content />\n\t\t\t</ngt-group>\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsFloat {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'enabled',\n\t\t'speed',\n\t\t'rotationIntensity',\n\t\t'floatIntensity',\n\t\t'floatingRange',\n\t\t'autoInvalidate',\n\t]);\n\n\tfloatRef = viewChild.required<ElementRef<THREE.Group>>('float');\n\n\tconstructor() {\n\t\textend({ Group });\n\n\t\tconst offset = Math.random() * 10000;\n\t\tbeforeRender(({ clock, invalidate }) => {\n\t\t\tconst [{ enabled, speed, rotationIntensity, floatingRange, floatIntensity, autoInvalidate }] = [\n\t\t\t\tthis.options(),\n\t\t\t];\n\t\t\tif (!enabled || speed === 0) return;\n\n\t\t\tif (autoInvalidate) invalidate();\n\n\t\t\tconst container = this.floatRef().nativeElement;\n\n\t\t\tconst offsetTime = offset + clock.elapsedTime;\n\t\t\tcontainer.rotation.x = (Math.cos((offsetTime / 4) * speed) / 8) * rotationIntensity;\n\t\t\tcontainer.rotation.y = (Math.sin((offsetTime / 4) * speed) / 8) * rotationIntensity;\n\t\t\tcontainer.rotation.z = (Math.sin((offsetTime / 4) * speed) / 20) * rotationIntensity;\n\n\t\t\tlet yPosition = Math.sin((offsetTime / 4) * speed) / 10;\n\t\t\tyPosition = THREE.MathUtils.mapLinear(\n\t\t\t\tyPosition,\n\t\t\t\t-0.1,\n\t\t\t\t0.1,\n\t\t\t\tfloatingRange[0] ?? -0.1,\n\t\t\t\tfloatingRange[1] ?? 0.1,\n\t\t\t);\n\t\t\tcontainer.position.y = yPosition * floatIntensity;\n\t\t\tcontainer.updateMatrix();\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 { applyProps, extend, NgtArgs, NgtThreeElements, NgtVector3, omit, pick, vector3 } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Mesh, MeshBasicMaterial, PlaneGeometry, RingGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsLightformer component.\n */\nexport interface NgtsLightformerOptions {\n\t/**\n\t * Texture map to apply to the lightformer.\n\t */\n\tmap?: THREE.Texture;\n\t/**\n\t * Whether the material should be tone mapped.\n\t * @default false\n\t */\n\ttoneMapped: boolean;\n\t/**\n\t * Color of the light emitted by the lightformer.\n\t * @default 'white'\n\t */\n\tcolor: string;\n\t/**\n\t * Shape of the lightformer geometry.\n\t * @default 'rect'\n\t */\n\tform: 'circle' | 'ring' | 'rect';\n\t/**\n\t * Scale of the lightformer. Can be uniform or per-axis.\n\t * @default 1\n\t */\n\tscale: number | [number, number, number] | [number, number];\n\t/**\n\t * Intensity multiplier for the light color.\n\t * @default 1\n\t */\n\tintensity: number;\n\t/**\n\t * Target position for the lightformer to look at.\n\t */\n\ttarget?: NgtVector3;\n}\n\nconst defaultOptions: Partial<Omit<NgtThreeElements['ngt-mesh'], 'scale'>> & NgtsLightformerOptions = {\n\ttoneMapped: false,\n\tcolor: 'white',\n\tform: 'rect',\n\tscale: 1,\n\tintensity: 1,\n};\n\n/**\n * Component for creating area lights in environment maps.\n * Renders a simple mesh that emits light, useful inside environment portals.\n *\n * @example\n * ```html\n * <ngts-lightformer [options]=\"{ form: 'circle', color: 'white', intensity: 2 }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-lightformer',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"fixedScale()\" [parameters]=\"parameters()\">\n\t\t\t<ng-content select=\"[data-lightformer-geometry]\">\n\t\t\t\t@switch (form()) {\n\t\t\t\t\t@case ('circle') {\n\t\t\t\t\t\t<ngt-ring-geometry *args=\"[0, 1, 64]\" />\n\t\t\t\t\t}\n\t\t\t\t\t@case ('ring') {\n\t\t\t\t\t\t<ngt-ring-geometry *args=\"[0.5, 1, 64]\" />\n\t\t\t\t\t}\n\t\t\t\t\t@case ('rect') {\n\t\t\t\t\t\t<ngt-plane-geometry />\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ng-content>\n\t\t\t<ng-content select=\"[data-lightformer-material]\">\n\t\t\t\t<ngt-mesh-basic-material #defaultMaterial [toneMapped]=\"toneMapped()\" [map]=\"map()\" [side]=\"side\" />\n\t\t\t</ng-content>\n\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsLightformer {\n\tprotected readonly side = THREE.DoubleSide;\n\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, ['map', 'toneMapped', 'color', 'form', 'scale', 'intensity', 'target']);\n\n\tprivate intensity = pick(this.options, 'intensity');\n\tprivate color = pick(this.options, 'color');\n\tprivate target = vector3(this.options, 'target', true);\n\tprivate scale = pick(this.options, 'scale');\n\tprotected fixedScale = computed(() => {\n\t\tconst scale = this.scale();\n\t\treturn Array.isArray(scale) && scale.length === 2 ? [scale[0], scale[1], 1] : scale;\n\t});\n\tprotected form = pick(this.options, 'form');\n\tprotected toneMapped = pick(this.options, 'toneMapped');\n\tprotected map = pick(this.options, 'map');\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\tprivate defaultMaterialRef = viewChild<ElementRef<THREE.MeshBasicMaterial>>('defaultMaterial');\n\n\tconstructor() {\n\t\textend({ Mesh, MeshBasicMaterial, RingGeometry, PlaneGeometry });\n\n\t\teffect(() => {\n\t\t\tconst material = this.defaultMaterialRef()?.nativeElement;\n\t\t\tif (!material) return;\n\n\t\t\tapplyProps(material, { color: this.color() });\n\t\t\tmaterial.color.multiplyScalar(this.intensity());\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst target = this.target();\n\t\t\tif (!target) return;\n\n\t\t\tconst mesh = this.meshRef().nativeElement;\n\t\t\tmesh.lookAt(target);\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\tnumberAttribute,\n\tviewChild,\n} from '@angular/core';\nimport { extend, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Mesh } from 'three';\n\n/**\n * Configuration options for the NgtsMask component.\n */\nexport interface NgtsMaskOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Whether to write color to the framebuffer.\n\t * @default false\n\t */\n\tcolorWrite: boolean;\n\t/**\n\t * Whether to write depth to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultOptions: NgtsMaskOptions = {\n\tcolorWrite: false,\n\tdepthWrite: false,\n};\n\n/**\n * Component that creates a stencil mask for selective rendering.\n * Objects inside the mask can be shown/hidden using the `mask()` function.\n *\n * @example\n * ```html\n * <ngts-mask [id]=\"1\">\n * <ngt-circle-geometry *args=\"[0.5, 64]\" />\n * </ngts-mask>\n *\n * <ngt-mesh [material]=\"maskedMaterial\">\n * <ngt-box-geometry />\n * </ngt-mesh>\n * ```\n *\n * ```typescript\n * maskedMaterial = new THREE.MeshStandardMaterial({\n * ...mask(() => 1)()\n * });\n * ```\n */\n@Component({\n\tselector: 'ngts-mask',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [renderOrder]=\"-id()\" [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsMask {\n\tid = input(1, { transform: numberAttribute });\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprotected parameters = omit(this.options, ['colorWrite', 'depthWrite']);\n\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh<THREE.BufferGeometry, THREE.Material>>>('mesh');\n\n\tprivate colorWrite = pick(this.options, 'colorWrite');\n\tprivate depthWrite = pick(this.options, 'depthWrite');\n\tprivate spread = computed(() => {\n\t\tconst [id, colorWrite, depthWrite] = [this.id(), this.colorWrite(), this.depthWrite()];\n\t\treturn {\n\t\t\tcolorWrite,\n\t\t\tdepthWrite,\n\t\t\tstencilWrite: true,\n\t\t\tstencilRef: id,\n\t\t\tstencilFunc: THREE.AlwaysStencilFunc,\n\t\t\tstencilFail: THREE.ReplaceStencilOp,\n\t\t\tstencilZFail: THREE.ReplaceStencilOp,\n\t\t\tstencilZPass: THREE.ReplaceStencilOp,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh });\n\n\t\teffect(() => {\n\t\t\tconst [mesh, spread] = [this.meshRef().nativeElement, this.spread()];\n\t\t\tObject.assign(mesh.material, spread);\n\t\t});\n\t}\n}\n\n/**\n * Creates stencil material properties for use with NgtsMask.\n * Apply the returned properties to a material to make it respect mask boundaries.\n *\n * @param id - Signal of the mask ID to match\n * @param inverse - Signal of whether to invert the mask (show outside instead of inside)\n * @returns A computed signal containing stencil properties to spread onto a material\n *\n * @example\n * ```typescript\n * // Show content only inside the mask\n * const insideMask = mask(() => 1);\n *\n * // Show content only outside the mask\n * const outsideMask = mask(() => 1, () => true);\n *\n * // Apply to material\n * Object.assign(myMaterial, insideMask());\n * ```\n */\nexport function mask(id: () => number, inverse: () => boolean = () => false) {\n\treturn computed(() => {\n\t\tconst [_id, _inverse] = [id(), inverse()];\n\t\treturn {\n\t\t\tstencilWrite: true,\n\t\t\tstencilRef: _id,\n\t\t\tstencilFunc: _inverse ? THREE.NotEqualStencilFunc : THREE.EqualStencilFunc,\n\t\t\tstencilFail: THREE.KeepStencilOp,\n\t\t\tstencilZFail: THREE.KeepStencilOp,\n\t\t\tstencilZPass: THREE.KeepStencilOp,\n\t\t};\n\t});\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tInjector,\n\tResourceRef,\n\tSignal,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { injectTexture, textureResource } from 'angular-three-soba/loaders';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\nfunction getFormatString(format: number) {\n\tswitch (format) {\n\t\tcase 64:\n\t\t\treturn '-64px';\n\t\tcase 128:\n\t\t\treturn '-128px';\n\t\tcase 256:\n\t\t\treturn '-256px';\n\t\tcase 512:\n\t\t\treturn '-512px';\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nconst LIST_URL = 'https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/matcaps.json';\nconst MATCAP_ROOT = 'https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d';\n\n/**\n * Injects a matcap texture from the matcaps library.\n * Matcaps provide realistic lighting without actual lights in the scene.\n *\n * @deprecated Use `matcapTextureResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param id - Signal of matcap ID (number index or string hash)\n * @param config - Configuration options\n * @param config.format - Signal of texture resolution (64, 128, 256, 512, or 1024)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, texture signal, and numTot (total available matcaps)\n *\n * @example\n * ```typescript\n * const { texture } = injectMatcapTexture(() => 42);\n * ```\n */\nexport function injectMatcapTexture(\n\tid: () => number | string = () => 0,\n\t{\n\t\tformat = () => 1024,\n\t\tonLoad,\n\t\tinjector,\n\t}: { format?: () => number; onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector } = {},\n) {\n\treturn assertInjector(injectMatcapTexture, injector, () => {\n\t\tconst matcapList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tmatcapList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_MATCAP = computed(() => matcapList()[0]);\n\t\tconst numTot = computed(() => Object.keys(matcapList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn matcapList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst fileName = computed(() => `${fileHash() || DEFAULT_MATCAP()}${getFormatString(format())}.png`);\n\t\tconst url = computed(() => `${MATCAP_ROOT}/${format()}/${fileName()}`);\n\n\t\tconst matcapTexture = injectTexture(url, { onLoad });\n\n\t\treturn { url, texture: matcapTexture, numTot };\n\t});\n}\n\n/**\n * Creates a reactive resource for loading matcap textures.\n * Matcaps provide realistic lighting without actual lights in the scene.\n *\n * @param id - Signal of matcap ID (number index or string hash)\n * @param config - Configuration options\n * @param config.format - Signal of texture resolution (64, 128, 256, 512, or 1024)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, resource, and numTot (total available matcaps)\n *\n * @example\n * ```typescript\n * const { resource } = matcapTextureResource(() => 42);\n * // Access texture: resource.value()\n * ```\n */\nexport function matcapTextureResource(\n\tid: () => number | string = () => 0,\n\t{\n\t\tformat = () => 1024,\n\t\tonLoad,\n\t\tinjector,\n\t}: { format?: () => number; onLoad?: (texture: THREE.Texture) => void; injector?: Injector } = {},\n) {\n\treturn assertInjector(matcapTextureResource, injector, () => {\n\t\tconst matcapList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tmatcapList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_MATCAP = computed(() => matcapList()[0]);\n\t\tconst numTot = computed(() => Object.keys(matcapList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn matcapList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst fileName = computed(() => `${fileHash() || DEFAULT_MATCAP()}${getFormatString(format())}.png`);\n\t\tconst url = computed(() => `${MATCAP_ROOT}/${format()}/${fileName()}`);\n\n\t\tconst resource = textureResource(url, { onLoad });\n\t\treturn { url, resource, numTot };\n\t});\n}\n\n/**\n * Options for the NgtsMatcapTexture structural directive.\n */\nexport interface NgtsMatcapTextureOptions {\n\t/**\n\t * Matcap ID (number index or string hash).\n\t * @default 0\n\t */\n\tid?: number | string;\n\t/**\n\t * Texture resolution (64, 128, 256, 512, or 1024).\n\t * @default 1024\n\t */\n\tformat?: number;\n}\n\n/**\n * Structural directive for loading and using matcap textures in templates.\n * Provides the loaded texture resource through the template context.\n *\n * @example\n * ```html\n * <ng-template [matcapTexture]=\"{ id: 42, format: 512 }\" let-resource>\n * @if (resource.hasValue()) {\n * <ngt-mesh-matcap-material [matcap]=\"resource.value()\" />\n * }\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[matcapTexture]' })\nexport class NgtsMatcapTexture {\n\tmatcapTexture = input<NgtsMatcapTextureOptions>();\n\tmatcapTextureLoaded = input<(texture: THREE.Texture) => void>();\n\n\tprivate template = inject(TemplateRef);\n\tprivate vcr = inject(ViewContainerRef);\n\n\tprivate id = computed(() => this.matcapTexture()?.id ?? 0);\n\tprivate format = computed(() => this.matcapTexture()?.format ?? 1024);\n\n\tprivate ref?: EmbeddedViewRef<{ $implicit: Signal<THREE.Texture | null> }>;\n\n\tconstructor() {\n\t\tconst { resource } = matcapTextureResource(this.id, {\n\t\t\tformat: this.format,\n\t\t\tonLoad: this.matcapTextureLoaded(),\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.ref = this.vcr.createEmbeddedView(this.template, { $implicit: resource });\n\t\t\tthis.ref.detectChanges();\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.ref?.destroy();\n\t\t});\n\t}\n\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsMatcapTexture,\n\t\tctx: unknown,\n\t): ctx is { $implicit: ResourceRef<THREE.Texture | undefined> } {\n\t\treturn true;\n\t}\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tInjector,\n\tResourceRef,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { injectTexture, textureResource } from 'angular-three-soba/loaders';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\nconst NORMAL_ROOT = 'https://rawcdn.githack.com/pmndrs/drei-assets/7a3104997e1576f83472829815b00880d88b32fb';\nconst LIST_URL = 'https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/normals/normals.json';\n\n/**\n * Settings for normal texture configuration.\n */\ninterface NgtsNormalTextureSettings {\n\t/**\n\t * Texture repeat values [x, y].\n\t * @default [1, 1]\n\t */\n\trepeat?: number[];\n\t/**\n\t * Anisotropic filtering level.\n\t * @default 1\n\t */\n\tanisotropy?: number;\n\t/**\n\t * Texture offset values [x, y].\n\t * @default [0, 0]\n\t */\n\toffset?: number[];\n}\n\n/**\n * Injects a normal texture from the normals library.\n * Normal textures add surface detail without additional geometry.\n *\n * @deprecated Use `normalTextureResource` instead. Will be removed in v5.0.0.\n * @since v4.0.0\n *\n * @param id - Signal of normal texture ID (number index or string hash)\n * @param config - Configuration options\n * @param config.settings - Signal of texture settings (repeat, anisotropy, offset)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, texture signal, and numTot (total available normal textures)\n *\n * @example\n * ```typescript\n * const { texture } = injectNormalTexture(() => 42, {\n * settings: () => ({ repeat: [2, 2] })\n * });\n * ```\n */\nexport function injectNormalTexture(\n\tid: () => string | number = () => 0,\n\t{\n\t\tsettings = () => ({}),\n\t\tonLoad,\n\t\tinjector,\n\t}: { settings?: () => NgtsNormalTextureSettings; onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector },\n) {\n\treturn assertInjector(injectNormalTexture, injector, () => {\n\t\tconst normalList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tnormalList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_NORMAL = computed(() => normalList()[0]);\n\t\tconst numTot = computed(() => Object.keys(normalList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn normalList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst imageName = computed(() => fileHash() || DEFAULT_NORMAL());\n\t\tconst url = computed(() => `${NORMAL_ROOT}/normals/${imageName()}`);\n\n\t\tconst normalTexture = injectTexture(url, { onLoad });\n\n\t\teffect(() => {\n\t\t\tconst texture = normalTexture();\n\t\t\tif (!texture) return;\n\n\t\t\tconst { anisotropy = 1, repeat = [1, 1], offset = [0, 0] } = settings();\n\t\t\ttexture.wrapS = texture.wrapT = THREE.RepeatWrapping;\n\t\t\ttexture.repeat = new THREE.Vector2(repeat[0], repeat[1]);\n\t\t\ttexture.offset = new THREE.Vector2(offset[0], offset[1]);\n\t\t\ttexture.anisotropy = anisotropy;\n\t\t});\n\n\t\treturn { url, texture: normalTexture, numTot };\n\t});\n}\n\n/**\n * Creates a reactive resource for loading normal textures.\n * Normal textures add surface detail without additional geometry.\n *\n * @param id - Signal of normal texture ID (number index or string hash)\n * @param config - Configuration options\n * @param config.settings - Signal of texture settings (repeat, anisotropy, offset)\n * @param config.onLoad - Callback when texture is loaded\n * @param config.injector - Optional injector for dependency injection\n * @returns Object with url, resource, and numTot (total available normal textures)\n *\n * @example\n * ```typescript\n * const { resource } = normalTextureResource(() => 42);\n * // Access texture: resource.value()\n * ```\n */\nexport function normalTextureResource(\n\tid: () => string | number = () => 0,\n\t{\n\t\tsettings = () => ({}),\n\t\tonLoad,\n\t\tinjector,\n\t}: { settings?: () => NgtsNormalTextureSettings; onLoad?: (texture: THREE.Texture) => void; injector?: Injector },\n) {\n\treturn assertInjector(normalTextureResource, injector, () => {\n\t\tconst normalList = signal<Record<string, string>>({});\n\n\t\tfetch(LIST_URL)\n\t\t\t.then((res) => res.json())\n\t\t\t.then((list) => {\n\t\t\t\tnormalList.set(list);\n\t\t\t});\n\n\t\tconst DEFAULT_NORMAL = computed(() => normalList()[0]);\n\t\tconst numTot = computed(() => Object.keys(normalList()).length);\n\n\t\tconst fileHash = computed(() => {\n\t\t\tconst idValue = id();\n\t\t\tif (typeof idValue === 'string') {\n\t\t\t\treturn idValue;\n\t\t\t}\n\n\t\t\tif (typeof idValue === 'number') {\n\t\t\t\treturn normalList()[idValue];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\tconst imageName = computed(() => fileHash() || DEFAULT_NORMAL());\n\t\tconst url = computed(() => `${NORMAL_ROOT}/normals/${imageName()}`);\n\n\t\tconst resource = textureResource(url, { onLoad });\n\n\t\teffect(() => {\n\t\t\tif (!resource.hasValue()) return;\n\n\t\t\tconst texture = resource.value();\n\t\t\tconst { anisotropy = 1, repeat = [1, 1], offset = [0, 0] } = settings();\n\n\t\t\ttexture.wrapS = texture.wrapT = THREE.RepeatWrapping;\n\t\t\ttexture.repeat = new THREE.Vector2(repeat[0], repeat[1]);\n\t\t\ttexture.offset = new THREE.Vector2(offset[0], offset[1]);\n\t\t\ttexture.anisotropy = anisotropy;\n\t\t});\n\n\t\treturn { url, resource, numTot };\n\t});\n}\n\n/**\n * Options for the NgtsNormalTexture structural directive.\n * Extends NgtsNormalTextureSettings with an ID property.\n */\nexport interface NgtsNormalTextureOptions extends NgtsNormalTextureSettings {\n\t/**\n\t * Normal texture ID (number index or string hash).\n\t * @default 0\n\t */\n\tid?: number | string;\n}\n\n/**\n * Structural directive for loading and using normal textures in templates.\n * Provides the loaded texture resource through the template context.\n *\n * @example\n * ```html\n * <ng-template [normalTexture]=\"{ id: 42, repeat: [2, 2] }\" let-resource>\n * @if (resource.hasValue()) {\n * <ngt-mesh-standard-material [normalMap]=\"resource.value()\" />\n * }\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[normalTexture]' })\nexport class NgtsNormalTexture {\n\tnormalTexture = input<NgtsNormalTextureOptions>();\n\tnormalTextureLoaded = input<(texture: THREE.Texture) => void>();\n\n\tprivate template = inject(TemplateRef);\n\tprivate vcr = inject(ViewContainerRef);\n\n\tprivate id = computed(() => this.normalTexture()?.id ?? 0);\n\tprivate settings = computed(() => {\n\t\tconst { id: _, ...settings } = this.normalTexture() || {};\n\t\treturn settings;\n\t});\n\n\tprivate ref?: EmbeddedViewRef<{ $implicit: ResourceRef<THREE.Texture | undefined> }>;\n\n\tconstructor() {\n\t\tconst { resource } = normalTextureResource(this.id, {\n\t\t\tsettings: this.settings,\n\t\t\tonLoad: this.normalTextureLoaded(),\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.ref = this.vcr.createEmbeddedView(this.template, { $implicit: resource });\n\t\t\tthis.ref.detectChanges();\n\t\t});\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.ref?.destroy();\n\t\t});\n\t}\n\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsNormalTexture,\n\t\tctx: unknown,\n\t): ctx is { $implicit: ResourceRef<THREE.Texture | undefined> } {\n\t\treturn true;\n\t}\n}\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { NgtArgs, NgtThreeElements, extend, omit, pick } from 'angular-three';\nimport { getVersion } from 'angular-three-soba/misc';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { DirectionalLight, Group, OrthographicCamera, Vector2 } from 'three';\nimport { NgtsAccumulativeShadows } from './accumulative-shadows';\n\n/**\n * Configuration options for the NgtsRandomizedLights component.\n * Extends the base group element options from Three.js.\n */\nexport interface NgtsRandomizedLightsOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * How many frames it will jiggle the lights.\n\t * Frames is context aware - if a provider like AccumulativeShadows exists, frames will be taken from there.\n\t * @default 1\n\t */\n\tframes: number;\n\t/**\n\t * Light position in 3D space.\n\t * @default [0, 0, 0]\n\t */\n\tposition: [x: number, y: number, z: number];\n\t/**\n\t * Radius of the jiggle. Higher values make softer light.\n\t * @default 1\n\t */\n\tradius: number;\n\t/**\n\t * Amount of directional lights to create.\n\t * @default 8\n\t */\n\tamount: number;\n\t/**\n\t * Light intensity. Distributed among all lights.\n\t * @default Math.PI (for Three.js >= 155) or 1\n\t */\n\tintensity: number;\n\t/**\n\t * Ambient occlusion factor. Lower values mean less AO, higher values mean more.\n\t * You can mix AO and directional light.\n\t * @default 0.5\n\t */\n\tambient: number;\n\t/**\n\t * Whether the lights cast shadows.\n\t * @default true\n\t */\n\tcastShadow: boolean;\n\t/**\n\t * Shadow bias to prevent shadow acne.\n\t * @default 0.001\n\t */\n\tbias: number;\n\t/**\n\t * Shadow map size in pixels.\n\t * @default 512\n\t */\n\tmapSize: number;\n\t/**\n\t * Size of the shadow camera frustum.\n\t * @default 5\n\t */\n\tsize: number;\n\t/**\n\t * Shadow camera near plane distance.\n\t * @default 0.5\n\t */\n\tnear: number;\n\t/**\n\t * Shadow camera far plane distance.\n\t * @default 500\n\t */\n\tfar: number;\n}\n\nconst defaultOptions: NgtsRandomizedLightsOptions = {\n\tcastShadow: true,\n\tbias: 0.001,\n\tmapSize: 512,\n\tsize: 5,\n\tnear: 0.5,\n\tfar: 500,\n\tframes: 1,\n\tposition: [0, 0, 0],\n\tradius: 1,\n\tamount: 8,\n\tintensity: getVersion() >= 155 ? Math.PI : 1,\n\tambient: 0.5,\n};\n\n/**\n * Creates multiple randomized directional lights that jiggle their positions each frame.\n * Used in combination with AccumulativeShadows to create soft, natural-looking shadows.\n *\n * Must be used as a child of NgtsAccumulativeShadows.\n *\n * @example\n * ```html\n * <ngts-accumulative-shadows>\n * <ngts-randomized-lights [options]=\"{ amount: 8, radius: 4, intensity: 1 }\" />\n * </ngts-accumulative-shadows>\n * ```\n */\n@Component({\n\tselector: 'ngts-randomized-lights',\n\ttemplate: `\n\t\t<ngt-group #lights [parameters]=\"parameters()\">\n\t\t\t@for (i of count(); track $index) {\n\t\t\t\t<ngt-directional-light [castShadow]=\"castShadow()\" [intensity]=\"intensity() / amount()\">\n\t\t\t\t\t<ngt-value [rawValue]=\"bias()\" attach=\"shadow.bias\" />\n\t\t\t\t\t<ngt-vector2 *args=\"shadowMapSize()\" attach=\"shadow.mapSize\" />\n\t\t\t\t\t<ngt-orthographic-camera *args=\"cameraArgs()\" attach=\"shadow.camera\" />\n\t\t\t\t</ngt-directional-light>\n\t\t\t}\n\t\t</ngt-group>\n\t`,\n\timports: [NgtArgs],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsRandomizedLights {\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, Object.keys(defaultOptions) as Array<keyof NgtsRandomizedLightsOptions>);\n\n\tlightsRef = viewChild.required<ElementRef<THREE.Group>>('lights');\n\n\tprivate accumulativeShadows = inject(NgtsAccumulativeShadows);\n\n\tprotected castShadow = pick(this.options, 'castShadow');\n\tprotected bias = pick(this.options, 'bias');\n\tprotected intensity = pick(this.options, 'intensity');\n\tprotected amount = pick(this.options, 'amount');\n\n\tprivate mapSize = pick(this.options, 'mapSize');\n\tprotected shadowMapSize = computed(() => [this.mapSize(), this.mapSize()]);\n\n\tprivate position = pick(this.options, 'position');\n\tprivate length = computed(() => new THREE.Vector3(...this.position()).length());\n\n\tprotected count = computed(() => Array.from({ length: this.amount() }, (_, index) => index));\n\n\tprivate size = pick(this.options, 'size');\n\tprivate near = pick(this.options, 'near');\n\tprivate far = pick(this.options, 'far');\n\tprotected cameraArgs = computed(() => [\n\t\t-this.size(),\n\t\tthis.size(),\n\t\tthis.size(),\n\t\t-this.size(),\n\t\tthis.near(),\n\t\tthis.far(),\n\t]);\n\n\tconstructor() {\n\t\textend({ Group, DirectionalLight, OrthographicCamera, Vector2 });\n\n\t\teffect((onCleanup) => {\n\t\t\tconst lights = this.lightsRef().nativeElement;\n\t\t\tthis.accumulativeShadows.lightsMap.set(lights.uuid, this.update.bind(this));\n\t\t\tonCleanup(() => this.accumulativeShadows.lightsMap.delete(lights.uuid));\n\t\t});\n\t}\n\n\t/**\n\t * Updates the positions of all randomized lights.\n\t * Called automatically by AccumulativeShadows each frame.\n\t * Randomizes light positions based on ambient and radius settings.\n\t */\n\tupdate() {\n\t\tlet light: THREE.Object3D | undefined;\n\t\tconst lights = this.lightsRef().nativeElement;\n\t\tif (lights) {\n\t\t\tconst [{ ambient, radius, position }, length] = [this.options(), this.length()];\n\n\t\t\tfor (let i = 0; i < lights.children.length; i++) {\n\t\t\t\tlight = lights.children[i];\n\t\t\t\tif (Math.random() > ambient) {\n\t\t\t\t\tlight.position.set(\n\t\t\t\t\t\tposition[0] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t\tposition[1] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t\tposition[2] + THREE.MathUtils.randFloatSpread(radius),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tconst lambda = Math.acos(2 * Math.random() - 1) - Math.PI / 2.0;\n\t\t\t\t\tconst phi = 2 * Math.PI * Math.random();\n\t\t\t\t\tlight.position.set(\n\t\t\t\t\t\tMath.cos(lambda) * Math.cos(phi) * length,\n\t\t\t\t\t\tMath.abs(Math.cos(lambda) * Math.sin(phi) * length),\n\t\t\t\t\t\tMath.sin(lambda) * length,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDirective,\n\tInjector,\n\tTemplateRef,\n\tcomputed,\n\tcontentChild,\n\teffect,\n\tinput,\n} from '@angular/core';\nimport {\n\tNgtArgs,\n\tNgtAttachable,\n\tNgtComputeFunction,\n\tNgtPortal,\n\tNgtThreeElements,\n\textend,\n\tgetInstanceState,\n\tinjectStore,\n\tis,\n\tomit,\n\tpick,\n} from 'angular-three';\nimport { fbo } from 'angular-three-soba/misc';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group } from 'three';\n\n/**\n * Configuration options for the NgtsRenderTexture component.\n * Extends the base texture element options from Three.js.\n */\nexport interface NgtsRenderTextureOptions extends Partial<Omit<NgtThreeElements['ngt-texture'], 'attach'>> {\n\t/**\n\t * Width of the render texture in pixels.\n\t * @default viewport width\n\t */\n\twidth?: number;\n\t/**\n\t * Height of the render texture in pixels.\n\t * @default viewport height\n\t */\n\theight?: number;\n\t/**\n\t * Number of samples for multisampling anti-aliasing (MSAA).\n\t * @default 8\n\t */\n\tsamples: number;\n\t/**\n\t * Whether to use a stencil buffer.\n\t * @default false\n\t */\n\tstencilBuffer: boolean;\n\t/**\n\t * Whether to use a depth buffer.\n\t * @default true\n\t */\n\tdepthBuffer: boolean;\n\t/**\n\t * Whether to generate mipmaps for the texture.\n\t * @default false\n\t */\n\tgenerateMipmaps: boolean;\n\t/**\n\t * Render priority for the render loop subscription.\n\t * @default 0\n\t */\n\trenderPriority: number;\n\t/**\n\t * Event priority for pointer events.\n\t * @default 0\n\t */\n\teventPriority: number;\n\t/**\n\t * Number of frames to render. Set to Infinity for continuous rendering,\n\t * or a specific number to render only that many frames.\n\t * @default Infinity\n\t */\n\tframes: number;\n\t/**\n\t * Custom compute function for pointer event handling.\n\t * Used to transform pointer events for the virtual scene.\n\t */\n\tcompute?: (event: any, state: any, previous: any) => false | undefined;\n}\n\n/**\n * Internal directive that handles the render loop for the render texture.\n * Manages rendering the virtual scene to the FBO (Frame Buffer Object).\n *\n * @internal\n */\n@Directive({ selector: '[renderTextureContainer]' })\nexport class NgtsRenderTextureContainer {\n\t/** The WebGL render target (Frame Buffer Object) to render into. */\n\tfbo = input.required<THREE.WebGLRenderTarget>();\n\t/** Priority in the render loop. Higher values render later. */\n\trenderPriority = input.required<number>();\n\t/** Number of frames to render. Use Infinity for continuous rendering. */\n\tframes = input.required<number>();\n\n\tprivate store = injectStore();\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst [renderPriority, { internal }] = [this.renderPriority(), this.store()];\n\n\t\t\tlet count = 0;\n\t\t\tlet oldAutoClear: boolean;\n\t\t\tlet oldXrEnabled: boolean;\n\t\t\tlet oldRenderTarget: THREE.WebGLRenderTarget | null;\n\t\t\tlet oldIsPresenting: boolean;\n\n\t\t\tconst cleanup = internal.subscribe(\n\t\t\t\t({ gl, scene, camera }) => {\n\t\t\t\t\tconst [fbo, frames] = [this.fbo(), this.frames()];\n\t\t\t\t\t// NOTE: render the frames ^ 2\n\t\t\t\t\t// due to some race condition, we want to render double the frames here.\n\t\t\t\t\tif (frames === Infinity || count < frames * frames) {\n\t\t\t\t\t\toldAutoClear = gl.autoClear;\n\t\t\t\t\t\toldXrEnabled = gl.xr.enabled;\n\t\t\t\t\t\toldRenderTarget = gl.getRenderTarget();\n\t\t\t\t\t\toldIsPresenting = gl.xr.isPresenting;\n\t\t\t\t\t\tgl.autoClear = true;\n\t\t\t\t\t\tgl.xr.enabled = false;\n\t\t\t\t\t\tgl.xr.isPresenting = false;\n\t\t\t\t\t\tgl.setRenderTarget(fbo);\n\t\t\t\t\t\tgl.render(scene, camera);\n\t\t\t\t\t\tgl.setRenderTarget(oldRenderTarget);\n\t\t\t\t\t\tgl.autoClear = oldAutoClear;\n\t\t\t\t\t\tgl.xr.enabled = oldXrEnabled;\n\t\t\t\t\t\tgl.xr.isPresenting = oldIsPresenting;\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trenderPriority,\n\t\t\t\tthis.store,\n\t\t\t);\n\n\t\t\tonCleanup(() => {\n\t\t\t\tcleanup();\n\t\t\t});\n\t\t});\n\t}\n}\n\nconst defaultOptions: NgtsRenderTextureOptions = {\n\tsamples: 8,\n\trenderPriority: 0,\n\teventPriority: 0,\n\tframes: Infinity,\n\tstencilBuffer: false,\n\tdepthBuffer: true,\n\tgenerateMipmaps: false,\n};\n\n/**\n * Structural directive for defining the content to be rendered into the texture.\n * Provides type-safe template context with access to the virtual scene container and injector.\n *\n * @example\n * ```html\n * <ngts-render-texture>\n * <ng-template renderTextureContent let-container=\"container\">\n * <ngt-mesh>...</ngt-mesh>\n * </ng-template>\n * </ngts-render-texture>\n * ```\n */\n@Directive({ selector: 'ng-template[renderTextureContent]' })\nexport class NgtsRenderTextureContent {\n\t/**\n\t * Type guard for template context.\n\t *\n\t * @param _ - The directive instance\n\t * @param ctx - The template context to check\n\t * @returns Type predicate for the template context\n\t */\n\tstatic ngTemplateContextGuard(\n\t\t_: NgtsRenderTextureContent,\n\t\tctx: unknown,\n\t): ctx is { container: THREE.Object3D; injector: Injector } {\n\t\treturn true;\n\t}\n}\n\nlet incrementId = 0;\n\n/**\n * Renders a scene into a texture that can be used as a map on materials.\n * Creates a virtual scene with its own camera and renders it to an offscreen buffer.\n * Supports interactive raycasting through UV coordinate transformation.\n *\n * @example\n * ```html\n * <ngt-mesh>\n * <ngt-plane-geometry />\n * <ngt-mesh-standard-material>\n * <ngts-render-texture attach=\"map\">\n * <ng-template renderTextureContent>\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-basic-material color=\"red\" />\n * </ngt-mesh>\n * </ng-template>\n * </ngts-render-texture>\n * </ngt-mesh-standard-material>\n * </ngt-mesh>\n * ```\n */\n@Component({\n\tselector: 'ngts-render-texture',\n\ttemplate: `\n\t\t<ngt-portal [container]=\"virtualScene\" [state]=\"{ events: { compute: compute(), priority: eventPriority() } }\">\n\t\t\t<ng-template portalContent let-injector=\"injector\">\n\t\t\t\t<ng-container\n\t\t\t\t\trenderTextureContainer\n\t\t\t\t\t[fbo]=\"fbo\"\n\t\t\t\t\t[renderPriority]=\"renderPriority()\"\n\t\t\t\t\t[frames]=\"frames()\"\n\t\t\t\t\t[ngTemplateOutlet]=\"content()\"\n\t\t\t\t\t[ngTemplateOutletInjector]=\"injector\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ container: virtualScene, injector }\"\n\t\t\t\t>\n\t\t\t\t\t<ngt-group (pointerover)=\"(undefined)\" />\n\t\t\t\t</ng-container>\n\t\t\t</ng-template>\n\t\t</ngt-portal>\n\n\t\t<ngt-primitive *args=\"[fbo.texture]\" [attach]=\"attach()\" [parameters]=\"parameters()\" />\n\t`,\n\timports: [NgtPortal, NgtsRenderTextureContainer, NgtArgs, NgTemplateOutlet],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsRenderTextureImpl {\n\t/** Property path to attach the texture (e.g., 'map', 'envMap', 'alphaMap'). */\n\tattach = input<NgtAttachable>('map');\n\t/** Configuration options for the render texture. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'samples',\n\t\t'renderPriority',\n\t\t'eventPriority',\n\t\t'frames',\n\t\t'stencilBuffer',\n\t\t'depthBuffer',\n\t\t'generateMipmaps',\n\t\t'compute',\n\t\t'width',\n\t\t'height',\n\t]);\n\n\tcontent = contentChild.required(NgtsRenderTextureContent, { read: TemplateRef });\n\n\tprivate store = injectStore();\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate samples = pick(this.options, 'samples');\n\tprivate stencilBuffer = pick(this.options, 'stencilBuffer');\n\tprivate depthBuffer = pick(this.options, 'depthBuffer');\n\tprivate generateMipmaps = pick(this.options, 'generateMipmaps');\n\tprivate computeFn = pick(this.options, 'compute');\n\n\tprivate fboParams = computed(() => ({\n\t\twidth: (this.width() || this.store.size.width()) * this.store.viewport.dpr(),\n\t\theight: (this.height() || this.store.size.height()) * this.store.viewport.dpr(),\n\t\tsettings: {\n\t\t\tsamples: this.samples(),\n\t\t\tdepthBuffer: this.depthBuffer(),\n\t\t\tstencilBuffer: this.stencilBuffer(),\n\t\t\tgenerateMipmaps: this.generateMipmaps(),\n\t\t},\n\t}));\n\n\tprotected renderPriority = pick(this.options, 'renderPriority');\n\tprotected frames = pick(this.options, 'frames');\n\tprotected fbo = fbo(this.fboParams);\n\tprotected virtualScene = (() => {\n\t\tconst scene = new THREE.Scene();\n\t\tscene.name = `ngts-render-texture-virtual-scene-${incrementId++}`;\n\t\treturn scene;\n\t})();\n\tprotected eventPriority = pick(this.options, 'eventPriority');\n\tprotected compute = computed(() => this.computeFn() || this.uvCompute);\n\n\tprivate uvCompute: NgtComputeFunction = (event, root, previous) => {\n\t\tconst fbo = this.fbo;\n\t\tif (!fbo) return;\n\t\tconst state = root.snapshot;\n\t\tconst previousState = previous?.snapshot;\n\n\t\t// Since this is only a texture it does not have an easy way to obtain the parent, which we\n\t\t// need to transform event coordinates to local coordinates. We use ngt internals to find the\n\t\t// next Object3D.\n\t\tlet parent = getInstanceState(fbo.texture)?.parent();\n\t\twhile (parent && !is.three<THREE.Object3D>(parent, 'isObject3D')) {\n\t\t\tparent = getInstanceState(parent)?.parent();\n\t\t}\n\n\t\tif (!parent) return;\n\t\t// First we call the previous state-onion-layers compute, this is what makes it possible to nest portals\n\t\tif (previousState && !previousState.raycaster.camera) {\n\t\t\tpreviousState.events.compute?.(event, previous, previous.snapshot.previousRoot);\n\t\t}\n\t\t// We run a quick check against the parent, if it isn't hit there's no need to raycast at all\n\t\tconst [intersection] = previousState?.raycaster.intersectObject(parent) || [];\n\t\tif (!intersection) return;\n\t\t// We take that hits uv coords, set up this layers raycaster, et voilà, we have raycasting on arbitrary surfaces\n\t\tconst uv = intersection.uv;\n\t\tif (!uv) return;\n\t\tstate.raycaster.setFromCamera(state.pointer.set(uv.x * 2 - 1, uv.y * 2 - 1), state.camera);\n\t};\n\n\tconstructor() {\n\t\textend({ Group });\n\t}\n}\n\n/**\n * Tuple of components required for the render texture feature.\n * Import this array to use render texture functionality.\n *\n * @example\n * ```typescript\n * @Component({\n * imports: [NgtsRenderTexture],\n * // ...\n * })\n * ```\n */\nexport const NgtsRenderTexture = [NgtsRenderTextureImpl, NgtsRenderTextureContent] as const;\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDOCUMENT,\n\tinject,\n\tinput,\n} from '@angular/core';\nimport { extend, NgtArgs, NgtColor, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { CanvasTexture, Mesh, MeshBasicMaterial, PlaneGeometry } from 'three';\n\n/**\n * Configuration options for the NgtsShadow component.\n * Extends the base mesh element options from Three.js.\n */\nexport interface NgtsShadowOptions extends Partial<NgtThreeElements['ngt-mesh']> {\n\t/**\n\t * Position of the color stop in the radial gradient (0-1).\n\t * Lower values create a smaller, sharper shadow center.\n\t * @default 0.0\n\t */\n\tcolorStop: number;\n\t/**\n\t * Whether the shadow is affected by fog.\n\t * @default false\n\t */\n\tfog: boolean;\n\t/**\n\t * Color of the shadow.\n\t * @default 'black'\n\t */\n\tcolor: NgtColor;\n\t/**\n\t * Opacity of the shadow (0-1).\n\t * @default 0.5\n\t */\n\topacity: number;\n\t/**\n\t * Whether to write to the depth buffer.\n\t * @default false\n\t */\n\tdepthWrite: boolean;\n}\n\nconst defaultShadowOptions: NgtsShadowOptions = {\n\tfog: false,\n\tdepthWrite: false,\n\tcolorStop: 0.0,\n\tcolor: 'black',\n\topacity: 0.5,\n};\n\n/**\n * Renders a simple circular drop shadow using a canvas-generated radial gradient texture.\n * Creates a flat plane with a transparent gradient that simulates a soft shadow.\n *\n * @example\n * ```html\n * <ngts-shadow [options]=\"{ color: 'black', opacity: 0.5, scale: [2, 2, 1] }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-shadow',\n\ttemplate: `\n\t\t<ngt-mesh [renderOrder]=\"renderOrder()\" [rotation.x]=\"-Math.PI / 2\" [parameters]=\"parameters()\">\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[opacity]=\"opacity()\"\n\t\t\t\t[fog]=\"fog()\"\n\t\t\t\t[depthWrite]=\"depthWrite()\"\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t>\n\t\t\t\t<ngt-canvas-texture *args=\"[canvas()]\" attach=\"map\" />\n\t\t\t</ngt-mesh-basic-material>\n\t\t\t<ng-content />\n\t\t</ngt-mesh>\n\t`,\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NgtsShadow {\n\tprotected readonly Math = Math;\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** Configuration options for the shadow appearance. */\n\toptions = input(defaultShadowOptions, { transform: mergeInputs(defaultShadowOptions) });\n\tprotected parameters = omit(this.options, ['colorStop', 'fog', 'color', 'opacity', 'depthWrite', 'renderOrder']);\n\n\tprivate document = inject(DOCUMENT);\n\n\tprotected renderOrder = pick(this.options, 'renderOrder');\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected fog = pick(this.options, 'fog');\n\tprotected depthWrite = pick(this.options, 'depthWrite');\n\n\tprivate color = pick(this.options, 'color');\n\tprivate colorStop = pick(this.options, 'colorStop');\n\n\tprotected canvas = computed(() => {\n\t\tconst [color, colorStop] = [this.color(), this.colorStop()];\n\n\t\tconst canvas = this.document.createElement('canvas');\n\t\tcanvas.width = 128;\n\t\tcanvas.height = 128;\n\t\tconst context = canvas.getContext('2d') as CanvasRenderingContext2D;\n\t\tconst gradient = context.createRadialGradient(\n\t\t\tcanvas.width / 2,\n\t\t\tcanvas.height / 2,\n\t\t\t0,\n\t\t\tcanvas.width / 2,\n\t\t\tcanvas.height / 2,\n\t\t\tcanvas.width / 2,\n\t\t);\n\t\tconst colorArgs = Array.isArray(color) ? color : [color];\n\t\tgradient.addColorStop(colorStop, new THREE.Color(...colorArgs).getStyle());\n\t\tgradient.addColorStop(1, 'rgba(0,0,0,0)');\n\t\tcontext.fillStyle = gradient;\n\t\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\t\treturn canvas;\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial, CanvasTexture });\n\t}\n}\n","import { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input } from '@angular/core';\nimport { NgtArgs, NgtThreeElements, NgtVector3, omit, pick, vector3 } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Sky } from 'three-stdlib';\n\n/**\n * Calculates the sun position from inclination and azimuth angles.\n *\n * @param inclination - Vertical angle of the sun (0-1, where 0.5 is horizon)\n * @param azimuth - Horizontal angle of the sun (0-1, representing full rotation)\n * @param vector - Optional vector to store the result (creates new if not provided)\n * @returns The calculated sun position vector\n */\nexport function calcPosFromAngles(inclination: number, azimuth: number, vector: THREE.Vector3 = new THREE.Vector3()) {\n\tconst theta = Math.PI * (inclination - 0.5);\n\tconst phi = 2 * Math.PI * (azimuth - 0.5);\n\n\tvector.x = Math.cos(phi);\n\tvector.y = Math.sin(theta);\n\tvector.z = Math.sin(phi);\n\n\treturn vector;\n}\n\n/**\n * Configuration options for the NgtsSky component.\n * Extends the base mesh element options from Three.js.\n */\nexport interface NgtsSkyOptions extends Partial<Omit<NgtThreeElements['ngt-mesh'], 'scale'>> {\n\t/**\n\t * Distance of the sky sphere from the camera.\n\t * @default 1000\n\t */\n\tdistance: number;\n\t/**\n\t * Vertical angle of the sun (0-1, where 0.5 is horizon).\n\t * Values above 0.5 place sun above horizon, below places it below.\n\t * @default 0.6\n\t */\n\tinclination: number;\n\t/**\n\t * Horizontal angle of the sun (0-1, representing full rotation).\n\t * @default 0.1\n\t */\n\tazimuth: number;\n\t/**\n\t * Mie scattering coefficient. Controls haze and sun disc intensity.\n\t * @default 0.005\n\t */\n\tmieCoefficient: number;\n\t/**\n\t * Mie scattering directional parameter. Controls sun disc size.\n\t * @default 0.8\n\t */\n\tmieDirectionalG: number;\n\t/**\n\t * Rayleigh scattering coefficient. Higher values create bluer skies.\n\t * @default 0.5\n\t */\n\trayleigh: number;\n\t/**\n\t * Atmospheric turbidity. Higher values create hazier atmospheres.\n\t * @default 10\n\t */\n\tturbidity: number;\n\t/**\n\t * Direct sun position vector. If provided, overrides inclination/azimuth.\n\t */\n\tsunPosition?: NgtVector3;\n}\n\nconst defaultOptions: NgtsSkyOptions = {\n\tdistance: 1000,\n\tinclination: 0.6,\n\tazimuth: 0.1,\n\tmieCoefficient: 0.005,\n\tmieDirectionalG: 0.8,\n\trayleigh: 0.5,\n\tturbidity: 10,\n};\n\n/**\n * Renders a procedural sky dome using atmospheric scattering simulation.\n * Based on the Three.js Sky shader which simulates realistic sky colors based on sun position.\n *\n * @example\n * ```html\n * <ngts-sky [options]=\"{ turbidity: 10, rayleigh: 2, inclination: 0.5 }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-sky',\n\ttemplate: `\n\t\t<ngt-primitive\n\t\t\t*args=\"[sky]\"\n\t\t\t[parameters]=\"parameters()\"\n\t\t\t[scale]=\"scale()\"\n\t\t\t[material.uniforms.mieCoefficient.value]=\"mieCoefficient()\"\n\t\t\t[material.uniforms.mieDirectionalG.value]=\"mieDirectionalG()\"\n\t\t\t[material.uniforms.rayleigh.value]=\"rayleigh()\"\n\t\t\t[material.uniforms.sunPosition.value]=\"calculatedSunPosition()\"\n\t\t\t[material.uniforms.turbidity.value]=\"turbidity()\"\n\t\t>\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 NgtsSky {\n\t/** Configuration options for the sky appearance. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'distance',\n\t\t'inclination',\n\t\t'azimuth',\n\t\t'sunPosition',\n\t\t'turbidity',\n\t\t'mieCoefficient',\n\t\t'mieDirectionalG',\n\t\t'sunPosition',\n\t]);\n\n\tprivate distance = pick(this.options, 'distance');\n\tprotected turbidity = pick(this.options, 'turbidity');\n\tprotected mieCoefficient = pick(this.options, 'mieCoefficient');\n\tprotected mieDirectionalG = pick(this.options, 'mieDirectionalG');\n\tprotected rayleigh = pick(this.options, 'rayleigh');\n\n\tprotected scale = computed(() => new THREE.Vector3().setScalar(this.distance()));\n\n\tprivate inclination = pick(this.options, 'inclination');\n\tprivate azimuth = pick(this.options, 'azimuth');\n\tprivate sunPosition = vector3(this.options, 'sunPosition', true);\n\tprotected calculatedSunPosition = computed(() => {\n\t\tconst sunPosition = this.sunPosition();\n\t\tif (sunPosition) return sunPosition;\n\t\treturn calcPosFromAngles(this.inclination(), this.azimuth());\n\t});\n\n\tprotected sky = new Sky();\n}\n","import { ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input } from '@angular/core';\nimport { beforeRender, injectStore, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { Sparkles, type SparklesProps } from 'angular-three-soba/vanilla-exports';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\n\n/**\n * Configuration options for the NgtsSparkles component.\n * Combines Three.js points element options with sparkle-specific properties.\n */\nexport type NgtsSparklesOptions = Partial<NgtThreeElements['ngt-points']> & SparklesProps;\n\n/**\n * Default options for the sparkles effect.\n * @default { count: 100, speed: 1, opacity: 1, scale: 1, noise: 1 }\n */\nconst defaultSparklesOptions: NgtsSparklesOptions = {\n\tcount: 100,\n\tspeed: 1,\n\topacity: 1,\n\tscale: 1,\n\tnoise: 1,\n};\n\n/**\n * Renders animated sparkle particles floating in 3D space.\n * Creates a magical, sparkling effect using GPU-accelerated points.\n *\n * @example\n * ```html\n * <ngts-sparkles [options]=\"{ count: 50, scale: 2, size: 6, speed: 0.4, color: 'gold' }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-sparkles',\n\ttemplate: `\n\t\t<ngt-primitive *args=\"[sparkles()]\" [parameters]=\"parameters()\">\n\t\t\t<ng-content />\n\t\t</ngt-primitive>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\timports: [NgtArgs],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSparkles {\n\t/** Configuration options for the sparkles effect. */\n\toptions = input(defaultSparklesOptions, { transform: mergeInputs(defaultSparklesOptions) });\n\tprotected parameters = omit(this.options, ['noise', 'count', 'speed', 'opacity', 'scale', 'size', 'color']);\n\tprivate sparklesOptions = pick(this.options, ['noise', 'count', 'speed', 'opacity', 'scale', 'size', 'color']);\n\n\tprivate store = injectStore();\n\n\t/**\n\t * The underlying Sparkles instance containing the points geometry and material.\n\t * Exposes the Three.js Points object for advanced manipulation.\n\t */\n\tsparkles = computed(() => {\n\t\tconst s = new Sparkles(this.sparklesOptions());\n\t\ts.setPixelRatio(this.store.snapshot.viewport.dpr);\n\t\treturn s;\n\t});\n\n\tconstructor() {\n\t\tbeforeRender(({ clock }) => {\n\t\t\tthis.sparkles().update(clock.elapsedTime);\n\t\t});\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\teffect,\n\tElementRef,\n\tinject,\n\tInjector,\n\tinput,\n\tviewChild,\n} from '@angular/core';\nimport { beforeRender, extend, injectStore, is, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { NgtsHelper } from 'angular-three-soba/abstractions';\nimport { SpotLightMaterial } from 'angular-three-soba/vanilla-exports';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport * as THREE from 'three';\nimport { Group, Mesh, MeshBasicMaterial, PlaneGeometry, RepeatWrapping, SpotLight } from 'three';\nimport { FullScreenQuad } from 'three-stdlib';\n\n/**\n * Configuration options for the NgtsSpotLight component.\n * Extends the base spot light element options from Three.js.\n */\nexport interface NgtsSpotLightOptions extends Partial<NgtThreeElements['ngt-spot-light']> {\n\t/**\n\t * Depth texture for soft volumetric lighting. Set to null to disable.\n\t * @default null\n\t */\n\tdepthBuffer: THREE.DepthTexture | null;\n\t/**\n\t * Light attenuation factor. Controls how quickly light fades.\n\t * @default 5\n\t */\n\tattenuation?: number;\n\t/**\n\t * Power of the light cone angle falloff.\n\t * @default 5\n\t */\n\tanglePower?: number;\n\t/**\n\t * Radius of the light cone at the top (near the light source).\n\t * @default 0.1\n\t */\n\tradiusTop?: number;\n\t/**\n\t * Radius of the light cone at the bottom (far from the light source).\n\t * @default angle * 7\n\t */\n\tradiusBottom?: number;\n\t/**\n\t * Opacity of the volumetric light cone.\n\t * @default 1\n\t */\n\topacity?: number;\n\t/**\n\t * Color of the light.\n\t * @default 'white'\n\t */\n\tcolor?: THREE.ColorRepresentation;\n\t/**\n\t * Whether to render the volumetric light cone mesh.\n\t * @default true\n\t */\n\tvolumetric?: boolean;\n\t/**\n\t * Whether to show the SpotLightHelper for debugging.\n\t * @default false\n\t */\n\tdebug?: boolean;\n}\n\n/**\n * Configuration options for the volumetric mesh component.\n * Same as NgtsSpotLightOptions but without the volumetric toggle.\n */\nexport type NgtsVolumetricMeshOptions = Omit<NgtsSpotLightOptions, 'volumetric'>;\n\nconst defaultVolumetricMeshOptions: NgtsVolumetricMeshOptions = {\n\topacity: 1,\n\tdistance: 5,\n\tangle: 0.15,\n\tattenuation: 5,\n\tanglePower: 5,\n\tcolor: 'white',\n\tdepthBuffer: null,\n};\n\n/**\n * Renders the volumetric light cone mesh for the spot light effect.\n * Creates a cylinder geometry that visualizes the light beam with proper attenuation.\n *\n * @internal Used internally by NgtsSpotLight\n */\n@Component({\n\tselector: 'ngts-volumetric-mesh',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [geometry]=\"geometry()\" [raycast]=\"null\">\n\t\t\t<ngt-primitive\n\t\t\t\t*args=\"[material]\"\n\t\t\t\tattach=\"material\"\n\t\t\t\t[uniforms.opacity.value]=\"opacity()\"\n\t\t\t\t[uniforms.lightColor.value]=\"color()\"\n\t\t\t\t[uniforms.attenuation.value]=\"attenuation()\"\n\t\t\t\t[uniforms.anglePower.value]=\"anglePower()\"\n\t\t\t\t[uniforms.depth.value]=\"depthBuffer()\"\n\t\t\t\t[uniforms.cameraNear.value]=\"camera.near()\"\n\t\t\t\t[uniforms.cameraFar.value]=\"camera.far()\"\n\t\t\t\t[uniforms.resolution.value]=\"depthBuffer() ? [size.width() * dpr(), size.height() * dpr()] : [0, 0]\"\n\t\t\t/>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtArgs],\n})\nexport class NgtsVolumetricMesh {\n\t/** Configuration options for the volumetric mesh. */\n\toptions = input(defaultVolumetricMeshOptions, { transform: mergeInputs(defaultVolumetricMeshOptions) });\n\n\t/** Reference to the underlying mesh element. */\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\n\tprivate store = injectStore();\n\tprotected size = this.store.size;\n\tprotected dpr = this.store.viewport.dpr;\n\tprotected camera = this.store.camera;\n\n\tprivate radiusTop = pick(this.options, 'radiusTop');\n\tprivate radiusBottom = pick(this.options, 'radiusBottom');\n\tprivate angle = pick(this.options, 'angle');\n\tprivate distance = pick(this.options, 'distance');\n\n\tprivate normalizedRadiusTop = computed(() => (this.radiusTop() === undefined ? 0.1 : this.radiusTop()));\n\tprivate normalizedRadiusBottom = computed(() =>\n\t\tthis.radiusBottom() === undefined ? this.angle()! * 7 : this.radiusBottom(),\n\t);\n\n\tprotected material = new SpotLightMaterial();\n\tprotected opacity = pick(this.options, 'opacity');\n\tprotected color = pick(this.options, 'color');\n\tprotected attenuation = pick(this.options, 'attenuation');\n\tprotected anglePower = pick(this.options, 'anglePower');\n\tprotected depthBuffer = pick(this.options, 'depthBuffer');\n\n\tprotected geometry = computed(() => {\n\t\tconst geometry = new THREE.CylinderGeometry(\n\t\t\tthis.normalizedRadiusTop(),\n\t\t\tthis.normalizedRadiusBottom(),\n\t\t\tthis.distance(),\n\t\t\t128,\n\t\t\t64,\n\t\t\ttrue,\n\t\t);\n\t\tgeometry.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -this.distance()! / 2, 0));\n\t\tgeometry.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));\n\t\treturn geometry;\n\t});\n\n\tconstructor() {\n\t\textend({ Mesh });\n\n\t\tconst vec = new THREE.Vector3();\n\n\t\tbeforeRender(() => {\n\t\t\tconst mesh = this.meshRef().nativeElement;\n\t\t\tconst material = this.material;\n\n\t\t\tmaterial.uniforms['spotPosition'].value.copy(mesh.getWorldPosition(vec));\n\t\t\tif (mesh.parent) {\n\t\t\t\tmesh.lookAt((mesh.parent as any).target.getWorldPosition(vec));\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Shared logic for spot light shadow components.\n * Handles shadow map sizing and mesh positioning to follow the spot light target.\n *\n * @param spotLight - Reference to the parent spot light element\n * @param mesh - Reference to the shadow mesh element\n * @param width - Shadow map width\n * @param height - Shadow map height\n * @param distance - Distance factor for shadow placement\n * @param injector - Optional injector for dependency injection\n *\n * @internal\n */\nfunction spotLightCommon(\n\tspotLight: () => ElementRef<THREE.SpotLight> | null,\n\tmesh: () => ElementRef<Mesh> | null,\n\twidth: () => number,\n\theight: () => number,\n\tdistance: () => number,\n\tinjector?: Injector,\n) {\n\tassertInjector(spotLightCommon, injector, () => {\n\t\tconst pos = new THREE.Vector3();\n\t\tconst dir = new THREE.Vector3();\n\n\t\teffect(() => {\n\t\t\tconst [_spotLight, _width, _height] = [spotLight()?.nativeElement, width(), height()];\n\t\t\tif (!_spotLight) return;\n\t\t\tif (is.three<THREE.SpotLight>(_spotLight, 'isSpotLight')) {\n\t\t\t\t_spotLight.shadow.mapSize.set(_width, _height);\n\t\t\t\tif (_spotLight.shadow.map) {\n\t\t\t\t\t_spotLight.shadow.map.setSize(_width, _height);\n\t\t\t\t}\n\t\t\t\t_spotLight.shadow.needsUpdate = true;\n\t\t\t} else {\n\t\t\t\tthrow new Error('NgtsSpotLightShadow must be a child of a NgtsSpotLight');\n\t\t\t}\n\t\t});\n\n\t\tbeforeRender(() => {\n\t\t\tconst [_spotLight, _mesh] = [spotLight()?.nativeElement, mesh()?.nativeElement];\n\t\t\tif (!_spotLight || !_mesh) return;\n\n\t\t\tconst A = _spotLight.position;\n\t\t\tconst B = _spotLight.target.position;\n\n\t\t\tdir.copy(B).sub(A);\n\t\t\tconst len = dir.length();\n\t\t\tdir.normalize().multiplyScalar(len * distance());\n\t\t\tpos.copy(A).add(dir);\n\n\t\t\t_mesh.position.copy(pos);\n\t\t\t_mesh.lookAt(_spotLight.target.position);\n\t\t});\n\t});\n}\n\n/**\n * Configuration options for shadow mesh components.\n *\n * @internal\n */\ninterface NgtsShadowMeshOptions {\n\t/**\n\t * Distance factor for shadow placement along the light direction.\n\t * @default 0.4\n\t */\n\tdistance: number;\n\t/**\n\t * Alpha test threshold for shadow transparency.\n\t * @default 0.5\n\t */\n\talphaTest: number;\n\t/**\n\t * Scale of the shadow mesh.\n\t * @default 1\n\t */\n\tscale: number;\n\t/**\n\t * Width of the shadow map in pixels.\n\t * @default 512\n\t */\n\twidth: number;\n\t/**\n\t * Height of the shadow map in pixels.\n\t * @default 512\n\t */\n\theight: number;\n\t/**\n\t * Texture to use as the shadow alpha map.\n\t */\n\tmap?: THREE.Texture;\n}\n\nconst defaultSpotLightShadowOptions: NgtsShadowMeshOptions = {\n\tdistance: 0.4,\n\talphaTest: 0.5,\n\tscale: 1,\n\twidth: 512,\n\theight: 512,\n};\n\n/**\n * Shadow component that uses a custom shader to generate procedural shadow patterns.\n * Renders the shader output to a texture used as an alpha map for the shadow mesh.\n *\n * @internal Used internally by NgtsSpotLightShadow\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow-shader',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"scale()\" castShadow>\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t[alphaTest]=\"alphaTest()\"\n\t\t\t\t[alphaMap]=\"texture()\"\n\t\t\t\t[opacity]=\"debug() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh-basic-material>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadowShader {\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** GLSL shader code for generating the shadow pattern. */\n\tshader = input.required<string>();\n\t/** Configuration options for the shadow mesh. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n\n\t/** Reference to the shadow mesh element. */\n\tmeshRef = viewChild.required<ElementRef<Mesh>>('mesh');\n\n\tprivate spotLight = inject(NgtsSpotLight);\n\tprotected debug = this.spotLight.debug;\n\n\tprotected scale = pick(this.options, 'scale');\n\tprotected alphaTest = pick(this.options, 'alphaTest');\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate map = pick(this.options, 'map');\n\tprivate distance = pick(this.options, 'distance');\n\n\tprivate renderTarget = computed(() => {\n\t\treturn new THREE.WebGLRenderTarget(this.width(), this.height(), {\n\t\t\tformat: THREE.RGBAFormat,\n\t\t\tstencilBuffer: false,\n\t\t\t// depthTexture: null!\n\t\t});\n\t});\n\n\tprotected texture = computed(() => {\n\t\tconst renderTarget = this.renderTarget();\n\t\trenderTarget.texture.wrapT = renderTarget.texture.wrapS = THREE.RepeatWrapping;\n\t\treturn renderTarget.texture;\n\t});\n\n\tprivate fsQuad = computed(() => {\n\t\treturn new FullScreenQuad(\n\t\t\tnew THREE.ShaderMaterial({\n\t\t\t\tuniforms: this.uniforms,\n\t\t\t\tvertexShader: /* language=glsl glsl */ `\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n `,\n\t\t\t\tfragmentShader: this.shader(),\n\t\t\t}),\n\t\t);\n\t});\n\n\tprivate uniforms = {\n\t\tuShadowMap: { value: undefined as THREE.Texture | undefined },\n\t\tuTime: { value: 0 },\n\t};\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial });\n\n\t\tspotLightCommon(this.spotLight.spotLightRef, this.meshRef, this.width, this.height, this.distance);\n\n\t\teffect(() => {\n\t\t\tthis.uniforms.uShadowMap.value = this.map();\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst fsQuad = this.fsQuad();\n\t\t\tonCleanup(() => {\n\t\t\t\tfsQuad.material.dispose();\n\t\t\t\tfsQuad.dispose();\n\t\t\t});\n\t\t});\n\n\t\teffect((onCleanup) => {\n\t\t\tconst renderTarget = this.renderTarget();\n\t\t\tonCleanup(() => {\n\t\t\t\trenderTarget.dispose();\n\t\t\t});\n\t\t});\n\n\t\tbeforeRender(({ gl, delta }) => {\n\t\t\tthis.uniforms.uTime.value += delta;\n\n\t\t\tgl.setRenderTarget(this.renderTarget());\n\t\t\tthis.fsQuad().render(gl);\n\t\t\tgl.setRenderTarget(null);\n\t\t});\n\t}\n}\n\n/**\n * Shadow component that uses a provided texture directly as the alpha map.\n * Simpler alternative to the shader-based shadow when custom patterns aren't needed.\n *\n * @internal Used internally by NgtsSpotLightShadow\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow-no-shader',\n\ttemplate: `\n\t\t<ngt-mesh #mesh [scale]=\"scale()\" castShadow>\n\t\t\t<ngt-plane-geometry />\n\t\t\t<ngt-mesh-basic-material\n\t\t\t\ttransparent\n\t\t\t\t[side]=\"DoubleSide\"\n\t\t\t\t[alphaTest]=\"alphaTest()\"\n\t\t\t\t[alphaMap]=\"map()\"\n\t\t\t\t[opacity]=\"debug() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<ng-content />\n\t\t\t</ngt-mesh-basic-material>\n\t\t</ngt-mesh>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadowNoShader {\n\tprotected readonly DoubleSide = THREE.DoubleSide;\n\n\t/** Configuration options for the shadow mesh. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n\n\t/** Reference to the shadow mesh element. */\n\tmeshRef = viewChild.required<ElementRef<THREE.Mesh>>('mesh');\n\n\tprivate spotLight = inject(NgtsSpotLight);\n\tprotected debug = this.spotLight.debug;\n\n\tprotected alphaTest = pick(this.options, 'alphaTest');\n\tprotected scale = pick(this.options, 'scale');\n\tprotected map = computed(() => {\n\t\tconst map = this.options().map;\n\t\tif (map) {\n\t\t\tmap.wrapS = map.wrapT = RepeatWrapping;\n\t\t}\n\t\treturn map;\n\t});\n\n\tprivate width = pick(this.options, 'width');\n\tprivate height = pick(this.options, 'height');\n\tprivate distance = pick(this.options, 'distance');\n\n\tconstructor() {\n\t\textend({ Mesh, PlaneGeometry, MeshBasicMaterial });\n\n\t\tspotLightCommon(this.spotLight.spotLightRef, this.meshRef, this.width, this.height, this.distance);\n\t}\n}\n\n/**\n * Casts shaped shadows from a spot light using a projected texture or shader.\n * Must be used as a child of NgtsSpotLight.\n *\n * @example\n * ```html\n * <ngts-spot-light>\n * <ngts-spot-light-shadow [options]=\"{ map: shadowTexture, scale: 4 }\" />\n * </ngts-spot-light>\n * ```\n */\n@Component({\n\tselector: 'ngts-spot-light-shadow',\n\ttemplate: `\n\t\t@if (shader(); as shader) {\n\t\t\t<ngts-spot-light-shadow-shader [shader]=\"shader\" [options]=\"options()\" />\n\t\t} @else {\n\t\t\t<ngts-spot-light-shadow-no-shader [options]=\"options()\" />\n\t\t}\n\t`,\n\timports: [NgtsSpotLightShadowShader, NgtsSpotLightShadowNoShader],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsSpotLightShadow {\n\t/** Optional GLSL shader code for custom shadow patterns. If not provided, uses texture-based shadows. */\n\tshader = input<string>();\n\t/** Configuration options for the shadow. */\n\toptions = input(defaultSpotLightShadowOptions, { transform: mergeInputs(defaultSpotLightShadowOptions) });\n}\n\nconst defaultOptions: NgtsSpotLightOptions = {\n\topacity: 1,\n\tcolor: 'white',\n\tdistance: 5,\n\tangle: 0.15,\n\tattenuation: 5,\n\tanglePower: 5,\n\tvolumetric: true,\n\tdebug: false,\n\tdepthBuffer: null,\n};\n\n/**\n * Enhanced spot light with optional volumetric lighting effect.\n * Creates a visible light cone that simulates light scattering through atmosphere or dust.\n *\n * @example\n * ```html\n * <ngts-spot-light\n * [options]=\"{\n * position: [0, 5, 0],\n * angle: 0.5,\n * intensity: 1,\n * color: 'white',\n * volumetric: true\n * }\"\n * />\n * ```\n */\n@Component({\n\tselector: 'ngts-spot-light',\n\ttemplate: `\n\t\t<ngt-group>\n\t\t\t<ngt-spot-light\n\t\t\t\t#spotLight\n\t\t\t\t[angle]=\"angle()\"\n\t\t\t\t[color]=\"color()\"\n\t\t\t\t[distance]=\"distance()\"\n\t\t\t\tcastShadow\n\t\t\t\t[parameters]=\"parameters()\"\n\t\t\t>\n\t\t\t\t@if (volumetric()) {\n\t\t\t\t\t<ngts-volumetric-mesh [options]=\"volumetricOptions()\" />\n\t\t\t\t}\n\n\t\t\t\t@if (debug()) {\n\t\t\t\t\t<ngts-helper [type]=\"SpotLightHelper\" />\n\t\t\t\t}\n\t\t\t</ngt-spot-light>\n\t\t\t<ng-content />\n\t\t</ngt-group>\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgtsVolumetricMesh, NgtsHelper],\n})\nexport class NgtsSpotLight {\n\tprotected readonly SpotLightHelper = THREE.SpotLightHelper;\n\n\t/** Configuration options for the spot light. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprotected parameters = omit(this.options, [\n\t\t'opacity',\n\t\t'radiusTop',\n\t\t'radiusBottom',\n\t\t'depthBuffer',\n\t\t'color',\n\t\t'distance',\n\t\t'angle',\n\t\t'attenuation',\n\t\t'anglePower',\n\t\t'volumetric',\n\t\t'debug',\n\t]);\n\tprotected volumetricOptions = pick(this.options, [\n\t\t'opacity',\n\t\t'radiusTop',\n\t\t'radiusBottom',\n\t\t'depthBuffer',\n\t\t'color',\n\t\t'distance',\n\t\t'angle',\n\t\t'attenuation',\n\t\t'anglePower',\n\t\t'debug',\n\t]);\n\n\t/** Reference to the underlying spot light element. */\n\tspotLightRef = viewChild.required<ElementRef<THREE.SpotLight>>('spotLight');\n\n\t/** Whether debug mode is enabled (shows SpotLightHelper). */\n\tdebug = pick(this.options, 'debug');\n\tprotected angle = pick(this.options, 'angle');\n\tprotected color = pick(this.options, 'color');\n\tprotected distance = pick(this.options, 'distance');\n\tprotected volumetric = pick(this.options, 'volumetric');\n\n\tconstructor() {\n\t\textend({ Group, SpotLight });\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tDirective,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { extend, NgtArgs, NgtThreeElements, omit, pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport { AmbientLight, Group, PointLight, SpotLight, Vector2 } from 'three';\nimport { NgtsAccumulativeShadows, NgtsAccumulativeShadowsOptions } from './accumulative-shadows';\nimport { NgtsBounds } from './bounds';\nimport { NgtsCenter, NgtsCenterOptions, NgtsCenterState } from './center';\nimport { NgtsContactShadows, NgtsContactShadowsOptions } from './contact-shadows';\nimport { NgtsEnvironment, NgtsEnvironmentOptions } from './environment/environment';\nimport { type NgtsEnvironmentPresets } from './environment/environment-resource';\nimport { NgtsRandomizedLights, NgtsRandomizedLightsOptions } from './randomized-lights';\n\n/**\n * Predefined lighting presets for the stage.\n * Each preset defines main and fill light positions as [x, y, z] multipliers of the scene radius.\n */\nconst presets = {\n\trembrandt: { main: [1, 2, 1], fill: [-2, -0.5, -2] },\n\tportrait: { main: [-1, 2, 0.5], fill: [-1, 0.5, -1.5] },\n\tupfront: { main: [0, 2, 1], fill: [-1, 0.5, -1.5] },\n\tsoft: { main: [-2, 4, 4], fill: [-1, 0.5, -1.5] },\n} as const;\n\n/**\n * Configuration options for stage shadows.\n * Combines options from both accumulative and contact shadow components.\n */\ntype NgtsStageShadowsOptions = Partial<NgtsAccumulativeShadowsOptions> &\n\tPartial<NgtsRandomizedLightsOptions> &\n\tPartial<NgtsContactShadowsOptions> & {\n\t\t/**\n\t\t * Type of shadow to use.\n\t\t * 'contact' - Fast, simple contact shadows.\n\t\t * 'accumulative' - Soft, accumulated shadows from multiple samples.\n\t\t */\n\t\ttype: 'contact' | 'accumulative';\n\t\t/**\n\t\t * Vertical offset for the shadow plane.\n\t\t * @default 0\n\t\t */\n\t\toffset: number;\n\t\t/**\n\t\t * Shadow bias to prevent shadow acne.\n\t\t * @default -0.0001\n\t\t */\n\t\tbias: number;\n\t\t/**\n\t\t * Shadow normal bias.\n\t\t * @default 0\n\t\t */\n\t\tnormalBias: number;\n\t\t/**\n\t\t * Shadow map size in pixels.\n\t\t * @default 1024\n\t\t */\n\t\tsize: number;\n\t};\n\n/**\n * Configuration options for the NgtsStage component.\n * Extends the base group element options from Three.js.\n */\nexport interface NgtsStageOptions extends Partial<NgtThreeElements['ngt-group']> {\n\t/**\n\t * Lighting preset or custom light configuration.\n\t * Available presets: 'rembrandt', 'portrait', 'upfront', 'soft'.\n\t * Or provide custom { main: [x, y, z], fill: [x, y, z] } positions.\n\t * @default 'rembrandt'\n\t */\n\tpreset:\n\t\t| 'rembrandt'\n\t\t| 'portrait'\n\t\t| 'upfront'\n\t\t| 'soft'\n\t\t| { main: [x: number, y: number, z: number]; fill: [x: number, y: number, z: number] };\n\t/**\n\t * Shadow configuration. Can be:\n\t * - false: No shadows\n\t * - 'contact': Simple contact shadows\n\t * - 'accumulative': Soft accumulated shadows\n\t * - NgtsStageShadowsOptions: Full shadow configuration\n\t * @default 'contact'\n\t */\n\tshadows: boolean | 'contact' | 'accumulative' | NgtsStageShadowsOptions;\n\t/**\n\t * Whether to automatically adjust the camera to fit the content.\n\t * Can be a boolean or a number representing the margin.\n\t * @default true\n\t */\n\tadjustCamera: boolean | number;\n\t/**\n\t * Environment map configuration.\n\t * Can be a preset name, full environment options, or null to disable.\n\t * @default 'city'\n\t */\n\tenvironment: NgtsEnvironmentPresets | Partial<NgtsEnvironmentOptions> | null;\n\t/**\n\t * Overall lighting intensity multiplier.\n\t * @default 0.5\n\t */\n\tintensity: number;\n\t/**\n\t * Options for centering the content within the stage.\n\t */\n\tcenter?: Partial<NgtsCenterOptions>;\n}\n\nconst defaultOptions: NgtsStageOptions = {\n\tpreset: 'rembrandt',\n\tshadows: 'contact',\n\tadjustCamera: true,\n\tenvironment: 'city',\n\tintensity: 0.5,\n};\n\n/**\n * Internal directive that triggers camera refitting when the stage radius changes.\n *\n * @internal\n */\n@Directive({ selector: 'ngts-stage-refit' })\nexport class NgtsStageRefit {\n\t/** Current radius of the scene bounds, used to trigger camera refit. */\n\tradius = input.required<number>();\n\t/** Whether automatic camera adjustment is enabled. */\n\tadjustCamera = input.required<boolean>();\n\n\tconstructor() {\n\t\tconst bounds = inject(NgtsBounds);\n\n\t\teffect(() => {\n\t\t\tconst [, adjustCamera] = [this.radius(), this.adjustCamera()];\n\t\t\tif (adjustCamera) bounds.refresh().clip().fit();\n\t\t});\n\t}\n}\n\n/**\n * A complete stage setup for presenting 3D models with lighting, shadows, and environment.\n * Automatically centers content, sets up professional lighting presets, and configures shadows.\n *\n * This is a convenience component that combines:\n * - Bounds for auto-fitting the camera\n * - Center for centering content\n * - Environment map for reflections\n * - Contact or accumulative shadows\n * - Three-point lighting setup\n *\n * @example\n * ```html\n * <ngts-stage [options]=\"{ preset: 'rembrandt', shadows: 'contact', environment: 'city' }\">\n * <ngt-mesh>\n * <ngt-box-geometry />\n * <ngt-mesh-standard-material />\n * </ngt-mesh>\n * </ngts-stage>\n * ```\n */\n@Component({\n\tselector: 'ngts-stage',\n\ttemplate: `\n\t\t<ngt-ambient-light [intensity]=\"intensity() / 3\" />\n\t\t<ngt-spot-light\n\t\t\t[penumbra]=\"1\"\n\t\t\t[position]=\"[config().main[0] * radius(), config().main[1] * radius(), config().main[2] * radius()]\"\n\t\t\t[intensity]=\"intensity() * 2\"\n\t\t\t[castShadow]=\"!!shadows()\"\n\t\t>\n\t\t\t<ngt-value [rawValue]=\"shadowBias()\" attach=\"shadow.bias\" />\n\t\t\t<ngt-value [rawValue]=\"normalBias()\" attach=\"shadow.normalBias\" />\n\t\t\t<ngt-vector2 *args=\"[shadowSize(), shadowSize()]\" attach=\"shadow.mapSize\" />\n\t\t</ngt-spot-light>\n\t\t<ngt-point-light\n\t\t\t[position]=\"[config().fill[0] * radius(), config().fill[1] * radius(), config().fill[2] * radius()]\"\n\t\t\t[intensity]=\"intensity()\"\n\t\t/>\n\n\t\t<ngts-bounds [options]=\"boundsOptions()\">\n\t\t\t<ngts-stage-refit [radius]=\"radius()\" [adjustCamera]=\"!!adjustCamera()\" />\n\t\t\t<ngts-center [options]=\"centerOptions()\" (centered)=\"onCenter($event)\">\n\t\t\t\t<ng-content />\n\t\t\t</ngts-center>\n\t\t</ngts-bounds>\n\n\t\t<ngt-group [position]=\"[0, -height() / 2 - shadowOffset() / 2, 0]\">\n\t\t\t@if (contactShadow()) {\n\t\t\t\t<ngts-contact-shadows [options]=\"shadowOptions()\" />\n\t\t\t}\n\n\t\t\t@if (accumulativeShadow()) {\n\t\t\t\t<ngts-accumulative-shadows [options]=\"shadowOptions()\">\n\t\t\t\t\t<ngts-randomized-lights [options]=\"randomizedLightsOptions()\" />\n\t\t\t\t</ngts-accumulative-shadows>\n\t\t\t}\n\t\t</ngt-group>\n\n\t\t@if (environment()) {\n\t\t\t<ngts-environment [options]=\"environmentOptions()\" />\n\t\t}\n\t`,\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [\n\t\tNgtArgs,\n\t\tNgtsBounds,\n\t\tNgtsStageRefit,\n\t\tNgtsCenter,\n\t\tNgtsContactShadows,\n\t\tNgtsAccumulativeShadows,\n\t\tNgtsEnvironment,\n\t\tNgtsRandomizedLights,\n\t],\n})\nexport class NgtsStage {\n\t/** Configuration options for the stage setup. */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\tprivate parameters = omit(this.options, [\n\t\t'preset',\n\t\t'shadows',\n\t\t'adjustCamera',\n\t\t'environment',\n\t\t'intensity',\n\t\t'center',\n\t]);\n\n\t/** Emits when the content has been centered, providing the calculated dimensions. */\n\tcentered = output<NgtsCenterState>();\n\n\tprivate dims = signal({ radius: 0, width: 0, height: 0, depth: 0 });\n\tprotected radius = pick(this.dims, 'radius');\n\tprotected height = pick(this.dims, 'height');\n\n\tprivate center = pick(this.options, 'center');\n\tprotected adjustCamera = pick(this.options, 'adjustCamera');\n\tprivate margin = computed(() => Number(this.adjustCamera()));\n\tprotected intensity = pick(this.options, 'intensity');\n\tprotected shadows = pick(this.options, 'shadows');\n\tprotected environment = pick(this.options, 'environment');\n\tprivate preset = pick(this.options, 'preset');\n\n\tprotected config = computed(() => {\n\t\tconst preset = this.preset();\n\t\treturn typeof preset === 'string' ? presets[preset] : preset;\n\t});\n\n\tprotected shadowBias = computed(() => (this.shadows() as NgtsStageShadowsOptions).bias ?? -0.0001);\n\tprotected normalBias = computed(() => (this.shadows() as NgtsStageShadowsOptions).normalBias ?? 0);\n\tprotected shadowSize = computed(() => (this.shadows() as NgtsStageShadowsOptions).size ?? 1024);\n\tprotected shadowOffset = computed(() => (this.shadows() as NgtsStageShadowsOptions).offset ?? 0);\n\tprotected contactShadow = computed(\n\t\t() => this.shadows() === 'contact' || (this.shadows() as NgtsStageShadowsOptions)?.type === 'contact',\n\t);\n\tprotected accumulativeShadow = computed(\n\t\t() => this.shadows() === 'accumulative' || (this.shadows() as NgtsStageShadowsOptions)?.type === 'accumulative',\n\t);\n\tprotected shadowOptions = computed(() => {\n\t\tconst shadows = this.shadows() as NgtsStageShadowsOptions;\n\n\t\tif (this.contactShadow()) {\n\t\t\treturn { scale: this.radius() * 4, far: this.radius(), blur: 2, ...shadows };\n\t\t}\n\n\t\tif (this.accumulativeShadow()) {\n\t\t\treturn {\n\t\t\t\ttemporal: true,\n\t\t\t\tframes: 100,\n\t\t\t\talphaTest: 0.9,\n\t\t\t\ttoneMapped: true,\n\t\t\t\tscale: this.radius() * 4,\n\t\t\t\t...shadows,\n\t\t\t};\n\t\t}\n\n\t\treturn typeof shadows === 'object' ? shadows : {};\n\t});\n\tprotected randomizedLightsOptions = computed(() => {\n\t\tif (!this.accumulativeShadow()) return {};\n\t\tconst shadows = this.shadows() as NgtsStageShadowsOptions;\n\t\treturn {\n\t\t\tamount: shadows.amount ?? 8,\n\t\t\tradius: shadows.radius ?? this.radius(),\n\t\t\tambient: shadows.ambient ?? 0.5,\n\t\t\tintensity: shadows.intensity ?? 1,\n\t\t\tposition: [\n\t\t\t\tthis.config().main[0] * this.radius(),\n\t\t\t\tthis.config().main[1] * this.radius(),\n\t\t\t\tthis.config().main[2] * this.radius(),\n\t\t\t],\n\t\t\tsize: this.radius() * 4,\n\t\t\tbias: -this.shadowBias(),\n\t\t\tmapSize: this.shadowSize(),\n\t\t} as Partial<NgtsRandomizedLightsOptions>;\n\t});\n\tprotected environmentOptions = computed(() => {\n\t\tconst environment = this.environment();\n\t\treturn !environment ? {} : typeof environment === 'string' ? { preset: environment } : environment;\n\t});\n\n\tprotected boundsOptions = computed(() => ({\n\t\tfit: !!this.adjustCamera(),\n\t\tclip: !!this.adjustCamera(),\n\t\tmargin: this.margin(),\n\t\tobserve: true,\n\t\t...this.parameters(),\n\t}));\n\tprotected centerOptions = computed(\n\t\t() =>\n\t\t\t({\n\t\t\t\t...(this.center() || {}),\n\t\t\t\tposition: [0, this.shadowOffset() / 2, 0],\n\t\t\t}) as Partial<NgtsCenterOptions>,\n\t);\n\n\tconstructor() {\n\t\textend({ AmbientLight, SpotLight, PointLight, Group, Vector2 });\n\t}\n\n\t/**\n\t * Handles the centered event from NgtsCenter.\n\t * Updates internal dimensions and emits the centered event.\n\t *\n\t * @param $event - The center state containing dimensions and bounding sphere\n\t */\n\tonCenter($event: NgtsCenterState) {\n\t\tconst { width, height, depth, boundingSphere } = $event;\n\t\tthis.dims.set({ radius: boundingSphere.radius, width, height, depth });\n\t\tthis.centered.emit($event);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["defaultOptions","LIST_URL"],"mappings":";;;;;;;;;;;;;;;;AAmFA,MAAMA,gBAAc,GAAmC;AACtD,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,UAAU,EAAE,IAAI;CAChB;AAED;;;;;;;;;;;;;AAaG;MAyBU,uBAAuB,CAAA;AAsDnC,IAAA,WAAA,GAAA;AArDmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,IAAI;QAC1B,IAAA,CA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