illutions 0.21.9 → 0.22.1

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,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.22.1
4
+
5
+ ### Added
6
+
7
+ - Added `cfg.render.params` for renderer-specific runtime parameters.
8
+ - Added `render.api` output to the infobox.
9
+ - Added `.blend` source files to the public example apps.
10
+
11
+ ### Changed
12
+
13
+ - Renamed `cfg.webgl` and `cfg.webgpu` parameter groups to `params`.
14
+
15
+ ## 0.22.0
16
+
17
+ ### Changed
18
+
19
+ - Updated the framework to Three.js r185.
20
+ - Changed the default renderer selection to `render.api = 'auto'`.
21
+ - Added `envCtrls.dataType` to configure environment texture data handling.
22
+ - Replaced `SsrWebGpuCfg.opacity` with `SsrWebGpuCfg.intensity`.
23
+
24
+ ### Fixed
25
+
26
+ - Clarified the WebGL/WebGPU renderer switch behavior.
27
+ - Enabled WebGPU renderer loading even when post-processing is disabled.
28
+
3
29
  ## 0.21.9
4
30
 
5
31
  ### Changed
package/dist/main.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import { AnyEventObject } from 'xstate';
2
2
  import { AnyStateMachine } from 'xstate';
3
+ import { ao } from 'three/addons/tsl/display/GTAONode.js';
4
+ import { createBrowserInspector } from '@statelyai/inspect';
3
5
  import { default as default_2 } from 'three/addons/tsl/display/GTAONode.js';
4
6
  import { default as default_3 } from 'three/addons/tsl/display/SSRNode.js';
5
7
  import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
6
8
  import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
7
9
  import { EXRLoader } from 'three/addons/loaders/EXRLoader.js';
10
+ import { FXAAShader } from 'three/addons/shaders/FXAAShader.js';
8
11
  import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
9
12
  import { HDRLoader } from 'three/addons/loaders/HDRLoader.js';
10
13
  import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js';
@@ -12,16 +15,21 @@ import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
12
15
  import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
13
16
  import { OrbitControls as OrbitControls_2 } from 'three/examples/jsm/controls/OrbitControls.js';
14
17
  import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
18
+ import { Pane } from 'tweakpane';
15
19
  import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
16
20
  import { PointerLockControls as PointerLockControls_2 } from 'three/examples/jsm/controls/PointerLockControls.js';
17
21
  import { ReflectorForSSRPass } from 'three/addons/objects/ReflectorForSSRPass.js';
18
22
  import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
19
23
  import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js';
24
+ import { smaa } from 'three/addons/tsl/display/SMAANode.js';
25
+ import { SMAAPass } from 'three/addons/postprocessing/SMAAPass.js';
20
26
  import { SSAOPass } from 'three/addons/postprocessing/SSAOPass.js';
27
+ import { ssr } from 'three/addons/tsl/display/SSRNode.js';
21
28
  import { SSRPass } from 'three/addons/postprocessing/SSRPass.js';
22
29
  import type * as THREE_TYPE from 'three';
23
30
  import type * as THREE_WEBGPU_TYPE from 'three/webgpu';
24
31
  import type * as THREE_WEBTSL_TYPE from 'three/tsl';
32
+ import { TierResult } from 'detect-gpu';
25
33
 
26
34
  /**
27
35
  * Defines the shared anti-aliasing settings.
@@ -500,6 +508,8 @@ export declare interface ClipFadeEvent {
500
508
  action?: THREE_TYPE.AnimationAction;
501
509
  }
502
510
 
511
+ declare type ColorNode = THREE_WEBGPU_TYPE.Node<'vec4'>;
512
+
503
513
  /**
504
514
  * Represents a reusable web-component logic unit bound to a custom element that participates in the scene lifecycle.
505
515
  * @category Components
@@ -999,6 +1009,11 @@ export declare interface EnvCtrlsCfg {
999
1009
  * @default 0
1000
1010
  */
1001
1011
  backgroundIntensity: number;
