@zephyr3d/editor 0.3.4 → 0.3.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.
Files changed (75) hide show
  1. package/dist/assets/{index-DzQzWsCG.js → index-ySiLtSxz.js} +3 -3
  2. package/dist/assistant/zephyr-types-index.json +14217 -7895
  3. package/dist/index.html +1 -1
  4. package/dist/modules/zephyr3d_backend-webgl.js.map +1 -1
  5. package/dist/modules/zephyr3d_backend-webgpu.js +13 -12
  6. package/dist/modules/zephyr3d_backend-webgpu.js.map +1 -1
  7. package/dist/modules/zephyr3d_device.js +15 -15
  8. package/dist/modules/zephyr3d_device.js.map +1 -1
  9. package/dist/modules/zephyr3d_imgui.js.map +1 -1
  10. package/dist/modules/zephyr3d_scene.js +3276 -1089
  11. package/dist/modules/zephyr3d_scene.js.map +1 -1
  12. package/dist/vendor/zephyr3d/backend-webgl/dist/index.js.map +1 -1
  13. package/dist/vendor/zephyr3d/backend-webgpu/dist/capabilities_webgpu.js +7 -6
  14. package/dist/vendor/zephyr3d/backend-webgpu/dist/capabilities_webgpu.js.map +1 -1
  15. package/dist/vendor/zephyr3d/backend-webgpu/dist/index.js.map +1 -1
  16. package/dist/vendor/zephyr3d/backend-webgpu/dist/renderpass_webgpu.js +6 -6
  17. package/dist/vendor/zephyr3d/backend-webgpu/dist/renderpass_webgpu.js.map +1 -1
  18. package/dist/vendor/zephyr3d/device/dist/device.js +15 -15
  19. package/dist/vendor/zephyr3d/device/dist/device.js.map +1 -1
  20. package/dist/vendor/zephyr3d/imgui/dist/index.d.ts +7 -0
  21. package/dist/vendor/zephyr3d/imgui/dist/index.js.map +1 -1
  22. package/dist/vendor/zephyr3d/scene/dist/animation/animation.js +87 -0
  23. package/dist/vendor/zephyr3d/scene/dist/animation/animation.js.map +1 -1
  24. package/dist/vendor/zephyr3d/scene/dist/animation/animationcontroller.js +503 -0
  25. package/dist/vendor/zephyr3d/scene/dist/animation/animationcontroller.js.map +1 -0
  26. package/dist/vendor/zephyr3d/scene/dist/animation/animationset.js +686 -63
  27. package/dist/vendor/zephyr3d/scene/dist/animation/animationset.js.map +1 -1
  28. package/dist/vendor/zephyr3d/scene/dist/animation/animationtimeline.js +974 -0
  29. package/dist/vendor/zephyr3d/scene/dist/animation/animationtimeline.js.map +1 -0
  30. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics_modifier.js +19 -19
  31. package/dist/vendor/zephyr3d/scene/dist/animation/joint_dynamics_modifier.js.map +1 -1
  32. package/dist/vendor/zephyr3d/scene/dist/app/engine.js +131 -131
  33. package/dist/vendor/zephyr3d/scene/dist/app/engine.js.map +1 -1
  34. package/dist/vendor/zephyr3d/scene/dist/app/scriptregistry.js +17 -12
  35. package/dist/vendor/zephyr3d/scene/dist/app/scriptregistry.js.map +1 -1
  36. package/dist/vendor/zephyr3d/scene/dist/asset/model.js +2 -1
  37. package/dist/vendor/zephyr3d/scene/dist/asset/model.js.map +1 -1
  38. package/dist/vendor/zephyr3d/scene/dist/avatar/wardrobe.js +13 -13
  39. package/dist/vendor/zephyr3d/scene/dist/avatar/wardrobe.js.map +1 -1
  40. package/dist/vendor/zephyr3d/scene/dist/camera/camera.js +201 -201
  41. package/dist/vendor/zephyr3d/scene/dist/camera/camera.js.map +1 -1
  42. package/dist/vendor/zephyr3d/scene/dist/index.d.ts +1271 -10
  43. package/dist/vendor/zephyr3d/scene/dist/index.js +3 -1
  44. package/dist/vendor/zephyr3d/scene/dist/index.js.map +1 -1
  45. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lightmodel/pbrmetallicroughness.js +5 -5
  46. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  47. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lit.js +7 -3
  48. package/dist/vendor/zephyr3d/scene/dist/material/mixins/lit.js.map +1 -1
  49. package/dist/vendor/zephyr3d/scene/dist/material/mtoon.js +4 -4
  50. package/dist/vendor/zephyr3d/scene/dist/material/mtoon.js.map +1 -1
  51. package/dist/vendor/zephyr3d/scene/dist/material/pbrblueprint.js +11 -11
  52. package/dist/vendor/zephyr3d/scene/dist/material/pbrblueprint.js.map +1 -1
  53. package/dist/vendor/zephyr3d/scene/dist/material/shader/helper.js +284 -284
  54. package/dist/vendor/zephyr3d/scene/dist/material/shader/helper.js.map +1 -1
  55. package/dist/vendor/zephyr3d/scene/dist/posteffect/ssr.js +9 -9
  56. package/dist/vendor/zephyr3d/scene/dist/posteffect/ssr.js.map +1 -1
  57. package/dist/vendor/zephyr3d/scene/dist/render/lightpass.js +5 -5
  58. package/dist/vendor/zephyr3d/scene/dist/render/lightpass.js.map +1 -1
  59. package/dist/vendor/zephyr3d/scene/dist/render/renderer.js +7 -7
  60. package/dist/vendor/zephyr3d/scene/dist/render/renderer.js.map +1 -1
  61. package/dist/vendor/zephyr3d/scene/dist/shadow/esm.js +1 -1
  62. package/dist/vendor/zephyr3d/scene/dist/shadow/esm.js.map +1 -1
  63. package/dist/vendor/zephyr3d/scene/dist/shadow/shadow_region.js +45 -45
  64. package/dist/vendor/zephyr3d/scene/dist/shadow/shadow_region.js.map +1 -1
  65. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/manager.js +276 -275
  66. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/manager.js.map +1 -1
  67. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/animation.js +4 -3
  68. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/animation.js.map +1 -1
  69. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/camera.js +1 -1
  70. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/camera.js.map +1 -1
  71. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/mesh.js.map +1 -1
  72. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/node.js +3 -2
  73. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/node.js.map +1 -1
  74. package/dist/vendor/zephyr3d/scene/dist/utility/serialization/scene/sprite.js.map +1 -1
  75. package/package.json +8 -8
