@playcanvas/web-components 0.2.10 → 0.2.12

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.10",
3
+ "version": "0.2.12",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://playcanvas.com",
6
6
  "description": "Web Components for the PlayCanvas Engine",
@@ -39,26 +39,26 @@
39
39
  "devDependencies": {
40
40
  "@mediapipe/tasks-vision": "0.10.21",
41
41
  "@playcanvas/eslint-config": "2.1.0",
42
- "@rollup/plugin-commonjs": "28.0.6",
43
- "@rollup/plugin-node-resolve": "16.0.1",
42
+ "@rollup/plugin-commonjs": "29.0.0",
43
+ "@rollup/plugin-node-resolve": "16.0.3",
44
44
  "@rollup/plugin-terser": "0.4.4",
45
- "@rollup/plugin-typescript": "12.1.4",
45
+ "@rollup/plugin-typescript": "12.3.0",
46
46
  "@tweenjs/tween.js": "25.0.0",
47
- "@typescript-eslint/eslint-plugin": "8.42.0",
48
- "@typescript-eslint/parser": "8.42.0",
47
+ "@typescript-eslint/eslint-plugin": "8.49.0",
48
+ "@typescript-eslint/parser": "8.49.0",
49
49
  "concurrently": "9.2.1",
50
50
  "earcut": "3.0.2",
51
- "eslint": "9.34.0",
51
+ "eslint": "9.39.2",
52
52
  "eslint-import-resolver-typescript": "4.4.4",
53
- "globals": "16.3.0",
54
- "mediabunny": "1.13.0",
53
+ "globals": "16.5.0",
54
+ "mediabunny": "1.26.0",
55
55
  "opentype.js": "1.3.4",
56
- "playcanvas": "2.11.0",
57
- "rollup": "4.50.0",
58
- "serve": "14.2.4",
56
+ "playcanvas": "2.14.3",
57
+ "rollup": "4.53.3",
58
+ "serve": "14.2.5",
59
59
  "tslib": "2.8.1",
60
- "typedoc": "0.28.12",
61
- "typedoc-plugin-mdn-links": "5.0.9",
62
- "typescript": "5.9.2"
60
+ "typedoc": "0.28.15",
61
+ "typedoc-plugin-mdn-links": "5.0.10",
62
+ "typescript": "5.9.3"
63
63
  }
64
64
  }
@@ -16,6 +16,8 @@ class SplatComponentElement extends ComponentElement {
16
16
 
17
17
  private _castShadows = false;
18
18
 
19
+ private _unified = false;
20
+
19
21
  /** @ignore */
20
22
  constructor() {
21
23
  super('gsplat');
@@ -24,7 +26,8 @@ class SplatComponentElement extends ComponentElement {
24
26
  getInitialComponentData() {
25
27
  return {
26
28
  asset: AssetElement.get(this._asset),
27
- castShadows: this._castShadows
29
+ castShadows: this._castShadows,
30
+ unified: this._unified
28
31
  };
29
32
  }
30
33
 
@@ -75,11 +78,36 @@ class SplatComponentElement extends ComponentElement {
75
78
  return this._castShadows;
76
79
  }
77
80
 
81
+ /**
82
+ * Sets whether the splat supports global sorting and LOD streaming. This property can only be
83
+ * changed when the component is disabled.
84
+ * @param value - Whether the splat supports global sorting and LOD streaming.
85
+ */
86
+ set unified(value: boolean) {
87
+ if (this.component && this.component.enabled) {
88
+ console.warn('The "unified" property can only be changed when the component is disabled.');
89
+ return;
90
+ }
91
+ this._unified = value;
92
+ if (this.component) {
93
+ this.component.unified = value;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Gets whether the splat supports global sorting and LOD streaming.
99
+ * @returns Whether the splat supports global sorting and LOD streaming.
100
+ */
101
+ get unified() {
102
+ return this._unified;
103
+ }
104
+
78
105
  static get observedAttributes() {
79
106
  return [
80
107
  ...super.observedAttributes,
81
108
  'asset',
82
- 'cast-shadows'
109
+ 'cast-shadows',
110
+ 'unified'
83
111
  ];
84
112
  }
85
113
 
@@ -93,6 +121,9 @@ class SplatComponentElement extends ComponentElement {
93
121
  case 'cast-shadows':
94
122
  this.castShadows = this.hasAttribute('cast-shadows');
95
123
  break;
124
+ case 'unified':
125
+ this.unified = this.hasAttribute('unified');
126
+ break;
96
127
  }
97
128
  }
98
129
  }