1012
+ /**
1013
+ * Specifies the texture data type used by EXR and HDR loaders.
1014
+ * @default 'halfFloat'
1015
+ */
1016
+ dataType: 'halfFloat' | 'float';
1002
1017
  /**
1003
1018
  * Enables or disables environment and background map handling.
1004
1019
  * @default false
@@ -1249,6 +1264,8 @@ export declare interface FxaaCfg {
1249
1264
  sharpness: number;
1250
1265
  }
1251
1266
 
1267
+ declare type FXAAPostNode = (input: ColorNode) => ColorNode;
1268
+
1252
1269
  /**
1253
1270
  * Defines the GUI elements for runtime information, controls and inspection.
1254
1271
  * @category Cfg
@@ -1547,17 +1564,17 @@ export declare interface ModelLoadingEvent {
1547
1564
  }
1548
1565
 
1549
1566
  declare class Modules {
1550
- gpuTier: any;
1551
- fxaaNode: any;
1552
- fxaaShader: any;
1553
- smaaPassClass: any;
1554
- smaaNode: any;
1555
- ssaoPassClass: any;
1556
- gtaoNodeClass: any;
1557
- ssrNode: any;
1558
- ssrPassClass: any;
1559
- paneClass: any;
1560
- createBrowserInspector: any;
1567
+ gpuTier: TierResult | null;
1568
+ fxaaNode: FXAAPostNode | null;
1569
+ fxaaShader: typeof FXAAShader | null;
1570
+ smaaPassClass: typeof SMAAPass | null;
1571
+ smaaNode: typeof smaa | null;
1572
+ ssaoPassClass: typeof SSAOPass | null;
1573
+ gtaoNodeClass: typeof ao | null;
1574
+ ssrNode: typeof ssr | null;
1575
+ ssrPassClass: typeof SSRPass | null;
1576
+ paneClass: typeof Pane | null;
1577
+ createBrowserInspector: typeof createBrowserInspector | null;
1561
1578
  effectComposerClass: typeof EffectComposer | null;
1562
1579
  envLoader: EXRLoader | HDRLoader | null;
1563
1580
  dracoLoader: DRACOLoader | null;
@@ -1582,8 +1599,8 @@ declare class Modules {
1582
1599
  tslVec3: typeof THREE_WEBTSL_TYPE.vec3 | null;
1583
1600
  tslVec4: typeof THREE_WEBTSL_TYPE.vec4 | null;
1584
1601
  tslFloat: typeof THREE_WEBTSL_TYPE.float | null;
1585
- tslDirectionToColor: typeof THREE_WEBTSL_TYPE.directionToColor | null;
1586
- tslColorToDirection: typeof THREE_WEBTSL_TYPE.colorToDirection | null;
1602
+ packNormalToRGB: typeof THREE_WEBTSL_TYPE.packNormalToRGB | null;
1603
+ unpackRGBToNormal: typeof THREE_WEBTSL_TYPE.unpackRGBToNormal | null;
1587
1604
  private cfg;
1588
1605
  constructor(cfg: Cfg);
1589
1606
  private consoleLog;
@@ -2135,22 +2152,37 @@ export declare interface RenderCfg {
2135
2152
  */
2136
2153
  toneMappingExposure: number;
2137
2154
  /**
2138
- * WebGL renderer configuration.
2155
+ * Parameters passed to both WebGL and WebGPU renderer constructors.
2156
+ */
2157
+ params: {
2158
+ /**
2159
+ * Whether the renderer canvas uses an alpha buffer.
2160
+ * @default false
2161
+ */
2162
+ alpha: boolean;
2163
+ /**
2164
+ * Whether renderer-level anti-aliasing is enabled.
2165
+ * @default false
2166
+ */
2167
+ aa: boolean;
2168
+ };
2169
+ /**
2170
+ * WebGL-specific renderer configuration.
2139
2171
  */
2140
2172
  webgl: {
2141
2173
  /**
2142
2174
  * Parameters passed to `THREE.WebGLRenderer`.
2143
2175
  */
2144
- parameters: THREE_TYPE.WebGLRendererParameters;
2176
+ params: THREE_TYPE.WebGLRendererParameters;
2145
2177
  };
2146
2178
  /**
2147
- * WebGPU renderer configuration.
2179
+ * WebGPU-specific renderer configuration.
2148
2180
  */
2149
2181
  webgpu: {
2150
2182
  /**
2151
2183
  * Parameters passed to `THREE.WebGPURenderer`.
2152
2184
  */
2153
- parameters: WebGpuRendererParameters;
2185
+ params: WebGpuRendererParameters;
2154
2186
  };
2155
2187
  }
2156
2188
 
@@ -2400,10 +2432,10 @@ export declare interface SsrWebGpuCfg {
2400
2432
  */
2401
2433
  maxDistance: number;
2402
2434
  /**
2403
- * Reflection opacity value.
2435
+ * Reflection intensity value.
2404
2436
  * @default 0.5
2405
2437
  */
2406
- opacity: number;
2438
+ intensity: number;
2407
2439
  /**
2408
2440
  * Ray thickness used for SSR intersection tests.
2409
2441
  * @default 0.018
@@ -2475,3 +2507,10 @@ export declare interface WindowResizeEvent {
2475
2507
  }
2476
2508
 
2477
2509
  export { }
2510
+
2511
+
2512
+ declare module 'three/addons/postprocessing/SSRPass.js' {
2513
+ interface SSRPassParams {
2514
+ bouncing?: boolean;
2515
+ }
2516
+ }