@@ -45,24 +45,24 @@ const SSS_QUALITY_PRESET_SETTINGS = {
45
45
  normalCutoff: 0.72
46
46
  }
47
47
  };
48
- /**
49
- * A renderable camera node that manages view/projection math, frusta,
50
- * input control, picking, and a post-processing chain via a compositor.
51
- *
52
- * Key features:
53
- * - Maintains projection, view, VP, and inverse VP matrices and lazily recomputes them when invalidated.
54
- * - Provides world- and view-space frusta for culling and clipping.
55
- * - Supports perspective and orthographic projections.
56
- * - Integrates with post effects (Tonemap, FXAA, TAA, Bloom, SSR, SSS, SSAO, Motion Blur) through an internal `Compositor`.
57
- * - Handles temporal jitter and history state when TAA or motion blur are enabled.
58
- * - Emits picking rays from screen coordinates and supports async GPU picking.
59
- * - Optional controller integration for user input handling.
60
- *
61
- * Performance notes:
62
- * - Matrices/frusta are computed on demand and cached until invalidation.
63
- * - Temporal jitter and history are set up only when required by enabled features and device support.
64
- *
65
- * @public
48
+ /**
49
+ * A renderable camera node that manages view/projection math, frusta,
50
+ * input control, picking, and a post-processing chain via a compositor.
51
+ *
52
+ * Key features:
53
+ * - Maintains projection, view, VP, and inverse VP matrices and lazily recomputes them when invalidated.
54
+ * - Provides world- and view-space frusta for culling and clipping.
55
+ * - Supports perspective and orthographic projections.
56
+ * - Integrates with post effects (Tonemap, FXAA, TAA, Bloom, SSR, SSS, SSAO, Motion Blur) through an internal `Compositor`.
57
+ * - Handles temporal jitter and history state when TAA or motion blur are enabled.
58
+ * - Emits picking rays from screen coordinates and supports async GPU picking.
59
+ * - Optional controller integration for user input handling.
60
+ *
61
+ * Performance notes:
62
+ * - Matrices/frusta are computed on demand and cached until invalidation.
63
+ * - Temporal jitter and history are set up only when required by enabled features and device support.
64
+ *
65
+ * @public
66
66
  */ class Camera extends SceneNode {
67
67
  /** @internal Halton 2-3 sequence used for TAA jittering. */ static _halton23 = halton23(16);
68
68
  /** @internal Per-camera history resources. */ static _historyData = new WeakMap();
@@ -166,14 +166,14 @@ const SSS_QUALITY_PRESET_SETTINGS = {
166
166
  /** @internal Post-processing compositor attached to this camera. */ _compositor;
167
167
  /** @internal Pointer interaction rectangle in css pixels (relative to canvas) */ _interactionRect;
168
168
  /** @internal captured by which mouse button (-1 if not captured) */ _capturedButton;
169
- /**
170
- * Creates a new camera node.
171
- *
172
- * Initializes projection/view matrices, temporal fields, controller linkage, and
173
- * builds the default post-processing pipeline on the internal compositor.
174
- *
175
- * @param scene - The scene that owns this camera.
176
- * @param projectionMatrix - Optional projection matrix to initialize with.
169
+ /**
170
+ * Creates a new camera node.
171
+ *
172
+ * Initializes projection/view matrices, temporal fields, controller linkage, and
173
+ * builds the default post-processing pipeline on the internal compositor.
174
+ *
175
+ * @param scene - The scene that owns this camera.
176
+ * @param projectionMatrix - Optional projection matrix to initialize with.
177
177
  */ constructor(scene, projectionMatrix){
178
178
  super(scene);
179
179
  this._projMatrix = projectionMatrix || Matrix4x4.identity();
@@ -288,81 +288,81 @@ const SSS_QUALITY_PRESET_SETTINGS = {
288
288
  scene.mainCamera = this;
289
289
  }
290
290
  }
291
- /**
292
- * The compositor that owns and runs the camera's post-processing chain.
291
+ /**
292
+ * The compositor that owns and runs the camera's post-processing chain.
293
293
  */ get compositor() {
294
294
  return this._compositor;
295
295
  }
296
- /**
297
- * Pointer interaction rectangle in css pixels (relative to canvas)
296
+ /**
297
+ * Pointer interaction rectangle in css pixels (relative to canvas)
298
298
  */ get interactionRect() {
299
299
  return this._interactionRect;
300
300
  }
301
301
  set interactionRect(rect) {
302
302
  this._interactionRect = rect;
303
303
  }
304
- /**
305
- * Framebuffer clear color, or `null` to disable.
304
+ /**
305
+ * Framebuffer clear color, or `null` to disable.
306
306
  */ get clearColor() {
307
307
  return this._clearColor;
308
308
  }
309
309
  set clearColor(v) {
310
310
  this._clearColor = v?.clone() ?? null;
311
311
  }
312
- /**
313
- * Framebuffer stencil clear value, disabled when null. Default is 0.
312
+ /**
313
+ * Framebuffer stencil clear value, disabled when null. Default is 0.
314
314
  */ get clearDepth() {
315
315
  return this._clearDepth;
316
316
  }
317
317
  set clearDepth(v) {
318
318
  this._clearDepth = v;
319
319
  }
320
- /**
321
- * Framebuffer stencil clear value, disabled when null. Default is 0.
320
+ /**
321
+ * Framebuffer stencil clear value, disabled when null. Default is 0.
322
322
  */ get clearStencil() {
323
323
  return this._clearStencil;
324
324
  }
325
325
  set clearStencil(v) {
326
326
  this._clearStencil = v;
327
327
  }
328
- /**
329
- * Whether Hi-Z acceleration is enabled.
330
- *
331
- * Often improves SSR performance with little quality impact when supported.
328
+ /**
329
+ * Whether Hi-Z acceleration is enabled.
330
+ *
331
+ * Often improves SSR performance with little quality impact when supported.
332
332
  */ get HiZ() {
333
333
  return this._HiZ;
334
334
  }
335
335
  set HiZ(val) {
336
336
  this._HiZ = !!val;
337
337
  }
338
- /**
339
- * Render path used by the scene renderer.
338
+ /**
339
+ * Render path used by the scene renderer.
340
340
  */ get renderPath() {
341
341
  return this._renderPath;
342
342
  }
343
343
  set renderPath(_val) {
344
344
  this._renderPath = 'forward';
345
345
  }
346
- /**
347
- * Whether HDR backbuffer is enabled.
348
- *
349
- * Tonemap should be disabled when not using HDR backbuffer.
346
+ /**
347
+ * Whether HDR backbuffer is enabled.
348
+ *
349
+ * Tonemap should be disabled when not using HDR backbuffer.
350
350
  */ get HDR() {
351
351
  return this._HDR;
352
352
  }
353
353
  set HDR(val) {
354
354
  this._HDR = !!val;
355
355
  }
356
- /**
357
- * Whether tonemapping is enabled via the post effect.
356
+ /**
357
+ * Whether tonemapping is enabled via the post effect.
358
358
  */ get toneMap() {
359
359
  return this._postEffectTonemap.get().enabled;
360
360
  }
361
361
  set toneMap(val) {
362
362
  this._postEffectTonemap.get().enabled = !!val;
363
363
  }
364
- /**
365
- * Whether motion blur is enabled via the post effect.
364
+ /**
365
+ * Whether motion blur is enabled via the post effect.
366
366
  */ get motionBlur() {
367
367
  return this._postEffectMotionBlur.get().enabled;
368
368
  }
@@ -378,16 +378,16 @@ const SSS_QUALITY_PRESET_SETTINGS = {
378
378
  this._postEffectMotionBlur.get().strength = this._motionBlurStrength;
379
379
  }
380
380
  }
381
- /**
382
- * Gets whether Bloom is enabled.
381
+ /**
382
+ * Gets whether Bloom is enabled.
383
383
  */ get bloom() {
384
384
  return this._postEffectBloom.get().enabled;
385
385
  }
386
386
  set bloom(val) {
387
387
  this._postEffectBloom.get().enabled = !!val;
388
388
  }
389
- /**
390
- * Maximum bloom downsample levels
389
+ /**
390
+ * Maximum bloom downsample levels
391
391
  */ get bloomMaxDownsampleLevels() {
392
392
  return this._bloomMaxDownsampleLevels;
393
393
  }
@@ -397,8 +397,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
397
397
  this._postEffectBloom.get().maxDownsampleLevel = val;
398
398
  }
