illutions 0.21.8 → 0.21.9

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/CHANGELOG.md CHANGED
@@ -1,7 +1,13 @@
1
- # Changelog
2
-
3
- ## Unreleased
4
-
5
- ### Changed
6
-
7
- - Add cfg.audio.enable in config
1
+ # Changelog
2
+
3
+ ## 0.21.9
4
+
5
+ ### Changed
6
+
7
+ - Removed the `CfgCtrl` class and the related `app.cfgCtrl` access point. Runtime parameters are now updated through the responsible feature APIs, such as `app.audio.set(...)`.
8
+
9
+ ## 0.21.8
10
+
11
+ ### Changed
12
+
13
+ - Added `cfg.audio.enable` to the configuration.
package/README.md CHANGED
@@ -3,6 +3,38 @@
3
3
  illutions is a proprietary Web 3D engine for building interactive browser-based
4
4
  3D applications with Three.js, XState, GSAP, Tweakpane and more.
5
5
 
6
+ ## Highlights
7
+
8
+ **Advanced post-processing**
9
+ Add SSAO, SSR, FXAA and SMAA through configurable pipelines for WebGL and WebGPU.
10
+
11
+ **Advanced animation control**
12
+ Coordinate GLTF animation clips, GSAP transitions, camera paths and custom dolly-rig camera workflows.
13
+
14
+ **XState-powered application logic**
15
+ Model complex application flows as predictable and inspectable state machines with integrated XState 5 usage.
16
+
17
+ **Resource-aware rendering**
18
+ An intelligent, configurable FPS limiter avoids unnecessary frames and helps reduce CPU and GPU load.
19
+
20
+ **WebGL and WebGPU rendering**
21
+ Support established and next-generation browser rendering with automatic WebGPU selection and WebGL fallback.
22
+
23
+ **Lean initial bundles**
24
+ Optional controls, loaders, inspectors and effects are dynamically imported only when needed.
25
+
26
+ **Optimized GLTF/GLB pipeline**
27
+ Load assets with Draco or Meshopt mesh compression and WebP or KTX2 textures.
28
+
29
+ **Built-in interaction and audio**
30
+ Use pointer-based raycasting and distance-aware spatial audio.
31
+
32
+ **Flexible environments**
33
+ Load HDR, EXR and texture environments with configurable rotation, intensity and background controls.
34
+
35
+ **Runtime insights and debugging**
36
+ Inspect runtime properties, FPS, CPU and renderer statistics with detailed state, event and console reporting.
37
+
6
38
  ## Installation
7
39
 
8
40
  The recommended starting point is an illutions project template. The template
@@ -38,9 +70,11 @@ await App.run(cfg);
38
70
  illutions is not open source software. It may be used only under the terms granted
39
71
  by illutions.
40
72
 
41
- A free license displays the illutions menu bar and attribution. Removing or hiding
42
- that menu bar requires an active paid illutions license subscription or another
43
- written agreement with illutions.
73
+ A valid `license.json` permits commercial and non-commercial use without
74
+ requiring the illutions menu bar or attribution to remain visible.
75
+
76
+ For the 2026 introductory period, the official GitHub project templates include
77
+ a free `license.json` valid through December 31, 2026.
44
78
 
45
79
  See the included `LICENSE` file for the legal rights and restrictions.
46
80
 
