@playcanvas/web-components 0.1.11 → 0.1.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.
Files changed (55) hide show
  1. package/README.md +31 -303
  2. package/dist/app.d.ts +4 -1
  3. package/dist/asset.d.ts +3 -2
  4. package/dist/components/camera-component.d.ts +4 -3
  5. package/dist/components/collision-component.d.ts +4 -3
  6. package/dist/components/element-component.d.ts +84 -3
  7. package/dist/components/light-component.d.ts +4 -3
  8. package/dist/components/listener-component.d.ts +4 -3
  9. package/dist/components/render-component.d.ts +4 -3
  10. package/dist/components/rigidbody-component.d.ts +5 -4
  11. package/dist/components/screen-component.d.ts +4 -3
  12. package/dist/components/script-component.d.ts +4 -3
  13. package/dist/components/sound-component.d.ts +4 -3
  14. package/dist/components/sound-slot.d.ts +2 -2
  15. package/dist/components/splat-component.d.ts +36 -0
  16. package/dist/entity.d.ts +3 -2
  17. package/dist/index.d.ts +2 -2
  18. package/dist/material.d.ts +3 -2
  19. package/dist/model.d.ts +6 -5
  20. package/dist/module.d.ts +3 -2
  21. package/dist/pwc.cjs +238 -65
  22. package/dist/pwc.cjs.map +1 -1
  23. package/dist/pwc.js +238 -65
  24. package/dist/pwc.js.map +1 -1
  25. package/dist/pwc.min.js +1 -1
  26. package/dist/pwc.min.js.map +1 -1
  27. package/dist/pwc.mjs +238 -65
  28. package/dist/pwc.mjs.map +1 -1
  29. package/dist/scene.d.ts +3 -2
  30. package/dist/sky.d.ts +64 -0
  31. package/package.json +23 -23
  32. package/src/app.ts +14 -10
  33. package/src/asset.ts +3 -2
  34. package/src/components/camera-component.ts +4 -3
  35. package/src/components/collision-component.ts +4 -3
  36. package/src/components/element-component.ts +84 -3
  37. package/src/components/light-component.ts +4 -3
  38. package/src/components/listener-component.ts +4 -3
  39. package/src/components/render-component.ts +4 -3
  40. package/src/components/rigidbody-component.ts +5 -4
  41. package/src/components/screen-component.ts +4 -3
  42. package/src/components/script-component.ts +4 -3
  43. package/src/components/sound-component.ts +4 -3
  44. package/src/components/sound-slot.ts +2 -2
  45. package/src/components/{gsplat-component.ts → splat-component.ts} +17 -8
  46. package/src/entity.ts +3 -2
  47. package/src/index.ts +2 -2
  48. package/src/material.ts +6 -5
  49. package/src/model.ts +8 -7
  50. package/src/module.ts +3 -2
  51. package/src/scene.ts +3 -2
  52. package/src/sky.ts +64 -0
  53. package/dist/components/gsplat-component.d.ts +0 -27
  54. package/dist/fog.d.ts +0 -28
  55. package/src/fog.ts +0 -121
package/dist/pwc.js CHANGED
@@ -42,8 +42,9 @@
42
42
 
43
43
  /**
44
44
  * The ModuleElement interface provides properties and methods for manipulating
45
- * `<pc-module>` elements. The ModuleElement interface also inherits the properties and
46
- * methods of the {@link HTMLElement} interface.
45
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-module/ | `<pc-module>`} elements.
46
+ * The ModuleElement interface also inherits the properties and methods of the
47
+ * {@link HTMLElement} interface.
47
48
  */