399
399
  }
400
- /**
401
- * Bloom downsample limit
400
+ /**
401
+ * Bloom downsample limit
402
402
  */ get bloomDownsampleLimit() {
403
403
  return this._bloomDownsampleLimit;
404
404
  }
@@ -408,8 +408,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
408
408
  this._postEffectBloom.get().downsampleLimit = val;
409
409
  }
410
410
  }
411
- /**
412
- * Bloom threshold
411
+ /**
412
+ * Bloom threshold
413
413
  */ get bloomThreshold() {
414
414
  return this._bloomThreshold;
415
415
  }
@@ -419,8 +419,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
419
419
  this._postEffectBloom.get().threshold = val;
420
420
  }
421
421
  }
422
- /**
423
- * Bloom threshold knee
422
+ /**
423
+ * Bloom threshold knee
424
424
  */ get bloomThresholdKnee() {
425
425
  return this._bloomThresholdKnee;
426
426
  }
@@ -430,8 +430,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
430
430
  this._postEffectBloom.get().thresholdKnee = val;
431
431
  }
432
432
  }
433
- /**
434
- * Bloom intensity
433
+ /**
434
+ * Bloom intensity
435
435
  */ get bloomIntensity() {
436
436
  return this._bloomIntensity;
437
437
  }
@@ -483,16 +483,16 @@ const SSS_QUALITY_PRESET_SETTINGS = {
483
483
  this._postEffectColorAdjust.get().sharpen = val;
484
484
  }
