illutions 0.21.7 → 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
- - Removed the Illutions Engine defaults from `render.webgl.parameters` and `render.webgpu.parameters`. Both renderers now use the default parameter values provided by Three.js.
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
@@ -93,7 +93,6 @@ export declare interface AnimFadeEvent {
93
93
  */
94
94
  export declare class App<TClasses extends Classes = {}> {
95
95
  readonly audio: Audio_2;
96
- readonly cfgCtrl: CfgCtrl;
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
 
@@ -217,6 +223,11 @@ export { Audio_2 as Audio }
217
223
  * @category Cfg
218
224
  */
219
225
  export declare interface AudioCfg {
226
+ /**
227
+ * Whether audio support is initialized when the application starts.
228
+ * @default false
229
+ */
230
+ enable: boolean;
220
231
  /**
221
232
  * Whether the GUI audio dropdown is open.
222
233
  * @default false
@@ -448,39 +459,9 @@ export declare interface Cfg {
448
459
  stateMachine: StateMachineCfg;
449
460
  }
450
461
 
451
- /** 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. */
452
463
  export declare const cfg: Cfg;
453
464
 
454
- /**
455
- * Controls configuration options at runtime.
456
- * @category Core
457
- */
458
- export declare class CfgCtrl {
459
- private cfg;
460
- /* Excluded from this release type: __constructor */
461
- /**
462
- * Applies runtime updates to `AudioCfg`.
463
- *
464
- * @param params - Partial audio settings to apply.
465
- * @param params.refDistance - {@link AudioCfg.refDistance}.
466
- * @param params.rolloffFactor - {@link AudioCfg.rolloffFactor}.
467
- * @param params.maxDistance - {@link AudioCfg.maxDistance}.
468
- * @param params.distanceModel - {@link AudioCfg.distanceModel}.
469
- * @param params.coneInnerAngle - {@link AudioCfg.coneInnerAngle}.
470
- * @param params.coneOuterAngle - {@link AudioCfg.coneOuterAngle}.
471
- * @param params.coneOuterGain - {@link AudioCfg.coneOuterGain}.
472
- */
473
- setAudio(params: Partial<AudioCfg>): void;
474
- /**
475
- * Applies runtime updates to `RenderCfg`.
476
- *
477
- * @param params - Partial render settings to apply.
478
- * @param params.fpsLimiter - {@link RenderCfg.fpsLimiter}.
479
- * @param params.deltaTimesMax - {@link RenderCfg.deltaTimesMax}.
480
- */
481
- setRender(params: Partial<RenderCfg>): void;
482
- }
483
-
484
465
  /**
485
466
  * Groups optional class registries for `Obj3D` and `Comp`.
486
467
  *
@@ -527,7 +508,6 @@ export declare class Comp extends HTMLElement {
527
508
  /** The root HTML element that hosts the visual container for the engine. */
528
509
  canvas: Readonly<HTMLElement>;
529
510
  cfg: Cfg;
530
- cfgCtrl: Readonly<CfgCtrl>;
531
511
  comps: Map<string, Comp[]> | null;
532
512
  events: Readonly<Events>;
533
513
  objs3D: Map<string, Obj3D>;
@@ -1121,20 +1101,11 @@ export declare interface FogCfg {
1121
1101
  export declare class FpvCtrls {
1122
1102
  private readonly cam3D;
1123
1103
  private readonly canvas;
1124
- private readonly cfg;
1125
1104
  private readonly engine;
1126
1105
  private readonly events;
1127
1106
  private readonly modules;
1128
1107
  /* Excluded from this release type: pointerLockCtrls */
1129
- private minPolarAngle;
1130
- private maxPolarAngle;
1131
- private pointerSpeed;
1132
- private keyMoveForward;
1133
- private keyMoveLeft;
1134
- private keyMoveBackward;
1135
- private keyMoveRight;
1136
- private keyMoveUp;
1137
- private keyMoveDown;
1108
+ private readonly params;
1138
1109
  private isMoveForward;
1139
1110
  private isMoveLeft;
1140
1111
  private isMoveBackward;
@@ -1154,7 +1125,10 @@ export declare class FpvCtrls {
1154
1125
  enable(): void;
1155
1126
  /** Disposes three.js `PointerLockControls` and cleans up their runtime resources. */
1156
1127
  dispose(): void;
1157
- /** 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
+ */
1158
1132
  get(): Partial<FpvCtrlsCfg>;
1159
1133
  /** Returns whether three.js `PointerLockControls` are enabled. */
1160
1134
  isEnabled(): boolean;
@@ -1646,8 +1620,6 @@ export declare class Obj3D {
1646
1620
  /** @public */
1647
1621
  protected canvas: HTMLElement;
1648
1622
  protected cfg: Cfg;
1649
- /** @public */
1650
- protected readonly cfgCtrl: Readonly<CfgCtrl>;
1651
1623
  /* Excluded from this release type: events */
1652
1624
  protected name: string;
1653
1625
  /** The managed `THREE.Object3D` instance for this object. It is `null` until a scene object is assigned. */
@@ -1738,7 +1710,7 @@ export declare class Obj3D {
1738
1710
  }
1739
1711
 
1740
1712
  /** Constructor type for `Obj3D` classes. */
1741
- 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;
1742
1714
 
1743
1715
  /** Defines all event types supported by `Obj3D.addEventListener`. */
1744
1716
  export declare type Obj3DEvent = Obj3DPosWorldEvent | Obj3DPosScreenEvent | Obj3DVisibleEvent | Obj3DPointerEvent;
@@ -1805,25 +1777,11 @@ export declare type Objs3D = Cam3D | Light3D | Mesh3D | Obj3D;
1805
1777
  export declare class OrbitCtrls {
1806
1778
  private readonly cam3D;
1807
1779
  private readonly canvas;
1808
- private readonly cfg;
1809
1780
  private readonly engine;
1810
1781
  private readonly events;
1811
1782
  private readonly modules;
1812
1783
  orbitControls: OrbitControls_2 | null;
1813
- private enableDamping;
1814
- private dampingFactor;
1815
- private minDistance;
1816
- private maxDistance;
1817
- private enableZoom;
1818
- private zoomSpeed;
1819
- private enableRotate;
1820
- private rotateSpeed;
1821
- private enablePan;
1822
- private panSpeed;
1823
- private autoRotate;
1824
- private autoRotateSpeed;
1825
- private minPolarAngle;
1826
- private maxPolarAngle;
1784
+ private readonly params;
1827
1785
  private orbitCtrlsFirstChange;
1828
1786
  private callback;
1829
1787
  private listenerPointersStart;
@@ -1838,6 +1796,11 @@ export declare class OrbitCtrls {
1838
1796
  enable(): void;
1839
1797
  /** Disposes three.js `OrbitControls` and removes them from the render loop. */
1840
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>;
1841
1804
  /**
1842
1805
  * Returns whether three.js `OrbitControls` are currently enabled.
1843
1806
  * @returns `true` if `OrbitControls` are currently enabled; otherwise, `false`.
@@ -1848,8 +1811,6 @@ export declare class OrbitCtrls {
1848
1811
  * @param params - Object containing any subset of orbit control parameters.
1849
1812
  */
1850
1813
  set(params: Partial<OrbitCtrlsCfg>): void;
1851
- /** Returns the current three.js `OrbitControls` configuration. */
1852
- get(): Partial<OrbitCtrlsCfg>;
1853
1814
  /**
1854
1815
  * Registers and executes a low-level extension function with access to the public `OrbitCtrls` API.
1855
1816
  *