@playcanvas/web-components 0.15.0 → 0.17.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/app.d.cts +14 -13
- package/dist/app.d.ts +14 -13
- package/dist/async-element.d.cts +13 -13
- package/dist/async-element.d.ts +13 -13
- package/dist/components/anim-clip.d.cts +127 -0
- package/dist/components/anim-clip.d.ts +127 -0
- package/dist/components/anim-component.d.cts +235 -0
- package/dist/components/anim-component.d.ts +235 -0
- package/dist/components/{listener-component.d.cts → audio-listener-component.d.cts} +7 -5
- package/dist/components/{listener-component.d.ts → audio-listener-component.d.ts} +7 -5
- package/dist/components/button-component.d.cts +5 -1
- package/dist/components/button-component.d.ts +5 -1
- package/dist/components/camera-component.d.cts +2 -0
- package/dist/components/camera-component.d.ts +2 -0
- package/dist/components/collision-component.d.cts +5 -1
- package/dist/components/collision-component.d.ts +5 -1
- package/dist/components/component.d.cts +3 -2
- package/dist/components/component.d.ts +3 -2
- package/dist/components/element-component.d.cts +7 -0
- package/dist/components/element-component.d.ts +7 -0
- package/dist/components/gsplat-component.d.cts +2 -0
- package/dist/components/gsplat-component.d.ts +2 -0
- package/dist/components/joint-component.d.cts +2 -0
- package/dist/components/joint-component.d.ts +2 -0
- package/dist/components/{layoutchild-component.d.cts → layout-child-component.d.cts} +3 -1
- package/dist/components/{layoutchild-component.d.ts → layout-child-component.d.ts} +3 -1
- package/dist/components/{layoutgroup-component.d.cts → layout-group-component.d.cts} +3 -1
- package/dist/components/{layoutgroup-component.d.ts → layout-group-component.d.ts} +3 -1
- package/dist/components/light-component.d.cts +2 -0
- package/dist/components/light-component.d.ts +2 -0
- package/dist/components/{particlesystem-component.d.cts → particle-system-component.d.cts} +3 -1
- package/dist/components/{particlesystem-component.d.ts → particle-system-component.d.ts} +3 -1
- package/dist/components/render-component.d.cts +2 -0
- package/dist/components/render-component.d.ts +2 -0
- package/dist/components/{rigidbody-component.d.cts → rigid-body-component.d.cts} +3 -1
- package/dist/components/{rigidbody-component.d.ts → rigid-body-component.d.ts} +3 -1
- package/dist/components/screen-component.d.cts +2 -0
- package/dist/components/screen-component.d.ts +2 -0
- package/dist/components/script-component.d.cts +23 -12
- package/dist/components/script-component.d.ts +23 -12
- package/dist/components/{script.d.cts → script-instance.d.cts} +7 -7
- package/dist/components/{script.d.ts → script-instance.d.ts} +7 -7
- package/dist/components/{scrollview-component.d.cts → scroll-view-component.d.cts} +3 -1
- package/dist/components/{scrollview-component.d.ts → scroll-view-component.d.ts} +3 -1
- package/dist/components/scrollbar-component.d.cts +2 -0
- package/dist/components/scrollbar-component.d.ts +2 -0
- package/dist/components/sound-component.d.cts +3 -1
- package/dist/components/sound-component.d.ts +3 -1
- package/dist/components/sound-slot.d.cts +2 -2
- package/dist/components/sound-slot.d.ts +2 -2
- package/dist/custom-elements.json +3154 -2005
- package/dist/entity-base.d.cts +6 -5
- package/dist/entity-base.d.ts +6 -5
- package/dist/entity-owner.d.cts +118 -0
- package/dist/entity-owner.d.ts +118 -0
- package/dist/entity.d.cts +8 -101
- package/dist/entity.d.ts +8 -101
- package/dist/index.d.cts +26 -21
- package/dist/index.d.ts +26 -21
- package/dist/model.d.cts +67 -24
- package/dist/model.d.ts +67 -24
- package/dist/pwc.cjs +1766 -619
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1766 -619
- 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 +1762 -618
- package/dist/pwc.mjs.map +1 -1
- package/dist/vscode.html-custom-data.json +203 -89
- package/dist/{module.d.cts → wasm.d.cts} +6 -6
- package/dist/{module.d.ts → wasm.d.ts} +6 -6
- package/dist/web-types.json +556 -273
- package/package.json +7 -7
- package/src/app.ts +45 -35
- package/src/async-element.ts +14 -14
- package/src/components/anim-clip.ts +395 -0
- package/src/components/anim-component.ts +719 -0
- package/src/components/{listener-component.ts → audio-listener-component.ts} +8 -6
- package/src/components/button-component.ts +5 -1
- package/src/components/camera-component.ts +2 -0
- package/src/components/collision-component.ts +5 -1
- package/src/components/component.ts +4 -3
- package/src/components/element-component.ts +7 -0
- package/src/components/gsplat-component.ts +2 -0
- package/src/components/joint-component.ts +2 -0
- package/src/components/{layoutchild-component.ts → layout-child-component.ts} +4 -2
- package/src/components/{layoutgroup-component.ts → layout-group-component.ts} +4 -2
- package/src/components/light-component.ts +2 -0
- package/src/components/{particlesystem-component.ts → particle-system-component.ts} +4 -2
- package/src/components/render-component.ts +2 -0
- package/src/components/{rigidbody-component.ts → rigid-body-component.ts} +4 -2
- package/src/components/screen-component.ts +2 -0
- package/src/components/script-component.ts +63 -42
- package/src/components/{script.ts → script-instance.ts} +14 -14
- package/src/components/{scrollview-component.ts → scroll-view-component.ts} +4 -2
- package/src/components/scrollbar-component.ts +2 -0
- package/src/components/sound-component.ts +4 -2
- package/src/components/sound-slot.ts +4 -4
- package/src/entity-base.ts +6 -5
- package/src/entity-owner.ts +298 -0
- package/src/entity.ts +15 -270
- package/src/index.ts +32 -24
- package/src/model.ts +159 -79
- package/src/node.ts +9 -5
- package/src/{module.ts → wasm.ts} +8 -8
package/src/entity.ts
CHANGED
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Entity, Vec3 } from 'playcanvas';
|
|
1
|
+
import { Vec3 } from 'playcanvas';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { POINTER_ATTRIBUTES } from './entity-base';
|
|
4
|
+
import { buildDescendantEntities, EntityOwnerElement } from './entity-owner';
|
|
5
5
|
import { parseBool, parseTags, parseVec3 } from './parse';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Creates and parents the entities of every descendant `<pc-entity>` of `root`, in two passes so
|
|
9
|
-
* that no parent's existence depends on document order. Called wherever a subtree could not build
|
|
10
|
-
* itself: an element inserted into an application that is already running, and a `<pc-node>` whose
|
|
11
|
-
* children waited for it to bind.
|
|
12
|
-
*
|
|
13
|
-
* Descendants that are not yet custom elements are skipped, because there is nothing useful to do
|
|
14
|
-
* for them and reaching for `_createEntity` would throw. A subtree cloned from a `<template>`
|
|
15
|
-
* arrives entirely unupgraded — template content lives in an inert document, where custom element
|
|
16
|
-
* definitions are never looked up — and appending the clone upgrades its elements in tree order,
|
|
17
|
-
* an element before its descendants. So a sweep from an element's own `connectedCallback` sees
|
|
18
|
-
* plain `HTMLElement`s below it. Each becomes an `EntityElement` moments later and its own
|
|
19
|
-
* `connectedCallback` creates and parents it, by which time the ancestor it parents under has its
|
|
20
|
-
* entity — the same guarantee tree order gives this sweep.
|
|
21
|
-
*
|
|
22
|
-
* @param root - The element whose descendant entities to build.
|
|
23
|
-
* @param app - The application to create the entities in.
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
export const buildDescendantEntities = (root: Element, app: AppBase) => {
|
|
27
|
-
const children = Array.from(root.querySelectorAll('pc-entity')).filter(
|
|
28
|
-
(child): child is EntityElement => child instanceof EntityElement
|
|
29
|
-
);
|
|
30
|
-
children.forEach((child) => child._createEntity(app));
|
|
31
|
-
children.forEach((child) => child._buildHierarchy(app));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
7
|
/**
|
|
35
8
|
* The EntityElement interface provides properties and methods for manipulating
|
|
36
9
|
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-entity/ | `<pc-entity>`} elements.
|
|
@@ -42,6 +15,12 @@ export const buildDescendantEntities = (root: Element, app: AppBase) => {
|
|
|
42
15
|
* them, registered either with {@link addEventListener} or with the matching inline `onpointer*`
|
|
43
16
|
* attribute.
|
|
44
17
|
*
|
|
18
|
+
* @attribute {boolean} enabled - The enabled state of the entity.
|
|
19
|
+
* @attribute {string} name - The name of the entity.
|
|
20
|
+
* @attribute {string} position - The position of the entity.
|
|
21
|
+
* @attribute {string} rotation - The rotation of the entity.
|
|
22
|
+
* @attribute {string} scale - The scale of the entity.
|
|
23
|
+
* @attribute {string} tags - The tags of the entity.
|
|
45
24
|
* @attribute {string} onpointerenter - Script to run when the pointer moves onto the entity.
|
|
46
25
|
* @attribute {string} onpointerleave - Script to run when the pointer moves off the entity.
|
|
47
26
|
* @attribute {string} onpointermove - Script to run when the pointer moves over the entity.
|
|
@@ -55,129 +34,7 @@ export const buildDescendantEntities = (root: Element, app: AppBase) => {
|
|
|
55
34
|
* @fires {PointerEvent} pointerdown - Fired when a pointer button is pressed over the entity.
|
|
56
35
|
* @fires {PointerEvent} pointerup - Fired when a pointer button is released over the entity.
|
|
57
36
|
*/
|
|
58
|
-
class EntityElement extends
|
|
59
|
-
/**
|
|
60
|
-
* Whether the entity is enabled.
|
|
61
|
-
*/
|
|
62
|
-
private _enabled = true;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The name of the entity.
|
|
66
|
-
*/
|
|
67
|
-
private _name = 'Untitled';
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The position of the entity.
|
|
71
|
-
*/
|
|
72
|
-
private _position = new Vec3();
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The rotation of the entity.
|
|
76
|
-
*/
|
|
77
|
-
private _rotation = new Vec3();
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The scale of the entity.
|
|
81
|
-
*/
|
|
82
|
-
private _scale = new Vec3(1, 1, 1);
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* The tags of the entity.
|
|
86
|
-
*/
|
|
87
|
-
private _tags: string[] = [];
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Whether the hierarchy has been built for this entity.
|
|
91
|
-
*/
|
|
92
|
-
private _built = false;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Creates the backing entity. Called by the containing `<pc-app>` element during its boot
|
|
96
|
-
* sweep, and on connection for elements inserted while the application is already running.
|
|
97
|
-
*
|
|
98
|
-
* @param app - The application to create the entity in.
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
_createEntity(app: AppBase) {
|
|
102
|
-
// Guard against double creation. When a subtree is inserted at runtime (e.g. cloning a
|
|
103
|
-
// `<template>`), an ancestor's connectedCallback eagerly creates descendant entities; the
|
|
104
|
-
// descendants' own connectedCallbacks would otherwise create them a second time.
|
|
105
|
-
if (this._entity) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Seed from the cached fields rather than re-reading the attributes. Every observed
|
|
110
|
-
// attribute is routed through its property setter by attributeChangedCallback, so the field
|
|
111
|
-
// already holds the parsed attribute value - and it also holds anything assigned through the
|
|
112
|
-
// property API before the app booted, which reading the attribute back would discard.
|
|
113
|
-
const entity = new Entity(this._name, app);
|
|
114
|
-
this._entity = entity;
|
|
115
|
-
|
|
116
|
-
entity.enabled = this._enabled;
|
|
117
|
-
entity.setLocalPosition(this._position);
|
|
118
|
-
entity.setLocalEulerAngles(this._rotation);
|
|
119
|
-
entity.setLocalScale(this._scale);
|
|
120
|
-
|
|
121
|
-
if (this._tags.length > 0) {
|
|
122
|
-
entity.tags.add(this._tags);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Register with the owning application and hook the entity's destruction. The engine
|
|
126
|
-
// fires 'destroy' for every entity in a destroyed subtree, so the element learns of its
|
|
127
|
-
// entity's death no matter who causes it: this element, an ancestor, the whole
|
|
128
|
-
// application, or a user script calling entity.destroy().
|
|
129
|
-
this._registerEntity(entity);
|
|
130
|
-
entity.once('destroy', this._onEntityDestroy, this);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Handles the destruction of the backing entity. Resets the element so a later re-insertion
|
|
135
|
-
* starts clean: `_built` must be cleared alongside `_entity`, or _buildHierarchy would bail
|
|
136
|
-
* and a re-created entity would never be parented. Readiness is re-armed for the same
|
|
137
|
-
* reason — with the entity gone, a resolved ready promise would resume its awaiters against
|
|
138
|
-
* a null `entity`.
|
|
139
|
-
*
|
|
140
|
-
* @param entity - The entity that was destroyed.
|
|
141
|
-
*/
|
|
142
|
-
private _onEntityDestroy(entity: Entity) {
|
|
143
|
-
this._unregisterEntity(entity);
|
|
144
|
-
this._entity = null;
|
|
145
|
-
this._built = false;
|
|
146
|
-
this._resetReady();
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Parents the backing entity: under the entity of the nearest ancestor `<pc-entity>` or
|
|
151
|
-
* `<pc-node>` when there is one, and under the application root otherwise. Called by the
|
|
152
|
-
* containing `<pc-app>` element once a sweep has created every entity, so a parent's
|
|
153
|
-
* existence never depends on document order.
|
|
154
|
-
*
|
|
155
|
-
* @param app - The application whose root adopts parentless entities.
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
|
-
_buildHierarchy(app: AppBase) {
|
|
159
|
-
if (!this.entity || this._built) return;
|
|
160
|
-
|
|
161
|
-
const closestEntity = this.closestEntity;
|
|
162
|
-
|
|
163
|
-
// A host element without an entity is an unresolved `<pc-node>`: building now would
|
|
164
|
-
// mis-anchor this entity to the application root while the host is still resolving.
|
|
165
|
-
// Stay unbuilt - the host drives this subtree itself once it binds.
|
|
166
|
-
if (closestEntity && !closestEntity.entity) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
this._built = true;
|
|
171
|
-
|
|
172
|
-
if (closestEntity?.entity) {
|
|
173
|
-
closestEntity.entity.addChild(this.entity);
|
|
174
|
-
} else {
|
|
175
|
-
app.root.addChild(this.entity);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
this._onReady();
|
|
179
|
-
}
|
|
180
|
-
|
|
37
|
+
class EntityElement extends EntityOwnerElement {
|
|
181
38
|
connectedCallback() {
|
|
182
39
|
// Wait for app to be ready
|
|
183
40
|
const closestApp = this.closestApp;
|
|
@@ -198,8 +55,11 @@ class EntityElement extends EntityBaseElement {
|
|
|
198
55
|
this._createEntity(app);
|
|
199
56
|
this._buildHierarchy(app);
|
|
200
57
|
|
|
201
|
-
// Handle any child entities that might exist
|
|
202
|
-
|
|
58
|
+
// Handle any child entities that might exist. A build that deferred (an unresolved
|
|
59
|
+
// pc-node above) defers the whole subtree with it - the node's bind sweeps it.
|
|
60
|
+
if (this._built) {
|
|
61
|
+
buildDescendantEntities(this, app);
|
|
62
|
+
}
|
|
203
63
|
}
|
|
204
64
|
}
|
|
205
65
|
|
|
@@ -211,121 +71,6 @@ class EntityElement extends EntityBaseElement {
|
|
|
211
71
|
this._entity?.destroy();
|
|
212
72
|
}
|
|
213
73
|
|
|
214
|
-
/**
|
|
215
|
-
* Sets the enabled state of the entity.
|
|
216
|
-
* @param value - Whether the entity is enabled.
|
|
217
|
-
*/
|
|
218
|
-
set enabled(value) {
|
|
219
|
-
this._enabled = value;
|
|
220
|
-
if (this.entity) {
|
|
221
|
-
this.entity.enabled = value;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Gets the enabled state of the entity.
|
|
227
|
-
* @returns Whether the entity is enabled.
|
|
228
|
-
*/
|
|
229
|
-
get enabled() {
|
|
230
|
-
return this._enabled;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Sets the name of the entity.
|
|
235
|
-
* @param value - The name of the entity.
|
|
236
|
-
*/
|
|
237
|
-
set name(value) {
|
|
238
|
-
this._name = value;
|
|
239
|
-
if (this.entity) {
|
|
240
|
-
this.entity.name = value;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Gets the name of the entity.
|
|
246
|
-
* @returns The name of the entity.
|
|
247
|
-
*/
|
|
248
|
-
get name() {
|
|
249
|
-
return this._name;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Sets the position of the entity.
|
|
254
|
-
* @param value - The position of the entity.
|
|
255
|
-
*/
|
|
256
|
-
set position(value) {
|
|
257
|
-
this._position = value;
|
|
258
|
-
if (this.entity) {
|
|
259
|
-
this.entity.setLocalPosition(this._position);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Gets the position of the entity.
|
|
265
|
-
* @returns The position of the entity.
|
|
266
|
-
*/
|
|
267
|
-
get position() {
|
|
268
|
-
return this._position;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Sets the rotation of the entity.
|
|
273
|
-
* @param value - The rotation of the entity.
|
|
274
|
-
*/
|
|
275
|
-
set rotation(value) {
|
|
276
|
-
this._rotation = value;
|
|
277
|
-
if (this.entity) {
|
|
278
|
-
this.entity.setLocalEulerAngles(this._rotation);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Gets the rotation of the entity.
|
|
284
|
-
* @returns The rotation of the entity.
|
|
285
|
-
*/
|
|
286
|
-
get rotation() {
|
|
287
|
-
return this._rotation;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Sets the scale of the entity.
|
|
292
|
-
* @param value - The scale of the entity.
|
|
293
|
-
*/
|
|
294
|
-
set scale(value) {
|
|
295
|
-
this._scale = value;
|
|
296
|
-
if (this.entity) {
|
|
297
|
-
this.entity.setLocalScale(this._scale);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Gets the scale of the entity.
|
|
303
|
-
* @returns The scale of the entity.
|
|
304
|
-
*/
|
|
305
|
-
get scale() {
|
|
306
|
-
return this._scale;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Sets the tags of the entity.
|
|
311
|
-
* @param value - The tags of the entity.
|
|
312
|
-
*/
|
|
313
|
-
set tags(value) {
|
|
314
|
-
this._tags = value;
|
|
315
|
-
if (this.entity) {
|
|
316
|
-
this.entity.tags.clear();
|
|
317
|
-
this.entity.tags.add(this._tags);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Gets the tags of the entity.
|
|
323
|
-
* @returns The tags of the entity.
|
|
324
|
-
*/
|
|
325
|
-
get tags() {
|
|
326
|
-
return this._tags;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
74
|
static get observedAttributes() {
|
|
330
75
|
return ['enabled', 'name', 'position', 'rotation', 'scale', 'tags', ...POINTER_ATTRIBUTES];
|
|
331
76
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,36 +9,39 @@
|
|
|
9
9
|
|
|
10
10
|
/* eslint-disable import-x/order */
|
|
11
11
|
|
|
12
|
-
// Note that order matters here (e.g. pc-entity must be defined before components)
|
|
12
|
+
// Note that order matters here (e.g. pc-entity and pc-model must be defined before components)
|
|
13
13
|
import { AsyncElement, whenReady } from './async-element';
|
|
14
|
-
import {
|
|
14
|
+
import { WasmElement } from './wasm';
|
|
15
15
|
import { AppElement } from './app';
|
|
16
16
|
import { EntityElement } from './entity';
|
|
17
|
+
import { ModelElement } from './model';
|
|
17
18
|
import { AssetElement } from './asset';
|
|
18
|
-
import {
|
|
19
|
+
import { AnimComponentElement } from './components/anim-component';
|
|
20
|
+
import { AnimClipElement } from './components/anim-clip';
|
|
21
|
+
import { AudioListenerComponentElement } from './components/audio-listener-component';
|
|
19
22
|
import { ButtonComponentElement } from './components/button-component';
|
|
20
23
|
import { CameraComponentElement } from './components/camera-component';
|
|
21
24
|
import { CollisionComponentElement } from './components/collision-component';
|
|
22
25
|
import { ComponentElement } from './components/component';
|
|
23
26
|
import { ElementComponentElement } from './components/element-component';
|
|
24
27
|
import { JointComponentElement } from './components/joint-component';
|
|
25
|
-
import { LayoutChildComponentElement } from './components/
|
|
26
|
-
import { LayoutGroupComponentElement } from './components/
|
|
28
|
+
import { LayoutChildComponentElement } from './components/layout-child-component';
|
|
29
|
+
import { LayoutGroupComponentElement } from './components/layout-group-component';
|
|
27
30
|
import { LightComponentElement } from './components/light-component';
|
|
28
|
-
import { ParticleSystemComponentElement } from './components/
|
|
31
|
+
import { ParticleSystemComponentElement } from './components/particle-system-component';
|
|
29
32
|
import { RenderComponentElement } from './components/render-component';
|
|
30
|
-
import { RigidBodyComponentElement } from './components/
|
|
33
|
+
import { RigidBodyComponentElement } from './components/rigid-body-component';
|
|
31
34
|
import { ScreenComponentElement } from './components/screen-component';
|
|
32
35
|
import { ScrollbarComponentElement } from './components/scrollbar-component';
|
|
33
|
-
import { ScrollViewComponentElement } from './components/
|
|
36
|
+
import { ScrollViewComponentElement } from './components/scroll-view-component';
|
|
34
37
|
import { ScriptComponentElement } from './components/script-component';
|
|
35
|
-
import {
|
|
38
|
+
import { ScriptInstanceElement } from './components/script-instance';
|
|
36
39
|
import { SoundComponentElement } from './components/sound-component';
|
|
37
40
|
import { SoundSlotElement } from './components/sound-slot';
|
|
38
41
|
import { GSplatComponentElement } from './components/gsplat-component';
|
|
39
42
|
import { EntityBaseElement } from './entity-base';
|
|
43
|
+
import { EntityOwnerElement } from './entity-owner';
|
|
40
44
|
import { MaterialElement } from './material';
|
|
41
|
-
import { ModelElement } from './model';
|
|
42
45
|
import { NodeElement } from './node';
|
|
43
46
|
import { SceneElement } from './scene';
|
|
44
47
|
import { SkyElement } from './sky';
|
|
@@ -58,6 +61,8 @@ declare global {
|
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
interface HTMLElementTagNameMap {
|
|
64
|
+
'pc-anim': AnimComponentElement;
|
|
65
|
+
'pc-anim-clip': AnimClipElement;
|
|
61
66
|
'pc-app': AppElement;
|
|
62
67
|
'pc-asset': AssetElement;
|
|
63
68
|
'pc-button': ButtonComponentElement;
|
|
@@ -67,35 +72,37 @@ declare global {
|
|
|
67
72
|
'pc-entity': EntityElement;
|
|
68
73
|
'pc-gsplat': GSplatComponentElement;
|
|
69
74
|
'pc-joint': JointComponentElement;
|
|
70
|
-
'pc-
|
|
71
|
-
'pc-
|
|
75
|
+
'pc-layout-child': LayoutChildComponentElement;
|
|
76
|
+
'pc-layout-group': LayoutGroupComponentElement;
|
|
72
77
|
'pc-light': LightComponentElement;
|
|
73
|
-
'pc-listener':
|
|
78
|
+
'pc-audio-listener': AudioListenerComponentElement;
|
|
74
79
|
'pc-material': MaterialElement;
|
|
75
80
|
'pc-model': ModelElement;
|
|
76
|
-
'pc-
|
|
81
|
+
'pc-wasm': WasmElement;
|
|
77
82
|
'pc-node': NodeElement;
|
|
78
|
-
'pc-
|
|
83
|
+
'pc-particle-system': ParticleSystemComponentElement;
|
|
79
84
|
'pc-render': RenderComponentElement;
|
|
80
|
-
'pc-
|
|
85
|
+
'pc-rigid-body': RigidBodyComponentElement;
|
|
81
86
|
'pc-scene': SceneElement;
|
|
82
87
|
'pc-screen': ScreenComponentElement;
|
|
83
|
-
'pc-script':
|
|
84
|
-
'pc-
|
|
88
|
+
'pc-script-instance': ScriptInstanceElement;
|
|
89
|
+
'pc-script': ScriptComponentElement;
|
|
85
90
|
'pc-scrollbar': ScrollbarComponentElement;
|
|
86
|
-
'pc-
|
|
91
|
+
'pc-scroll-view': ScrollViewComponentElement;
|
|
87
92
|
'pc-sky': SkyElement;
|
|
88
|
-
'pc-sound': SoundSlotElement;
|
|
89
|
-
'pc-
|
|
93
|
+
'pc-sound-slot': SoundSlotElement;
|
|
94
|
+
'pc-sound': SoundComponentElement;
|
|
90
95
|
}
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
export {
|
|
94
99
|
AsyncElement,
|
|
95
|
-
|
|
100
|
+
WasmElement,
|
|
96
101
|
AppElement,
|
|
97
102
|
EntityElement,
|
|
98
103
|
AssetElement,
|
|
104
|
+
AnimComponentElement,
|
|
105
|
+
AnimClipElement,
|
|
99
106
|
ButtonComponentElement,
|
|
100
107
|
CameraComponentElement,
|
|
101
108
|
CollisionComponentElement,
|
|
@@ -106,18 +113,19 @@ export {
|
|
|
106
113
|
LayoutGroupComponentElement,
|
|
107
114
|
ParticleSystemComponentElement,
|
|
108
115
|
LightComponentElement,
|
|
109
|
-
|
|
116
|
+
AudioListenerComponentElement,
|
|
110
117
|
RenderComponentElement,
|
|
111
118
|
RigidBodyComponentElement,
|
|
112
119
|
ScreenComponentElement,
|
|
113
120
|
ScrollbarComponentElement,
|
|
114
121
|
ScrollViewComponentElement,
|
|
115
122
|
ScriptComponentElement,
|
|
116
|
-
|
|
123
|
+
ScriptInstanceElement,
|
|
117
124
|
SoundComponentElement,
|
|
118
125
|
SoundSlotElement,
|
|
119
126
|
GSplatComponentElement,
|
|
120
127
|
EntityBaseElement,
|
|
128
|
+
EntityOwnerElement,
|
|
121
129
|
MaterialElement,
|
|
122
130
|
ModelElement,
|
|
123
131
|
NodeElement,
|