48
49
  class ModuleElement extends HTMLElement {
49
50
  /** @ignore */
@@ -81,7 +82,10 @@
81
82
  customElements.define('pc-module', ModuleElement);
82
83
 
83
84
  /**
84
- * The main application element.
85
+ * The AppElement interface provides properties and methods for manipulating
86
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-app/ | `<pc-app>`} elements.
87
+ * The AppElement interface also inherits the properties and methods of the
88
+ * {@link HTMLElement} interface.
85
89
  */
86
90
  class AppElement extends AsyncElement {
87
91
  /**
@@ -240,13 +244,14 @@
240
244
  // Get the currently hovered entity by walking up the hierarchy
241
245
  let newHoverEntity = null;
242
246
  if (selection.length > 0) {
243
- let node = selection[0].node;
244
- while (node && !newHoverEntity) {
245
- const entityElement = this.querySelector(`pc-entity[name="${node.name}"]`);
247
+ let currentNode = selection[0].node;
248
+ while (currentNode !== null) {
249
+ const entityElement = this.querySelector(`pc-entity[name="${currentNode.name}"]`);
246
250
  if (entityElement) {
247
251
  newHoverEntity = entityElement;
252
+ break;
248
253
  }
249
- node = node.parent;
254
+ currentNode = currentNode.parent;
250
255
  }
251
256
  }
252
257
  // Handle enter/leave events
@@ -277,14 +282,14 @@
277
282
  this._picker.prepare(camera, this.app.scene);
278
283
  const selection = this._picker.getSelection(x, y);
279
284
  if (selection.length > 0) {
280
- let node = selection[0].node;
281
- while (node) {
282
- const entityElement = this.querySelector(`pc-entity[name="${node.name}"]`);
285
+ let currentNode = selection[0].node;
286
+ while (currentNode !== null) {
287
+ const entityElement = this.querySelector(`pc-entity[name="${currentNode.name}"]`);
283
288
  if (entityElement && entityElement.hasListeners('pointerdown')) {
284
289
  entityElement.dispatchEvent(new PointerEvent('pointerdown', event));
285
290
  break;
286
291
  }
287
- node = node.parent;
292
+ currentNode = currentNode.parent;
288
293
  }
289
294
  }
290
295
  }
@@ -653,8 +658,9 @@
653
658
 
654
659
  /**
655
660
  * The EntityElement interface provides properties and methods for manipulating
656
- * `<pc-entity>` elements. The EntityElement interface also inherits the properties and
657
- * methods of the {@link HTMLElement} interface.
661
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-entity/ | `<pc-entity>`} elements.
662
+ * The EntityElement interface also inherits the properties and methods of the
663
+ * {@link HTMLElement} interface.
658
664
  */
659
665
  class EntityElement extends AsyncElement {
660
666
  constructor() {
@@ -992,8 +998,9 @@
992
998
  ]);
993
999
  /**
994
1000
  * The AssetElement interface provides properties and methods for manipulating
995
- * `<pc-asset>` elements. The AssetElement interface also inherits the properties and
996
- * methods of the {@link HTMLElement} interface.
1001
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-asset/ | `<pc-asset>`} elements.
1002
+ * The AssetElement interface also inherits the properties and methods of the
1003
+ * {@link HTMLElement} interface.
997
1004
  */
998
1005
  class AssetElement extends HTMLElement {
999
1006
  constructor() {
@@ -1142,8 +1149,9 @@
1142
1149
 
1143
1150
  /**
1144
1151
  * The ListenerComponentElement interface provides properties and methods for manipulating
1145
- * `<pc-listener>` elements. The ListenerComponentElement interface also inherits the properties
1146
- * and methods of the {@link HTMLElement} interface.
1152
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-listener/ | `<pc-listener>`} elements.
1153
+ * The ListenerComponentElement interface also inherits the properties and methods of the
1154
+ * {@link HTMLElement} interface.
1147
1155
  *
1148
1156
  * @category Components
1149
1157
  */
@@ -1153,7 +1161,7 @@
1153
1161
  super('audiolistener');
1154
1162
  }
1155
1163
  /**
1156
- * Gets the audio listener component.
1164
+ * Gets the underlying PlayCanvas audio listener component.
1157
1165
  * @returns The audio listener component.
1158
1166
  */
1159
1167
  get component() {
@@ -1173,8 +1181,9 @@
1173
1181
  ]);
1174
1182
  /**
1175
1183
  * The CameraComponentElement interface provides properties and methods for manipulating
1176
- * `<pc-camera>` elements. The CameraComponentElement interface also inherits the properties and
1177
- * methods of the {@link HTMLElement} interface.
1184
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-camera/ | `<pc-camera>`} elements.
1185
+ * The CameraComponentElement interface also inherits the properties and methods of the
1186
+ * {@link HTMLElement} interface.
1178
1187
  *
1179
1188
  * @category Components
1180
1189
  */
@@ -1244,7 +1253,7 @@
1244
1253
  }
1245
1254
  }