485
485
  }
486
- /**
487
- * Gets whether FXAA is enabled.
486
+ /**
487
+ * Gets whether FXAA is enabled.
488
488
  */ get FXAA() {
489
489
  return this._postEffectFXAA.get().enabled;
490
490
  }
491
491
  set FXAA(val) {
492
492
  this._postEffectFXAA.get().enabled = !!val;
493
493
  }
494
- /**
495
- * Tonemap exposure
494
+ /**
495
+ * Tonemap exposure
496
496
  */ get toneMapExposure() {
497
497
  return this._tonemapExposure;
498
498
  }
@@ -502,156 +502,156 @@ const SSS_QUALITY_PRESET_SETTINGS = {
502
502
  this._postEffectTonemap.get().exposure = val;
503
503
  }
504
504
  }
505
- /**
506
- * Gets whether TAA is enabled.
505
+ /**
506
+ * Gets whether TAA is enabled.
507
507
  */ get TAA() {
508
508
  return this._postEffectTAA.get().enabled;
509
509
  }
510
510
  set TAA(val) {
511
511
  this._postEffectTAA.get().enabled = !!val;
512
512
  }
513
- /**
514
- * Gets the debug flag for TAA
513
+ /**
514
+ * Gets the debug flag for TAA
515
515
  */ get TAADebug() {
516
516
  return this._TAADebug;
517
517
  }
518
518
  set TAADebug(val) {
519
519
  this._TAADebug = val;
520
520
  }
521
- /**
522
- * Enables cascade debug visualization for directional shadows.
521
+ /**
522
+ * Enables cascade debug visualization for directional shadows.
523
523
  */ get shadowDebugCascades() {
524
524
  return this._shadowDebugCascades;
525
525
  }
526
526
  set shadowDebugCascades(val) {
527
527
  this._shadowDebugCascades = !!val;
528
528
  }
529
- /**
530
- * Gets whether Screen Space Reflections (SSR) is enabled.
529
+ /**
530
+ * Gets whether Screen Space Reflections (SSR) is enabled.
531
531
  */ get SSR() {
532
532
  return this._postEffectSSR.get().enabled;
533
533
  }
534
534
  set SSR(val) {
535
535
  this._postEffectSSR.get().enabled = !!val;
536
536
  }
537
- /**
538
- * Gets the maximum roughness value for screen space reflections.
539
- * Controls the cutoff point where surfaces are considered too rough for SSR.
537
+ /**
538
+ * Gets the maximum roughness value for screen space reflections.
539
+ * Controls the cutoff point where surfaces are considered too rough for SSR.
540
540
  */ get ssrMaxRoughness() {
541
541
  return this._ssrMaxRoughness;
542
542
  }
543
543
  set ssrMaxRoughness(val) {
544
544
  this._ssrMaxRoughness = val;
545
545
  }
