@playcanvas/web-components 0.10.1 → 0.11.0

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/sky.d.ts CHANGED
@@ -10,7 +10,7 @@ declare class SkyElement extends AsyncElement {
10
10
  private _center;
11
11
  private _intensity;
12
12
  private _rotation;
13
- private _level;
13
+ private _mipLevel;
14
14
  private _lighting;
15
15
  private _scale;
16
16
  private _type;
@@ -51,16 +51,6 @@ declare class SkyElement extends AsyncElement {
51
51
  * @returns The intensity.
52
52
  */
53
53
  get intensity(): number;
54
- /**
55
- * Sets the mip level of the skybox.
56
- * @param value - The mip level.
57
- */
58
- set level(value: number);
59
- /**
60
- * Gets the mip level of the skybox.
61
- * @returns The mip level.
62
- */
63
- get level(): number;
64
54
  /**
65
55
  * Sets whether the skybox is used as a light source.
66
56
  * @param value - Whether to use lighting.
@@ -71,6 +61,17 @@ declare class SkyElement extends AsyncElement {
71
61
  * @returns Whether to use lighting.
72
62
  */
73
63
  get lighting(): boolean;
64
+ /**
65
+ * Sets the mip level of the skybox, where 0 is the sharpest. Raising it selects a blurrier mip,
66
+ * which is how a skybox is softened without blurring the texture itself.
67
+ * @param value - The mip level.
68
+ */
69
+ set mipLevel(value: number);
70
+ /**
71
+ * Gets the mip level of the skybox.
72
+ * @returns The mip level.
73
+ */
74
+ get mipLevel(): number;
74
75
  /**
75
76
  * Sets the Euler rotation of the skybox.
76
77
  * @param value - The rotation.
@@ -4,12 +4,16 @@
4
4
  "tags": [
5
5
  {
6
6
  "name": "pc-app",
7
- "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n \n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
7
+ "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n - **elementFromEntity(entity: _Entity_): __** - Returns the `<pc-entity>` element whose backing entity is `entity`, or `null` if the\nentity was not created by an element of this application - for example, a node inside a\nmodel's instantiated hierarchy, or an entity created through the engine API.\n\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
8
8
  "attributes": [
9
- { "name": "alpha", "description": "The alpha flag.", "values": [] },
9
+ {
10
+ "name": "alpha",
11
+ "description": "Whether the frame buffer has an alpha channel.",
12
+ "values": []
13
+ },
10
14
  {
11
15
  "name": "antialias",
12
- "description": "The antialias flag.",
16
+ "description": "Whether the frame buffer is anti-aliased.",
13
17
  "values": []
14
18
  },
15
19
  {
@@ -21,10 +25,9 @@
21
25
  { "name": "null" }
22
26
  ]
23
27
  },
24
- { "name": "depth", "description": "The depth flag.", "values": [] },
25
28
  {
26
- "name": "high-resolution",
27
- "description": "The high resolution flag.",
29
+ "name": "depth-buffer",
30
+ "description": "Whether the frame buffer has a depth buffer.",
28
31
  "values": []
29
32
  },
30
33
  {
@@ -32,7 +35,16 @@
32
35
  "description": "Whether the application shows its built-in loading bar while it boots and preloads its assets.",
33
36
  "values": []
34
37
  },
35
- { "name": "stencil", "description": "The stencil flag.", "values": [] }
38
+ {
39
+ "name": "max-pixel-ratio",
40
+ "description": "The cap on the pixel ratio the application renders at.",
41
+ "values": []
42
+ },
43
+ {
44
+ "name": "stencil-buffer",
45
+ "description": "Whether the frame buffer has a stencil buffer.",
46
+ "values": []
47
+ }
36
48
  ],
37
49
  "references": []
38
50
  },
@@ -730,13 +742,13 @@
730
742
  "values": []
731
743
  },
732
744
  {
733
- "name": "level",
734
- "description": "The mip level of the skybox.",
745
+ "name": "lighting",
746
+ "description": "Whether the skybox is used as a light source.",
735
747
  "values": []
736
748
  },
737
749
  {
738
- "name": "lighting",
739
- "description": "Whether the skybox is used as a light source.",
750
+ "name": "mip-level",
751
+ "description": "The mip level of the skybox.",
740
752
  "values": []
741
753
  },
742
754
  {
@@ -918,16 +930,16 @@
918
930
  "description": "The orthographic height of the camera.",
919
931
  "values": []
920
932
  },
921
- {
922
- "name": "orthographic",
923
- "description": "The orthographic projection of the camera.",
924
- "values": []
925
- },
926
933
  {
927
934
  "name": "priority",
928
935
  "description": "The priority of the camera.",
929
936
  "values": []
930
937
  },
938
+ {
939
+ "name": "projection",
940
+ "description": "The projection of the camera.",
941
+ "values": [{ "name": "perspective" }, { "name": "orthographic" }]
942
+ },
931
943
  {
932
944
  "name": "rect",
933
945
  "description": "The rect of the camera. Accepts 4 space-separated numbers.",
@@ -1528,7 +1540,6 @@
1528
1540
  "name": "pc-screen",
1529
1541
  "description": "The ScreenComponentElement interface provides properties and methods for manipulating\n[`<pc-screen>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/) elements.\nThe ScreenComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n \n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
1530
1542
  "attributes": [
1531
- { "name": "blend", "values": [] },
1532
1543
  {
1533
1544
  "name": "enabled",
1534
1545
  "description": "The enabled state of the component.",
@@ -1545,7 +1556,16 @@
1545
1556
  "description": "Accepts 2 space-separated numbers.",
1546
1557
  "values": []
1547
1558
  },
1548
- { "name": "scale-blend", "values": [] },
1559
+ {
1560
+ "name": "scale-blend",
1561
+ "description": "How the screen's resolutions are weighted against each other.",
1562
+ "values": []
1563
+ },
1564
+ {
1565
+ "name": "scale-mode",
1566
+ "description": "How the screen scales its contents.",
1567
+ "values": [{ "name": "none" }, { "name": "blend" }]
1568
+ },
1549
1569
  { "name": "screen-space", "values": [] }
1550
1570
  ],
1551
1571
  "references": []
@@ -1638,7 +1658,7 @@
1638
1658
  { "name": "friction", "description": "The friction.", "values": [] },
1639
1659
  {
1640
1660
  "name": "horizontal",
1641
- "description": "Whether horizontal scrolling is enabled.",
1661
+ "description": "Whether scrolling along the horizontal axis is enabled.",
1642
1662
  "values": []
1643
1663
  },
1644
1664
  {
@@ -1672,7 +1692,7 @@
1672
1692
  },
1673
1693
  {
1674
1694
  "name": "vertical",
1675
- "description": "Whether vertical scrolling is enabled.",
1695
+ "description": "Whether scrolling along the vertical axis is enabled.",
1676
1696
  "values": []
1677
1697
  },
1678
1698
  {
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@playcanvas/web-components",
4
- "version": "0.10.1",
4
+ "version": "0.11.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "pc-app",
11
- "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n \n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
11
+ "description": "The AppElement interface provides properties and methods for manipulating\n[`<pc-app>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-app/) elements.\nThe AppElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **progress** - Fired while the application preloads its assets. `loaded` and `total` are asset counts, not bytes, and an asset that fails to load still counts as loaded. Fired at least once per boot, and the final event always has `loaded` equal to `total`. Does not bubble.\n- **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n - **elementFromEntity(entity: _Entity_): __** - Returns the `<pc-entity>` element whose backing entity is `entity`, or `null` if the\nentity was not created by an element of this application - for example, a node inside a\nmodel's instantiated hierarchy, or an entity created through the engine API.\n\n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
12
12
  "doc-url": "",
13
13
  "attributes": [
14
14
  {
15
15
  "name": "alpha",
16
- "description": "The alpha flag.",
16
+ "description": "Whether the frame buffer has an alpha channel.",
17
17
  "value": { "type": "boolean", "default": "true" }
18
18
  },
19
19
  {
20
20
  "name": "antialias",
21
- "description": "The antialias flag.",
21
+ "description": "Whether the frame buffer is anti-aliased.",
22
22
  "value": { "type": "boolean", "default": "true" }
23
23
  },
24
24
  {
@@ -30,13 +30,8 @@
30
30
  }
31
31
  },
32
32
  {
33
- "name": "depth",
34
- "description": "The depth flag.",
35
- "value": { "type": "boolean", "default": "true" }
36
- },
37
- {
38
- "name": "high-resolution",
39
- "description": "The high resolution flag.",
33
+ "name": "depth-buffer",
34
+ "description": "Whether the frame buffer has a depth buffer.",
40
35
  "value": { "type": "boolean", "default": "true" }
41
36
  },
42
37
  {
@@ -45,8 +40,13 @@
45
40
  "value": { "type": "boolean", "default": "true" }
46
41
  },
47
42
  {
48
- "name": "stencil",
49
- "description": "The stencil flag.",
43
+ "name": "max-pixel-ratio",
44
+ "description": "The cap on the pixel ratio the application renders at.",
45
+ "value": { "type": "number", "default": "Infinity" }
46
+ },
47
+ {
48
+ "name": "stencil-buffer",
49
+ "description": "Whether the frame buffer has a stencil buffer.",
50
50
  "value": { "type": "boolean", "default": "true" }
51
51
  }
52
52
  ],
@@ -74,25 +74,34 @@
74
74
  "description": "The asset preload progress of the application, as a fraction from 0 to 1. It is 0 until\npreloading begins (and again once the element has been removed from the document), and 1\nonce preloading has finished — including when there was nothing to preload. Read this to\ninitialize a loading UI; subsequent updates arrive via the `progress` event.",
75
75
  "type": "number"
76
76
  },
77
- { "name": "alpha", "description": "Gets the alpha flag." },
77
+ {
78
+ "name": "alpha",
79
+ "description": "Gets whether the frame buffer has an alpha channel."
80
+ },
78
81
  {
79
82
  "name": "antialias",
80
- "description": "Gets the antialias flag."
83
+ "description": "Gets whether the frame buffer is anti-aliased."
81
84
  },
82
85
  {
83
86
  "name": "backend",
84
87
  "description": "Gets the graphics backend."
85
88
  },
86
- { "name": "depth", "description": "Gets the depth flag." },
87
89
  {
88
- "name": "highResolution",
89
- "description": "Gets the high resolution flag."
90
+ "name": "depthBuffer",
91
+ "description": "Gets whether the frame buffer has a depth buffer."
90
92
  },
91
93
  {
92
94
  "name": "loadingBar",
93
95
  "description": "Gets whether the application shows its built-in loading bar while it boots and preloads\nits assets."
94
96
  },
95
- { "name": "stencil", "description": "Gets the stencil flag." },
97
+ {
98
+ "name": "maxPixelRatio",
99
+ "description": "Gets the cap on the pixel ratio the application renders at."
100
+ },
101
+ {
102
+ "name": "stencilBuffer",
103
+ "description": "Gets whether the frame buffer has a stencil buffer."
104
+ },
96
105
  {
97
106
  "name": "closestApp",
98
107
  "description": "The nearest ancestor `<pc-app>` element, or `null` if this element has no `<pc-app>`\nancestor. The search starts at the parent, so an element never resolves to itself.",
@@ -1361,16 +1370,16 @@
1361
1370
  "description": "The intensity of the skybox.",
1362
1371
  "value": { "type": "number", "default": "1" }
1363
1372
  },
1364
- {
1365
- "name": "level",
1366
- "description": "The mip level of the skybox.",
1367
- "value": { "type": "number", "default": "0" }
1368
- },
1369
1373
  {
1370
1374
  "name": "lighting",
1371
1375
  "description": "Whether the skybox is used as a light source.",
1372
1376
  "value": { "type": "boolean", "default": "false" }
1373
1377
  },
1378
+ {
1379
+ "name": "mip-level",
1380
+ "description": "The mip level of the skybox.",
1381
+ "value": { "type": "number", "default": "0" }
1382
+ },
1374
1383
  {
1375
1384
  "name": "rotation",
1376
1385
  "description": "The Euler rotation of the skybox. Accepts 3 space-separated numbers.",
@@ -1411,14 +1420,14 @@
1411
1420
  "name": "intensity",
1412
1421
  "description": "Gets the intensity of the skybox."
1413
1422
  },
1414
- {
1415
- "name": "level",
1416
- "description": "Gets the mip level of the skybox."
1417
- },
1418
1423
  {
1419
1424
  "name": "lighting",
1420
1425
  "description": "Gets whether the skybox is used as a light source."
1421
1426
  },
1427
+ {
1428
+ "name": "mipLevel",
1429
+ "description": "Gets the mip level of the skybox."
1430
+ },
1422
1431
  {
1423
1432
  "name": "rotation",
1424
1433
  "description": "Gets the Euler rotation of the skybox."
@@ -1698,16 +1707,19 @@
1698
1707
  "description": "The orthographic height of the camera.",
1699
1708
  "value": { "type": "number", "default": "10" }
1700
1709
  },
1701
- {
1702
- "name": "orthographic",
1703
- "description": "The orthographic projection of the camera.",
1704
- "value": { "type": "boolean", "default": "false" }
1705
- },
1706
1710
  {
1707
1711
  "name": "priority",
1708
1712
  "description": "The priority of the camera.",
1709
1713
  "value": { "type": "number", "default": "0" }
1710
1714
  },
1715
+ {
1716
+ "name": "projection",
1717
+ "description": "The projection of the camera.",
1718
+ "value": {
1719
+ "type": "'perspective' | 'orthographic'",
1720
+ "default": "perspective"
1721
+ }
1722
+ },
1711
1723
  {
1712
1724
  "name": "rect",
1713
1725
  "description": "The rect of the camera. Accepts 4 space-separated numbers.",
@@ -1802,11 +1814,6 @@
1802
1814
  "description": "Gets the near clip distance of the camera.",
1803
1815
  "type": "number"
1804
1816
  },
1805
- {
1806
- "name": "orthographic",
1807
- "description": "Gets the orthographic projection of the camera.",
1808
- "type": "boolean"
1809
- },
1810
1817
  {
1811
1818
  "name": "orthoHeight",
1812
1819
  "description": "Gets the orthographic height of the camera."
@@ -1816,6 +1823,10 @@
1816
1823
  "description": "Gets the priority of the camera.",
1817
1824
  "type": "number"
1818
1825
  },
1826
+ {
1827
+ "name": "projection",
1828
+ "description": "Gets the projection of the camera."
1829
+ },
1819
1830
  {
1820
1831
  "name": "rect",
1821
1832
  "description": "Gets the rect of the camera.",
@@ -3108,10 +3119,6 @@
3108
3119
  "description": "The ScreenComponentElement interface provides properties and methods for manipulating\n[`<pc-screen>`](https://developer.playcanvas.com/user-manual/web-components/tags/pc-screen/) elements.\nThe ScreenComponentElement interface also inherits the properties and methods of the\nHTMLElement interface.\n\n---\n\n\n### **Events:**\n - **ready** - Fired once the element is fully initialized. Bubbles and is composed.\n\n### **Methods:**\n \n- **ready(): __** - Returns a promise that resolves with this element when it's ready. This is the low-level\nprimitive underlying whenReady, which is the recommended way to wait for elements.",
3109
3120
  "doc-url": "",
3110
3121
  "attributes": [
3111
- {
3112
- "name": "blend",
3113
- "value": { "type": "boolean", "default": "false" }
3114
- },
3115
3122
  {
3116
3123
  "name": "enabled",
3117
3124
  "description": "The enabled state of the component.",
@@ -3133,8 +3140,14 @@
3133
3140
  },
3134
3141
  {
3135
3142
  "name": "scale-blend",
3143
+ "description": "How the screen's resolutions are weighted against each other.",
3136
3144
  "value": { "type": "number", "default": "0.5" }
3137
3145
  },
3146
+ {
3147
+ "name": "scale-mode",
3148
+ "description": "How the screen scales its contents.",
3149
+ "value": { "type": "'none' | 'blend'", "default": "none" }
3150
+ },
3138
3151
  {
3139
3152
  "name": "screen-space",
3140
3153
  "value": { "type": "boolean", "default": "false" }
@@ -3157,8 +3170,14 @@
3157
3170
  { "name": "priority" },
3158
3171
  { "name": "referenceResolution" },
3159
3172
  { "name": "resolution" },
3160
- { "name": "scaleBlend" },
3161
- { "name": "blend" },
3173
+ {
3174
+ "name": "scaleBlend",
3175
+ "description": "Gets how the screen's resolutions are weighted against each other."
3176
+ },
3177
+ {
3178
+ "name": "scaleMode",
3179
+ "description": "Gets how the screen scales its contents."
3180
+ },
3162
3181
  { "name": "screenSpace" },
3163
3182
  {
3164
3183
  "name": "enabled",
@@ -3443,7 +3462,7 @@
3443
3462
  },
3444
3463
  {
3445
3464
  "name": "horizontal",
3446
- "description": "Whether horizontal scrolling is enabled.",
3465
+ "description": "Whether scrolling along the horizontal axis is enabled.",
3447
3466
  "value": { "type": "boolean", "default": "true" }
3448
3467
  },
3449
3468
  {
@@ -3479,7 +3498,7 @@
3479
3498
  },
3480
3499
  {
3481
3500
  "name": "vertical",
3482
- "description": "Whether vertical scrolling is enabled.",
3501
+ "description": "Whether scrolling along the vertical axis is enabled.",
3483
3502
  "value": { "type": "boolean", "default": "true" }
3484
3503
  },
3485
3504
  {
@@ -3517,11 +3536,11 @@
3517
3536
  },
3518
3537
  {
3519
3538
  "name": "horizontal",
3520
- "description": "Gets whether horizontal scrolling is enabled."
3539
+ "description": "Gets whether scrolling along the horizontal axis is enabled."
3521
3540
  },
3522
3541
  {
3523
3542
  "name": "vertical",
3524
- "description": "Gets whether vertical scrolling is enabled."
3543
+ "description": "Gets whether scrolling along the vertical axis is enabled."
3525
3544
  },
3526
3545
  {
3527
3546
  "name": "scrollMode",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/web-components",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://playcanvas.com",
6
6
  "description": "Web Components for the PlayCanvas Engine",