@playcanvas/web-components 0.11.1 → 0.13.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 +1 -1
- package/dist/app.d.cts +246 -0
- package/dist/app.d.ts +38 -13
- package/dist/asset.d.cts +218 -0
- package/dist/asset.d.ts +145 -6
- package/dist/async-element.d.cts +103 -0
- package/dist/async-element.d.ts +11 -8
- package/dist/colors.d.cts +1 -0
- package/dist/components/button-component.d.cts +186 -0
- package/dist/components/button-component.d.ts +1 -1
- package/dist/components/camera-component.d.cts +253 -0
- package/dist/components/camera-component.d.ts +1 -1
- package/dist/components/collision-component.d.cts +73 -0
- package/dist/components/collision-component.d.ts +17 -1
- package/dist/components/component.d.cts +82 -0
- package/dist/components/component.d.ts +20 -1
- package/dist/components/element-component.d.cts +316 -0
- package/dist/components/element-component.d.ts +1 -1
- package/dist/components/gsplat-component.d.cts +108 -0
- package/dist/components/gsplat-component.d.ts +1 -1
- package/dist/components/layoutchild-component.d.cts +110 -0
- package/dist/components/layoutchild-component.d.ts +1 -1
- package/dist/components/layoutgroup-component.d.cts +136 -0
- package/dist/components/layoutgroup-component.d.ts +1 -1
- package/dist/components/light-component.d.cts +264 -0
- package/dist/components/light-component.d.ts +1 -1
- package/dist/components/listener-component.d.cts +20 -0
- package/dist/components/listener-component.d.ts +1 -1
- package/dist/components/particlesystem-component.d.cts +52 -0
- package/dist/components/particlesystem-component.d.ts +1 -1
- package/dist/components/render-component.d.cts +76 -0
- package/dist/components/render-component.d.ts +1 -1
- package/dist/components/rigidbody-component.d.cts +88 -0
- package/dist/components/rigidbody-component.d.ts +1 -1
- package/dist/components/screen-component.d.cts +70 -0
- package/dist/components/screen-component.d.ts +1 -1
- package/dist/components/script-component.d.cts +163 -0
- package/dist/components/script-component.d.ts +1 -1
- package/dist/components/script.d.cts +94 -0
- package/dist/components/script.d.ts +1 -1
- package/dist/components/scrollbar-component.d.cts +69 -0
- package/dist/components/scrollbar-component.d.ts +1 -1
- package/dist/components/scrollview-component.d.cts +178 -0
- package/dist/components/scrollview-component.d.ts +1 -1
- package/dist/components/sound-component.d.cts +108 -0
- package/dist/components/sound-component.d.ts +1 -1
- package/dist/components/sound-slot.d.cts +134 -0
- package/dist/components/sound-slot.d.ts +2 -2
- package/dist/custom-elements.json +1127 -179
- package/dist/entity-base.d.cts +67 -0
- package/dist/entity-base.d.ts +67 -0
- package/dist/entity.d.cts +131 -0
- package/dist/entity.d.ts +3 -38
- package/dist/index.d.cts +79 -0
- package/dist/index.d.ts +35 -32
- package/dist/loading-bar.d.cts +35 -0
- package/dist/material.d.cts +1011 -0
- package/dist/material.d.ts +2 -1
- package/dist/model.d.cts +72 -0
- package/dist/model.d.ts +27 -5
- package/dist/module.d.cts +29 -0
- package/dist/module.d.ts +16 -10
- package/dist/node.d.cts +253 -0
- package/dist/node.d.ts +253 -0
- package/dist/parse.d.cts +147 -0
- package/dist/pwc.cjs +1496 -200
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1497 -201
- 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 +1496 -202
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.cts +117 -0
- package/dist/scene.d.ts +1 -1
- package/dist/sky.d.cts +121 -0
- package/dist/sky.d.ts +1 -1
- package/dist/vscode.html-custom-data.json +127 -5
- package/dist/web-types.json +399 -59
- package/package.json +16 -7
- package/src/app.ts +137 -45
- package/src/asset.ts +439 -9
- package/src/async-element.ts +11 -8
- package/src/components/collision-component.ts +35 -0
- package/src/components/component.ts +93 -3
- package/src/entity-base.ts +136 -0
- package/src/entity.ts +23 -117
- package/src/index.ts +5 -0
- package/src/loading-bar.ts +2 -2
- package/src/material.ts +2 -2
- package/src/model.ts +79 -11
- package/src/module.ts +39 -20
- package/src/node.ts +715 -0
- package/src/sky.ts +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { SoundSlot } from 'playcanvas';
|
|
2
|
+
import { AsyncElement } from '../async-element.cjs';
|
|
3
|
+
import { SoundComponentElement } from './sound-component.cjs';
|
|
4
|
+
/**
|
|
5
|
+
* The SoundSlotElement interface provides properties and methods for manipulating
|
|
6
|
+
* `<pc-sound>` elements. The SoundSlotElement interface also inherits the properties and
|
|
7
|
+
* methods of the {@link AsyncElement} interface.
|
|
8
|
+
*/
|
|
9
|
+
declare class SoundSlotElement extends AsyncElement {
|
|
10
|
+
private _asset;
|
|
11
|
+
private _autoPlay;
|
|
12
|
+
private _duration;
|
|
13
|
+
private _loop;
|
|
14
|
+
private _name;
|
|
15
|
+
private _overlap;
|
|
16
|
+
private _pitch;
|
|
17
|
+
private _startTime;
|
|
18
|
+
private _volume;
|
|
19
|
+
/**
|
|
20
|
+
* The `<pc-sounds>` this slot was added to, captured at connect time.
|
|
21
|
+
*
|
|
22
|
+
* `disconnectedCallback` cannot rediscover it: by the time the element is disconnected its
|
|
23
|
+
* `parentElement` is already `null`, so a lookup would both fail to find the component and
|
|
24
|
+
* emit a misleading "must be a direct child" warning for what is an ordinary removal.
|
|
25
|
+
*/
|
|
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;
|
|
34
|
+
/**
|
|
35
|
+
* The sound slot.
|
|
36
|
+
*/
|
|
37
|
+
soundSlot: SoundSlot | null;
|
|
38
|
+
connectedCallback(): Promise<void>;
|
|
39
|
+
disconnectedCallback(): void;
|
|
40
|
+
protected get soundElement(): SoundComponentElement | null;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the id of the `pc-asset` to use for the sound slot.
|
|
43
|
+
* @param value - The asset.
|
|
44
|
+
*/
|
|
45
|
+
set asset(value: string);
|
|
46
|
+
/**
|
|
47
|
+
* Gets the id of the `pc-asset` to use for the sound slot.
|
|
48
|
+
* @returns The asset.
|
|
49
|
+
*/
|
|
50
|
+
get asset(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the auto play flag of the sound slot.
|
|
53
|
+
* @param value - The auto play flag.
|
|
54
|
+
*/
|
|
55
|
+
set autoPlay(value: boolean);
|
|
56
|
+
/**
|
|
57
|
+
* Gets the auto play flag of the sound slot.
|
|
58
|
+
* @returns The auto play flag.
|
|
59
|
+
*/
|
|
60
|
+
get autoPlay(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the duration of the sound slot, in seconds (or `null` to play the whole clip).
|
|
63
|
+
* @param value - The duration.
|
|
64
|
+
*/
|
|
65
|
+
set duration(value: number | null);
|
|
66
|
+
/**
|
|
67
|
+
* Gets the duration of the sound slot.
|
|
68
|
+
* @returns The duration.
|
|
69
|
+
*/
|
|
70
|
+
get duration(): number | null;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the loop flag of the sound slot.
|
|
73
|
+
* @param value - The loop flag.
|
|
74
|
+
*/
|
|
75
|
+
set loop(value: boolean);
|
|
76
|
+
/**
|
|
77
|
+
* Gets the loop flag of the sound slot.
|
|
78
|
+
* @returns The loop flag.
|
|
79
|
+
*/
|
|
80
|
+
get loop(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the name of the sound slot.
|
|
83
|
+
* @param value - The name.
|
|
84
|
+
*/
|
|
85
|
+
set name(value: string);
|
|
86
|
+
/**
|
|
87
|
+
* Gets the name of the sound slot.
|
|
88
|
+
* @returns The name.
|
|
89
|
+
*/
|
|
90
|
+
get name(): string;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the overlap flag of the sound slot.
|
|
93
|
+
* @param value - The overlap flag.
|
|
94
|
+
*/
|
|
95
|
+
set overlap(value: boolean);
|
|
96
|
+
/**
|
|
97
|
+
* Gets the overlap flag of the sound slot.
|
|
98
|
+
* @returns The overlap flag.
|
|
99
|
+
*/
|
|
100
|
+
get overlap(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the pitch of the sound slot.
|
|
103
|
+
* @param value - The pitch.
|
|
104
|
+
*/
|
|
105
|
+
set pitch(value: number);
|
|
106
|
+
/**
|
|
107
|
+
* Gets the pitch of the sound slot.
|
|
108
|
+
* @returns The pitch.
|
|
109
|
+
*/
|
|
110
|
+
get pitch(): number;
|
|
111
|
+
/**
|
|
112
|
+
* Sets the start time of the sound slot.
|
|
113
|
+
* @param value - The start time.
|
|
114
|
+
*/
|
|
115
|
+
set startTime(value: number);
|
|
116
|
+
/**
|
|
117
|
+
* Gets the start time of the sound slot.
|
|
118
|
+
* @returns The start time.
|
|
119
|
+
*/
|
|
120
|
+
get startTime(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Sets the volume of the sound slot.
|
|
123
|
+
* @param value - The volume.
|
|
124
|
+
*/
|
|
125
|
+
set volume(value: number);
|
|
126
|
+
/**
|
|
127
|
+
* Gets the volume of the sound slot.
|
|
128
|
+
* @returns The volume.
|
|
129
|
+
*/
|
|
130
|
+
get volume(): number;
|
|
131
|
+
static get observedAttributes(): string[];
|
|
132
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
133
|
+
}
|
|
134
|
+
export { SoundSlotElement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SoundSlot } from 'playcanvas';
|
|
2
|
-
import { AsyncElement } from '../async-element';
|
|
3
|
-
import { SoundComponentElement } from './sound-component';
|
|
2
|
+
import { AsyncElement } from '../async-element.js';
|
|
3
|
+
import { SoundComponentElement } from './sound-component.js';
|
|
4
4
|
/**
|
|
5
5
|
* The SoundSlotElement interface provides properties and methods for manipulating
|
|
6
6
|
* `<pc-sound>` elements. The SoundSlotElement interface also inherits the properties and
|