546
- /**
547
- * Gets the roughness factor for SSR calculations.
548
- * Affects how surface roughness influences reflection clarity.
546
+ /**
547
+ * Gets the roughness factor for SSR calculations.
548
+ * Affects how surface roughness influences reflection clarity.
549
549
  */ get ssrRoughnessFactor() {
550
550
  return this._ssrRoughnessFactor;
551
551
  }
552
552
  set ssrRoughnessFactor(val) {
553
553
  this._ssrRoughnessFactor = val;
554
554
  }
555
- /**
556
- * Gets the stride value for SSR ray marching.
557
- * Controls the step size during ray marching. Larger values improve performance but may miss details.
555
+ /**
556
+ * Gets the stride value for SSR ray marching.
557
+ * Controls the step size during ray marching. Larger values improve performance but may miss details.
558
558
  */ get ssrStride() {
559
559
  return this._ssrStride;
560
560
  }
561
561
  set ssrStride(val) {
562
562
  this._ssrStride = val;
563
563
  }
564
- /**
565
- * Gets the maximum distance for SSR ray marching.
566
- * Defines how far rays will travel when searching for reflection intersections.
564
+ /**
565
+ * Gets the maximum distance for SSR ray marching.
566
+ * Defines how far rays will travel when searching for reflection intersections.
567
567
  */ get ssrMaxDistance() {
568
568
  return this._ssrParams.x;
569
569
  }
570
570
  set ssrMaxDistance(val) {
571
571
  this._ssrParams.x = val;
572
572
  }
573
- /**
574
- * Gets the number of iterations for SSR ray marching.
575
- * Higher values provide more accurate reflections but impact performance.
573
+ /**
574
+ * Gets the number of iterations for SSR ray marching.
575
+ * Higher values provide more accurate reflections but impact performance.
576
576
  */ get ssrIterations() {
577
577
  return this._ssrParams.y;
578
578
  }
579
579
  set ssrIterations(val) {
580
580
  this._ssrParams.y = val;
581
581
  }
582
- /**
583
- * Gets the thickness value for SSR calculations.
584
- * Determines the thickness threshold for surfaces when calculating reflections.
582
+ /**
583
+ * Gets the thickness value for SSR calculations.
584
+ * Determines the thickness threshold for surfaces when calculating reflections.
585
585
  */ get ssrThickness() {
586
586
  return this._ssrParams.z;
587
587
  }
588
588
  set ssrThickness(val) {
589
589
  this._ssrParams.z = val;
590
590
  }
591
- /**
592
- * Gets whether SSR should calculate thickness automatically.
593
- * When enabled, the system will dynamically compute surface thickness for reflections.
591
+ /**
592
+ * Gets whether SSR should calculate thickness automatically.
593
+ * When enabled, the system will dynamically compute surface thickness for reflections.
594
594
  */ get ssrCalcThickness() {
595
595
  return this._ssrCalcThickness;
596
596
  }
597
597
  set ssrCalcThickness(val) {
598
598
  this._ssrCalcThickness = !!val;
599
599
  }
600
- /**
601
- * Gets the blur scale factor for SSR.
602
- * Controls the overall intensity of the blur effect applied to reflections.
600
+ /**
601
+ * Gets the blur scale factor for SSR.
602
+ * Controls the overall intensity of the blur effect applied to reflections.
603
603
  */ get ssrBlurScale() {
604
604
  return this._ssrBlurriness;
605
605
  }
606
606
  set ssrBlurScale(val) {
607
607
  this._ssrBlurriness = val;
608
608
  }
609
- /**
610
- * Gets the depth cutoff value for SSR blur.
611
- * Determines at what depth difference the blur effect should be reduced or eliminated.
609
+ /**
610
+ * Gets the depth cutoff value for SSR blur.
611
+ * Determines at what depth difference the blur effect should be reduced or eliminated.
612
612
  */ get ssrBlurDepthCutoff() {
613
613
  return this._ssrBlurDepthCutoff;
614
614
  }
615
615
  set ssrBlurDepthCutoff(val) {
616
616
  this._ssrBlurDepthCutoff = val;
617
617
  }
618
- /**
619
- * Gets the kernel size for the SSR blur effect.
620
- * Defines the size of the blur kernel. Larger values create softer, more spread-out blur.
618
+ /**
619
+ * Gets the kernel size for the SSR blur effect.
620
+ * Defines the size of the blur kernel. Larger values create softer, more spread-out blur.
621
621
  */ get ssrBlurKernelSize() {
622
622
  return this._ssrBlurKernelSize;
623
623
  }
624
624
  set ssrBlurKernelSize(val) {
625
625
  this._ssrBlurKernelSize = val;
626
626
  }
627
- /**
628
- * Gets the standard deviation for the SSR Gaussian blur.
629
- * Controls the distribution of the blur effect. Higher values create more pronounced blur.
627
+ /**
628
+ * Gets the standard deviation for the SSR Gaussian blur.
629
+ * Controls the distribution of the blur effect. Higher values create more pronounced blur.
630
630
  */ get ssrBlurStdDev() {
631
631
  return this._ssrBlurStdDev;
632
632
  }