1246
1255
  /**
1247
- * Gets the camera component.
1256
+ * Gets the underlying PlayCanvas camera component.
1248
1257
  * @returns The camera component.
1249
1258
  */
1250
1259
  get component() {
@@ -1645,8 +1654,9 @@
1645
1654
 
1646
1655
  /**
1647
1656
  * The CollisionComponentElement interface provides properties and methods for manipulating
1648
- * `<pc-collision>` elements. The CollisionComponentElement interface also inherits the properties
1649
- * and methods of the {@link HTMLElement} interface.
1657
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-collision/ | `<pc-collision>`} elements.
1658
+ * The CollisionComponentElement interface also inherits the properties and methods of the
1659
+ * {@link HTMLElement} interface.
1650
1660
  *
1651
1661
  * @category Components
1652
1662
  */
@@ -1676,7 +1686,7 @@
1676
1686
  };
1677
1687
  }
1678
1688
  /**
1679
- * Gets the collision component.
1689
+ * Gets the underlying PlayCanvas collision component.
1680
1690
  * @returns The collision component.
1681
1691
  */
1682
1692
  get component() {
@@ -1791,8 +1801,9 @@
1791
1801
 
1792
1802
  /**
1793
1803
  * The ElementComponentElement interface provides properties and methods for manipulating
1794
- * `<pc-element>` elements. The ElementComponentElement interface also inherits the properties and
1795
- * methods of the {@link HTMLElement} interface.
1804
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-element/ | `<pc-element>`} elements.
1805
+ * The ElementComponentElement interface also inherits the properties and methods of the
1806
+ * {@link HTMLElement} interface.
1796
1807
  *
1797
1808
  * @category Components
1798
1809
  */
@@ -1831,21 +1842,33 @@
1831
1842
  };
1832
1843
  }
1833
1844
  /**
1834
- * Gets the element component.
1845
+ * Gets the underlying PlayCanvas element component.
1835
1846
  * @returns The element component.
1836
1847
  */
1837
1848
  get component() {
1838
1849
  return super.component;
1839
1850
  }
1851
+ /**
1852
+ * Sets the anchor of the element component.
1853
+ * @param value - The anchor.
1854
+ */
1840
1855
  set anchor(value) {
1841
1856
  this._anchor = value;
1842
1857
  if (this.component) {
1843
1858
  this.component.anchor = value;
1844
1859
  }
1845
1860
  }
1861
+ /**
1862
+ * Gets the anchor of the element component.
1863
+ * @returns The anchor.
1864
+ */
1846
1865
  get anchor() {
1847
1866
  return this._anchor;
1848
1867
  }
1868
+ /**
1869
+ * Sets the id of the `pc-asset` to use for the font.
1870
+ * @param value - The asset ID.
1871
+ */
1849
1872
  set asset(value) {
1850
1873
  this._asset = value;
1851
1874
  const asset = AssetElement.get(value);
@@ -1853,60 +1876,112 @@
1853
1876
  this.component.fontAsset = asset.id;
1854
1877
  }
1855
1878
  }
1879
+ /**
1880
+ * Gets the id of the `pc-asset` to use for the font.
1881
+ * @returns The asset ID.
1882
+ */
1856
1883
  get asset() {
1857
1884
  return this._asset;
1858
1885
  }
1886
+ /**
1887
+ * Sets whether the element component should automatically adjust its width.
1888
+ * @param value - Whether to automatically adjust the width.
1889
+ */
1859
1890
  set autoWidth(value) {
1860
1891
  this._autoWidth = value;
1861
1892
  if (this.component) {
1862
1893
  this.component.autoWidth = value;
1863
1894
  }
1864
1895
  }
1896
+ /**
1897
+ * Gets whether the element component should automatically adjust its width.
1898
+ * @returns Whether to automatically adjust the width.
1899
+ */
1865
1900
  get autoWidth() {
1866
1901
  return this._autoWidth;
1867
1902
  }
