illutions 0.21.6 → 0.21.7

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/main.d.ts CHANGED
@@ -23,7 +23,8 @@ import type * as THREE_TYPE from 'three';
23
23
  import type * as THREE_WEBGPU_TYPE from 'three/webgpu';
24
24
  import type * as THREE_WEBTSL_TYPE from 'three/tsl';
25
25
 
26
- /** Defines the shared anti-aliasing settings.
26
+ /**
27
+ * Defines the shared anti-aliasing settings.
27
28
  * @category Cfg
28
29
  */
29
30
  export declare interface aaCfg {
@@ -39,7 +40,8 @@ export declare interface aaCfg {
39
40
  mode: 'none' | 'fxaa' | 'smaa';
40
41
  }
41
42
 
42
- /** Defines the ambient light settings controlling global scene illumination.
43
+ /**
44
+ * Defines the ambient light settings controlling global scene illumination.
43
45
  * @category Cfg
44
46
  */
45
47
  export declare interface AmbientlightCfg {
@@ -100,7 +102,7 @@ export declare class App<TClasses extends Classes = {}> {
100
102
  readonly raycast: Raycast;
101
103
  readonly stateMachine: StateMachine;
102
104
  private cam3D;
103
- private readonly gui;
105
+ private readonly inspector;
104
106
  readonly comps: CompInsts<NonNullable<TClasses['comps']>>;
105
107
  readonly objs3D: Obj3DInsts<NonNullable<TClasses['objs3D']>>;
106
108
  /* Excluded from this release type: __constructor */
@@ -210,7 +212,8 @@ declare class Audio_2 {
210
212
  }
211
213
  export { Audio_2 as Audio }
212
214
 
213
- /** Defines the audio settings used for playback timing and distance-based spatial attenuation.
215
+ /**
216
+ * Defines the audio settings used for playback timing and distance-based spatial attenuation.
214
217
  * @category Cfg
215
218
  */
216
219
  export declare interface AudioCfg {
@@ -294,7 +297,8 @@ export declare class Cam3D extends Obj3D {
294
297
  /* Excluded from this release type: updateCanvasResize */
295
298
  }
296
299
 
297
- /** Defines the shared camera settings used to position, orient and clip the scene view.
300
+ /**
301
+ * Defines the shared camera settings used to position, orient and clip the scene view.
298
302
  * @category Cfg
299
303
  */
300
304
  export declare interface CamBaseCfg {
@@ -330,7 +334,8 @@ export declare interface CamBaseCfg {
330
334
 
331
335
  export declare type CamCfg = CamPerspectiveCfg | CamOrthographicCfg;
332
336
 
333
- /** Defines the orthographic camera settings used to render the scene without perspective distortion.
337
+ /**
338
+ * Defines the orthographic camera settings used to render the scene without perspective distortion.
334
339
  * @category Cfg
335
340
  */
336
341
  export declare interface CamOrthographicCfg extends CamBaseCfg {
@@ -365,7 +370,8 @@ export declare interface CamOrthographicCfg extends CamBaseCfg {
365
370
  aspect?: never;
366
371
  }
367
372
 
368
- /** Defines the perspective camera settings used to render the scene with depth perception.
373
+ /**
374
+ * Defines the perspective camera settings used to render the scene with depth perception.
369
375
  * @category Cfg
370
376
  */
371
377
  export declare interface CamPerspectiveCfg extends CamBaseCfg {
@@ -405,7 +411,8 @@ export declare interface CanvasPointerEvent {
405
411
  event: PointerEvent;
406
412
  }
407
413
 
408
- /** Defines the full configuration structure used to initialize the application.
414
+ /**
415
+ * Defines the full configuration structure used to initialize the application.
409
416
  * @category Cfg
410
417
  */
411
418
  export declare interface Cfg {
@@ -417,10 +424,10 @@ export declare interface Cfg {
417
424
  debug: DebugCfg;
418
425
  /** Environment controls settings. */
419
426
  envCtrls: EnvCtrlsCfg;
427
+ /** Default GUI settings. */
428
+ gui: GuiCfg;
420
429
  /** Light and shadow settings. */
421
430
  light: LightCfg;
422
- /** Menu bar settings. */
423
- menuBar: MenuBarCfg;
424
431
  /** Default mesh settings. */
425
432
  mesh: MeshCfg;
426
433
  /** GLTF/GLB model settings. */
@@ -439,8 +446,6 @@ export declare interface Cfg {
439
446
  scene: SceneCfg;
440
447
  /** State machine settings. */
441
448
  stateMachine: StateMachineCfg;
442
- /** Runtime statistics settings. */
443
- stats: StatsCfg;
444
449
  }
445
450
 
446
451
  /** Defines the static configuration that is applied at compile-time. For runtime updates use {@link CfgCtrl}. */
@@ -546,7 +551,7 @@ export declare class Comp extends HTMLElement {
546
551
  * @public
547
552
  *
548
553
  * **Example**
549
- * {@includeCode ../../examples/comp-onready.ts}
554
+ * {@includeCode ../../examples/ilu-onready.ts}
550
555
  */
551
556
  protected onReady(): void;
552
557
  /**
@@ -570,7 +575,8 @@ export declare type CompInsts<T extends Record<string, CompClass>> = {
570
575
  [K in keyof T]: InstanceType<T[K]>[];
571
576
  };
572
577
 
573
- /** Defines the debugging settings that can be toggled during development.
578
+ /**
579
+ * Defines the debugging settings that can be toggled during development.
574
580
  * @category Cfg
575
581
  */
576
582
  export declare interface DebugCfg {
@@ -599,7 +605,7 @@ export declare class Engine {
599
605
  private readonly comps;
600
606
  private readonly objs3D;
601
607
  private readonly cfg;
602
- private readonly stats;
608
+ private readonly infoBox;
603
609
  private actionObserver;
604
610
  private gltf;
605
611
  private mixer;
@@ -624,7 +630,7 @@ export declare class Engine {
624
630
  private ambientLight;
625
631
  private hemisphereLight;
626
632
  private powerMode;
627
- private postAuto;
633
+ private postNoise;
628
634
  private dTs;
629
635
  private dT;
630
636
  private dTFrameMax;
@@ -637,7 +643,6 @@ export declare class Engine {
637
643
  /* Excluded from this release type: __constructor */
638
644
  /* Excluded from this release type: init */
639
645
  private initWebGpuRenderer;
640
- private isPostEnabled;
641
646
  /**
642
647
  * Registers a callback that is executed on every requestAnimationFrame update.
643
648
  * @param {(deltaTime: number) => void} cb - Callback executed once per frame with `deltaTime`.
@@ -756,7 +761,9 @@ export declare class Engine {
756
761
  * @param enable - Whether SSR should be enabled.
757
762
  */
758
763
  enableSsr(enable: boolean): Promise<void>;
759
- private getPostAuto;
764
+ private isPostCfg;
765
+ /* Excluded from this release type: isPostEnabled */
766
+ private isPostGpu;
760
767
  private loadModel;
761
768
  private pauseObjActions;
762
769
  /**
@@ -997,7 +1004,8 @@ export declare class EnvCtrls {
997
1004
  private update;
998
1005
  }
999
1006
 
1000
- /** Defines the environment controls settings for `THREE.Scene.environment` and `THREE.Scene.background`.
1007
+ /**
1008
+ * Defines the environment controls settings for `THREE.Scene.environment` and `THREE.Scene.background`.
1001
1009
  * @category Cfg
1002
1010
  */
1003
1011
  export declare interface EnvCtrlsCfg {
@@ -1079,7 +1087,8 @@ export declare class Events {
1079
1087
  /* Excluded from this release type: windowResize */
1080
1088
  }
1081
1089
 
1082
- /** Defines the fog settings controlling scene depth-based color attenuation.
1090
+ /**
1091
+ * Defines the fog settings controlling scene depth-based color attenuation.
1083
1092
  * @category Cfg
1084
1093
  */
1085
1094
  export declare interface FogCfg {
@@ -1186,7 +1195,8 @@ export declare class FpvCtrls {
1186
1195
  use(extension: (fpvctrls: FpvCtrls) => void): void;
1187
1196
  }
1188
1197
 
1189
- /** Defines the First Person View Controls settings used to move and rotate the camera inside a scene.
1198
+ /**
1199
+ * Defines the First Person View Controls settings used to move and rotate the camera inside a scene.
1190
1200
  * @category Cfg
1191
1201
  */
1192
1202
  export declare interface FpvCtrlsCfg {
@@ -1253,7 +1263,8 @@ export declare interface FpvCtrlsEvent {
1253
1263
  type: 'FPVCTRLS_DISABLED' | 'FPVCTRLS_ENABLED' | 'FPVCTRLS_LOCK' | 'FPVCTRLS_UNLOCK' | 'FPVCTRLS_DISABLED';
1254
1264
  }
1255
1265
 
1256
- /** Defines the FXAA anti-aliasing settings used to smooth jagged edges in the rendered image.
1266
+ /**
1267
+ * Defines the FXAA anti-aliasing settings used to smooth jagged edges in the rendered image.
1257
1268
  * @category Cfg
1258
1269
  */
1259
1270
  export declare interface FxaaCfg {
@@ -1264,7 +1275,27 @@ export declare interface FxaaCfg {
1264
1275
  sharpness: number;
1265
1276
  }
1266
1277
 
1267
- /** Defines the hemisphere light settings controlling ambient sky and ground illumination.
1278
+ /**
1279
+ * Defines the GUI elements for runtime information, controls and inspection.
1280
+ * @category Cfg
1281
+ */
1282
+ export declare interface GuiCfg {
1283
+ /** The infobox for runtime statistics and renderer information. */
1284
+ infoBox: InfoBoxCfg;
1285
+ /** The inspector for runtime properties. */
1286
+ inspector: {
1287
+ /**
1288
+ * Activates the inspector for runtime property control via lazy loading.
1289
+ * @default true
1290
+ */
1291
+ enable: boolean;
1292
+ };
1293
+ /** The menubar at the bottom. */
1294
+ menuBar: MenuBarCfg;
1295
+ }
1296
+
1297
+ /**
1298
+ * Defines the hemisphere light settings controlling ambient sky and ground illumination.
1268
1299
  * @category Cfg
1269
1300
  */
1270
1301
  export declare interface HemisphereCfg {
@@ -1290,6 +1321,73 @@ export declare interface HemisphereCfg {
1290
1321
  intensity: number;
1291
1322
  }
1292
1323
 
1324
+ /**
1325
+ * Defines the built-in engine infobox settings used to display FPS, CPU/frame timing and renderer.info values.
1326
+ * @category Cfg
1327
+ */
1328
+ export declare interface InfoBoxCfg {
1329
+ /**
1330
+ * Enables or disables infobox data collection.
1331
+ * @default true
1332
+ */
1333
+ enabled: boolean;
1334
+ /**
1335
+ * Shows the FPS value.
1336
+ * @default true
1337
+ */
1338
+ fps: boolean;
1339
+ /**
1340
+ * Shows the measured CPU/update time in milliseconds.
1341
+ * @default true
1342
+ */
1343
+ cpu: boolean;
1344
+ /**
1345
+ * Shows the frame time in milliseconds.
1346
+ * @default true
1347
+ */
1348
+ frame: boolean;
1349
+ /**
1350
+ * Shows renderer.info.render.calls.
1351
+ * @default true
1352
+ */
1353
+ calls: boolean;
1354
+ /**
1355
+ * Shows renderer.info.render.triangles.
1356
+ * @default true
1357
+ */
1358
+ triangles: boolean;
1359
+ /**
1360
+ * Shows renderer.info.render.lines.
1361
+ * @default true
1362
+ */
1363
+ lines: boolean;
1364
+ /**
1365
+ * Shows renderer.info.render.points.
1366
+ * @default true
1367
+ */
1368
+ points: boolean;
1369
+ /**
1370
+ * Shows renderer.info.memory.geometries.
1371
+ * @default true
1372
+ */
1373
+ geometries: boolean;
1374
+ /**
1375
+ * Shows renderer.info.memory.textures.
1376
+ * @default true
1377
+ */
1378
+ textures: boolean;
1379
+ /**
1380
+ * Shows the number of compiled WebGL programs from renderer.info.programs.
1381
+ * @default true
1382
+ */
1383
+ programs: boolean;
1384
+ /**
1385
+ * Refresh rate of the displayed values.
1386
+ * @default 10
1387
+ */
1388
+ logsPerSecond: number;
1389
+ }
1390
+
1293
1391
  /**
1294
1392
  * The `Light3D` class represents a managed light source.
1295
1393
  * @category 3D Objects
@@ -1315,7 +1413,8 @@ export declare class Light3D extends Obj3D {
1315
1413
  /* Excluded from this release type: traverse */
1316
1414
  }
1317
1415
 
1318
- /** Defines the light shadow settings used to configure shadow map resolution and shadow camera limits.
1416
+ /**
1417
+ * Defines the light shadow settings used to configure shadow map resolution and shadow camera limits.
1319
1418
  * @category Cfg
1320
1419
  */
1321
1420
  export declare interface LightCfg {
@@ -1351,7 +1450,8 @@ export declare interface LightCfg {
1351
1450
  far: number;
1352
1451
  }
1353
1452
 
1354
- /** Defines the menu bar settings used to display licensed UI controls and branding.
1453
+ /**
1454
+ * Defines the menu bar settings used to display licensed UI controls and branding.
1355
1455
  * @category Cfg
1356
1456
  */
1357
1457
  export declare interface MenuBarCfg {
@@ -1400,7 +1500,8 @@ export declare class Mesh3D extends Obj3D {
1400
1500
  /* Excluded from this release type: traverse */
1401
1501
  }
1402
1502
 
1403
- /** Defines the mesh-specific rendering settings used to control shadows and frustum culling.
1503
+ /**
1504
+ * Defines the mesh-specific rendering settings used to control shadows and frustum culling.
1404
1505
  * @category Cfg
1405
1506
  */
1406
1507
  export declare interface MeshCfg {
@@ -1421,7 +1522,8 @@ export declare interface MeshCfg {
1421
1522
  frustumCulled: boolean;
1422
1523
  }
1423
1524
 
1424
- /** Defines the GLTF/GLB model loading settings used to fetch models and configure optional Draco decoding.
1525
+ /**
1526
+ * Defines the GLTF/GLB model loading settings used to fetch models and configure optional Draco decoding.
1425
1527
  * @category Cfg
1426
1528
  */
1427
1529
  export declare interface ModelCfg {
@@ -1762,7 +1864,8 @@ export declare class OrbitCtrls {
1762
1864
  private updatePointersStart;
1763
1865
  }
1764
1866
 
1765
- /** Defines the Orbit Controls settings used to rotate, pan, zoom and constrain the camera around a target.
1867
+ /**
1868
+ * Defines the Orbit Controls settings used to rotate, pan, zoom and constrain the camera around a target.
1766
1869
  * @category Cfg
1767
1870
  */
1768
1871
  export declare interface OrbitCtrlsCfg {
@@ -1863,15 +1966,11 @@ export declare interface OrbitCtrlsEvent {
1863
1966
  */
1864
1967
  export declare type PauseObjectActions = 'all' | 'finished' | 'last' | 'none';
1865
1968
 
1866
- /** Defines the post-processing settings used by the rendering pipeline.
1969
+ /**
1970
+ * Defines the post-processing settings used by the rendering pipeline.
1867
1971
  * @category Cfg
1868
1972
  */
1869
1973
  export declare interface PostCfg {
1870
- /**
1871
- * Enables GPU-based auto activation for post-processing.
1872
- * @default true
1873
- */
1874
- auto: boolean;
1875
1974
  /**
1876
1975
  * Whether the GUI post-processing dropdown is open.
1877
1976
  * @default false
@@ -1982,7 +2081,8 @@ export declare class Raycast {
1982
2081
  private updatePointer;
1983
2082
  }
1984
2083
 
1985
- /** Defines the raycasting settings used to detect selectable objects around the pointer.
2084
+ /**
2085
+ * Defines the raycasting settings used to detect selectable objects around the pointer.
1986
2086
  * @category Cfg
1987
2087
  */
1988
2088
  export declare interface RaycastCfg {
@@ -2003,7 +2103,8 @@ export declare interface RaycastCfg {
2003
2103
  countClosestObjs: number;
2004
2104
  }
2005
2105
 
2006
- /** Defines the renderer settings used to control frame timing, resolution, shadows, tone mapping and output color space.
2106
+ /**
2107
+ * Defines the renderer settings used to control frame timing, resolution, shadows, tone mapping and output color space.
2007
2108
  * @category Cfg
2008
2109
  */
2009
2110
  export declare interface RenderCfg {
@@ -2042,11 +2143,6 @@ export declare interface RenderCfg {
2042
2143
  * @default 10
2043
2144
  */
2044
2145
  deltaTimesMax: number;
2045
- /**
2046
- * Activates the GUI module via lazy loading.
2047
- * @default false
2048
- */
2049
- gui: boolean;
2050
2146
  /**
2051
2147
  * Output color space.
2052
2148
  * @default THREE.SRGBColorSpace
@@ -2083,7 +2179,6 @@ export declare interface RenderCfg {
2083
2179
  webgl: {
2084
2180
  /**
2085
2181
  * Parameters passed to `THREE.WebGLRenderer`.
2086
- * @default antialias: true, alpha: false, powerPreference: 'low-power'
2087
2182
  */
2088
2183
  parameters: THREE_TYPE.WebGLRendererParameters;
2089
2184
  };
@@ -2093,7 +2188,6 @@ export declare interface RenderCfg {
2093
2188
  webgpu: {
2094
2189
  /**
2095
2190
  * Parameters passed to `THREE.WebGPURenderer`.
2096
- * @default antialias: true, alpha: false
2097
2191
  */
2098
2192
  parameters: WebGpuRendererParameters;
2099
2193
  };
@@ -2102,13 +2196,14 @@ export declare interface RenderCfg {
2102
2196
  /** Defines the available renderer backends. */
2103
2197
  export declare type Renderer = 'webgl' | 'webgpu' | 'auto';
2104
2198
 
2105
- /** Defines the scene settings used to configure background, environment, model, fog and lights.
2199
+ /**
2200
+ * Defines the scene settings used to configure background, environment, model, fog and lights.
2106
2201
  * @category Cfg
2107
2202
  */
2108
2203
  export declare interface SceneCfg {
2109
2204
  /**
2110
2205
  * Custom element tag in which the canvas is rendered.
2111
- * @default 'comp-canvas'
2206
+ * @default 'ilu-canvas'
2112
2207
  */
2113
2208
  canvas: string;
2114
2209
  /**
@@ -2136,7 +2231,8 @@ export declare interface SceneRenderedEvent {
2136
2231
  type: 'SCENE_RENDERED';
2137
2232
  }
2138
2233
 
2139
- /** Defines the SMAA anti-aliasing pass settings used to smooth jagged edges in the rendered image.
2234
+ /**
2235
+ * Defines the SMAA anti-aliasing pass settings used to smooth jagged edges in the rendered image.
2140
2236
  * @category Cfg
2141
2237
  */
2142
2238
  export declare interface SmaaCfg {
@@ -2152,7 +2248,8 @@ export declare interface SmaaCfg {
2152
2248
  guiOpened: boolean;
2153
2249
  }
2154
2250
 
2155
- /** Defines the screen-space ambient occlusion settings used to enhance depth and shading.
2251
+ /**
2252
+ * Defines the screen-space ambient occlusion settings used to enhance depth and shading.
2156
2253
  * @category Cfg
2157
2254
  */
2158
2255
  export declare interface SsaoCfg {
@@ -2168,7 +2265,8 @@ export declare interface SsaoCfg {
2168
2265
  guiOpened: boolean;
2169
2266
  }
2170
2267
 
2171
- /** Defines the WebGL screen-space ambient occlusion settings.
2268
+ /**
2269
+ * Defines the WebGL screen-space ambient occlusion settings.
2172
2270
  * @category Cfg
2173
2271
  */
2174
2272
  export declare interface SsaoWebGlCfg {
@@ -2189,7 +2287,8 @@ export declare interface SsaoWebGlCfg {
2189
2287
  maxDistance: number;
2190
2288
  }
2191
2289
 
2192
- /** Defines the WebGPU screen-space ambient occlusion settings.
2290
+ /**
2291
+ * Defines the WebGPU screen-space ambient occlusion settings.
2193
2292
  * @category Cfg
2194
2293
  */
2195
2294
  export declare interface SsaoWebGpuCfg {
@@ -2230,7 +2329,8 @@ export declare interface SsaoWebGpuCfg {
2230
2329
  resolutionScale: number;
2231
2330
  }
2232
2331
 
2233
- /** Defines the shared screen-space reflection settings.
2332
+ /**
2333
+ * Defines the shared screen-space reflection settings.
2234
2334
  * @category Cfg
2235
2335
  */
2236
2336
  export declare interface SsrCfg {
@@ -2246,7 +2346,8 @@ export declare interface SsrCfg {
2246
2346
  guiOpened: boolean;
2247
2347
  }
2248
2348
 
2249
- /** Defines the WebGL screen-space reflection settings.
2349
+ /**
2350
+ * Defines the WebGL screen-space reflection settings.
2250
2351
  * @category Cfg
2251
2352
  */
2252
2353
  export declare interface SsrWebGlCfg {
@@ -2317,7 +2418,8 @@ export declare interface SsrWebGlCfg {
2317
2418
  maxRoughness: number;
2318
2419
  }
2319
2420
 
2320
- /** Defines the WebGPU screen-space reflection settings.
2421
+ /**
2422
+ * Defines the WebGPU screen-space reflection settings.
2321
2423
  * @category Cfg
2322
2424
  */
2323
2425
  export declare interface SsrWebGpuCfg {
@@ -2388,7 +2490,8 @@ export declare class StateMachine {
2388
2490
  start(stateMachine: AnyStateMachine): void;
2389
2491
  }
2390
2492
 
2391
- /** Defines the application state machine settings used to control inspector-related state.
2493
+ /**
2494
+ * Defines the application state machine settings used to control inspector-related state.
2392
2495
  * @category Cfg
2393
2496
  */
2394
2497
  export declare interface StateMachineCfg {
@@ -2399,72 +2502,6 @@ export declare interface StateMachineCfg {
2399
2502
  inspector: boolean;
2400
2503
  }
2401
2504
 
2402
- /** Defines the built-in engine stats panel settings used to display FPS, CPU/frame timing and renderer.info values.
2403
- * @category Cfg
2404
- */
2405
- export declare interface StatsCfg {
2406
- /**
2407
- * Enables or disables stats data collection.
2408
- * @default true
2409
- */
2410
- enabled: boolean;
2411
- /**
2412
- * Shows the FPS value.
2413
- * @default true
2414
- */
2415
- fps: boolean;
2416
- /**
2417
- * Shows the measured CPU/update time in milliseconds.
2418
- * @default true
2419
- */
2420
- cpu: boolean;
2421
- /**
2422
- * Shows the frame time in milliseconds.
2423
- * @default true
2424
- */
2425
- frame: boolean;
2426
- /**
2427
- * Shows renderer.info.render.calls.
2428
- * @default true
2429
- */
2430
- calls: boolean;
2431
- /**
2432
- * Shows renderer.info.render.triangles.
2433
- * @default true
2434
- */
2435
- triangles: boolean;
2436
- /**
2437
- * Shows renderer.info.render.lines.
2438
- * @default true
2439
- */
2440
- lines: boolean;
2441
- /**
2442
- * Shows renderer.info.render.points.
2443
- * @default true
2444
- */
2445
- points: boolean;
2446
- /**
2447
- * Shows renderer.info.memory.geometries.
2448
- * @default true
2449
- */
2450
- geometries: boolean;
2451
- /**
2452
- * Shows renderer.info.memory.textures.
2453
- * @default true
2454
- */
2455
- textures: boolean;
2456
- /**
2457
- * Shows the number of compiled WebGL programs from renderer.info.programs.
2458
- * @default true
2459
- */
2460
- programs: boolean;
2461
- /**
2462
- * Refresh rate of the displayed values.
2463
- * @default 10
2464
- */
2465
- logsPerSecond: number;
2466
- }
2467
-
2468
2505
  /** Function returned by an event subscription. Calling it removes the associated listener. */
2469
2506
  export declare type Unsubscribe = () => void;
2470
2507