633
633
  set ssrBlurStdDev(val) {
634
634
  this._ssrBlurStdDev = val;
635
635
  }
636
- /**
637
- * Gets whether SSR temporal accumulation is enabled.
636
+ /**
637
+ * Gets whether SSR temporal accumulation is enabled.
638
638
  */ get ssrTemporal() {
639
639
  return this._ssrTemporal;
640
640
  }
641
641
  set ssrTemporal(val) {
642
642
  this._ssrTemporal = !!val;
643
643
  }
644
- /**
645
- * Gets SSR temporal blending weight in [0, 1].
646
- * Higher values rely more on reprojected history.
644
+ /**
645
+ * Gets SSR temporal blending weight in [0, 1].
646
+ * Higher values rely more on reprojected history.
647
647
  */ get ssrTemporalWeight() {
648
648
  return this._ssrTemporalWeight;
649
649
  }
650
650
  set ssrTemporalWeight(val) {
651
651
  this._ssrTemporalWeight = Math.max(0, Math.min(1, val ?? 0));
652
652
  }
653
- /**
654
- * Gets whether Screen Space Subsurface Scattering (SSS) is enabled.
653
+ /**
654
+ * Gets whether Screen Space Subsurface Scattering (SSS) is enabled.
655
655
  */ get SSS() {
656
656
  return this._postEffectSSS.get().enabled;
657
657
  }
@@ -664,11 +664,11 @@ const SSS_QUALITY_PRESET_SETTINGS = {
664
664
  set sssBlurScale(val) {
665
665
  this._sssBlurScale = Math.max(0, val ?? 0);
666
666
  }
667
- /**
668
- * High-level quality preset for SSS blur controls.
669
- *
670
- * This is the primary user-facing SSS quality control and only affects
671
- * the blur sampling quality/performance tradeoff, not the authored look.
667
+ /**
668
+ * High-level quality preset for SSS blur controls.
669
+ *
670
+ * This is the primary user-facing SSS quality control and only affects
671
+ * the blur sampling quality/performance tradeoff, not the authored look.
672
672
  */ get sssQualityPreset() {
673
673
  return this._sssQualityPreset;
674
674
  }
@@ -715,8 +715,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
715
715
  /** @internal */ get ssrParams() {
716
716
  return this._ssrParams;
717
717
  }
718
- /**
719
- * Gets whether SSAO is enabled.
718
+ /**
719
+ * Gets whether SSAO is enabled.
720
720
  */ get SSAO() {
721
721
  return this._postEffectSSAO.get().enabled;
722
722
  }
@@ -856,27 +856,27 @@ const SSS_QUALITY_PRESET_SETTINGS = {
856
856
  }
857
857
  return this._viewport;
858
858
  }
859
- /**
860
- * Screen configuration used for adapting the camera viewport
859
+ /**
860
+ * Screen configuration used for adapting the camera viewport
861
861
  */ get screenConfig() {
862
862
  return this._screenAdapter.config;
863
863
  }
864
864
  set screenConfig(config) {
865
865
  this._screenAdapter.config = config;
866
866
  }
867
- /**
868
- * Screen viewport used for adapting the camera viewport
867
+ /**
868
+ * Screen viewport used for adapting the camera viewport
869
869
  */ get screenViewport() {
870
870
  return this._screenAdapter.viewport;
871
871
  }
872
872
  set screenViewport(viewport) {
873
873
  this._screenAdapter.viewport = viewport;
874
874
  }