1903
+ /**
1904
+ * Sets the color of the element component.
1905
+ * @param value - The color.
1906
+ */
1868
1907
  set color(value) {
1869
1908
  this._color = value;
1870
1909
  if (this.component) {
1871
1910
  this.component.color = value;
1872
1911
  }
1873
1912
  }
1913
+ /**
1914
+ * Gets the color of the element component.
1915
+ * @returns The color.
1916
+ */
1874
1917
  get color() {
1875
1918
  return this._color;
1876
1919
  }
1920
+ /**
1921
+ * Sets the font size of the element component.
1922
+ * @param value - The font size.
1923
+ */
1877
1924
  set fontSize(value) {
1878
1925
  this._fontSize = value;
1879
1926
  if (this.component) {
1880
1927
  this.component.fontSize = value;
1881
1928
  }
1882
1929
  }
1930
+ /**
1931
+ * Gets the font size of the element component.
1932
+ * @returns The font size.
1933
+ */
1883
1934
  get fontSize() {
1884
1935
  return this._fontSize;
1885
1936
  }
1937
+ /**
1938
+ * Sets the line height of the element component.
1939
+ * @param value - The line height.
1940
+ */
1886
1941
  set lineHeight(value) {
1887
1942
  this._lineHeight = value;
1888
1943
  if (this.component) {
1889
1944
  this.component.lineHeight = value;
1890
1945
  }
1891
1946
  }
1947
+ /**
1948
+ * Gets the line height of the element component.
1949
+ * @returns The line height.
1950
+ */
1892
1951
  get lineHeight() {
1893
1952
  return this._lineHeight;
1894
1953
  }
1954
+ /**
1955
+ * Sets the pivot of the element component.
1956
+ * @param value - The pivot.
1957
+ */
1895
1958
  set pivot(value) {
1896
1959
  this._pivot = value;
1897
1960
  if (this.component) {
1898
1961
  this.component.pivot = value;
1899
1962
  }
1900
1963
  }
1964
+ /**
1965
+ * Gets the pivot of the element component.
1966
+ * @returns The pivot.
1967
+ */
1901
1968
  get pivot() {
1902
1969
  return this._pivot;
1903
1970
  }
1971
+ /**
1972
+ * Sets the text of the element component.
1973
+ * @param value - The text.
1974
+ */
1904
1975
  set text(value) {
1905
1976
  this._text = value;
1906
1977
  if (this.component) {
1907
1978
  this.component.text = value;
1908
1979
  }
1909
1980
  }
1981
+ /**
1982
+ * Gets the text of the element component.
1983
+ * @returns The text.
1984
+ */
1910
1985
  get text() {
1911
1986
  return this._text;
1912
1987
  }
@@ -1927,21 +2002,37 @@
1927
2002
  get type() {
1928
2003
  return this._type;
1929
2004
  }
2005
+ /**
2006
+ * Sets the width of the element component.
2007
+ * @param value - The width.
2008
+ */
1930
2009
  set width(value) {
1931
2010
  this._width = value;
1932
2011
  if (this.component) {
1933
2012
  this.component.width = value;
1934
2013
  }
1935
2014
  }
2015
+ /**
2016
+ * Gets the width of the element component.
2017
+ * @returns The width.
2018
+ */
1936
2019
  get width() {
1937
2020
  return this._width;
1938
2021
  }
2022
+ /**
2023
+ * Sets whether the element component should wrap lines.
2024
+ * @param value - Whether to wrap lines.
2025
+ */
1939
2026
  set wrapLines(value) {
1940
2027
  this._wrapLines = value;
1941
2028
  if (this.component) {
1942
2029
  this.component.wrapLines = value;
1943
2030
  }
1944
2031
  }
2032
+ /**
2033
+ * Gets whether the element component should wrap lines.
2034
+ * @returns Whether to wrap lines.
2035
+ */
1945
2036
  get wrapLines() {
1946
2037
  return this._wrapLines;
1947
2038
  }
@@ -2003,13 +2094,14 @@
2003
2094
  customElements.define('pc-element', ElementComponentElement);
2004
2095
 