package/dist/main.d.ts CHANGED
@@ -92,8 +92,7 @@ export declare interface AnimFadeEvent {
92
92
  * @category Core
93
93
  */
94
94
  export declare class App<TClasses extends Classes = {}> {
95
- readonly audio: Audio_2 | null;
96
- readonly cfgCtrl: CfgCtrl;
95
+ readonly audio: Audio_2;
97
96
  readonly engine: Engine;
98
97
  readonly envCtrls: EnvCtrls;
99
98
  readonly events: Events;
@@ -127,16 +126,19 @@ export declare class App<TClasses extends Classes = {}> {
127
126
  * @category Core
128
127
  */
129
128
  declare class Audio_2 {
130
- private readonly cfg;
131
129
  private readonly ctx;
132
130
  private readonly loader;
133
131
  private readonly engine;
134
132
  private readonly sounds;
135
- private audioCfgLast;
136
- private callback;
133
+ private readonly params;
137
134
  private listener;
138
135
  /* Excluded from this release type: __constructor */
139
136
  private attachSoundTo;
137
+ /**
138
+ * Returns the audio parameters currently used at runtime.
139
+ * @returns A snapshot of the mutable audio settings.
140
+ */
141
+ get(): Partial<AudioCfg>;
140
142
  /**
141
143
  * Checks whether an audio source with the given name is loaded.
142
144
  * @param params - Parameter object.
@@ -194,6 +196,11 @@ declare class Audio_2 {
194
196
  }): void;
195
197
  private setAllPositionalSoundsCfg;
196
198
  private setPositionalSoundCfg;
199
+ /**
200
+ * Updates one or more audio parameters at runtime.
201
+ * @param params - Audio parameters to update.
202
+ */
203
+ set(params: Partial<AudioCfg>): void;
197
204
  /**
198
205
  * Stops the playback of an audio with a smooth fade-out.
199
206
  * @param params - Parameter object.
@@ -208,7 +215,6 @@ declare class Audio_2 {
208
215
  * @remarks This method is intended for advanced custom integrations where developers need direct access to the engine instance. The extension is executed once immediately when `use()` is called.
209
216
  */
210
217
  use(extension: (audio: Audio_2) => void): void;
211
- /* Excluded from this release type: update */
212
218
  }
213
219
  export { Audio_2 as Audio }
214
220
 
@@ -453,39 +459,9 @@ export declare interface Cfg {
453
459
  stateMachine: StateMachineCfg;
454
460
  }
455
461
 
456
- /** Defines the static configuration that is applied at compile-time. For runtime updates use {@link CfgCtrl}. */
462
+ /** Defines the initial configuration that is applied when the application starts. */
457
463
  export declare const cfg: Cfg;
458
464
 
459
- /**
460
- * Controls configuration options at runtime.
461
- * @category Core
462
- */
463
- export declare class CfgCtrl {
464
- private cfg;
465
- /* Excluded from this release type: __constructor */
466
- /**
467
- * Applies runtime updates to `AudioCfg`.
468
- *
469
- * @param params - Partial audio settings to apply.
470
- * @param params.refDistance - {@link AudioCfg.refDistance}.
471
- * @param params.rolloffFactor - {@link AudioCfg.rolloffFactor}.
472
- * @param params.maxDistance - {@link AudioCfg.maxDistance}.
473
- * @param params.distanceModel - {@link AudioCfg.distanceModel}.
474
- * @param params.coneInnerAngle - {@link AudioCfg.coneInnerAngle}.
475
- * @param params.coneOuterAngle - {@link AudioCfg.coneOuterAngle}.
476
- * @param params.coneOuterGain - {@link AudioCfg.coneOuterGain}.
477
- */
478
- setAudio(params: Partial<Omit<AudioCfg, 'enable'>>): void;
479
- /**
480
- * Applies runtime updates to `RenderCfg`.
481
- *
482
- * @param params - Partial render settings to apply.
483
- * @param params.fpsLimiter - {@link RenderCfg.fpsLimiter}.
484
- * @param params.deltaTimesMax - {@link RenderCfg.deltaTimesMax}.
485
- */
486
- setRender(params: Partial<RenderCfg>): void;
487
- }
488
-
489
465
  /**
490
466
  * Groups optional class registries for `Obj3D` and `Comp`.
491
467
  *
@@ -532,7 +508,6 @@ export declare class Comp extends HTMLElement {
532
508
  /** The root HTML element that hosts the visual container for the engine. */
533
509
  canvas: Readonly<HTMLElement>;
534
510
  cfg: Cfg;
535
- cfgCtrl: Readonly<CfgCtrl>;
536
511
  comps: Map<string, Comp[]> | null;
537
512
  events: Readonly<Events>;
538
513
  objs3D: Map<string, Obj3D>;
@@ -1126,20 +1101,11 @@ export declare interface FogCfg {
1126
1101
  export declare class FpvCtrls {
1127
1102
  private readonly cam3D;
1128
1103
  private readonly canvas;
1129
- private readonly cfg;
1130
1104
  private readonly engine;
1131
1105
  private readonly events;
1132
1106
  private readonly modules;
1133
1107
  /* Excluded from this release type: pointerLockCtrls */
1134
- private minPolarAngle;
1135
- private maxPolarAngle;
1136
- private pointerSpeed;
1137
- private keyMoveForward;
1138
- private keyMoveLeft;
1139
- private keyMoveBackward;
1140
- private keyMoveRight;
1141
- private keyMoveUp;
1142
- private keyMoveDown;
1108
+ private readonly params;
1143
1109
  private isMoveForward;
1144
1110
  private isMoveLeft;
1145
1111
  private isMoveBackward;
@@ -1159,7 +1125,10 @@ export declare class FpvCtrls {
1159
1125
  enable(): void;
1160
1126
  /** Disposes three.js `PointerLockControls` and cleans up their runtime resources. */
1161
1127
  dispose(): void;
1162
- /** Returns the current three.js `PointerLockControls` configuration. */
1128
+ /**
1129
+ * Returns the parameters currently used by three.js `PointerLockControls`.
1130
+ * @returns A snapshot of the mutable first-person control settings.
1131
+ */
1163
1132
  get(): Partial<FpvCtrlsCfg>;
1164
1133
  /** Returns whether three.js `PointerLockControls` are enabled. */
1165
1134
  isEnabled(): boolean;
@@ -1651,8 +1620,6 @@ export declare class Obj3D {
1651
1620
  /** @public */
1652
1621
  protected canvas: HTMLElement;
1653
1622
  protected cfg: Cfg;
1654
- /** @public */
1655
- protected readonly cfgCtrl: Readonly<CfgCtrl>;
1656
1623
  /* Excluded from this release type: events */
1657
1624
  protected name: string;
1658
1625
  /** The managed `THREE.Object3D` instance for this object. It is `null` until a scene object is assigned. */
@@ -1743,7 +1710,7 @@ export declare class Obj3D {
1743
1710
  }
1744
1711
 
1745
1712
  /** Constructor type for `Obj3D` classes. */
1746
- export declare type Obj3DClass = new (canvas: HTMLElement, cfg: Cfg, cfgCtrl: CfgCtrl, name: string) => Objs3D;
1713
+ export declare type Obj3DClass = new (canvas: HTMLElement, cfg: Cfg, name: string) => Objs3D;
1747
1714
 
1748
1715
  /** Defines all event types supported by `Obj3D.addEventListener`. */
1749
1716
  export declare type Obj3DEvent = Obj3DPosWorldEvent | Obj3DPosScreenEvent | Obj3DVisibleEvent | Obj3DPointerEvent;
@@ -1810,25 +1777,11 @@ export declare type Objs3D = Cam3D | Light3D | Mesh3D | Obj3D;
1810
1777
  export declare class OrbitCtrls {
1811
1778
  private readonly cam3D;
1812
1779
  private readonly canvas;
1813
- private readonly cfg;
1814
1780
  private readonly engine;
1815
1781
  private readonly events;
1816
1782
  private readonly modules;
1817
1783
  orbitControls: OrbitControls_2 | null;
1818
- private enableDamping;
1819
- private dampingFactor;
1820
- private minDistance;
1821
- private maxDistance;
1822
- private enableZoom;
1823
- private zoomSpeed;
1824
- private enableRotate;
1825
- private rotateSpeed;
1826
- private enablePan;
1827
- private panSpeed;
1828
- private autoRotate;
1829
- private autoRotateSpeed;
1830
- private minPolarAngle;
1831
- private maxPolarAngle;
1784
+ private readonly params;
1832
1785
  private orbitCtrlsFirstChange;
1833
1786
  private callback;
1834
1787
  private listenerPointersStart;
@@ -1843,6 +1796,11 @@ export declare class OrbitCtrls {
1843
1796
  enable(): void;
1844
1797
  /** Disposes three.js `OrbitControls` and removes them from the render loop. */
1845
1798
  dispose(): void;
1799
+ /**
1800
+ * Returns the parameters currently used by three.js `OrbitControls`.
1801
+ * @returns A snapshot of the mutable orbit control settings.
1802
+ */
1803
+ get(): Partial<OrbitCtrlsCfg>;
1846
1804
  /**
1847
1805
  * Returns whether three.js `OrbitControls` are currently enabled.
1848
1806
  * @returns `true` if `OrbitControls` are currently enabled; otherwise, `false`.
@@ -1853,8 +1811,6 @@ export declare class OrbitCtrls {
1853
1811
  * @param params - Object containing any subset of orbit control parameters.
1854
1812
  */
1855
1813
  set(params: Partial<OrbitCtrlsCfg>): void;
1856
- /** Returns the current three.js `OrbitControls` configuration. */
1857
- get(): Partial<OrbitCtrlsCfg>;
1858
1814
  /**
1859
1815
  * Registers and executes a low-level extension function with access to the public `OrbitCtrls` API.
1860
1816
  *