@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/web-components",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://playcanvas.com",
6
6
  "description": "Web Components for the PlayCanvas Engine",
@@ -40,24 +40,24 @@
40
40
  "@mediapipe/tasks-vision": "0.10.21",
41
41
  "@playcanvas/eslint-config": "2.0.9",
42
42
  "@rollup/plugin-commonjs": "28.0.3",
43
- "@rollup/plugin-node-resolve": "16.0.0",
43
+ "@rollup/plugin-node-resolve": "16.0.1",
44
44
  "@rollup/plugin-terser": "0.4.4",
45
45
  "@rollup/plugin-typescript": "12.1.2",
46
46
  "@tweenjs/tween.js": "25.0.0",
47
- "@typescript-eslint/eslint-plugin": "8.26.1",
48
- "@typescript-eslint/parser": "8.26.1",
47
+ "@typescript-eslint/eslint-plugin": "8.28.0",
48
+ "@typescript-eslint/parser": "8.28.0",
49
49
  "concurrently": "9.1.2",
50
50
  "earcut": "3.0.1",
51
- "eslint": "9.22.0",
52
- "eslint-import-resolver-typescript": "3.8.4",
51
+ "eslint": "9.23.0",
52
+ "eslint-import-resolver-typescript": "4.2.2",
53
53
  "globals": "16.0.0",
54
54
  "mp4-muxer": "5.2.0",
55
55
  "opentype.js": "1.3.4",
56
- "playcanvas": "2.5.1",
57
- "rollup": "4.35.0",
56
+ "playcanvas": "2.6.0",
57
+ "rollup": "4.37.0",
58
58
  "serve": "14.2.4",
59
59
  "tslib": "2.8.1",
60
- "typedoc": "0.27.9",
60
+ "typedoc": "0.28.1",
61
61
  "typedoc-plugin-mdn-links": "5.0.1",
62
62
  "typescript": "5.8.2"
63
63
  }
package/src/asset.ts CHANGED
@@ -28,7 +28,7 @@ const extToType = new Map([
28
28
  const processBufferView = (
29
29
  gltfBuffer: any,
30
30
  buffers: Array<any>,
31
- continuation: (err: string, result: any) => void
31
+ continuation: (err: string | null, result: any) => void
32
32
  ) => {
33
33
  if (gltfBuffer.extensions && gltfBuffer.extensions.EXT_meshopt_compression) {
34
34
  const extensionDef = gltfBuffer.extensions.EXT_meshopt_compression;
@@ -52,6 +52,8 @@ class LightComponentElement extends ComponentElement {
52
52
 
53
53
  private _vsmBias = 0.01;
54
54
 
55
+ private _vsmBlurSize = 11;
56
+
55
57
  /** @ignore */
56
58
  constructor() {
57
59
  super('light');
@@ -72,7 +74,8 @@ class LightComponentElement extends ComponentElement {
72
74
  shadowResolution: this._shadowResolution,
73
75
  shadowType: shadowTypes.get(this._shadowType),
74
76
  type: this._type,
75
- vsmBias: this._vsmBias
77
+ vsmBias: this._vsmBias,
78
+ vsmBlurSize: this._vsmBlurSize
76
79
  };
77
80
  }
78
81
 
@@ -365,6 +368,25 @@ class LightComponentElement extends ComponentElement {
365
368
  return this._vsmBias;
366
369
  }
367
370
 
371
+ /**
372
+ * Sets the VSM blur size of the light. Minimum is 1, maximum is 25. Default is 11.
373
+ * @param value - The VSM blur size.
374
+ */
375
+ set vsmBlurSize(value: number) {
376
+ this._vsmBlurSize = value;
377
+ if (this.component) {
378
+ this.component.vsmBlurSize = value;
379
+ }
380
+ }
381
+
382
+ /**
383
+ * Gets the VSM blur size of the light.
384
+ * @returns The VSM blur size.
385
+ */
386
+ get vsmBlurSize() {
387
+ return this._vsmBlurSize;
388
+ }
389
+
368
390
  static get observedAttributes() {
369
391
  return [
370
392
  ...super.observedAttributes,
@@ -381,7 +403,8 @@ class LightComponentElement extends ComponentElement {
381
403
  'shadow-resolution',
382
404
  'shadow-type',
383
405
  'type',
384
- 'vsm-bias'
406
+ 'vsm-bias',
407
+ 'vsm-blur-size'
385
408
  ];
386
409
  }
387
410
 
@@ -431,6 +454,9 @@ class LightComponentElement extends ComponentElement {
431
454
  case 'vsm-bias':
432
455
  this.vsmBias = Number(newValue);
433
456
  break;
457
+ case 'vsm-blur-size':
458
+ this.vsmBlurSize = Number(newValue);
459
+ break;
434
460
  }
435
461
  }
436
462
  }