2005
2096
  /**
2006
- * The GSplatComponentElement interface provides properties and methods for manipulating
2007
- * `<pc-splat>` elements. The GSplatComponentElement interface also inherits the properties and
2008
- * methods of the {@link HTMLElement} interface.
2097
+ * The SplatComponentElement interface provides properties and methods for manipulating
2098
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-splat/ | `<pc-splat>`} elements.
2099
+ * The SplatComponentElement interface also inherits the properties and methods of the
2100
+ * {@link HTMLElement} interface.
2009
2101
  *
2010
2102
  * @category Components
2011
2103
  */
2012
- class GSplatComponentElement extends ComponentElement {
2104
+ class SplatComponentElement extends ComponentElement {
2013
2105
  /** @ignore */
2014
2106
  constructor() {
2015
2107
  super('gsplat');
@@ -2021,12 +2113,16 @@
2021
2113
  };
2022
2114
  }
2023
2115
  /**
2024
- * Gets the gsplat component.
2025
- * @returns The gsplat component.
2116
+ * Gets the underlying PlayCanvas splat component.
2117
+ * @returns The splat component.
2026
2118
  */
2027
2119
  get component() {
2028
2120
  return super.component;
2029
2121
  }
2122
+ /**
2123
+ * Sets id of the `pc-asset` to use for the splat.
2124
+ * @param value - The asset ID.
2125
+ */
2030
2126
  set asset(value) {
2031
2127
  this._asset = value;
2032
2128
  const asset = AssetElement.get(value);
@@ -2034,6 +2130,10 @@
2034
2130
  this.component.asset = asset;
2035
2131
  }
2036
2132
  }
2133
+ /**
2134
+ * Gets the id of the `pc-asset` to use for the splat.
2135
+ * @returns The asset ID.
2136
+ */
2037
2137
  get asset() {
2038
2138
  return this._asset;
2039
2139
  }
@@ -2049,7 +2149,7 @@
2049
2149
  }
2050
2150
  }
2051
2151
  }
2052
- customElements.define('pc-splat', GSplatComponentElement);
2152
+ customElements.define('pc-splat', SplatComponentElement);
2053
2153
 
2054
2154
  const shadowTypes = new Map([
2055
2155
  ['pcf1-16f', playcanvas.SHADOW_PCF1_16F],
@@ -2064,8 +2164,9 @@
2064
2164
  ]);
2065
2165
  /**
2066
2166
  * The LightComponentElement interface provides properties and methods for manipulating
2067
- * `<pc-light>` elements. The LightComponentElement interface also inherits the properties and
2068
- * methods of the {@link HTMLElement} interface.
2167
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-light/ | `<pc-light>`} elements.
2168
+ * The LightComponentElement interface also inherits the properties and methods of the
2169
+ * {@link HTMLElement} interface.
2069
2170
  *
2070
2171
  * @category Components
2071
2172
  */
@@ -2107,7 +2208,7 @@
2107
2208
  };
2108
2209
  }
2109
2210
  /**
2110
- * Gets the light component.
2211
+ * Gets the underlying PlayCanvas light component.
2111
2212
  * @returns The light component.
2112
2213
  */
