@playcanvas/web-components 0.2.4 → 0.2.5

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/pwc.js CHANGED
@@ -2354,6 +2354,7 @@
2354
2354
  this._shadowType = 'pcf3-32f';
2355
2355
  this._type = 'directional';
2356
2356
  this._vsmBias = 0.01;
2357
+ this._vsmBlurSize = 11;
2357
2358
  }
2358
2359
  getInitialComponentData() {
2359
2360
  return {
@@ -2370,7 +2371,8 @@
2370
2371
  shadowResolution: this._shadowResolution,
2371
2372
  shadowType: shadowTypes.get(this._shadowType),
2372
2373
  type: this._type,
2373
- vsmBias: this._vsmBias
2374
+ vsmBias: this._vsmBias,
2375
+ vsmBlurSize: this._vsmBlurSize
2374
2376
  };
2375
2377
  }
2376
2378
  /**
@@ -2633,6 +2635,23 @@
2633
2635
  get vsmBias() {
2634
2636
  return this._vsmBias;
2635
2637
  }
2638
+ /**
2639
+ * Sets the VSM blur size of the light. Minimum is 1, maximum is 25. Default is 11.
2640
+ * @param value - The VSM blur size.
2641
+ */
2642
+ set vsmBlurSize(value) {
2643
+ this._vsmBlurSize = value;
2644
+ if (this.component) {
2645
+ this.component.vsmBlurSize = value;
2646
+ }
2647
+ }
2648
+ /**
2649
+ * Gets the VSM blur size of the light.
2650
+ * @returns The VSM blur size.
2651
+ */
2652
+ get vsmBlurSize() {
2653
+ return this._vsmBlurSize;
2654
+ }
2636
2655
  static get observedAttributes() {
2637
2656
  return [
2638
2657
  ...super.observedAttributes,
@@ -2649,7 +2668,8 @@
2649
2668
  'shadow-resolution',
2650
2669
  'shadow-type',
2651
2670
  'type',
2652
- 'vsm-bias'
2671
+ 'vsm-bias',
2672
+ 'vsm-blur-size'
2653
2673
  ];
2654
2674
  }
2655
2675
  attributeChangedCallback(name, _oldValue, newValue) {
@@ -2697,6 +2717,9 @@
2697
2717
  case 'vsm-bias':
2698
2718
  this.vsmBias = Number(newValue);
2699
2719
  break;
2720
+ case 'vsm-blur-size':
2721
+ this.vsmBlurSize = Number(newValue);
2722
+ break;
2700
2723
  }
2701
2724
  }
2702
2725
  }