@playcanvas/web-components 0.8.2 → 0.10.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/README.md +18 -0
- package/dist/app.d.ts +13 -4
- package/dist/asset.d.ts +33 -3
- package/dist/async-element.d.ts +54 -4
- package/dist/components/button-component.d.ts +11 -5
- package/dist/components/camera-component.d.ts +10 -5
- package/dist/components/collision-component.d.ts +10 -5
- package/dist/components/component.d.ts +8 -2
- package/dist/components/element-component.d.ts +18 -13
- package/dist/components/gsplat-component.d.ts +7 -2
- package/dist/components/layoutchild-component.d.ts +7 -2
- package/dist/components/layoutgroup-component.d.ts +22 -16
- package/dist/components/light-component.d.ts +13 -7
- package/dist/components/listener-component.d.ts +6 -1
- package/dist/components/particlesystem-component.d.ts +7 -2
- package/dist/components/render-component.d.ts +14 -5
- package/dist/components/rigidbody-component.d.ts +10 -5
- package/dist/components/screen-component.d.ts +7 -2
- package/dist/components/script-component.d.ts +116 -16
- package/dist/components/script.d.ts +79 -8
- package/dist/components/scrollbar-component.d.ts +11 -5
- package/dist/components/scrollview-component.d.ts +18 -11
- package/dist/components/sound-component.d.ts +7 -2
- package/dist/components/sound-slot.d.ts +17 -4
- package/dist/custom-elements.json +16231 -0
- package/dist/entity.d.ts +45 -3
- package/dist/index.d.ts +3 -2
- package/dist/material.d.ts +976 -4
- package/dist/model.d.ts +6 -1
- package/dist/module.d.ts +15 -0
- package/dist/parse.d.ts +144 -0
- package/dist/pwc.cjs +5735 -2923
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +5735 -2923
- 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.min.mjs +2 -0
- package/dist/pwc.min.mjs.map +1 -0
- package/dist/pwc.mjs +5736 -2925
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.ts +15 -6
- package/dist/sky.d.ts +7 -1
- package/dist/vscode.html-custom-data.json +1795 -0
- package/dist/web-types.json +3592 -0
- package/package.json +32 -14
- package/src/app.ts +42 -15
- package/src/asset.ts +78 -8
- package/src/async-element.ts +89 -5
- package/src/components/button-component.ts +31 -24
- package/src/components/camera-component.ts +30 -24
- package/src/components/collision-component.ts +20 -14
- package/src/components/component.ts +33 -14
- package/src/components/element-component.ts +62 -56
- package/src/components/gsplat-component.ts +16 -9
- package/src/components/layoutchild-component.ts +17 -10
- package/src/components/layoutgroup-component.ts +39 -32
- package/src/components/light-component.ts +34 -32
- package/src/components/listener-component.ts +8 -2
- package/src/components/particlesystem-component.ts +10 -4
- package/src/components/render-component.ts +28 -12
- package/src/components/rigidbody-component.ts +22 -16
- package/src/components/screen-component.ts +16 -10
- package/src/components/script-component.ts +512 -125
- package/src/components/script.ts +123 -16
- package/src/components/scrollbar-component.ts +21 -14
- package/src/components/scrollview-component.ts +42 -34
- package/src/components/sound-component.ts +17 -10
- package/src/components/sound-slot.ts +50 -19
- package/src/entity.ts +84 -76
- package/src/index.ts +5 -2
- package/src/material.ts +2432 -62
- package/src/model.ts +8 -2
- package/src/module.ts +16 -0
- package/src/parse.ts +298 -0
- package/src/scene.ts +26 -13
- package/src/sky.ts +36 -18
- package/dist/utils.d.ts +0 -56
- package/src/utils.ts +0 -119
package/dist/scene.d.ts
CHANGED
|
@@ -31,22 +31,26 @@ declare class SceneElement extends AsyncElement {
|
|
|
31
31
|
* The gravity of the scene.
|
|
32
32
|
*/
|
|
33
33
|
private _gravity;
|
|
34
|
+
private _scene;
|
|
34
35
|
/**
|
|
35
|
-
* The PlayCanvas scene instance.
|
|
36
|
+
* The PlayCanvas scene instance. Available once the element is ready — await
|
|
37
|
+
* {@link whenReady} or the element's `ready()` promise before accessing it.
|
|
38
|
+
* @returns The scene instance.
|
|
36
39
|
*/
|
|
37
|
-
scene: Scene
|
|
40
|
+
get scene(): Scene;
|
|
38
41
|
connectedCallback(): Promise<void>;
|
|
39
42
|
updateSceneSettings(): void;
|
|
40
43
|
/**
|
|
41
|
-
* Sets the fog type of the scene.
|
|
44
|
+
* Sets the fog type of the scene. Can be `none`, `linear`, `exp` or `exp2`. Defaults to
|
|
45
|
+
* `none`.
|
|
42
46
|
* @param value - The fog type.
|
|
43
47
|
*/
|
|
44
|
-
set fog(value:
|
|
48
|
+
set fog(value: "linear" | "none" | "exp" | "exp2");
|
|
45
49
|
/**
|
|
46
50
|
* Gets the fog type of the scene.
|
|
47
51
|
* @returns The fog type.
|
|
48
52
|
*/
|
|
49
|
-
get fog():
|
|
53
|
+
get fog(): "linear" | "none" | "exp" | "exp2";
|
|
50
54
|
/**
|
|
51
55
|
* Sets the fog color of the scene.
|
|
52
56
|
* @param value - The fog color.
|
|
@@ -98,6 +102,11 @@ declare class SceneElement extends AsyncElement {
|
|
|
98
102
|
*/
|
|
99
103
|
get gravity(): Vec3;
|
|
100
104
|
static get observedAttributes(): string[];
|
|
101
|
-
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
105
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
106
|
+
}
|
|
107
|
+
declare global {
|
|
108
|
+
interface HTMLElementTagNameMap {
|
|
109
|
+
'pc-scene': SceneElement;
|
|
110
|
+
}
|
|
102
111
|
}
|
|
103
112
|
export { SceneElement };
|
package/dist/sky.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare class SkyElement extends AsyncElement {
|
|
|
15
15
|
private _scale;
|
|
16
16
|
private _type;
|
|
17
17
|
private _scene;
|
|
18
|
+
private _appElement;
|
|
18
19
|
connectedCallback(): void;
|
|
19
20
|
disconnectedCallback(): void;
|
|
20
21
|
private _generateSkybox;
|
|
@@ -101,6 +102,11 @@ declare class SkyElement extends AsyncElement {
|
|
|
101
102
|
*/
|
|
102
103
|
get type(): "box" | "dome" | "infinite" | "none";
|
|
103
104
|
static get observedAttributes(): string[];
|
|
104
|
-
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
105
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
106
|
+
}
|
|
107
|
+
declare global {
|
|
108
|
+
interface HTMLElementTagNameMap {
|
|
109
|
+
'pc-sky': SkyElement;
|
|
110
|
+
}
|
|
105
111
|
}
|
|
106
112
|
export { SkyElement };
|