2113
2214
  get component() {
@@ -2437,8 +2538,9 @@
2437
2538
 
2438
2539
  /**
2439
2540
  * The MaterialElement interface provides properties and methods for manipulating
2440
- * `<pc-material>` elements. The MaterialElement interface also inherits the properties and
2441
- * methods of the {@link HTMLElement} interface.
2541
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-material/ | `<pc-material>`} elements.
2542
+ * The MaterialElement interface also inherits the properties and methods of the
2543
+ * {@link HTMLElement} interface.
2442
2544
  */
2443
2545
  class MaterialElement extends HTMLElement {
2444
2546
  constructor() {
@@ -2553,8 +2655,9 @@
2553
2655
 
2554
2656
  /**
2555
2657
  * The RenderComponentElement interface provides properties and methods for manipulating
2556
- * `<pc-render>` elements. The RenderComponentElement interface also inherits the properties and
2557
- * methods of the {@link HTMLElement} interface.
2658
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-render/ | `<pc-render>`} elements.
2659
+ * The RenderComponentElement interface also inherits the properties and methods of the
2660
+ * {@link HTMLElement} interface.
2558
2661
  *
2559
2662
  * @category Components
2560
2663
  */
@@ -2576,7 +2679,7 @@
2576
2679
  };
2577
2680
  }
2578
2681
  /**
2579
- * Gets the render component.
2682
+ * Gets the underlying PlayCanvas render component.
2580
2683
  * @returns The render component.
2581
2684
  */
2582
2685
  get component() {
@@ -2675,8 +2778,9 @@
2675
2778
 
2676
2779
  /**
2677
2780
  * The RigidBodyComponentElement interface provides properties and methods for manipulating
2678
- * `<pc-rigidbody>` elements. The RigidBodyComponentElement interface also inherits the properties
2679
- * and methods of the {@link HTMLElement} interface.
2781
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.
2782
+ * The RigidBodyComponentElement interface also inherits the properties and methods of the
2783
+ * {@link HTMLElement} interface.
2680
2784
  *
2681
2785
  * @category Components
2682
2786
  */
@@ -2735,8 +2839,8 @@
2735
2839
  };
2736
2840
  }
2737
2841
  /**
2738
- * Gets the collision component.
2739
- * @returns The collision component.
2842
+ * Gets the underlying PlayCanvas rigidbody component.
2843
+ * @returns The rigidbody component.
2740
2844
  */
2741
2845
  get component() {
2742
2846
  return super.component;
@@ -2862,8 +2966,9 @@
2862
2966
 
2863
2967
  /**
2864
2968
  * The ScreenComponentElement interface provides properties and methods for manipulating
2865
- * `<pc-screen>` elements. The ScreenComponentElement interface also inherits the properties and
2866
- * methods of the {@link HTMLElement} interface.
2969
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
2970
+ * The ScreenComponentElement interface also inherits the properties and methods of the
2971
+ * {@link HTMLElement} interface.
2867
2972
  *
2868
2973
  * @category Components
2869
2974
  */
@@ -2889,7 +2994,7 @@
2889
2994
  };
2890
2995
  }
2891
2996
  /**
2892
- * Gets the screen component.
2997
+ * Gets the underlying PlayCanvas screen component.
2893
2998
  * @returns The screen component.
2894
2999
  */
2895
3000
  get component() {
@@ -2988,8 +3093,9 @@
2988
3093
 
2989
3094
  /**
2990
3095
  * The ScriptComponentElement interface provides properties and methods for manipulating
2991
- * `<pc-scripts>` elements. The ScriptComponentElement interface also inherits the properties and
2992
- * methods of the {@link HTMLElement} interface.
3096
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scripts/ | `<pc-scripts>`} elements.
3097
+ * The ScriptComponentElement interface also inherits the properties and methods of the
3098
+ * {@link HTMLElement} interface.
2993
3099
  *
2994
3100
  * @category Components
2995
3101
  */
@@ -3139,7 +3245,7 @@
3139
3245
  (_a = super.disconnectedCallback) === null || _a === undefined ? undefined : _a.call(this);
3140
3246
  }
3141
3247
  /**
3142
- * Gets the script component.
3248
+ * Gets the underlying PlayCanvas script component.
3143
3249
  * @returns The script component.
3144
3250
  */
3145
3251
  get component() {
@@ -3231,8 +3337,9 @@
3231
3337
 
3232
3338
  /**
3233
3339
  * The SoundComponentElement interface provides properties and methods for manipulating
3234
- * `<pc-sounds>` elements. The SoundComponentElement interface also inherits the properties and
3235
- * methods of the {@link HTMLElement} interface.
3340
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-sounds/ | `<pc-sounds>`} elements.
3341
+ * The SoundComponentElement interface also inherits the properties and methods of the
3342
+ * {@link HTMLElement} interface.
3236
3343
  *
3237
3344
  * @category Components
3238
3345
  */
@@ -3260,7 +3367,7 @@
3260
3367
  };
3261
3368
  }
3262
3369
  /**
3263
- * Gets the sound component.
3370
+ * Gets the underlying PlayCanvas sound component.
3264
3371
  * @returns The sound component.
3265
3372
  */
