@playcanvas/web-components 0.2.3 → 0.2.4
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.cjs +6 -3
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +6 -3
- 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 +6 -3
- package/dist/pwc.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/sound-slot.ts +5 -3
- package/src/sky.ts +1 -0
package/package.json
CHANGED
|
@@ -50,7 +50,6 @@ class SoundSlotElement extends AsyncElement {
|
|
|
50
50
|
|
|
51
51
|
this.soundSlot = this.soundElement!.component!.addSlot(this._name, options);
|
|
52
52
|
this.asset = this._asset;
|
|
53
|
-
this.soundSlot!.play();
|
|
54
53
|
|
|
55
54
|
this._onReady();
|
|
56
55
|
}
|
|
@@ -245,7 +244,7 @@ class SoundSlotElement extends AsyncElement {
|
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
static get observedAttributes() {
|
|
248
|
-
return ['asset', '
|
|
247
|
+
return ['asset', 'auto-play', 'duration', 'loop', 'name', 'overlap', 'pitch', 'start-time', 'volume'];
|
|
249
248
|
}
|
|
250
249
|
|
|
251
250
|
attributeChangedCallback(name: string, _oldValue: string, newValue: string) {
|
|
@@ -253,6 +252,9 @@ class SoundSlotElement extends AsyncElement {
|
|
|
253
252
|
case 'asset':
|
|
254
253
|
this.asset = newValue;
|
|
255
254
|
break;
|
|
255
|
+
case 'auto-play':
|
|
256
|
+
this.autoPlay = this.hasAttribute('auto-play');
|
|
257
|
+
break;
|
|
256
258
|
case 'duration':
|
|
257
259
|
this.duration = parseFloat(newValue);
|
|
258
260
|
break;
|
|
@@ -268,7 +270,7 @@ class SoundSlotElement extends AsyncElement {
|
|
|
268
270
|
case 'pitch':
|
|
269
271
|
this.pitch = parseFloat(newValue);
|
|
270
272
|
break;
|
|
271
|
-
case '
|
|
273
|
+
case 'start-time':
|
|
272
274
|
this.startTime = parseFloat(newValue);
|
|
273
275
|
break;
|
|
274
276
|
case 'volume':
|
package/src/sky.ts
CHANGED
|
@@ -61,6 +61,7 @@ class SkyElement extends AsyncElement {
|
|
|
61
61
|
this._scene.sky.node.setLocalScale(this._scale);
|
|
62
62
|
this._scene.sky.center = this._center;
|
|
63
63
|
this._scene.skyboxIntensity = this._intensity;
|
|
64
|
+
this._scene.skyboxMip = this._level;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
private async _loadSkybox() {
|