875
- /**
876
- * Handle input events
877
- * @param ev - input event object
878
- * @param type - event type, default to ev.type
879
- * @returns Boolean value indicates whether the event was handled.
875
+ /**
876
+ * Handle input events
877
+ * @param ev - input event object
878
+ * @param type - event type, default to ev.type
879
+ * @returns Boolean value indicates whether the event was handled.
880
880
  */ handleEvent(ev, type) {
881
881
  let handled = false;
882
882
  if (this._controller) {
@@ -909,12 +909,12 @@ const SSS_QUALITY_PRESET_SETTINGS = {
909
909
  }
910
910
  return handled;
911
911
  }
912
- /**
913
- * Constructs a ray based on the given screen coordinates.
914
- *
915
- * @param x - The x-component of the screen coordinates, relative to the top-left corner of the viewport.
916
- * @param y - The y-component of the screen coordinates, relative to the top-left corner of the viewport.
917
- * @returns The ray originating from the camera position and passing through the given screen coordinates.
912
+ /**
913
+ * Constructs a ray based on the given screen coordinates.
914
+ *
915
+ * @param x - The x-component of the screen coordinates, relative to the top-left corner of the viewport.
916
+ * @param y - The y-component of the screen coordinates, relative to the top-left corner of the viewport.
917
+ * @returns The ray originating from the camera position and passing through the given screen coordinates.
918
918
  */ constructRay(x, y) {
919
919
  const width = this.viewport ? this.viewport[2] : getDevice().getViewport().width;
920
920
  const height = this.viewport ? this.viewport[3] : getDevice().getViewport().height;
@@ -932,54 +932,54 @@ const SSS_QUALITY_PRESET_SETTINGS = {
932
932
  const vDir = Vector3.sub(farWorld.xyz(), vEye).inplaceNormalize();
933
933
  return new Ray(vEye, vDir);
934
934
  }
935
- /**
936
- * Place the camera by specifying the camera position and the target point
937
- * @param eye - The camera position
938
- * @param target - The target point to look at
939
- * @param up - The up vector
940
- * @returns self
935
+ /**
936
+ * Place the camera by specifying the camera position and the target point
937
+ * @param eye - The camera position
938
+ * @param target - The target point to look at
939
+ * @param up - The up vector
940
+ * @returns self
941
941
  */ lookAt(eye, target, up) {
942
942
  return this.setLocalTransform(Matrix4x4.lookAt(eye, target, up));
943
943
  }
944
- /**
945
- * Place the camera to look at a given cube face at a given camera position
946
- * @param face - The cube face to look at
947
- * @param position - The camera position
948
- * @returns self
944
+ /**
945
+ * Place the camera to look at a given cube face at a given camera position
946
+ * @param face - The cube face to look at
947
+ * @param position - The camera position
948
+ * @returns self
949
949
  */ lookAtCubeFace(face, position) {
950
950
  return this.setLocalTransform(Matrix4x4.lookAtCubeFace(face, position ?? this.position));
951
951
  }
952
- /**
953
- * Setup a perspective projection matrix for the camera
954
- * @param fovY - The vertical field of view in radians.
955
- * @param aspect - The aspect ratio
956
- * @param zNear - The near clip plane
957
- * @param zFar - The far clip plane
958
- * @returns self
952
+ /**
953
+ * Setup a perspective projection matrix for the camera
954
+ * @param fovY - The vertical field of view in radians.
955
+ * @param aspect - The aspect ratio
956
+ * @param zNear - The near clip plane
957
+ * @param zFar - The far clip plane
958
+ * @returns self
959
959
  */ setPerspective(fovY, aspect, zNear, zFar) {
960
960
  this._projMatrix.perspective(fovY, aspect, zNear, zFar);
961
961
  Matrix4x4.invert(this._projMatrix, this._invProjMatrix);
962
962
  this._invalidate(true);
963
963
  return this;
964
964
  }
965
- /**
966
- * Setup a orthogonal projection matrix for the camera
967
- * @param left - Left bound of the frustum
968
- * @param right - Right bound of the frustum
969
- * @param bottom - Bottom bound of the frustum
970
- * @param top - Top bound of the frustum
971
- * @param near - Near bound of the frustum.
972
- * @param far - Far bound of the frustum.
973
- * @returns self
965
+ /**
966
+ * Setup a orthogonal projection matrix for the camera
967
+ * @param left - Left bound of the frustum
968
+ * @param right - Right bound of the frustum
969
+ * @param bottom - Bottom bound of the frustum
970
+ * @param top - Top bound of the frustum
971
+ * @param near - Near bound of the frustum.
972
+ * @param far - Far bound of the frustum.
973
+ * @returns self
974
974
  */ setOrtho(left, right, bottom, top, near, far) {
975
975
  this._projMatrix.ortho(left, right, bottom, top, near, far);
976
976
  Matrix4x4.invert(this._projMatrix, this._invProjMatrix);
977
977
  this._invalidate(true);
978
978
  return this;
979
979
  }
980
- /**
981
- * Setup a projection matrix for the camera
982
- * @param matrix - The projection matrix
980
+ /**
981
+ * Setup a projection matrix for the camera
982
+ * @param matrix - The projection matrix
983
983
  */ setProjectionMatrix(matrix) {
984
984
  if (matrix && matrix !== this._projMatrix) {
985
985
  this._projMatrix = matrix;
@@ -987,18 +987,18 @@ const SSS_QUALITY_PRESET_SETTINGS = {
987
987
  this._invalidate(true);
988
988
  }
989
989
  }
990
- /**
991
- * Gets the projection matrix of the camera
992
- * @returns The projection matrix
990
+ /**
991
+ * Gets the projection matrix of the camera
992
+ * @returns The projection matrix
993
993
  */ getProjectionMatrix() {
994
994
  if (this.dirtyCheck()) {
995
995
  this._compute();
996
996
  }
997
997
  return this._projMatrix;
998
998
  }
999
- /**
1000
- * Gets the inverse projection matrix of the camera
1001
- * @returns The projection matrix
999
+ /**
1000
+ * Gets the inverse projection matrix of the camera
1001
+ * @returns The projection matrix
1002
1002
  */ getInvProjectionMatrix() {
1003
1003
  if (this.dirtyCheck()) {
1004
1004
  this._compute();
@@ -1016,11 +1016,11 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1016
1016
  rotationMatrix.setRow(2, new Vector4(zAxis.x, zAxis.y, zAxis.z, 0));
1017
1017
  return rotationMatrix;
1018
1018
  }
1019
- /**
1020
- * View matrix of the camera
1021
- *
1022
- * @remarks
1023
- * Camera's view matrix will transform a point from the world space to the camera space
1019
+ /**
1020
+ * View matrix of the camera
1021
+ *
1022
+ * @remarks
1023
+ * Camera's view matrix will transform a point from the world space to the camera space
1024
1024
  */ get viewMatrix() {
1025
1025
  if (this.dirtyCheck()) {
1026
1026
  this._compute();
@@ -1033,11 +1033,11 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1033
1033
  }
1034
1034
  return this._viewProjMatrix;
1035
1035
  }
1036
- /**
1037
- * The inverse-view-projection matrix of the camera
1038
- *
1039
- * @remarks
1040
- * The inverse-view-projection matrix transforms a point from the clip space to the camera space
1036
+ /**
1037
+ * The inverse-view-projection matrix of the camera
1038
+ *
1039
+ * @remarks
1040
+ * The inverse-view-projection matrix transforms a point from the clip space to the camera space
1041
1041
  */ get invViewProjectionMatrix() {
1042
1042
  if (this.dirtyCheck()) {
1043
1043
  this._compute();
@@ -1089,9 +1089,9 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1089
1089
  /** Returns true if the camera is orthographic */ isOrtho() {
1090
1090
  return this.getProjectionMatrix().isOrtho();
1091
1091
  }
1092
- /**
1093
- * Gets the camera history data which is used in temporal reprojection
1094
- * @returns Camera history data
1092
+ /**
1093
+ * Gets the camera history data which is used in temporal reprojection
1094
+ * @returns Camera history data
1095
1095
  */ getHistoryData() {
1096
1096
  let data = Camera._historyData.get(this);
1097
1097
  if (!data) {
@@ -1105,8 +1105,8 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1105
1105
  }
1106
1106
  return data;
1107
1107
  }
1108
- /**
1109
- * Clears the camera history data which is used in temporal reprojection
1108
+ /**
1109
+ * Clears the camera history data which is used in temporal reprojection
1110
1110
  */ clearHistoryData() {
1111
1111
  const data = Camera._historyData.get(this);
1112
1112
  if (data) {
@@ -1220,10 +1220,10 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1220
1220
  this._sssResolvedSettings.blurDepthCutoff = source.blurDepthCutoff;
1221
1221
  this._sssResolvedSettings.normalCutoff = source.normalCutoff;
1222
1222
  }
1223
- /**
1224
- * Renders a scene
1225
- * @param scene - The scene to be rendered
1226
- * @param compositor - Compositor instance that will be used to apply postprocess effects
1223
+ /**
1224
+ * Renders a scene
1225
+ * @param scene - The scene to be rendered
1226
+ * @param compositor - Compositor instance that will be used to apply postprocess effects
1227
1227
  */ render(scene) {
1228
1228
  const device = getDevice();
1229
1229
  //this.updatePostProcessing(device);
@@ -1297,13 +1297,13 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1297
1297
  /** @internal */ getPickPosY() {
1298
1298
  return this._pickPosY;
1299
1299
  }
1300
- /**
1301
- * Updates the controller state
1300
+ /**
1301
+ * Updates the controller state
1302
1302
  */ updateController() {
1303
1303
  this._controller?.update();
1304
1304
  }
1305
- /**
1306
- * Reset the controller
1305
+ /**
1306
+ * Reset the controller
1307
1307
  */ resetController() {
1308
1308
  this._controller?.reset();
1309
1309
  }
@@ -1328,15 +1328,15 @@ const SSS_QUALITY_PRESET_SETTINGS = {
1328
1328
  /** @internal */ get prevPosition() {
1329
1329
  return this._prevPosition;
1330
1330
  }
1331
- /**
1332
- * Gets the camera history resource manager for temporal effects.
1331
+ /**
1332
+ * Gets the camera history resource manager for temporal effects.
1333
1333
  */ getHistoryResourceManager() {
1334
1334
  return Camera._historyResourceManager.get(this) ?? null;
1335
1335
  }
1336
- /**
1337
- * Sets the camera history resource manager for temporal effects.
1338
- *
1339
- * @internal
1336
+ /**
1337
+ * Sets the camera history resource manager for temporal effects.
1338
+ *
1339
+ * @internal
1340
1340
  */ setHistoryResourceManager(manager) {
1341
1341
  Camera._historyResourceManager.set(this, manager);
1342
1342
  }