three-low-poly 0.9.23 → 0.9.24

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/dist/index.d.ts CHANGED
@@ -2,13 +2,15 @@ import { BoxGeometry } from 'three';
2
2
  import { BufferGeometry } from 'three';
3
3
  import { Camera } from 'three';
4
4
  import { Color } from 'three';
5
+ import { ColorRepresentation } from 'three';
5
6
  import { DataTexture } from 'three';
7
+ import { DirectionalLight } from 'three';
6
8
  import { ExtrudeGeometry } from 'three';
7
9
  import { Group } from 'three';
8
10
  import { InstancedMesh } from 'three';
9
- import { Light } from 'three';
10
11
  import { Material } from 'three';
11
12
  import { Mesh } from 'three';
13
+ import { MeshBasicMaterial } from 'three';
12
14
  import { MeshLambertMaterial } from 'three';
13
15
  import { MeshPhongMaterial } from 'three';
14
16
  import { MeshPhysicalMaterial } from 'three';
@@ -16,6 +18,9 @@ import { MeshStandardMaterial } from 'three';
16
18
  import { Object3D } from 'three';
17
19
  import { ParametricGeometry } from 'three-stdlib';
18
20
  import { PerspectiveCamera } from 'three';
21
+ import { PlaneGeometry } from 'three';
22
+ import { PointLight } from 'three';
23
+ import { Points } from 'three';
19
24
  import { ShaderMaterial } from 'three';
20
25
  import { Shape } from 'three';
21
26
  import { SphereGeometry } from 'three';
@@ -400,6 +405,22 @@ declare interface BlurTransitionOptions extends SceneTransitionFXOptions {
400
405
  kernelSize?: number;
401
406
  }
402
407
 
408
+ export declare const blurTransitionShader: {
409
+ uniforms: {
410
+ tDiffuse: {
411
+ value: null;
412
+ };
413
+ kernelSize: {
414
+ value: number;
415
+ };
416
+ resolution: {
417
+ value: null;
418
+ };
419
+ };
420
+ vertexShader: string;
421
+ fragmentShader: string;
422
+ };
423
+
403
424
  export declare class Bone extends Mesh<BoneGeometry, MeshStandardMaterial> {
404
425
  constructor();
405
426
  }
@@ -482,31 +503,31 @@ export declare enum BoxSide {
482
503
  BACK = "back"
483
504
  }
484
505
 