3266
3373
  get component() {
@@ -3479,7 +3586,7 @@
3479
3586
  return soundElement;
3480
3587
  }
3481
3588
  /**
3482
- * Sets the asset of the sound slot.
3589
+ * Sets the id of the `pc-asset` to use for the sound slot.
3483
3590
  * @param value - The asset.
3484
3591
  */
3485
3592
  set asset(value) {
@@ -3493,7 +3600,7 @@
3493
3600
  }
3494
3601
  }
3495
3602
  /**
3496
- * Gets the asset of the sound slot.
3603
+ * Gets the id of the `pc-asset` to use for the sound slot.
3497
3604
  * @returns The asset.
3498
3605
  */
3499
3606
  get asset() {
@@ -3671,8 +3778,9 @@
3671
3778
 
3672
3779
  /**
3673
3780
  * The ModelElement interface provides properties and methods for manipulating
3674
- * `<pc-model>` elements. The ModelElement interface also inherits the properties and
3675
- * methods of the {@link HTMLElement} interface.
3781
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-model/ | `<pc-model>`} elements.
3782
+ * The ModelElement interface also inherits the properties and methods of the
3783
+ * {@link HTMLElement} interface.
3676
3784
  */
3677
3785
  class ModelElement extends AsyncElement {
3678
3786
  constructor() {
@@ -3735,7 +3843,7 @@
3735
3843
  this._entity = null;
3736
3844
  }
3737
3845
  /**
3738
- * Sets the asset ID of the model.
3846
+ * Sets the id of the `pc-asset` to use for the model.
3739
3847
  * @param value - The asset ID.
3740
3848
  */
3741
3849
  set asset(value) {
@@ -3745,8 +3853,8 @@
3745
3853
  }
3746
3854
  }
3747
3855
  /**
3748
- * Gets the source URL of the model.
3749
- * @returns The source URL of the model.
3856
+ * Gets the id of the `pc-asset` to use for the model.
3857
+ * @returns The asset ID.
3750
3858
  */
3751
3859
  get asset() {
3752
3860
  return this._asset;
@@ -3766,8 +3874,9 @@
3766
3874
 
3767
3875
  /**
3768
3876
  * The SceneElement interface provides properties and methods for manipulating
3769
- * `<pc-scene>` elements. The SceneElement interface also inherits the properties and
3770
- * methods of the {@link HTMLElement} interface.
3877
+ * {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scene/ | `<pc-scene>`} elements.
3878
+ * The SceneElement interface also inherits the properties and methods of the
3879
+ * {@link HTMLElement} interface.
3771
3880
  */
3772
3881
  class SceneElement extends AsyncElement {
3773
3882
  constructor() {
@@ -4005,66 +4114,126 @@
4005
4114
  this._scene.envAtlas = null;
4006
4115
  this._scene = null;
4007
4116
  }
4117
+ /**
4118
+ * Sets the id of the `pc-asset` to use for the skybox.
4119
+ * @param value - The asset ID.
4120
+ */
4008
4121
  set asset(value) {
4009
4122
  this._asset = value;
4010
4123
  if (this.isConnected) {
4011
4124
  this._loadSkybox();
4012
4125
  }
4013
4126
  }
4127
+ /**
4128
+ * Gets the id of the `pc-asset` to use for the skybox.
4129
+ * @returns The asset ID.
4130
+ */
4014
4131
  get asset() {
4015
4132
  return this._asset;
4016
4133
  }
4134
+ /**
4135
+ * Sets the center of the skybox.
4136
+ * @param value - The center.
4137
+ */
4017
4138
  set center(value) {
4018
4139
  this._center = value;
4019
4140
  if (this._scene) {
4020
4141
  this._scene.sky.center = this._center;
4021
4142
  }
4022
4143
  }
4144
+ /**
4145
+ * Gets the center of the skybox.
4146
+ * @returns The center.
4147
+ */
4023
4148
  get center() {
4024
4149
  return this._center;
4025
4150
  }
4151
+ /**
4152
+ * Sets the intensity of the skybox.
4153
+ * @param value - The intensity.
4154
+ */
4026
4155
  set intensity(value) {
4027
4156
  this._intensity = value;
4028
4157
  if (this._scene) {
4029
4158
  this._scene.skyboxIntensity = this._intensity;
4030
4159
  }
4031
4160
  }
4161
+ /**
4162
+ * Gets the intensity of the skybox.
4163
+ * @returns The intensity.
4164
+ */
4032
4165
  get intensity() {
4033
4166
  return this._intensity;
4034
4167
  }
4168
+ /**
4169
+ * Sets the mip level of the skybox.
4170
+ * @param value - The mip level.
4171
+ */
4035
4172
  set level(value) {
4036
4173
  this._level = value;
4037
4174
  if (this._scene) {
4038
4175
  this._scene.skyboxMip = this._level;
4039
4176
  }
4040
4177
  }
4178
+ /**
4179
+ * Gets the mip level of the skybox.
4180
+ * @returns The mip level.
4181
+ */
4041
4182
  get level() {
4042
4183
  return this._level;
4043
4184
  }
4185
+ /**
4186
+ * Sets whether the skybox is used as a light source.
4187
+ * @param value - Whether to use lighting.
4188
+ */
4044
4189
  set lighting(value) {
4045
4190
  this._lighting = value;
4046
4191
  }
4192
+ /**
4193
+ * Gets whether the skybox is used as a light source.
4194
+ * @returns Whether to use lighting.
4195
+ */
4047
4196
  get lighting() {
4048
4197
  return this._lighting;
4049
4198
  }
4199
+ /**
4200
+ * Sets the Euler rotation of the skybox.
4201
+ * @param value - The rotation.
4202
+ */
4050
4203
  set rotation(value) {
4051
4204
  this._rotation = value;
4052
4205
  if (this._scene) {
4053
4206
  this._scene.skyboxRotation = new playcanvas.Quat().setFromEulerAngles(value);
4054
4207
  }
4055
4208
  }
4209
+ /**
4210
+ * Gets the Euler rotation of the skybox.
4211
+ * @returns The rotation.
4212
+ */
4056
4213
  get rotation() {
4057
4214
  return this._rotation;
4058
4215
  }
4216
+ /**
4217
+ * Sets the scale of the skybox.
4218
+ * @param value - The scale.
4219
+ */
4059
4220
  set scale(value) {
4060
4221
  this._scale = value;
4061
4222
  if (this._scene) {
4062
4223
  this._scene.sky.node.setLocalScale(this._scale);
4063
4224
  }
4064
4225
  }
4226
+ /**
4227
+ * Gets the scale of the skybox.
4228
+ * @returns The scale.
4229
+ */
4065
4230
  get scale() {
4066
4231
  return this._scale;
4067
4232
  }
4233
+ /**
4234
+ * Sets the type of the skybox.
4235
+ * @param value - The type.
4236
+ */
4068
4237
  set type(value) {
4069
4238
  this._type = value;
4070
4239
  if (this._scene) {
@@ -4075,6 +4244,10 @@
4075
4244
  }
4076
4245
  }
4077
4246
  }
4247
+ /**
4248
+ * Gets the type of the skybox.
4249
+ * @returns The type.
4250
+ */
4078
4251
  get type() {
4079
4252
  return this._type;
4080
4253
  }
@@ -4120,7 +4293,6 @@
4120
4293
  exports.ComponentElement = ComponentElement;
4121
4294
  exports.ElementComponentElement = ElementComponentElement;
4122
4295
  exports.EntityElement = EntityElement;
4123
- exports.GSplatComponentElement = GSplatComponentElement;
4124
4296
  exports.LightComponentElement = LightComponentElement;
4125
4297
  exports.ListenerComponentElement = ListenerComponentElement;
4126
4298
  exports.MaterialElement = MaterialElement;
@@ -4135,6 +4307,7 @@
4135
4307
  exports.SkyElement = SkyElement;
4136
4308
  exports.SoundComponentElement = SoundComponentElement;
4137
4309
  exports.SoundSlotElement = SoundSlotElement;
4310
+ exports.SplatComponentElement = SplatComponentElement;
4138
4311
 
4139
4312
  }));
4140
4313
  //# sourceMappingURL=pwc.js.map