@playcanvas/web-components 0.11.0 → 0.11.1
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 +1 -1
- package/dist/app.d.ts +18 -38
- package/dist/asset.d.ts +8 -7
- package/dist/async-element.d.ts +21 -5
- package/dist/components/button-component.d.ts +3 -7
- package/dist/components/camera-component.d.ts +3 -7
- package/dist/components/collision-component.d.ts +3 -7
- package/dist/components/component.d.ts +22 -4
- package/dist/components/element-component.d.ts +4 -8
- package/dist/components/gsplat-component.d.ts +2 -7
- package/dist/components/layoutchild-component.d.ts +2 -7
- package/dist/components/layoutgroup-component.d.ts +3 -7
- package/dist/components/light-component.d.ts +3 -7
- package/dist/components/listener-component.d.ts +1 -6
- package/dist/components/particlesystem-component.d.ts +2 -7
- package/dist/components/render-component.d.ts +2 -7
- package/dist/components/rigidbody-component.d.ts +3 -7
- package/dist/components/screen-component.d.ts +3 -7
- package/dist/components/script-component.d.ts +8 -20
- package/dist/components/script.d.ts +2 -22
- package/dist/components/scrollbar-component.d.ts +2 -7
- package/dist/components/scrollview-component.d.ts +3 -7
- package/dist/components/sound-component.d.ts +2 -7
- package/dist/components/sound-slot.d.ts +8 -6
- package/dist/custom-elements.json +5049 -10696
- package/dist/entity.d.ts +5 -11
- package/dist/index.d.ts +37 -0
- package/dist/material.d.ts +12 -12
- package/dist/model.d.ts +21 -5
- package/dist/module.d.ts +0 -6
- package/dist/parse.d.ts +2 -1
- package/dist/pwc.cjs +496 -136
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +496 -136
- 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 +1 -1
- package/dist/pwc.min.mjs.map +1 -1
- package/dist/pwc.mjs +496 -136
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.ts +4 -7
- package/dist/sky.d.ts +13 -5
- package/dist/vscode.html-custom-data.json +26 -26
- package/dist/web-types.json +545 -536
- package/package.json +8 -7
- package/src/app.ts +142 -70
- package/src/asset.ts +34 -28
- package/src/async-element.ts +34 -8
- package/src/components/button-component.ts +5 -9
- package/src/components/camera-component.ts +24 -10
- package/src/components/collision-component.ts +26 -15
- package/src/components/component.ts +58 -8
- package/src/components/element-component.ts +26 -30
- package/src/components/gsplat-component.ts +4 -9
- package/src/components/layoutchild-component.ts +4 -9
- package/src/components/layoutgroup-component.ts +14 -9
- package/src/components/light-component.ts +42 -12
- package/src/components/listener-component.ts +1 -7
- package/src/components/particlesystem-component.ts +7 -15
- package/src/components/render-component.ts +5 -10
- package/src/components/rigidbody-component.ts +23 -16
- package/src/components/screen-component.ts +5 -9
- package/src/components/script-component.ts +108 -46
- package/src/components/script.ts +38 -33
- package/src/components/scrollbar-component.ts +6 -16
- package/src/components/scrollview-component.ts +16 -11
- package/src/components/sound-component.ts +10 -15
- package/src/components/sound-slot.ts +30 -20
- package/src/entity.ts +42 -19
- package/src/index.ts +45 -1
- package/src/loading-bar.ts +8 -8
- package/src/material.ts +63 -37
- package/src/model.ts +69 -14
- package/src/module.ts +8 -7
- package/src/parse.ts +62 -17
- package/src/scene.ts +12 -9
- package/src/sky.ts +50 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScrollbarComponent } from 'playcanvas';
|
|
1
|
+
import type { ScrollbarComponent } from 'playcanvas';
|
|
2
2
|
import { ComponentElement } from './component';
|
|
3
3
|
/**
|
|
4
4
|
* The ScrollbarComponentElement interface provides properties and methods for manipulating
|
|
@@ -15,7 +15,7 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
15
15
|
private _handle;
|
|
16
16
|
/** @ignore */
|
|
17
17
|
constructor();
|
|
18
|
-
getInitialComponentData(): Record<string, any>;
|
|
18
|
+
protected getInitialComponentData(): Record<string, any>;
|
|
19
19
|
/**
|
|
20
20
|
* Gets the underlying PlayCanvas scrollbar component.
|
|
21
21
|
* @returns The scrollbar component.
|
|
@@ -66,9 +66,4 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
66
66
|
static get observedAttributes(): string[];
|
|
67
67
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
68
68
|
}
|
|
69
|
-
declare global {
|
|
70
|
-
interface HTMLElementTagNameMap {
|
|
71
|
-
'pc-scrollbar': ScrollbarComponentElement;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
69
|
export { ScrollbarComponentElement };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ScrollViewComponent
|
|
1
|
+
import type { ScrollViewComponent } from 'playcanvas';
|
|
2
|
+
import { Vec2 } from 'playcanvas';
|
|
2
3
|
import { ComponentElement } from './component';
|
|
3
4
|
/**
|
|
4
5
|
* The ScrollViewComponentElement interface provides properties and methods for manipulating
|
|
@@ -24,7 +25,7 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
24
25
|
private _verticalScrollbar;
|
|
25
26
|
/** @ignore */
|
|
26
27
|
constructor();
|
|
27
|
-
getInitialComponentData(): Record<string, any>;
|
|
28
|
+
protected getInitialComponentData(): Record<string, any>;
|
|
28
29
|
/**
|
|
29
30
|
* Gets the underlying PlayCanvas scroll view component.
|
|
30
31
|
* @returns The scroll view component.
|
|
@@ -174,9 +175,4 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
174
175
|
static get observedAttributes(): string[];
|
|
175
176
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
176
177
|
}
|
|
177
|
-
declare global {
|
|
178
|
-
interface HTMLElementTagNameMap {
|
|
179
|
-
'pc-scrollview': ScrollViewComponentElement;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
178
|
export { ScrollViewComponentElement };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SoundComponent } from 'playcanvas';
|
|
1
|
+
import type { SoundComponent } from 'playcanvas';
|
|
2
2
|
import { ComponentElement } from './component';
|
|
3
3
|
/**
|
|
4
4
|
* The SoundComponentElement interface provides properties and methods for manipulating
|
|
@@ -18,7 +18,7 @@ declare class SoundComponentElement extends ComponentElement {
|
|
|
18
18
|
private _volume;
|
|
19
19
|
/** @ignore */
|
|
20
20
|
constructor();
|
|
21
|
-
getInitialComponentData(): {
|
|
21
|
+
protected getInitialComponentData(): {
|
|
22
22
|
distanceModel: "linear" | "exponential" | "inverse";
|
|
23
23
|
maxDistance: number;
|
|
24
24
|
pitch: number;
|
|
@@ -105,9 +105,4 @@ declare class SoundComponentElement extends ComponentElement {
|
|
|
105
105
|
static get observedAttributes(): string[];
|
|
106
106
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
107
107
|
}
|
|
108
|
-
declare global {
|
|
109
|
-
interface HTMLElementTagNameMap {
|
|
110
|
-
'pc-sounds': SoundComponentElement;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
108
|
export { SoundComponentElement };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SoundSlot } from 'playcanvas';
|
|
1
|
+
import type { SoundSlot } from 'playcanvas';
|
|
2
2
|
import { AsyncElement } from '../async-element';
|
|
3
3
|
import { SoundComponentElement } from './sound-component';
|
|
4
4
|
/**
|
|
@@ -24,6 +24,13 @@ declare class SoundSlotElement extends AsyncElement {
|
|
|
24
24
|
* emit a misleading "must be a direct child" warning for what is an ordinary removal.
|
|
25
25
|
*/
|
|
26
26
|
private _soundElement;
|
|
27
|
+
/**
|
|
28
|
+
* Incremented on every connect and disconnect, and captured by connectedCallback on entry —
|
|
29
|
+
* a resume from an await abandons itself if the value has moved on, so a stale callback can
|
|
30
|
+
* neither act on a torn-down tree nor add its slot alongside a re-inserted element's own
|
|
31
|
+
* callback.
|
|
32
|
+
*/
|
|
33
|
+
private _connectionGeneration;
|
|
27
34
|
/**
|
|
28
35
|
* The sound slot.
|
|
29
36
|
*/
|
|
@@ -124,9 +131,4 @@ declare class SoundSlotElement extends AsyncElement {
|
|
|
124
131
|
static get observedAttributes(): string[];
|
|
125
132
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
126
133
|
}
|
|
127
|
-
declare global {
|
|
128
|
-
interface HTMLElementTagNameMap {
|
|
129
|
-
'pc-sound': SoundSlotElement;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
134
|
export { SoundSlotElement };
|