485
- export declare class BubblingEffect extends InstancedMesh {
486
- private bubblePositions;
487
- private velocities;
488
- private width;
489
- private height;
490
- private depth;
491
- constructor(options?: BubblingEffectOptions);
492
- /**
493
- * Updates the position of a specific bubble instance in the InstancedMesh.
494
- */
495
- private updateInstanceMatrix;
496
- /**
497
- * Updates bubble positions, moving them upward and resetting them
498
- * to the bottom if they reach the top.
499
- */
500
- update(): void;
506
+ /**
507
+ * Single brick geometry for low-poly aesthetic.
508
+ * Default dimensions approximate standard brick proportions (in feet scale).
509
+ */
510
+ export declare class BrickGeometry extends BufferGeometry {
511
+ constructor({ width, height, depth, }?: {
512
+ width?: number | undefined;
513
+ height?: number | undefined;
514
+ depth?: number | undefined;
515
+ });
501
516
  }
502
517
 
503
- export declare interface BubblingEffectOptions {
504
- geometry?: BufferGeometry;
518
+ export declare interface BrickWallOptions {
519
+ wallWidth?: number;
520
+ wallHeight?: number;
521
+ brickWidth?: number;
522
+ brickHeight?: number;
523
+ brickDepth?: number;
524
+ mortarGap?: number;
525
+ offsetPattern?: boolean;
526
+ brickColors?: number[];
527
+ colorVariation?: boolean;
528
+ positionVariation?: number;
529
+ rotationVariation?: number;
505
530
  material?: Material;
506
- count?: number;
507
- height?: number;
508
- width?: number;
509
- depth?: number;
510
531
  }
511
532
 
512
533
  export declare class BunsenBurner extends Group {
@@ -866,12 +887,6 @@ export declare function centerObjectGeometry<T extends Object3D>(object: T, targ
866
887
  */
867
888
  export declare const checkerboardTexture: (size: number) => DataTexture;
868
889
 
869
- export declare const circIn: (t: number) => number;
870
-
871
- export declare const circInOut: (t: number) => number;
872
-
873
- export declare const circOut: (t: number) => number;
874
-
875
890
  export declare const ColorPalette: {
876
891
  CADMIUM_RED: number;
877
892
  CARDINAL_RED: number;
@@ -944,9 +959,21 @@ export declare const ColorPalette: {
944
959
  TITANIUM_WHITE: number;
945
960
  };
946
961
 
947
- export declare const concave: (t: number) => number;
948
-
949
- export declare const convex: (t: number) => number;
962
+ /**
963
+ * Creates an instanced mesh brick wall with running bond pattern.
964
+ *
965
+ * @example
966
+ * ```ts
967
+ * const wall = createBrickWall({
968
+ * wallWidth: 10,
969
+ * wallHeight: 8,
970
+ * brickColors: [0x8b4513, 0xa0522d, 0x6b3410],
971
+ * colorVariation: true
972
+ * });
973
+ * scene.add(wall);
974
+ * ```
975
+ */
976
+ export declare function createBrickWall({ wallWidth, wallHeight, brickWidth, brickHeight, brickDepth, mortarGap, offsetPattern, brickColors, colorVariation, positionVariation, rotationVariation, material, }?: BrickWallOptions): InstancedMesh;
950
977
 
951
978
  /**
952
979
  * Function to create cubic Bezier curve points
@@ -1162,6 +1189,22 @@ export declare const createQuadraticCurvePoints: (start: Vector2, control: Vecto
1162
1189
  */
1163
1190
  export declare const createSigmoidCurvePoints: (start: Vector2, end: Vector2, a: number, segments?: number) => Vector2[];
1164
1191
 
1192
+ export declare const crossfadeShader: {
1193
+ uniforms: {
1194
+ tDiffuseA: {
1195
+ value: null;
1196
+ };
1197
+ tDiffuseB: {
1198
+ value: null;
1199
+ };
1200
+ mixRatio: {
1201
+ value: number;
1202
+ };
1203
+ };
1204
+ vertexShader: string;
1205
+ fragmentShader: string;
1206
+ };
1207
+
1165
1208
  export declare class CrossHeadstone extends Mesh<CrossHeadstoneGeometry, MeshStandardMaterial> {
1166
1209
  constructor({ width, height, depth, }?: CrossHeadstoneOptions);
1167
1210
  }
@@ -1176,14 +1219,6 @@ declare interface CrossHeadstoneOptions {
1176
1219
  depth?: number;
1177
1220
  }
1178
1221
 
1179
- export declare const cubicCurve: (t: number, p0: number, p1: number, p2: number, p3: number) => number;
1180
-
1181
- export declare const cubicIn: (t: number) => number;
1182
-
1183
- export declare const cubicInOut: (t: number) => number;
1184
-
1185
- export declare const cubicOut: (t: number) => number;
1186
-
1187
1222
  /**
1188
1223
  * Cubic UV Mapping
1189
1224
  * Applies a texture by projecting UVs along each face of a cube.
@@ -1223,8 +1258,6 @@ export declare function cubicUVMappingBatch(vertices: [number, number, number][]
1223
1258
  */
1224
1259
  export declare function cylindricalUVMapping(vertices: [number, number, number][]): [number, number][];
1225
1260
 
1226
- export declare const dampedCurve: (t: number, damping?: number) => number;
1227
-
1228
1261
  export declare class DaySkybox extends Mesh {
1229
1262
  geometry: BoxGeometry;
1230
1263
  material: ShaderMaterial & {
@@ -1407,7 +1440,7 @@ export declare const displacementBrush: <T extends BufferGeometry>(geometry: T,
1407
1440
  *
1408
1441
  * @example
1409
1442
  * ```typescript
1410
- * import { Easing, cubicInOut } from 'three-low-poly';
1443
+ * import { Easing } from 'three-low-poly';
1411
1444
  *
1412
1445
  * // Using with transitions (namespace)
1413
1446
  * cameraTransition.transitionTo(camera, {
@@ -1415,12 +1448,6 @@ export declare const displacementBrush: <T extends BufferGeometry>(geometry: T,
1415
1448
  * easing: Easing.cubicInOut // Function reference
1416
1449
  * });
1417
1450
  *
1418
- * // Or using direct import
1419
- * cameraTransition.transitionTo(camera, {
1420
- * duration: 1000,
1421
- * easing: cubicInOut // Direct function reference
1422
- * });
1423
- *
1424
1451
  * // Or using string reference
1425
1452
  * cameraTransition.transitionTo(camera, {
1426
1453
  * duration: 1000,
@@ -1478,6 +1505,80 @@ export declare const Easing: {
1478
1505
  */
1479
1506
  export declare type EasingFunction = (t: number) => number;
1480
1507
 
1508
+ /**
1509
+ * Carbonation bubbles rising through a bounded volume — seltzer, soda, or
1510
+ * brewing liquid. Each instance drifts upward at its own speed and respawns
1511
+ * near {@link EffervescenceEffectOptions.baseY} after reaching the top.
1512
+ *
1513
+ * Spawn positions use a square footprint (`width` × `depth`). {@link EffervescenceEffectOptions.spread}
1514
+ * pulls that box inward so round jars do not get occasional corner outliers.
1515
+ * Position and scale the effect to sit inside a jar, flask, or panel viewport.
1516
+ * Call {@link EffervescenceEffect.update} each frame with elapsed time in seconds.
1517
+ *
1518
+ * @example
1519
+ * ```typescript
1520
+ * const fizz = new EffervescenceEffect({ width: 1.2, height: 2.5, count: 30 });
1521
+ * fizz.position.set(0, 1.2, 0);
1522
+ * scene.add(fizz);
1523
+ *
1524
+ * onFrame((dt) => fizz.update(dt));
1525
+ * ```
1526
+ */
1527
+ export declare class EffervescenceEffect extends InstancedMesh {
1528
+ private readonly width;
1529
+ private readonly height;
1530
+ private readonly depth;
1531
+ private readonly baseY;
1532
+ private readonly spread;
1533
+ private readonly px;
1534
+ private readonly py;
1535
+ private readonly pz;
1536
+ private readonly speed;
1537
+ private readonly dummy;
1538
+ constructor(options?: EffervescenceEffectOptions);
1539
+ /**
1540
+ * Advance bubble positions. Pass elapsed frame time in seconds (e.g. from
1541
+ * `createScene`'s `onFrame` callback).
1542
+ */
1543
+ update(dt: number): void;
1544
+ /** Release geometry and materials held by the field. */
1545
+ dispose(): this;
1546
+ private respawn;
1547
+ private writeMatrices;
1548
+ }
1549
+
1550
+ export declare interface EffervescenceEffectOptions {
1551
+ /** Override bubble geometry. Defaults to a small `SphereGeometry`. */
1552
+ geometry?: BufferGeometry;
1553
+ /** Override the default bubble material. */
1554
+ material?: Material;
1555
+ /** Number of bubble instances. Defaults to `24`. */
1556
+ count?: number;
1557
+ /** Horizontal spread (world units). Defaults to `1.5`. */
1558
+ width?: number;
1559
+ /** Vertical column height (world units). Defaults to `3`. */
1560
+ height?: number;
1561
+ /** Depth spread (world units). Defaults to `1.5`. */
1562
+ depth?: number;
1563
+ /**
1564
+ * Horizontal spawn inset (0–1). Scales width/depth spawn area inward so a
1565
+ * square volume fits round vessels. `1` = full box; `0.88` (default) trims corners.
1566
+ */
1567
+ spread?: number;
1568
+ /** World Y where bubbles spawn when they recycle. Defaults to `0`. */
1569
+ baseY?: number;
1570
+ /** Minimum rise speed (units/s). Defaults to `0.35`. */
1571
+ speedMin?: number;
1572
+ /** Maximum rise speed (units/s). Defaults to `0.85`. */
1573
+ speedMax?: number;
1574
+ /** Bubble tint when using the default material. Defaults to `0xffffff`. */
1575
+ color?: ColorRepresentation;
1576
+ /** Default material opacity. Defaults to `0.6`. */
1577
+ opacity?: number;
1578
+ /** Default material emissive intensity. Defaults to `0`. */
1579
+ emissiveIntensity?: number;
1580
+ }
1581
+
1481
1582
  export declare class ElectricPanel extends Group {
1482
1583
  constructor();
1483
1584
  }
@@ -1487,52 +1588,55 @@ export declare class EllipticLeafGeometry extends BufferGeometry {
1487
1588
  }
1488
1589
 
1489
1590
  /**
1490
- * Emissive pulse animation, producing a flickering light effect for materials that have emissive properties.
1491
- * The emissive intensity of the material will oscillate between `minIntensity` and `maxIntensity`.
1492
- *
1493
- * Oscillation time = 2π / speed
1494
- * - Low speed values (e.g., 0.5) will result in a slow pulse
1495
- * - High speed values (e.g., 10) will result in a rapid flicker
1591
+ * Smooth emissive pulse for fake LEDs animates `emissiveIntensity` on an existing
1592
+ * mesh material without adding geometry or scene lights.
1496
1593
  *
1497
- * Requires `update()` frame handler with `clock.getElapsedTime()` for animation.
1594
+ * Pair with a prefab such as {@link PanelLight}: place the mesh, pass its material
1595
+ * here, call `update(dt)` each frame. For a bank of same-color LEDs, give each
1596
+ * instance a different `speed` so they breathe out of sync.
1498
1597
  *
1499
- * Example usage:
1500
- * ```
1501
- * const pulseAnimation = new EmissivePulseAnimation();
1502
- * const clock = new THREE.Clock();
1598
+ * @example
1599
+ * ```ts
1600
+ * const led = new PanelLight({ emissive: 0xff0000 });
1601
+ * scene.add(led);
1602
+ *
1603
+ * const pulse = new EmissivePulseEffect({
1604
+ * material: led.material,
1605
+ * speed: 1.4,
1606
+ * minIntensity: 0.05,
1607
+ * maxIntensity: 2,
1608
+ * });
1503
1609
  *
1504
- * function animate() {
1505
- * pulseAnimation.update(clock.getElapsedTime());
1506
- * }
1507
- * ```
1610
+ * onFrame((dt) => pulse.update(dt));
1611
+ * ```
1508
1612
  */
1509
- export declare class EmissivePulseAnimation {
1613
+ export declare class EmissivePulseEffect {
1510
1614
  speed: number;
1511
- maxIntensity: number;
1512
1615
  minIntensity: number;
1513
- material: MeshStandardMaterial | MeshPhysicalMaterial | MeshLambertMaterial | MeshPhongMaterial;
1514
- constructor(options: EmissivePulseEffectOptions);
1515
- /**
1516
- * Update the emissive intensity of the material.
1517
- *
1518
- * Use Three.Clock getElapsedTime()
1519
- *
1520
- * Example:
1521
- * ```
1522
- * const clock = new THREE.Clock();
1523
- * effect.update(clock.getElapsedTime());
1524
- * ```
1525
- */
1526
- update(elapsedTime?: number): void;
1616
+ maxIntensity: number;
1617
+ readonly material: EmissivePulseMaterial;
1618
+ private elapsed;
1619
+ constructor({ material, speed, maxIntensity, minIntensity, }: EmissivePulseEffectOptions);
1620
+ /** Advance the pulse by `dt` seconds (elapsed time, not frame index). */
1621
+ update(dt: number): void;
1527
1622
  }
1528
1623
 
1529
1624
  export declare interface EmissivePulseEffectOptions {
1625
+ /** Material whose `emissiveIntensity` will oscillate. Must have emissive set. */
1626
+ material: EmissivePulseMaterial;
1627
+ /**
1628
+ * Pulse frequency in radians per second (`abs(sin(elapsed * speed))`).
1629
+ * Defaults to `2`. Primary differentiator when many LEDs share one color.
1630
+ */
1530
1631
  speed?: number;
1531
- maxIntensity?: number;
1632
+ /** Lower bound of the pulse. Defaults to `0.2`. */
1532
1633
  minIntensity?: number;
1533
- material: MeshStandardMaterial | MeshPhysicalMaterial | MeshLambertMaterial | MeshPhongMaterial;
1634
+ /** Upper bound of the pulse. Defaults to `0.8`. */
1635
+ maxIntensity?: number;
1534
1636
  }
1535
1637
 
1638
+ export declare type EmissivePulseMaterial = MeshStandardMaterial | MeshPhysicalMaterial | MeshLambertMaterial | MeshPhongMaterial;
1639
+
1536
1640
  export declare class ErlenmeyerFlask extends Mesh<ErlenmeyerFlaskGeometry, MeshPhysicalMaterial> {
1537
1641
  constructor({ flaskRadius, //
1538
1642
  neckRadius, height, neckHeight, radialSegments, }?: {
@@ -1555,22 +1659,17 @@ export declare class ErlenmeyerFlaskGeometry extends BufferGeometry {
1555
1659
  });
1556
1660
  }
1557
1661
 
1558
- export declare const expoIn: (t: number) => number;
1559
-
1560
- export declare const expoInOut: (t: number) => number;
1561
-
1562
- export declare const exponentialCurve: (t: number, base?: number, factor?: number) => number;
1563
-
1564
- export declare const expoOut: (t: number) => number;
1565
-
1566
1662
  export declare const fadeShader: {
1567
1663
  uniforms: {
1568
1664
  tDiffuse: {
1569
1665
  value: null;
1570
1666
  };
1571
- opacity: {
1667
+ fadeAmount: {
1572
1668
  value: number;
1573
1669
  };
1670
+ fadeColor: {
1671
+ value: null;
1672
+ };
1574
1673
  };
1575
1674
  vertexShader: string;
1576
1675
  fragmentShader: string;
@@ -1584,19 +1683,40 @@ declare interface FadeTransitionOptions_2 extends SceneTransitionFXOptions {
1584
1683
  color?: THREE.ColorRepresentation;
1585
1684
  }
1586
1685
 
1686
+ export declare const fadeTransitionSceneShader: {
1687
+ uniforms: {
1688
+ tDiffuseA: {
1689
+ value: null;
1690
+ };
1691
+ tDiffuseB: {
1692
+ value: null;
1693
+ };
1694
+ mixRatio: {
1695
+ value: number;
1696
+ };
1697
+ fadeColor: {
1698
+ value: null;
1699
+ };
1700
+ };
1701
+ vertexShader: string;
1702
+ fragmentShader: string;
1703
+ };
1704
+
1587
1705
  export declare const Falloff: {
1588
- LINEAR: (distance: number, radius: number) => number;
1589
- QUADRATIC: (distance: number, radius: number) => number;
1590
- SQUARE_ROOT: (distance: number, radius: number) => number;
1591
- LOGARITHMIC: (distance: number, radius: number) => number;
1592
- SINE: (distance: number, radius: number) => number;
1593
- EXPONENTIAL: (distance: number, radius: number) => number;
1594
- CUBIC: (distance: number, radius: number) => number;
1595
- GAUSSIAN: (distance: number, radius: number) => number;
1596
- INVERSE: (distance: number, radius: number) => number;
1597
- SMOOTHSTEP: (distance: number, radius: number) => number;
1706
+ linear: (distance: number, radius: number) => number;
1707
+ quadratic: (distance: number, radius: number) => number;
1708
+ squareRoot: (distance: number, radius: number) => number;
1709
+ logarithmic: (distance: number, radius: number) => number;
1710
+ sine: (distance: number, radius: number) => number;
1711
+ exponential: (distance: number, radius: number) => number;
1712
+ cubic: (distance: number, radius: number) => number;
1713
+ gaussian: (distance: number, radius: number) => number;
1714
+ inverse: (distance: number, radius: number) => number;
1715
+ smoothstep: (distance: number, radius: number) => number;
1598
1716
  };
1599
1717
 
1718
+ export declare type FalloffFunction = (distance: number, radius: number) => number;
1719
+
1600
1720
  export declare function findClosestColor(inputColor: number, dataset: number[]): number | null;
1601
1721
 
1602
1722
  export declare function findClosestColorChannelWise(inputColor: number, dataset: number[]): number | null;
@@ -1621,6 +1741,53 @@ export declare class Flame extends Mesh<FlameGeometry, MeshStandardMaterial> {
1621
1741
  });
1622
1742
  }
1623
1743
 
1744
+ /**
1745
+ * Calm flame flicker from detuned sines — drives optional real lights, flame
1746
+ * materials, and {@link GlowHalo} opacity in sync. Time-based (`update(dt)`).
1747
+ *
1748
+ * Use without a `light` for mass candlefields (halo + bloom only). Add a
1749
+ * `light` for hero sconces that must cast on walls and props.
1750
+ */
1751
+ export declare class FlameFlickerEffect {
1752
+ readonly seed: number;
1753
+ light?: PointLight;
1754
+ lightIntensity: number;
1755
+ flame?: MeshBasicMaterial;
1756
+ halo?: GlowHalo;
1757
+ haloOpacity: number;
1758
+ private readonly flameColor;
1759
+ private elapsed;
1760
+ constructor({ seed, light, lightIntensity, flame, flameColor, halo, haloOpacity, }?: FlameFlickerEffectOptions);
1761
+ /**
1762
+ * Flicker factor at elapsed time — lazy sum of detuned sines (~0.5–1.1).
1763
+ */
1764
+ static factor(elapsed: number, seed: number): number;
1765
+ /** Current flicker factor after the last `update`. */
1766
+ get level(): number;
1767
+ update(dt: number): void;
1768
+ /** Billboard linked halo toward the eye, if present. */
1769
+ faceCamera(eye: Vector3): void;
1770
+ }
1771
+
1772
+ export declare interface FlameFlickerEffectOptions {
1773
+ /**
1774
+ * Desyncs multiple instances. Defaults to `Math.random() * 100`.
1775
+ */
1776
+ seed?: number;
1777
+ /** Optional real light — use sparingly; casts on geometry but counts against light limits. */
1778
+ light?: PointLight;
1779
+ /** Base intensity when `light` is set. Defaults to `4`. */
1780
+ lightIntensity?: number;
1781
+ /** Optional flame core material (e.g. `MeshBasicMaterial` on a small sphere). */
1782
+ flame?: MeshBasicMaterial;
1783
+ /** Flame tint when `flame` is set. Defaults to `0xffaa44`. */
1784
+ flameColor?: ColorRepresentation;
1785
+ /** Optional {@link GlowHalo}; opacity scales with the flicker factor. */
1786
+ halo?: GlowHalo;
1787
+ /** Halo opacity multiplier at flicker peak. Defaults to `0.75`. */
1788
+ haloOpacity?: number;
1789
+ }
1790
+
1624
1791
  export declare class FlameGeometry extends ParametricGeometry {
1625
1792
  constructor({ height, radius, segmentsU, segmentsV }?: {
1626
1793
  height?: number | undefined;
@@ -1643,8 +1810,6 @@ export declare class FlorenceFlaskGeometry extends BufferGeometry {
1643
1810
  constructor();
1644
1811
  }
1645
1812
 
1646
- export declare const gaussian: (t: number) => number;
1647
-
1648
1813
  export declare class Gear extends Mesh {
1649
1814
  constructor({ sides, innerRadius, outerRadius, holeSides, holeRadius, depth }?: {
1650
1815
  sides?: number | undefined;
@@ -1681,6 +1846,87 @@ declare interface GlitchTransitionOptions extends SceneTransitionFXOptions {
1681
1846
  maxIntensity?: number;
1682
1847
  }
1683
1848
 
1849
+ /**
1850
+ * Soft additive glow billboard — reads as light without a {@link PointLight}.
1851
+ * Pair with {@link FlameFlickerEffect} for organic pulse, or use alone for
1852
+ * cheap mass lighting (many halos + bloom, no light-count limit).
1853
+ *
1854
+ * Call `faceCamera(camera.position)` each frame so the card faces the eye.
1855
+ */
1856
+ export declare class GlowHalo extends Object3D {
1857
+ readonly mesh: Mesh<PlaneGeometry, MeshBasicMaterial>;
1858
+ private texture;
1859
+ private readonly baseColor;
1860
+ constructor({ color, size, opacity, }?: GlowHaloOptions);
1861
+ /** Billboard toward the camera (or any eye position). */
1862
+ faceCamera(eye: Vector3): void;
1863
+ /** Set halo opacity (e.g. scaled each frame by {@link FlameFlickerEffect}). */
1864
+ setOpacity(opacity: number): void;
1865
+ get opacity(): number;
1866
+ setColor(color: ColorRepresentation): void;
1867
+ dispose(): void;
1868
+ }
1869
+
1870
+ export declare interface GlowHaloOptions {
1871
+ /** Warm glow tint. Defaults to `0xffaa44`. */
1872
+ color?: ColorRepresentation;
1873
+ /** Billboard plane edge length in world units. Defaults to `1.2`. */
1874
+ size?: number;
1875
+ /** Base opacity before flicker scaling. Defaults to `0.75`. */
1876
+ opacity?: number;
1877
+ }
1878
+
1879
+ /**
1880
+ * Creeping ground mist — soft horizontal cards drifting above the floor.
1881
+ * Interior patches wrap toroidally within `area`; optional perimeter patches
1882
+ * sit on/outside the fence on edges opposite the camera. One texture, one
1883
+ * `update(dt)` — perimeter is placement logic, not a separate effect.
1884
+ */
1885
+ export declare class GroundFogEffect extends Object3D {
1886
+ private readonly patches;
1887
+ private readonly area;
1888
+ private readonly heightAt;
1889
+ private readonly texture;
1890
+ private elapsed;
1891
+ constructor({ count, area, perimeterCount, plotHalf, terrainHalf, cameraFacing, color, heightAt, }?: GroundFogEffectOptions);
1892
+ update(dt: number): void;
1893
+ dispose(): void;
1894
+ private makeInteriorPatch;
1895
+ private makePerimeterPatch;
1896
+ private makeMesh;
1897
+ }
1898
+
1899
+ export declare interface GroundFogEffectOptions {
1900
+ /** Interior mist cards scattered across the plot. Defaults to `14`. */
1901
+ count?: number;
1902
+ /** Half-extent of the interior scatter (world units). Defaults to `16`. */
1903
+ area?: number;
1904
+ /**
1905
+ * Large cards hugging the plot perimeter — softens terrain cutoffs on the
1906
+ * horizons opposite the camera. Defaults to `0` (interior only).
1907
+ */
1908
+ perimeterCount?: number;
1909
+ /** Half-extent of the inner bounded plot (fence, wall, diorama edge, etc.). Defaults to `12`. */
1910
+ plotHalf?: number;
1911
+ /** Terrain half-extent; perimeter cards spill outward toward this edge. Defaults to `16`. */
1912
+ terrainHalf?: number;
1913
+ /**
1914
+ * Horizontal direction from plot center toward the camera. Perimeter patches
1915
+ * concentrate on the opposite edges. Defaults to `{ x: 1, z: 1 }`.
1916
+ */
1917
+ cameraFacing?: {
1918
+ x: number;
1919
+ z: number;
1920
+ };
1921
+ /** Mist tint. Defaults to `#9fb0c8`. */
1922
+ color?: ColorRepresentation;
1923
+ /**
1924
+ * Sample ground height at world (x, z). Defaults to flat `y = 0`.
1925
+ * Portfolio graveyard uses undulating terrain via the same callback.
1926
+ */
1927
+ heightAt?: (x: number, z: number) => number;
1928
+ }
1929
+
1684
1930
  export declare class Heart extends Mesh {
1685
1931
  constructor({ size, width, height, tipDepth, depth }?: {
1686
1932
  size?: number | undefined;
@@ -1798,8 +2044,6 @@ export declare function hslToRgb(h: number, s: number, l: number): [number, numb
1798
2044
  */
1799
2045
  export declare function interpolateCurve(curveFunction: (t: number) => number, startRadius: number, endRadius: number, startHeight: number, endHeight: number, segments?: number, min?: number, max?: number): Vector2[];
1800
2046
 
1801
- export declare const inverse: (t: number) => number;
1802
-
1803
2047
  /**
1804
2048
  * Material indices
1805
2049
  * 0. Jar
@@ -1822,136 +2066,72 @@ export declare class Lantern extends Group {
1822
2066
  constructor(height?: number, baseWidth?: number);
1823
2067
  }
1824
2068
 
1825
- export declare class LeafEffect extends InstancedMesh {
1826
- private dummyMatrix;
1827
- private velocities;
1828
- private width;
1829
- private height;
1830
- private depth;
1831
- constructor(options?: LeafEffectOptions);
1832
- update(): void;
1833
- }
1834
-
1835
- export declare interface LeafEffectOptions {
1836
- geometry?: BufferGeometry;
1837
- material?: Material;
1838
- count?: number;
1839
- width?: number;
1840
- height?: number;
1841
- depth?: number;
1842
- }
1843
-
1844
2069
  export declare class LeverPanel extends Group {
1845
2070
  constructor();
1846
2071
  }
1847
2072
 
1848
2073
  /**
1849
- * Create a light flicker animation that will randomly change the intensity and position of a light.
1850
- * Effect resembles a flickering flame of candlelight.
2074
+ * Thunderstorm lightning that drives a {@link DirectionalLight} each frame.
1851
2075
  *
1852
- * Example usage:
1853
- * ```
1854
- * // Create a candle
1855
- * const candle = new Candle({
1856
- * height: 1,
1857
- * flameHeight: 0.25,
1858
- * });
1859
- * scene.add(candle);
1860
- *
1861
- * // Create a point light
1862
- * const candleLight = new THREE.PointLight(0xffa500, 1, 5);
1863
- * scene.add(candleLight);
1864
- *
1865
- * // Apply the animator to the light
1866
- * const lightAnimation = new LightFlickerAnimation({
1867
- * light: candleLight,
1868
- * maxIntensity: 2.2,
1869
- * x: candle.position.x,
1870
- * y: candle.position.y + 1 + 0.125, // height + half flame height
1871
- * z: candle.position.z,
1872
- * });
1873
- * animations.push(lightAnimation);
1874
- *
1875
- * // Update the light animation in the render loop
1876
- * renderer.setAnimationLoop(() => {
1877
- * lightAnimation.update();
1878
- * });
1879
- * ```
1880
- */
1881
- export declare class LightFlickerAnimation {
1882
- private light?;
1883
- minIntensity: number;
1884
- maxIntensity: number;
1885
- x: number;
1886
- y: number;
1887
- z: number;
1888
- jitterX: number;
1889
- jitterY: number;
1890
- jitterZ: number;
1891
- constructor({ light, minIntensity, maxIntensity, x, y, z, jitterX, jitterY, jitterZ, }?: Partial<LightFlickerAnimationOptions>);
1892
- update(): void;
1893
- }
1894
-
1895
- export declare interface LightFlickerAnimationOptions {
1896
- light?: Light;
1897
- minIntensity: number;
1898
- maxIntensity: number;
1899
- x: number;
1900
- y: number;
1901
- z: number;
1902
- jitterX: number;
1903
- jitterY: number;
1904
- jitterZ: number;
1905
- }
1906
-
1907
- /**
1908
- * A lightning animation that can be used to simulate a lightning storm.
1909
- * This effect is applied to a light source.
2076
+ * Rather than scheduling timeouts (which need careful teardown), each strike
2077
+ * enqueues two or three decaying intensity spikes a few frames apart — the
2078
+ * characteristic stutter of real lightning. Read {@link LightningEffect.level}
2079
+ * after {@link LightningEffect.update} to sync fog, sky, rain, or emissive
2080
+ * surfaces with the flash.
1910
2081
  *
1911
- * Example usage:
1912
- * ```
1913
- * const lightning = new THREE.DirectionalLight(0xffffff, 0);
1914
- * scene.add(lightning);
1915
- * lightning.position.set(5, 10, -5);
2082
+ * @example
2083
+ * ```typescript
2084
+ * const bolt = new DirectionalLight(0xcdd8ff, 0);
2085
+ * bolt.position.set(5, 12, -8);
2086
+ * bolt.target.position.set(0, 0, 0);
2087
+ * scene.add(bolt, bolt.target);
1916
2088
  *
1917
- * const lightningAnimation = new LightningAnimation();
2089
+ * const storm = new LightningEffect({ light: bolt, peak: 12, minGap: 3, maxGap: 9 });
1918
2090
  *
1919
- * setRandomInterval(() => {
1920
- * lightningEffect.triggerLightning();
1921
- * }, 250, 1250);
2091
+ * function animate(delta: number) {
2092
+ * storm.update(delta);
2093
+ * const flash = storm.level; // 0..~1.2
2094
+ * renderer.render(scene, camera);
2095
+ * }
1922
2096
  * ```
1923
2097
  */
1924
- export declare class LightningAnimation {
1925
- private light?;
1926
- minIntensity: number;
1927
- maxIntensity: number;
1928
- minDuration: number;
1929
- maxDuration: number;
1930
- constructor({ light, //
1931
- minIntensity, maxIntensity, minDuration, maxDuration, }?: LightningEffectOptions);
1932
- triggerLightning(): void;
1933
- update(): void;
2098
+ export declare class LightningEffect {
2099
+ /** Current flash level, 0 = dark. Read after each {@link LightningEffect.update}. */
2100
+ level: number;
2101
+ private readonly light;
2102
+ private readonly peak;
2103
+ private readonly minGap;
2104
+ private readonly maxGap;
2105
+ private readonly spikes;
2106
+ private clock;
2107
+ private nextStrike;
2108
+ constructor({ light, peak, minGap, maxGap }: LightningEffectOptions);
2109
+ /**
2110
+ * Advance the strike schedule and update the driven light intensity. Pass
2111
+ * elapsed frame time in seconds.
2112
+ */
2113
+ update(dt: number): void;
2114
+ /** Force the driven light dark, e.g. when lightning is toggled off. */
2115
+ quiet(): void;
2116
+ private strike;
1934
2117
  }
1935
2118
 
1936
- declare interface LightningEffectOptions {
1937
- light?: Light;
1938
- minIntensity?: number;
1939
- maxIntensity?: number;
1940
- minDuration?: number;
1941
- maxDuration?: number;
2119
+ export declare interface LightningEffectOptions {
2120
+ /** Directional light driven by lightning flashes. Start at intensity `0`. */
2121
+ light: DirectionalLight;
2122
+ /** Peak light intensity at full flash. Defaults to `12`. */
2123
+ peak?: number;
2124
+ /** Minimum seconds between strikes. Defaults to `3`. */
2125
+ minGap?: number;
2126
+ /** Maximum seconds between strikes. Defaults to `9`. */
2127
+ maxGap?: number;
1942
2128
  }
1943
2129
 
1944
- export declare const linear: (t: number) => number;
1945
-
1946
2130
  export declare const LineEquations: {
1947
2131
  calculateXFromSlopeIntercept: typeof calculateXFromSlopeIntercept;
1948
2132
  calculateYFromSlopeIntercept: typeof calculateYFromSlopeIntercept;
1949
2133
  };
1950
2134
 
1951
- export declare const logarithmic: (t: number) => number;
1952
-
1953
- export declare const logarithmicCurve: (t: number, base?: number, factor?: number) => number;
1954
-
1955
2135
  /**
1956
2136
  * Generates a random number skewed towards the maximum value.
1957
2137
  *
@@ -2243,8 +2423,6 @@ export declare interface PanelOptions {
2243
2423
  depth?: number;
2244
2424
  }
2245
2425
 
2246
- export declare const parabolicCurve: (t: number, a?: number, b?: number, c?: number) => number;
2247
-
2248
2426
  /**
2249
2427
  * Prismatic parallelogram, with horizontal skew (offset in X for the slant).
2250
2428
  */
@@ -2253,14 +2431,14 @@ export declare class ParallelogramBoxGeometry extends BufferGeometry {
2253
2431
  }
2254
2432
 
2255
2433
  export declare const ParametricCurve: {
2256
- CUBIC: (t: number, p0: number, p1: number, p2: number, p3: number) => number;
2257
- DAMPED: (t: number, damping?: number) => number;
2258
- EXPONENTIAL: (t: number, base?: number, factor?: number) => number;
2259
- LOGARITHMIC: (t: number, base?: number, factor?: number) => number;
2260
- PARABOLIC: (t: number, a?: number, b?: number, c?: number) => number;
2261
- QUADRATIC: (t: number, p0: number, p1: number, p2: number) => number;
2262
- SIGMOID: (t: number, a?: number) => number;
2263
- SINUSOIDAL: (t: number) => number;
2434
+ cubic: (t: number, p0: number, p1: number, p2: number, p3: number) => number;
2435
+ damped: (t: number, damping?: number) => number;
2436
+ exponential: (t: number, base?: number, factor?: number) => number;
2437
+ logarithmic: (t: number, base?: number, factor?: number) => number;
2438
+ parabolic: (t: number, a?: number, b?: number, c?: number) => number;
2439
+ quadratic: (t: number, p0: number, p1: number, p2: number) => number;
2440
+ sigmoid: (t: number, a?: number) => number;
2441
+ sinusoidal: (t: number) => number;
2264
2442
  };
2265
2443
 
2266
2444
  export declare const ParametricCurveUtils: {
@@ -2278,6 +2456,86 @@ export declare const ParametricCurveUtils: {
2278
2456
  */
2279
2457
  export declare function parseHexCode(hex: string): [number, number, number];
2280
2458
 
2459
+ /**
2460
+ * Soft, slow-drifting petals (or leaves) falling through a bounded volume —
2461
+ * cherry-blossom float rather than stiff tumble. Each instance drifts downward
2462
+ * with gentle horizontal wander and a light sinusoidal flutter.
2463
+ *
2464
+ * Call {@link PetalDriftEffect.update} each frame with elapsed time in seconds.
2465
+ *
2466
+ * @example
2467
+ * ```typescript
2468
+ * const petals = new PetalDriftEffect({
2469
+ * count: 80,
2470
+ * color: [0xffd6f0, 0xfff0f8, 0xf8c8e0],
2471
+ * flutter: 0.3,
2472
+ * });
2473
+ * scene.add(petals);
2474
+ *
2475
+ * onFrame((dt) => petals.update(dt));
2476
+ * ```
2477
+ */
2478
+ export declare class PetalDriftEffect extends InstancedMesh {
2479
+ private readonly width;
2480
+ private readonly height;
2481
+ private readonly depth;
2482
+ private readonly floorY;
2483
+ private readonly flutter;
2484
+ private readonly px;
2485
+ private readonly py;
2486
+ private readonly pz;
2487
+ private readonly fallSpeed;
2488
+ private readonly driftX;
2489
+ private readonly driftZ;
2490
+ private readonly rotX;
2491
+ private readonly rotY;
2492
+ private readonly rotZ;
2493
+ private readonly phase;
2494
+ private readonly dummy;
2495
+ private clock;
2496
+ constructor(options?: PetalDriftEffectOptions);
2497
+ /**
2498
+ * Advance petal positions and flutter. Pass elapsed frame time in seconds.
2499
+ */
2500
+ update(dt: number): void;
2501
+ /** Release geometry and materials held by the field. */
2502
+ dispose(): this;
2503
+ private respawn;
2504
+ private writeMatrices;
2505
+ }
2506
+
2507
+ export declare interface PetalDriftEffectOptions {
2508
+ /** Override petal geometry. Defaults to {@link EllipticLeafGeometry}. */
2509
+ geometry?: BufferGeometry;
2510
+ /** Override the default petal material. */
2511
+ material?: Material;
2512
+ /** Number of petal instances. Defaults to `120`. */
2513
+ count?: number;
2514
+ /** Horizontal spread (world units). Defaults to `16`. */
2515
+ width?: number;
2516
+ /** Vertical spawn span (world units). Defaults to `8`. */
2517
+ height?: number;
2518
+ /** Depth spread (world units). Defaults to `16`. */
2519
+ depth?: number;
2520
+ /** World Y where petals respawn after drifting below the floor. Defaults to `0`. */
2521
+ floorY?: number;
2522
+ /** Minimum fall speed (units/s). Defaults to `0.12`. */
2523
+ fallSpeedMin?: number;
2524
+ /** Maximum fall speed (units/s). Defaults to `0.28`. */
2525
+ fallSpeedMax?: number;
2526
+ /** Minimum horizontal drift speed (units/s). Defaults to `0.04`. */
2527
+ driftMin?: number;
2528
+ /** Maximum horizontal drift speed (units/s). Defaults to `0.14`. */
2529
+ driftMax?: number;
2530
+ /**
2531
+ * Flutter strength (radians). Subtle rotation sway as each petal falls.
2532
+ * Defaults to `0.35`.
2533
+ */
2534
+ flutter?: number;
2535
+ /** Single petal color or palette; multiple entries pick a random color per petal. */
2536
+ color?: ColorRepresentation | ColorRepresentation[];
2537
+ }
2538
+
2281
2539
  /**
2282
2540
  * Planar UV Mapping
2283
2541
  * Projects UVs onto the geometry from a single direction (like shining a projector onto a surface).
@@ -2336,26 +2594,6 @@ export declare class PotionBottleGeometry extends BufferGeometry {
2336
2594
  constructor();
2337
2595
  }
2338
2596
 
2339
- export declare const quadIn: (t: number) => number;
2340
-
2341
- export declare const quadInOut: (t: number) => number;
2342
-
2343
- export declare const quadOut: (t: number) => number;
2344
-
2345
- export declare const quadraticCurve: (t: number, p0: number, p1: number, p2: number) => number;
2346
-
2347
- export declare const quartIn: (t: number) => number;
2348
-
2349
- export declare const quartInOut: (t: number) => number;
2350
-
2351
- export declare const quartOut: (t: number) => number;
2352
-
2353
- export declare const quintIn: (t: number) => number;
2354
-
2355
- export declare const quintInOut: (t: number) => number;
2356
-
2357
- export declare const quintOut: (t: number) => number;
2358
-
2359
2597
  /**
2360
2598
  * Calculate the radius to achieve a spherical cap height.
2361
2599
  * R = r / (1 - cos(thetaLength))
@@ -2368,6 +2606,110 @@ export declare const radiusFromCapHeight: (height: number, thetaLength: number)
2368
2606
  */
2369
2607
  export declare const radiusFromCapWidth: (width: number, thetaLength: number) => number;
2370
2608
 
2609
+ /**
2610
+ * Misty rainfall as instanced vertical streaks.
2611
+ *
2612
+ * Each streak is a thin, gradient-textured quad animated through a bounded
2613
+ * volume. By default streaks fall straight down with no rotation. Optional
2614
+ * {@link RainEffectOptions.windDirection} / {@link RainEffectOptions.windStrength}
2615
+ * tilt streaks **and** drift them horizontally together, so motion matches the
2616
+ * visual angle. Streak materials use `DoubleSide` so thin quads stay visible
2617
+ * from any camera angle. Scene fog dissolves distant streaks when the material's
2618
+ * `fog` flag is enabled.
2619
+ *
2620
+ * **`intensity`** (0–1) scales how many instances draw, how fast they fall, and
2621
+ * their opacity — useful for storm ramps or lightning flashes.
2622
+ *
2623
+ * @example
2624
+ * ```typescript
2625
+ * const rain = new RainEffect({ area: 12, height: 16, intensity: 0.4 });
2626
+ * scene.add(rain);
2627
+ * scene.fog = new Fog(0x0a0a12, 4, 28);
2628
+ *
2629
+ * function animate(delta: number) {
2630
+ * rain.update(delta);
2631
+ * renderer.render(scene, camera);
2632
+ * }
2633
+ * ```
2634
+ */
2635
+ export declare class RainEffect extends InstancedMesh {
2636
+ /** Rainfall strength (0–1). Adjust at runtime for storm variation. */
2637
+ intensity: number;
2638
+ private readonly maxCount;
2639
+ private readonly area;
2640
+ private readonly height;
2641
+ private readonly groundY;
2642
+ private readonly baseOpacity;
2643
+ private readonly windDirection;
2644
+ private readonly windStrength;
2645
+ private readonly fallDirection;
2646
+ private readonly streakOrientation;
2647
+ private readonly sx;
2648
+ private readonly sz;
2649
+ private readonly topY;
2650
+ private readonly len;
2651
+ private readonly speed;
2652
+ private readonly streakTexture?;
2653
+ private readonly dummy;
2654
+ private clock;
2655
+ constructor(options?: RainEffectOptions);
2656
+ /**
2657
+ * Advance streak positions and refresh instance transforms. Pass elapsed frame
2658
+ * time in seconds (e.g. from `createScene`'s `onFrame` callback).
2659
+ */
2660
+ update(dt: number): void;
2661
+ /** Release geometry, materials, and the procedural streak texture. */
2662
+ dispose(): this;
2663
+ private applyIntensity;
2664
+ private updateFallDirection;
2665
+ private writeMatrices;
2666
+ }
2667
+
2668
+ export declare interface RainEffectOptions {
2669
+ /** Override the streak quad geometry. Defaults to a thin `PlaneGeometry`. */
2670
+ geometry?: BufferGeometry;
2671
+ /** Override the default streak material. */
2672
+ material?: Material;
2673
+ /** Maximum number of streak instances. Defaults to `1400`. */
2674
+ count?: number;
2675
+ /** Horizontal half-extent of the rainfall area (square centered on the origin). Defaults to `26`. */
2676
+ area?: number;
2677
+ /** Vertical span above `groundY`. Defaults to `22`. */
2678
+ height?: number;
2679
+ /** World Y where streaks recycle. Defaults to `0`. */
2680
+ groundY?: number;
2681
+ /** Streak quad width. Defaults to `0.009`. */
2682
+ width?: number;
2683
+ /** Streak color. Defaults to `#aebfd6`. */
2684
+ color?: ColorRepresentation;
2685
+ /** Base material opacity at full intensity. Defaults to `0.16`. */
2686
+ opacity?: number;
2687
+ /** Minimum streak length. Defaults to `0.18`. */
2688
+ lengthMin?: number;
2689
+ /** Maximum streak length. Defaults to `0.42`. */
2690
+ lengthMax?: number;
2691
+ /** Minimum fall speed (units/s). Defaults to `11`. */
2692
+ speedMin?: number;
2693
+ /** Maximum fall speed (units/s). Defaults to `19`. */
2694
+ speedMax?: number;
2695
+ /**
2696
+ * Horizontal compass direction the wind blows (radians, 0 = +X, π/2 = +Z).
2697
+ * Only used when {@link RainEffectOptions.windStrength} is greater than zero.
2698
+ * Defaults to `0`.
2699
+ */
2700
+ windDirection?: number;
2701
+ /**
2702
+ * How much rain tilts and drifts from vertical, as `tan(angleFromVertical)`.
2703
+ * `0` = straight down (default). `0.15` ≈ 8.5° lean with matching horizontal drift.
2704
+ */
2705
+ windStrength?: number;
2706
+ /**
2707
+ * Rainfall strength (0–1). Scales visible instance count, fall speed, and opacity.
2708
+ * Defaults to `0.5`.
2709
+ */
2710
+ intensity?: number;
2711
+ }
2712
+
2371
2713
  /**
2372
2714
  * Generates a random number between `min` and `max`.
2373
2715
  */
@@ -2559,6 +2901,9 @@ export declare class SceneTransition {
2559
2901
  * - Fade: Classic fade through a color (black, white, or custom)
2560
2902
  * - Glitch: Digital distortion/glitch effect with heavy artifacts
2561
2903
  *
2904
+ * Built-in shader passes for blur and fade are automatically created. For bloom and glitch
2905
+ * effects, you'll need to provide those passes manually.
2906
+ *
2562
2907
  * Note: Requires post-processing imports from three/addons
2563
2908
  *
2564
2909
  * @example
@@ -2569,12 +2914,22 @@ export declare class SceneTransition {
2569
2914
  * import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js';
2570
2915
  *
2571
2916
  * const composer = new EffectComposer(renderer);
2572
- * const sceneTransitionFX = new SceneTransitionFX(renderer, composer);
2917
+ * const renderPass = new RenderPass(sceneA, camera);
2918
+ * composer.addPass(renderPass);
2573
2919
  *
2574
- * sceneTransitionFX.bloom(sceneA, sceneB, camera, {
2575
- * duration: 2000,
2576
- * maxBloom: 15.0
2577
- * });
2920
+ * // Pass ShaderPass to enable built-in blur and fade effects
2921
+ * const sceneTransitionFX = new SceneTransitionFX(renderer, composer, ShaderPass);
2922
+ *
2923
+ * // Blur and fade transitions work out of the box
2924
+ * sceneTransitionFX.blur(sceneA, sceneB, camera, { duration: 2000 });
2925
+ * sceneTransitionFX.fade(sceneA, sceneB, camera, { duration: 2000, color: 0x000000 });
2926
+ *
2927
+ * // For bloom, provide the pass manually
2928
+ * const bloomPass = new UnrealBloomPass(new THREE.Vector2(width, height), 0, 0.4, 0.85);
2929
+ * bloomPass.enabled = false;
2930
+ * composer.addPass(bloomPass);
2931
+ * sceneTransitionFX.setBloomPass(bloomPass);
2932
+ * sceneTransitionFX.bloom(sceneA, sceneB, camera, { duration: 2000, maxBloom: 15.0 });
2578
2933
  * ```
2579
2934
  */
2580
2935
  export declare class SceneTransitionFX {
@@ -2600,7 +2955,11 @@ export declare class SceneTransitionFX {
2600
2955
  private fadeColor;
2601
2956
  private onUpdateCallback?;
2602
2957
  private onCompleteCallback?;
2603
- constructor(renderer: THREE.WebGLRenderer, composer: any);
2958
+ constructor(renderer: THREE.WebGLRenderer, composer: any, ShaderPass?: any);
2959
+ /**
2960
+ * Create default shader passes for blur and fade effects
2961
+ */
2962
+ private createDefaultPasses;
2604
2963
  /**
2605
2964
  * Set the bloom pass for bloom transitions
2606
2965
  */
@@ -2709,21 +3068,11 @@ export declare function setRandomInterval(callback: () => void, minDelay: number
2709
3068
  */
2710
3069
  export declare function setRandomTimeout(callback: () => void, minDelay: number, maxDelay: number): NodeJS.Timeout;
2711
3070
 
2712
- export declare const sigmoidCurve: (t: number, a?: number) => number;
2713
-
2714
- export declare const sineIn: (t: number) => number;
2715
-
2716
- export declare const sineInOut: (t: number) => number;
2717
-
2718
- export declare const sineOut: (t: number) => number;
2719
-
2720
3071
  /**
2721
3072
  * Smooths out the vertices by averaging their positions with neighboring vertices within a given radius.
2722
3073
  */
2723
3074
  export declare const smoothBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, strength: number) => void;
2724
3075
 
2725
- export declare const smoothstep: (t: number) => number;
2726
-
2727
3076
  /**
2728
3077
  * Convert spherical coordinates to Cartesian coordinates.
2729
3078
  * @param {number} radius - The radius of the sphere.
@@ -2775,8 +3124,6 @@ export declare class SquareHeadstoneGeometry extends BufferGeometry {
2775
3124
  constructor(width?: number, height?: number, depth?: number);
2776
3125
  }
2777
3126
 
2778
- export declare const squareRoot: (t: number) => number;
2779
-
2780
3127
  export declare class StaircaseGeometry extends BufferGeometry {
2781
3128
  constructor(width?: number, stepHeight?: number, stepDepth?: number, numSteps?: number);
2782
3129
  }
@@ -2812,6 +3159,121 @@ export declare class Star extends Mesh {
2812
3159
  });
2813
3160
  }
2814
3161
 
3162
+ export declare interface StarBurstShapeOptions {
3163
+ /** Burst ray count. Defaults to `4`. */
3164
+ sides?: number;
3165
+ innerRadius?: number;
3166
+ outerRadius?: number;
3167
+ /** Extrusion depth; keep small for flat starbursts. Defaults to `0.05`. */
3168
+ depth?: number;
3169
+ }
3170
+
3171
+ /**
3172
+ * Procedural star field distributed on a spherical shell — intended as an infinite sky dome.
3173
+ *
3174
+ * Stars are placed in world space around the origin. To keep the shell centered on the
3175
+ * viewer, add this object to the **scene** (not the camera) and copy the camera position
3176
+ * every frame. Parenting to the camera is not supported: Three.js does not render
3177
+ * objects attached to the active camera.
3178
+ *
3179
+ * **Styles**
3180
+ *
3181
+ * - `points` — lightweight `Points` sprites using a canvas starburst texture.
3182
+ * - `burst` — instanced 3D starbursts ({@link BurstGeometry}) that face the shell center.
3183
+ * Uses `DoubleSide` so stars remain visible when the camera sits inside the shell.
3184
+ *
3185
+ * **Sizing** — `sizeMin` / `sizeMax` are angular extents (radians at unit distance),
3186
+ * multiplied by each star's distance from the origin so stars look similar regardless
3187
+ * of shell depth (`minRadius`–`maxRadius`).
3188
+ *
3189
+ * **Rendering** — `frustumCulled` is disabled and materials use `depthWrite: false` so
3190
+ * the field draws reliably as a background layer. For per-star color variation in burst
3191
+ * mode, colors are written via `InstancedMesh.setColorAt`, not `vertexColors` on the
3192
+ * base material.
3193
+ *
3194
+ * @example
3195
+ * ```typescript
3196
+ * const stars = new StarFieldEffect({
3197
+ * style: "burst",
3198
+ * count: 2500,
3199
+ * radius: 480,
3200
+ * twinkle: true,
3201
+ * });
3202
+ *
3203
+ * scene.add(stars);
3204
+ *
3205
+ * function animate() {
3206
+ * stars.position.copy(camera.position); // sky dome follows the viewer
3207
+ * stars.update(); // no-op when twinkle is false
3208
+ * renderer.render(scene, camera);
3209
+ * }
3210
+ * ```
3211
+ *
3212
+ * Call {@link dispose} when removing the effect to free geometry, materials, and the
3213
+ * points sprite texture.
3214
+ */
3215
+ export declare class StarFieldEffect extends Object3D {
3216
+ readonly style: "points" | "burst";
3217
+ private readonly field;
3218
+ private readonly twinkle;
3219
+ private readonly baseSize;
3220
+ private readonly baseScales?;
3221
+ private readonly twinklePhases?;
3222
+ private spriteTexture?;
3223
+ private readonly dummy;
3224
+ constructor(options?: StarFieldEffectOptions);
3225
+ get drawable(): Points | InstancedMesh;
3226
+ get geometry(): BufferGeometry;
3227
+ get material(): Material | Material[];
3228
+ /** Release GPU resources held by the field (and sprite texture, if any). */
3229
+ dispose(): void;
3230
+ /**
3231
+ * Animate twinkling. No-op when `twinkle` is `false`.
3232
+ *
3233
+ * Points style modulates sprite size; burst style pulses each instance scale with
3234
+ * a per-star phase offset. Pass elapsed time in seconds (defaults to `performance.now()`).
3235
+ */
3236
+ update(elapsed?: number): void;
3237
+ private createPointsField;
3238
+ private createBurstField;
3239
+ }
3240
+
3241
+ export declare interface StarFieldEffectOptions {
3242
+ /**
3243
+ * Rendering style.
3244
+ *
3245
+ * - `points` (default) — billboard sprites with a procedural starburst texture
3246
+ * (not the default square `Points` marker).
3247
+ * - `burst` — instanced {@link BurstGeometry} meshes oriented toward the shell center.
3248
+ */
3249
+ style?: "points" | "burst";
3250
+ /** Shape parameters for both styles; `burst` uses them for geometry, `points` for the sprite. */
3251
+ burst?: StarBurstShapeOptions;
3252
+ /** Override the burst mesh geometry (`style: "burst"` only). */
3253
+ geometry?: BufferGeometry;
3254
+ /** Override the default field material. */
3255
+ material?: Material;
3256
+ /** Number of stars. Defaults to `1500`. */
3257
+ count?: number;
3258
+ /** Shell radius when `minRadius` / `maxRadius` are omitted. Defaults to `500`. */
3259
+ radius?: number;
3260
+ /** Inner shell radius. Defaults to `radius`. */
3261
+ minRadius?: number;
3262
+ /** Outer shell radius. Defaults to `radius`. */
3263
+ maxRadius?: number;
3264
+ /**
3265
+ * Minimum angular size (radians at 1 unit distance). Scaled by each star's shell distance
3266
+ * so apparent size stays consistent. Defaults to `0.008`.
3267
+ */
3268
+ sizeMin?: number;
3269
+ /** Maximum angular size. Defaults to `0.025`. */
3270
+ sizeMax?: number;
3271
+ /** Single color or palette; multiple entries pick a random color per star. */
3272
+ color?: ColorRepresentation | ColorRepresentation[];
3273
+ /** Enable pulsing brightness; call {@link StarFieldEffect.update} each frame when `true`. */
3274
+ twinkle?: boolean;
3275
+ }
3276
+
2815
3277
  /**
2816
3278
  * Extrude geometry of Star Shape.
2817
3279
  */
@@ -2864,8 +3326,22 @@ export declare class TestTubeGeometry extends BufferGeometry {
2864
3326
  constructor(radiusTop?: number, radiusBottom?: number, height?: number, segments?: number, openEnded?: boolean);
2865
3327
  }
2866
3328
 
3329
+ /**
3330
+ * Wooden rack with instanced test tubes and emissive liquid fills.
3331
+ *
3332
+ * Glass shells use `DoubleSide` and `depthWrite: false`; liquid draws first
3333
+ * (`renderOrder` 1), glass second (`renderOrder` 2) so fills stay visible at
3334
+ * most camera angles.
3335
+ */
2867
3336
  export declare class TestTubeRack extends Group {
2868
- constructor(count?: number, colors?: number[]);
3337
+ constructor(count?: number, colors?: ColorRepresentation[]);
3338
+ }
3339
+
3340
+ export declare interface TestTubeRackOptions {
3341
+ /** Number of tubes. Defaults to `3`. */
3342
+ count?: number;
3343
+ /** Liquid color per tube; cycles when fewer entries than tubes. */
3344
+ colors?: ColorRepresentation[];
2869
3345
  }
2870
3346
 
2871
3347
  /**
@@ -2972,6 +3448,88 @@ export declare class WineBottleGeometry extends BufferGeometry {
2972
3448
  });
2973
3449
  }
2974
3450
 
3451
+ /**
3452
+ * Will-o'-the-wisps drifting through a bounded volume — eerie green orbs that
3453
+ * bob around spawn points with a pulsing point light. Ported from the portfolio
3454
+ * graveyard scene.
3455
+ *
3456
+ * @example
3457
+ * ```ts
3458
+ * const wisps = new WispEffect({ count: 3 });
3459
+ * scene.add(wisps);
3460
+ * onFrame((dt) => wisps.update(dt));
3461
+ * ```
3462
+ */
3463
+ export declare class WispEffect extends Object3D {
3464
+ private readonly wisps;
3465
+ private readonly orbGeometry;
3466
+ private readonly orbMaterial;
3467
+ private readonly halfWidth;
3468
+ private readonly depth;
3469
+ private readonly heightMin;
3470
+ private readonly heightMax;
3471
+ private readonly driftX;
3472
+ private readonly driftY;
3473
+ private readonly driftZ;
3474
+ private readonly speedMin;
3475
+ private readonly speedMax;
3476
+ private readonly castLight;
3477
+ private readonly lightDistance;
3478
+ private readonly lightDecay;
3479
+ private readonly lightIntensity;
3480
+ private readonly lightPulseAmplitude;
3481
+ private readonly lightPulseSpeed;
3482
+ private elapsed;
3483
+ constructor({ count, width, depth, heightMin, heightMax, color, orbRadius, driftX, driftY, driftZ, speedMin, speedMax, castLight, lightDistance, lightDecay, lightIntensity, lightPulseAmplitude, lightPulseSpeed, }?: WispEffectOptions);
3484
+ update(dt: number): void;
3485
+ dispose(): void;
3486
+ }
3487
+
3488
+ export declare interface WispEffectOptions {
3489
+ /** Number of drifting wisps. Defaults to `3`. */
3490
+ count?: number;
3491
+ /** Horizontal spawn extent (world units, centered on the effect). Defaults to `16`. */
3492
+ width?: number;
3493
+ /** Depth spawn maximum (world units, from z = 0). Defaults to `8`. */
3494
+ depth?: number;
3495
+ /** Minimum spawn height. Defaults to `1`. */
3496
+ heightMin?: number;
3497
+ /** Maximum spawn height. Defaults to `2`. */
3498
+ heightMax?: number;
3499
+ /** Wisp tint. Defaults to `0x6dffb0` (portfolio graveyard). */
3500
+ color?: ColorRepresentation;
3501
+ /** Orb radius. Defaults to `0.08`. */
3502
+ orbRadius?: number;
3503
+ /** Horizontal drift radius (X). Defaults to `1.6`. */
3504
+ driftX?: number;
3505
+ /** Vertical drift radius (Y). Defaults to `0.3`. */
3506
+ driftY?: number;
3507
+ /** Depth drift radius (Z). Defaults to `1.6`. */
3508
+ driftZ?: number;
3509
+ /** Minimum motion speed multiplier. Defaults to `0.3`. */
3510
+ speedMin?: number;
3511
+ /** Maximum motion speed multiplier. Defaults to `0.7`. */
3512
+ speedMax?: number;
3513
+ /**
3514
+ * Attach a {@link PointLight} per wisp (keep `count` low).
3515
+ * Defaults to `true` to match the portfolio graveyard.
3516
+ */
3517
+ castLight?: boolean;
3518
+ /** Point light distance when `castLight`. Defaults to `6`. */
3519
+ lightDistance?: number;
3520
+ /** Point light decay when `castLight`. Defaults to `2`. */
3521
+ lightDecay?: number;
3522
+ /**
3523
+ * Light intensity = `lightIntensity + sin(t * lightPulseSpeed) * lightPulseAmplitude`.
3524
+ * Defaults to `2.5`.
3525
+ */
3526
+ lightIntensity?: number;
3527
+ /** Defaults to `1.2`. */
3528
+ lightPulseAmplitude?: number;
3529
+ /** Defaults to `3`. */
3530
+ lightPulseSpeed?: number;
3531
+ }
3532
+
2975
3533
  export declare class WroughtIronBar extends Mesh<WroughtIronBarGeometry, MeshStandardMaterial> {
2976
3534
  constructor({ barHeight, //
2977
3535
  barRadius, spikeHeight, spikeRadius, spikeScaleZ, radialSegments, }?: {