@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/dist/components/splat-component.d.ts +13 -0
- package/dist/pwc.cjs +30 -2
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +30 -2
- package/dist/pwc.js.map +1 -1
- package/dist/pwc.min.js +1 -1
- package/dist/pwc.min.js.map +1 -1
- package/dist/pwc.mjs +30 -2
- package/dist/pwc.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/splat-component.ts +33 -2
package/dist/pwc.js
CHANGED
|
@@ -4261,11 +4261,13 @@
|
|
|
4261
4261
|
super('gsplat');
|
|
4262
4262
|
this._asset = '';
|
|
4263
4263
|
this._castShadows = false;
|
|
4264
|
+
this._unified = false;
|
|
4264
4265
|
}
|
|
4265
4266
|
getInitialComponentData() {
|
|
4266
4267
|
return {
|
|
4267
4268
|
asset: AssetElement.get(this._asset),
|
|
4268
|
-
castShadows: this._castShadows
|
|
4269
|
+
castShadows: this._castShadows,
|
|
4270
|
+
unified: this._unified
|
|
4269
4271
|
};
|
|
4270
4272
|
}
|
|
4271
4273
|
/**
|
|
@@ -4310,11 +4312,34 @@
|
|
|
4310
4312
|
get castShadows() {
|
|
4311
4313
|
return this._castShadows;
|
|
4312
4314
|
}
|
|
4315
|
+
/**
|
|
4316
|
+
* Sets whether the splat supports global sorting and LOD streaming. This property can only be
|
|
4317
|
+
* changed when the component is disabled.
|
|
4318
|
+
* @param value - Whether the splat supports global sorting and LOD streaming.
|
|
4319
|
+
*/
|
|
4320
|
+
set unified(value) {
|
|
4321
|
+
if (this.component && this.component.enabled) {
|
|
4322
|
+
console.warn('The "unified" property can only be changed when the component is disabled.');
|
|
4323
|
+
return;
|
|
4324
|
+
}
|
|
4325
|
+
this._unified = value;
|
|
4326
|
+
if (this.component) {
|
|
4327
|
+
this.component.unified = value;
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
/**
|
|
4331
|
+
* Gets whether the splat supports global sorting and LOD streaming.
|
|
4332
|
+
* @returns Whether the splat supports global sorting and LOD streaming.
|
|
4333
|
+
*/
|
|
4334
|
+
get unified() {
|
|
4335
|
+
return this._unified;
|
|
4336
|
+
}
|
|
4313
4337
|
static get observedAttributes() {
|
|
4314
4338
|
return [
|
|
4315
4339
|
...super.observedAttributes,
|
|
4316
4340
|
'asset',
|
|
4317
|
-
'cast-shadows'
|
|
4341
|
+
'cast-shadows',
|
|
4342
|
+
'unified'
|
|
4318
4343
|
];
|
|
4319
4344
|
}
|
|
4320
4345
|
attributeChangedCallback(name, _oldValue, newValue) {
|
|
@@ -4326,6 +4351,9 @@
|
|
|
4326
4351
|
case 'cast-shadows':
|
|
4327
4352
|
this.castShadows = this.hasAttribute('cast-shadows');
|
|
4328
4353
|
break;
|
|
4354
|
+
case 'unified':
|
|
4355
|
+
this.unified = this.hasAttribute('unified');
|
|
4356
|
+
break;
|
|
4329
4357
|
}
|
|
4330
4358
|
}
|
|
4331
4359
|
}
|