@playcanvas/web-components 0.19.0 → 0.21.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 +5 -99
- package/dist/app.d.ts +5 -99
- package/dist/asset-binding.d.cts +1 -0
- package/dist/asset-binding.d.ts +1 -0
- package/dist/components/anim-clip.d.cts +8 -10
- package/dist/components/anim-clip.d.ts +8 -10
- package/dist/components/anim-component.d.cts +5 -4
- package/dist/components/anim-component.d.ts +5 -4
- package/dist/components/audio-listener-component.d.cts +5 -4
- package/dist/components/audio-listener-component.d.ts +5 -4
- package/dist/components/button-component.d.cts +14 -9
- package/dist/components/button-component.d.ts +14 -9
- package/dist/components/camera-component.d.cts +5 -4
- package/dist/components/camera-component.d.ts +5 -4
- package/dist/components/collision-component.d.cts +5 -4
- package/dist/components/collision-component.d.ts +5 -4
- package/dist/components/component.d.cts +2 -2
- package/dist/components/component.d.ts +2 -2
- package/dist/components/element-component.d.cts +5 -4
- package/dist/components/element-component.d.ts +5 -4
- package/dist/components/gsplat-component.d.cts +5 -4
- package/dist/components/gsplat-component.d.ts +5 -4
- package/dist/components/joint-component.d.cts +29 -14
- package/dist/components/joint-component.d.ts +29 -14
- package/dist/components/layout-child-component.d.cts +5 -4
- package/dist/components/layout-child-component.d.ts +5 -4
- package/dist/components/layout-group-component.d.cts +5 -4
- package/dist/components/layout-group-component.d.ts +5 -4
- package/dist/components/light-component.d.cts +5 -4
- package/dist/components/light-component.d.ts +5 -4
- package/dist/components/particle-system-component.d.cts +22 -5
- package/dist/components/particle-system-component.d.ts +22 -5
- package/dist/components/render-component.d.cts +5 -4
- package/dist/components/render-component.d.ts +5 -4
- package/dist/components/rigid-body-component.d.cts +5 -4
- package/dist/components/rigid-body-component.d.ts +5 -4
- package/dist/components/screen-component.d.cts +5 -4
- package/dist/components/screen-component.d.ts +5 -4
- package/dist/components/script-component.d.cts +9 -6
- package/dist/components/script-component.d.ts +9 -6
- package/dist/components/script-instance.d.cts +14 -6
- package/dist/components/script-instance.d.ts +14 -6
- package/dist/components/scroll-view-component.d.cts +29 -16
- package/dist/components/scroll-view-component.d.ts +29 -16
- package/dist/components/scrollbar-component.d.cts +11 -7
- package/dist/components/scrollbar-component.d.ts +11 -7
- package/dist/components/sound-component.d.cts +5 -4
- package/dist/components/sound-component.d.ts +5 -4
- package/dist/custom-elements.json +59 -59
- package/dist/entity-reference.d.cts +13 -0
- package/dist/entity-reference.d.ts +13 -0
- package/dist/material.d.cts +8 -6
- package/dist/material.d.ts +8 -6
- package/dist/model.d.cts +8 -9
- package/dist/model.d.ts +8 -9
- package/dist/parse.d.cts +0 -3
- package/dist/parse.d.ts +0 -3
- package/dist/pointer-controller.d.cts +1 -0
- package/dist/pointer-controller.d.ts +1 -0
- package/dist/pwc.cjs +1085 -633
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +1085 -633
- 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 +1086 -634
- package/dist/pwc.mjs.map +1 -1
- package/dist/sky.d.cts +6 -7
- package/dist/sky.d.ts +6 -7
- package/dist/vscode.html-custom-data.json +10 -10
- package/dist/web-types.json +58 -58
- package/package.json +3 -3
- package/src/app.ts +16 -416
- package/src/asset-binding.ts +141 -0
- package/src/components/anim-clip.ts +22 -45
- package/src/components/anim-component.ts +10 -6
- package/src/components/audio-listener-component.ts +6 -5
- package/src/components/button-component.ts +25 -15
- package/src/components/camera-component.ts +6 -5
- package/src/components/collision-component.ts +6 -5
- package/src/components/component.ts +6 -4
- package/src/components/element-component.ts +6 -5
- package/src/components/gsplat-component.ts +6 -5
- package/src/components/joint-component.ts +36 -20
- package/src/components/layout-child-component.ts +6 -5
- package/src/components/layout-group-component.ts +6 -5
- package/src/components/light-component.ts +6 -5
- package/src/components/particle-system-component.ts +56 -30
- package/src/components/render-component.ts +6 -5
- package/src/components/rigid-body-component.ts +6 -5
- package/src/components/screen-component.ts +6 -5
- package/src/components/script-component.ts +28 -17
- package/src/components/script-instance.ts +14 -6
- package/src/components/scroll-view-component.ts +56 -34
- package/src/components/scrollbar-component.ts +20 -13
- package/src/components/sound-component.ts +6 -5
- package/src/entity-reference.ts +237 -0
- package/src/material.ts +25 -29
- package/src/model.ts +24 -48
- package/src/parse.ts +0 -35
- package/src/pointer-controller.ts +550 -0
- package/src/sky.ts +19 -30
|
@@ -15,7 +15,7 @@ import { ComponentElement } from './component.cjs';
|
|
|
15
15
|
*
|
|
16
16
|
* @category Components
|
|
17
17
|
*/
|
|
18
|
-
declare class ScreenComponentElement extends ComponentElement {
|
|
18
|
+
declare class ScreenComponentElement extends ComponentElement<ScreenComponent> {
|
|
19
19
|
private _screenSpace;
|
|
20
20
|
private _resolution;
|
|
21
21
|
private _referenceResolution;
|
|
@@ -33,10 +33,11 @@ declare class ScreenComponentElement extends ComponentElement {
|
|
|
33
33
|
screenSpace: boolean;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* Gets the underlying PlayCanvas screen component.
|
|
37
|
-
*
|
|
36
|
+
* Gets the underlying PlayCanvas screen component. `null` until the element is
|
|
37
|
+
* ready — see {@link ComponentElement.component}.
|
|
38
|
+
* @returns The screen component, or `null`.
|
|
38
39
|
*/
|
|
39
|
-
get component(): ScreenComponent;
|
|
40
|
+
get component(): ScreenComponent | null;
|
|
40
41
|
set priority(value: number);
|
|
41
42
|
get priority(): number;
|
|
42
43
|
set referenceResolution(value: Vec2);
|
|
@@ -15,7 +15,7 @@ import { ComponentElement } from './component.js';
|
|
|
15
15
|
*
|
|
16
16
|
* @category Components
|
|
17
17
|
*/
|
|
18
|
-
declare class ScreenComponentElement extends ComponentElement {
|
|
18
|
+
declare class ScreenComponentElement extends ComponentElement<ScreenComponent> {
|
|
19
19
|
private _screenSpace;
|
|
20
20
|
private _resolution;
|
|
21
21
|
private _referenceResolution;
|
|
@@ -33,10 +33,11 @@ declare class ScreenComponentElement extends ComponentElement {
|
|
|
33
33
|
screenSpace: boolean;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* Gets the underlying PlayCanvas screen component.
|
|
37
|
-
*
|
|
36
|
+
* Gets the underlying PlayCanvas screen component. `null` until the element is
|
|
37
|
+
* ready — see {@link ComponentElement.component}.
|
|
38
|
+
* @returns The screen component, or `null`.
|
|
38
39
|
*/
|
|
39
|
-
get component(): ScreenComponent;
|
|
40
|
+
get component(): ScreenComponent | null;
|
|
40
41
|
set priority(value: number);
|
|
41
42
|
get priority(): number;
|
|
42
43
|
set referenceResolution(value: Vec2);
|
|
@@ -29,7 +29,7 @@ export type ScriptNameChangeEvent = {
|
|
|
29
29
|
*
|
|
30
30
|
* @category Components
|
|
31
31
|
*/
|
|
32
|
-
declare class ScriptComponentElement extends ComponentElement {
|
|
32
|
+
declare class ScriptComponentElement extends ComponentElement<ScriptComponent> {
|
|
33
33
|
private observer;
|
|
34
34
|
/** @ignore */
|
|
35
35
|
constructor();
|
|
@@ -38,8 +38,10 @@ declare class ScriptComponentElement extends ComponentElement {
|
|
|
38
38
|
/**
|
|
39
39
|
* Recursively converts raw attribute data into proper PlayCanvas types. Supported conversions:
|
|
40
40
|
* - "asset:id" → the Asset created by the `pc-asset` element with that id
|
|
41
|
-
* - "entity:ref" → the Entity backing a `pc-entity` element. The
|
|
42
|
-
*
|
|
41
|
+
* - "entity:ref" → the Entity backing a `pc-entity`, `pc-model` or `pc-node` element. The
|
|
42
|
+
* reference is a name, resolved against this element's nearest enclosing entity first,
|
|
43
|
+
* then outward, then the document — or a document-wide `#` selector (`entity:#id`). A bare
|
|
44
|
+
* value is always a name, never an id.
|
|
43
45
|
* - "vec2:1 2" → new Vec2(1, 2)
|
|
44
46
|
* - "vec3:1 2 3" → new Vec3(1, 2, 3)
|
|
45
47
|
* - "vec4:1 2 3 4" → new Vec4(1, 2, 3, 4)
|
|
@@ -169,9 +171,10 @@ declare class ScriptComponentElement extends ComponentElement {
|
|
|
169
171
|
private handleMutations;
|
|
170
172
|
disconnectedCallback(): void;
|
|
171
173
|
/**
|
|
172
|
-
* Gets the underlying PlayCanvas script component.
|
|
173
|
-
*
|
|
174
|
+
* Gets the underlying PlayCanvas script component. `null` until the element is
|
|
175
|
+
* ready — see {@link ComponentElement.component}.
|
|
176
|
+
* @returns The script component, or `null`.
|
|
174
177
|
*/
|
|
175
|
-
get component(): ScriptComponent;
|
|
178
|
+
get component(): ScriptComponent | null;
|
|
176
179
|
}
|
|
177
180
|
export { ScriptComponentElement };
|
|
@@ -29,7 +29,7 @@ export type ScriptNameChangeEvent = {
|
|
|
29
29
|
*
|
|
30
30
|
* @category Components
|
|
31
31
|
*/
|
|
32
|
-
declare class ScriptComponentElement extends ComponentElement {
|
|
32
|
+
declare class ScriptComponentElement extends ComponentElement<ScriptComponent> {
|
|
33
33
|
private observer;
|
|
34
34
|
/** @ignore */
|
|
35
35
|
constructor();
|
|
@@ -38,8 +38,10 @@ declare class ScriptComponentElement extends ComponentElement {
|
|
|
38
38
|
/**
|
|
39
39
|
* Recursively converts raw attribute data into proper PlayCanvas types. Supported conversions:
|
|
40
40
|
* - "asset:id" → the Asset created by the `pc-asset` element with that id
|
|
41
|
-
* - "entity:ref" → the Entity backing a `pc-entity` element. The
|
|
42
|
-
*
|
|
41
|
+
* - "entity:ref" → the Entity backing a `pc-entity`, `pc-model` or `pc-node` element. The
|
|
42
|
+
* reference is a name, resolved against this element's nearest enclosing entity first,
|
|
43
|
+
* then outward, then the document — or a document-wide `#` selector (`entity:#id`). A bare
|
|
44
|
+
* value is always a name, never an id.
|
|
43
45
|
* - "vec2:1 2" → new Vec2(1, 2)
|
|
44
46
|
* - "vec3:1 2 3" → new Vec3(1, 2, 3)
|
|
45
47
|
* - "vec4:1 2 3 4" → new Vec4(1, 2, 3, 4)
|
|
@@ -169,9 +171,10 @@ declare class ScriptComponentElement extends ComponentElement {
|
|
|
169
171
|
private handleMutations;
|
|
170
172
|
disconnectedCallback(): void;
|
|
171
173
|
/**
|
|
172
|
-
* Gets the underlying PlayCanvas script component.
|
|
173
|
-
*
|
|
174
|
+
* Gets the underlying PlayCanvas script component. `null` until the element is
|
|
175
|
+
* ready — see {@link ComponentElement.component}.
|
|
176
|
+
* @returns The script component, or `null`.
|
|
174
177
|
*/
|
|
175
|
-
get component(): ScriptComponent;
|
|
178
|
+
get component(): ScriptComponent | null;
|
|
176
179
|
}
|
|
177
180
|
export { ScriptComponentElement };
|
|
@@ -12,7 +12,9 @@ import { AsyncElement } from '../async-element.cjs';
|
|
|
12
12
|
* Values are parsed according to the type of the attribute's current value — initially the
|
|
13
13
|
* script's declared default (numbers, booleans, strings, Vec2/3/4, Color, Quat as Euler
|
|
14
14
|
* angles) — and the `asset:`/`entity:`/`vec2:`/`vec3:`/`vec4:`/`color:` prefixes may be used
|
|
15
|
-
* to be explicit.
|
|
15
|
+
* to be explicit. An `entity:` reference is an entity name — resolved against the nearest
|
|
16
|
+
* enclosing entity first, then outward, then the document — or a document-wide `#` selector
|
|
17
|
+
* (`entity:#id`); a bare value is always a name, never an element id.
|
|
16
18
|
* - **The `attributes` JSON attribute**: an object supporting nested structures and attribute
|
|
17
19
|
* names that collide with reserved HTML attribute names (e.g. `title`).
|
|
18
20
|
*
|
|
@@ -28,7 +30,8 @@ import { AsyncElement } from '../async-element.cjs';
|
|
|
28
30
|
*
|
|
29
31
|
* @elementSummary The `<pc-script-instance>` element attaches one script class, named by `name`, to
|
|
30
32
|
* the entity of its parent `<pc-script>`. Its other attributes set script attributes of the same
|
|
31
|
-
* name, and `attributes` takes a JSON object instead.
|
|
33
|
+
* name, and `attributes` takes a JSON object instead. An `entity:` value is an entity name —
|
|
34
|
+
* write `entity:#id` for an element id. Must be a direct child of `<pc-script>`.
|
|
32
35
|
*
|
|
33
36
|
* @fires {CustomEvent} scriptattributeschange - Fired when the script's attributes change. The
|
|
34
37
|
* `detail` carries the new `attributes` object. Bubbles.
|
|
@@ -43,14 +46,19 @@ declare class ScriptInstanceElement extends AsyncElement {
|
|
|
43
46
|
/**
|
|
44
47
|
* Sets the attributes of the script as an object. Values are converted with the same rules
|
|
45
48
|
* as the `attributes` attribute: `asset:`/`entity:` references and `vec2:`/`vec3:`/`vec4:`/
|
|
46
|
-
* `color:` prefixed strings are resolved
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
+
* `color:` prefixed strings are resolved (an entity name against the nearest enclosing
|
|
50
|
+
* entity first, then outward, then the document — or a document-wide `#` selector; a bare
|
|
51
|
+
* value is always a name, never an element id), and a plain numeric array is converted to
|
|
52
|
+
* the type of the attribute it targets when that attribute currently holds a Vec2, Vec3,
|
|
53
|
+
* Vec4 or Color.
|
|
49
54
|
* @param value - The attributes of the script.
|
|
50
55
|
*/
|
|
51
56
|
set scriptAttributes(value: Record<string, any>);
|
|
52
57
|
/**
|
|
53
|
-
* Gets the attributes of the script
|
|
58
|
+
* Gets the attributes of the script as an object whose `asset:`, `entity:`, `vec2:`, `vec3:`,
|
|
59
|
+
* `vec4:` and `color:` prefixed values are resolved when applied — an `entity:` value being
|
|
60
|
+
* an entity name (nearest enclosing entity first, then outward, then the document) or a
|
|
61
|
+
* document-wide `#` selector (`entity:#id`), never a bare element id.
|
|
54
62
|
* @returns The attributes of the script.
|
|
55
63
|
*/
|
|
56
64
|
get scriptAttributes(): Record<string, any>;
|
|
@@ -12,7 +12,9 @@ import { AsyncElement } from '../async-element.js';
|
|
|
12
12
|
* Values are parsed according to the type of the attribute's current value — initially the
|
|
13
13
|
* script's declared default (numbers, booleans, strings, Vec2/3/4, Color, Quat as Euler
|
|
14
14
|
* angles) — and the `asset:`/`entity:`/`vec2:`/`vec3:`/`vec4:`/`color:` prefixes may be used
|
|
15
|
-
* to be explicit.
|
|
15
|
+
* to be explicit. An `entity:` reference is an entity name — resolved against the nearest
|
|
16
|
+
* enclosing entity first, then outward, then the document — or a document-wide `#` selector
|
|
17
|
+
* (`entity:#id`); a bare value is always a name, never an element id.
|
|
16
18
|
* - **The `attributes` JSON attribute**: an object supporting nested structures and attribute
|
|
17
19
|
* names that collide with reserved HTML attribute names (e.g. `title`).
|
|
18
20
|
*
|
|
@@ -28,7 +30,8 @@ import { AsyncElement } from '../async-element.js';
|
|
|
28
30
|
*
|
|
29
31
|
* @elementSummary The `<pc-script-instance>` element attaches one script class, named by `name`, to
|
|
30
32
|
* the entity of its parent `<pc-script>`. Its other attributes set script attributes of the same
|
|
31
|
-
* name, and `attributes` takes a JSON object instead.
|
|
33
|
+
* name, and `attributes` takes a JSON object instead. An `entity:` value is an entity name —
|
|
34
|
+
* write `entity:#id` for an element id. Must be a direct child of `<pc-script>`.
|
|
32
35
|
*
|
|
33
36
|
* @fires {CustomEvent} scriptattributeschange - Fired when the script's attributes change. The
|
|
34
37
|
* `detail` carries the new `attributes` object. Bubbles.
|
|
@@ -43,14 +46,19 @@ declare class ScriptInstanceElement extends AsyncElement {
|
|
|
43
46
|
/**
|
|
44
47
|
* Sets the attributes of the script as an object. Values are converted with the same rules
|
|
45
48
|
* as the `attributes` attribute: `asset:`/`entity:` references and `vec2:`/`vec3:`/`vec4:`/
|
|
46
|
-
* `color:` prefixed strings are resolved
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
+
* `color:` prefixed strings are resolved (an entity name against the nearest enclosing
|
|
50
|
+
* entity first, then outward, then the document — or a document-wide `#` selector; a bare
|
|
51
|
+
* value is always a name, never an element id), and a plain numeric array is converted to
|
|
52
|
+
* the type of the attribute it targets when that attribute currently holds a Vec2, Vec3,
|
|
53
|
+
* Vec4 or Color.
|
|
49
54
|
* @param value - The attributes of the script.
|
|
50
55
|
*/
|
|
51
56
|
set scriptAttributes(value: Record<string, any>);
|
|
52
57
|
/**
|
|
53
|
-
* Gets the attributes of the script
|
|
58
|
+
* Gets the attributes of the script as an object whose `asset:`, `entity:`, `vec2:`, `vec3:`,
|
|
59
|
+
* `vec4:` and `color:` prefixed values are resolved when applied — an `entity:` value being
|
|
60
|
+
* an entity name (nearest enclosing entity first, then outward, then the document) or a
|
|
61
|
+
* document-wide `#` selector (`entity:#id`), never a bare element id.
|
|
54
62
|
* @returns The attributes of the script.
|
|
55
63
|
*/
|
|
56
64
|
get scriptAttributes(): Record<string, any>;
|
|
@@ -15,7 +15,7 @@ import { ComponentElement } from './component.cjs';
|
|
|
15
15
|
*
|
|
16
16
|
* @category Components
|
|
17
17
|
*/
|
|
18
|
-
declare class ScrollViewComponentElement extends ComponentElement {
|
|
18
|
+
declare class ScrollViewComponentElement extends ComponentElement<ScrollViewComponent> {
|
|
19
19
|
private _horizontal;
|
|
20
20
|
private _vertical;
|
|
21
21
|
private _scrollMode;
|
|
@@ -33,10 +33,11 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
33
33
|
constructor();
|
|
34
34
|
protected getInitialComponentData(): Record<string, any>;
|
|
35
35
|
/**
|
|
36
|
-
* Gets the underlying PlayCanvas scroll view component.
|
|
37
|
-
*
|
|
36
|
+
* Gets the underlying PlayCanvas scroll view component. `null` until the element is
|
|
37
|
+
* ready — see {@link ComponentElement.component}.
|
|
38
|
+
* @returns The scroll view component, or `null`.
|
|
38
39
|
*/
|
|
39
|
-
get component(): ScrollViewComponent;
|
|
40
|
+
get component(): ScrollViewComponent | null;
|
|
40
41
|
/**
|
|
41
42
|
* Sets whether scrolling along the horizontal axis is enabled. This is a toggle, unlike the
|
|
42
43
|
* `orientation` of a `<pc-scrollbar>`, for which `horizontal` is one of the accepted values.
|
|
@@ -135,46 +136,58 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
135
136
|
*/
|
|
136
137
|
get verticalScrollbarVisibility(): "always" | "when-required";
|
|
137
138
|
/**
|
|
138
|
-
* Sets the reference (
|
|
139
|
-
* viewport, which clips the content to the scroll view's
|
|
139
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
140
|
+
* selector) to the entity used as the viewport, which clips the content to the scroll view's
|
|
141
|
+
* bounds. An exact name resolves against the nearest enclosing entity first, then outward,
|
|
142
|
+
* then the document. A non-empty reference that does not resolve warns and is ignored.
|
|
140
143
|
* @param value - The viewport entity reference.
|
|
141
144
|
*/
|
|
142
145
|
set viewport(value: string);
|
|
143
146
|
/**
|
|
144
|
-
* Gets the reference
|
|
147
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
148
|
+
* selector) to the entity used as the viewport.
|
|
145
149
|
* @returns The viewport entity reference.
|
|
146
150
|
*/
|
|
147
151
|
get viewport(): string;
|
|
148
152
|
/**
|
|
149
|
-
* Sets the reference (
|
|
150
|
-
* content, which is moved as the scroll view is
|
|
153
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
154
|
+
* selector) to the entity used as the content, which is moved as the scroll view is
|
|
155
|
+
* scrolled. An exact name resolves against the nearest enclosing entity first, then outward,
|
|
156
|
+
* then the document. A non-empty reference that does not resolve warns and is ignored.
|
|
151
157
|
* @param value - The content entity reference.
|
|
152
158
|
*/
|
|
153
159
|
set content(value: string);
|
|
154
160
|
/**
|
|
155
|
-
* Gets the reference
|
|
161
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
162
|
+
* selector) to the entity used as the content.
|
|
156
163
|
* @returns The content entity reference.
|
|
157
164
|
*/
|
|
158
165
|
get content(): string;
|
|
159
166
|
/**
|
|
160
|
-
* Sets the reference (
|
|
161
|
-
* the horizontal `<pc-scrollbar>`.
|
|
167
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
168
|
+
* selector) to the entity containing the horizontal `<pc-scrollbar>`. An exact name resolves
|
|
169
|
+
* against the nearest enclosing entity first, then outward, then the document. A non-empty
|
|
170
|
+
* reference that does not resolve warns and is ignored.
|
|
162
171
|
* @param value - The horizontal scrollbar entity reference.
|
|
163
172
|
*/
|
|
164
173
|
set horizontalScrollbar(value: string);
|
|
165
174
|
/**
|
|
166
|
-
* Gets the reference
|
|
175
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
176
|
+
* selector) to the entity containing the horizontal scrollbar.
|
|
167
177
|
* @returns The horizontal scrollbar entity reference.
|
|
168
178
|
*/
|
|
169
179
|
get horizontalScrollbar(): string;
|
|
170
180
|
/**
|
|
171
|
-
* Sets the reference (
|
|
172
|
-
* the vertical `<pc-scrollbar>`.
|
|
181
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
182
|
+
* selector) to the entity containing the vertical `<pc-scrollbar>`. An exact name resolves
|
|
183
|
+
* against the nearest enclosing entity first, then outward, then the document. A non-empty
|
|
184
|
+
* reference that does not resolve warns and is ignored.
|
|
173
185
|
* @param value - The vertical scrollbar entity reference.
|
|
174
186
|
*/
|
|
175
187
|
set verticalScrollbar(value: string);
|
|
176
188
|
/**
|
|
177
|
-
* Gets the reference
|
|
189
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
190
|
+
* selector) to the entity containing the vertical scrollbar.
|
|
178
191
|
* @returns The vertical scrollbar entity reference.
|
|
179
192
|
*/
|
|
180
193
|
get verticalScrollbar(): string;
|
|
@@ -15,7 +15,7 @@ import { ComponentElement } from './component.js';
|
|
|
15
15
|
*
|
|
16
16
|
* @category Components
|
|
17
17
|
*/
|
|
18
|
-
declare class ScrollViewComponentElement extends ComponentElement {
|
|
18
|
+
declare class ScrollViewComponentElement extends ComponentElement<ScrollViewComponent> {
|
|
19
19
|
private _horizontal;
|
|
20
20
|
private _vertical;
|
|
21
21
|
private _scrollMode;
|
|
@@ -33,10 +33,11 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
33
33
|
constructor();
|
|
34
34
|
protected getInitialComponentData(): Record<string, any>;
|
|
35
35
|
/**
|
|
36
|
-
* Gets the underlying PlayCanvas scroll view component.
|
|
37
|
-
*
|
|
36
|
+
* Gets the underlying PlayCanvas scroll view component. `null` until the element is
|
|
37
|
+
* ready — see {@link ComponentElement.component}.
|
|
38
|
+
* @returns The scroll view component, or `null`.
|
|
38
39
|
*/
|
|
39
|
-
get component(): ScrollViewComponent;
|
|
40
|
+
get component(): ScrollViewComponent | null;
|
|
40
41
|
/**
|
|
41
42
|
* Sets whether scrolling along the horizontal axis is enabled. This is a toggle, unlike the
|
|
42
43
|
* `orientation` of a `<pc-scrollbar>`, for which `horizontal` is one of the accepted values.
|
|
@@ -135,46 +136,58 @@ declare class ScrollViewComponentElement extends ComponentElement {
|
|
|
135
136
|
*/
|
|
136
137
|
get verticalScrollbarVisibility(): "always" | "when-required";
|
|
137
138
|
/**
|
|
138
|
-
* Sets the reference (
|
|
139
|
-
* viewport, which clips the content to the scroll view's
|
|
139
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
140
|
+
* selector) to the entity used as the viewport, which clips the content to the scroll view's
|
|
141
|
+
* bounds. An exact name resolves against the nearest enclosing entity first, then outward,
|
|
142
|
+
* then the document. A non-empty reference that does not resolve warns and is ignored.
|
|
140
143
|
* @param value - The viewport entity reference.
|
|
141
144
|
*/
|
|
142
145
|
set viewport(value: string);
|
|
143
146
|
/**
|
|
144
|
-
* Gets the reference
|
|
147
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
148
|
+
* selector) to the entity used as the viewport.
|
|
145
149
|
* @returns The viewport entity reference.
|
|
146
150
|
*/
|
|
147
151
|
get viewport(): string;
|
|
148
152
|
/**
|
|
149
|
-
* Sets the reference (
|
|
150
|
-
* content, which is moved as the scroll view is
|
|
153
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
154
|
+
* selector) to the entity used as the content, which is moved as the scroll view is
|
|
155
|
+
* scrolled. An exact name resolves against the nearest enclosing entity first, then outward,
|
|
156
|
+
* then the document. A non-empty reference that does not resolve warns and is ignored.
|
|
151
157
|
* @param value - The content entity reference.
|
|
152
158
|
*/
|
|
153
159
|
set content(value: string);
|
|
154
160
|
/**
|
|
155
|
-
* Gets the reference
|
|
161
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
162
|
+
* selector) to the entity used as the content.
|
|
156
163
|
* @returns The content entity reference.
|
|
157
164
|
*/
|
|
158
165
|
get content(): string;
|
|
159
166
|
/**
|
|
160
|
-
* Sets the reference (
|
|
161
|
-
* the horizontal `<pc-scrollbar>`.
|
|
167
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
168
|
+
* selector) to the entity containing the horizontal `<pc-scrollbar>`. An exact name resolves
|
|
169
|
+
* against the nearest enclosing entity first, then outward, then the document. A non-empty
|
|
170
|
+
* reference that does not resolve warns and is ignored.
|
|
162
171
|
* @param value - The horizontal scrollbar entity reference.
|
|
163
172
|
*/
|
|
164
173
|
set horizontalScrollbar(value: string);
|
|
165
174
|
/**
|
|
166
|
-
* Gets the reference
|
|
175
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
176
|
+
* selector) to the entity containing the horizontal scrollbar.
|
|
167
177
|
* @returns The horizontal scrollbar entity reference.
|
|
168
178
|
*/
|
|
169
179
|
get horizontalScrollbar(): string;
|
|
170
180
|
/**
|
|
171
|
-
* Sets the reference (
|
|
172
|
-
* the vertical `<pc-scrollbar>`.
|
|
181
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
182
|
+
* selector) to the entity containing the vertical `<pc-scrollbar>`. An exact name resolves
|
|
183
|
+
* against the nearest enclosing entity first, then outward, then the document. A non-empty
|
|
184
|
+
* reference that does not resolve warns and is ignored.
|
|
173
185
|
* @param value - The vertical scrollbar entity reference.
|
|
174
186
|
*/
|
|
175
187
|
set verticalScrollbar(value: string);
|
|
176
188
|
/**
|
|
177
|
-
* Gets the reference
|
|
189
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
190
|
+
* selector) to the entity containing the vertical scrollbar.
|
|
178
191
|
* @returns The vertical scrollbar entity reference.
|
|
179
192
|
*/
|
|
180
193
|
get verticalScrollbar(): string;
|
|
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.cjs';
|
|
|
14
14
|
*
|
|
15
15
|
* @category Components
|
|
16
16
|
*/
|
|
17
|
-
declare class ScrollbarComponentElement extends ComponentElement {
|
|
17
|
+
declare class ScrollbarComponentElement extends ComponentElement<ScrollbarComponent> {
|
|
18
18
|
private _orientation;
|
|
19
19
|
private _value;
|
|
20
20
|
private _handleSize;
|
|
@@ -23,10 +23,11 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
23
23
|
constructor();
|
|
24
24
|
protected getInitialComponentData(): Record<string, any>;
|
|
25
25
|
/**
|
|
26
|
-
* Gets the underlying PlayCanvas scrollbar component.
|
|
27
|
-
*
|
|
26
|
+
* Gets the underlying PlayCanvas scrollbar component. `null` until the element is
|
|
27
|
+
* ready — see {@link ComponentElement.component}.
|
|
28
|
+
* @returns The scrollbar component, or `null`.
|
|
28
29
|
*/
|
|
29
|
-
get component(): ScrollbarComponent;
|
|
30
|
+
get component(): ScrollbarComponent | null;
|
|
30
31
|
/**
|
|
31
32
|
* Sets the orientation of the scrollbar. Can be `horizontal` or `vertical`. Defaults to
|
|
32
33
|
* `horizontal`.
|
|
@@ -59,13 +60,16 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
59
60
|
*/
|
|
60
61
|
get handleSize(): number;
|
|
61
62
|
/**
|
|
62
|
-
* Sets the reference (
|
|
63
|
-
* scrollbar handle.
|
|
63
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
64
|
+
* selector) to the entity used as the scrollbar handle. An exact name resolves against the
|
|
65
|
+
* nearest enclosing entity first, then outward, then the document. A non-empty reference that
|
|
66
|
+
* does not resolve warns and is ignored.
|
|
64
67
|
* @param value - The handle entity reference.
|
|
65
68
|
*/
|
|
66
69
|
set handle(value: string);
|
|
67
70
|
/**
|
|
68
|
-
* Gets the reference
|
|
71
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
72
|
+
* selector) to the entity used as the scrollbar handle.
|
|
69
73
|
* @returns The handle entity reference.
|
|
70
74
|
*/
|
|
71
75
|
get handle(): string;
|
|
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @category Components
|
|
16
16
|
*/
|
|
17
|
-
declare class ScrollbarComponentElement extends ComponentElement {
|
|
17
|
+
declare class ScrollbarComponentElement extends ComponentElement<ScrollbarComponent> {
|
|
18
18
|
private _orientation;
|
|
19
19
|
private _value;
|
|
20
20
|
private _handleSize;
|
|
@@ -23,10 +23,11 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
23
23
|
constructor();
|
|
24
24
|
protected getInitialComponentData(): Record<string, any>;
|
|
25
25
|
/**
|
|
26
|
-
* Gets the underlying PlayCanvas scrollbar component.
|
|
27
|
-
*
|
|
26
|
+
* Gets the underlying PlayCanvas scrollbar component. `null` until the element is
|
|
27
|
+
* ready — see {@link ComponentElement.component}.
|
|
28
|
+
* @returns The scrollbar component, or `null`.
|
|
28
29
|
*/
|
|
29
|
-
get component(): ScrollbarComponent;
|
|
30
|
+
get component(): ScrollbarComponent | null;
|
|
30
31
|
/**
|
|
31
32
|
* Sets the orientation of the scrollbar. Can be `horizontal` or `vertical`. Defaults to
|
|
32
33
|
* `horizontal`.
|
|
@@ -59,13 +60,16 @@ declare class ScrollbarComponentElement extends ComponentElement {
|
|
|
59
60
|
*/
|
|
60
61
|
get handleSize(): number;
|
|
61
62
|
/**
|
|
62
|
-
* Sets the reference (
|
|
63
|
-
* scrollbar handle.
|
|
63
|
+
* Sets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
64
|
+
* selector) to the entity used as the scrollbar handle. An exact name resolves against the
|
|
65
|
+
* nearest enclosing entity first, then outward, then the document. A non-empty reference that
|
|
66
|
+
* does not resolve warns and is ignored.
|
|
64
67
|
* @param value - The handle entity reference.
|
|
65
68
|
*/
|
|
66
69
|
set handle(value: string);
|
|
67
70
|
/**
|
|
68
|
-
* Gets the reference
|
|
71
|
+
* Gets the reference (a `pc-entity`, `pc-model` or `pc-node` name, or a document-wide `#`
|
|
72
|
+
* selector) to the entity used as the scrollbar handle.
|
|
69
73
|
* @returns The handle entity reference.
|
|
70
74
|
*/
|
|
71
75
|
get handle(): string;
|
|
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.cjs';
|
|
|
14
14
|
*
|
|
15
15
|
* @category Components
|
|
16
16
|
*/
|
|
17
|
-
declare class SoundComponentElement extends ComponentElement {
|
|
17
|
+
declare class SoundComponentElement extends ComponentElement<SoundComponent> {
|
|
18
18
|
private _distanceModel;
|
|
19
19
|
private _maxDistance;
|
|
20
20
|
private _pitch;
|
|
@@ -34,10 +34,11 @@ declare class SoundComponentElement extends ComponentElement {
|
|
|
34
34
|
volume: number;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Gets the underlying PlayCanvas sound component.
|
|
38
|
-
*
|
|
37
|
+
* Gets the underlying PlayCanvas sound component. `null` until the element is
|
|
38
|
+
* ready — see {@link ComponentElement.component}.
|
|
39
|
+
* @returns The sound component, or `null`.
|
|
39
40
|
*/
|
|
40
|
-
get component(): SoundComponent;
|
|
41
|
+
get component(): SoundComponent | null;
|
|
41
42
|
/**
|
|
42
43
|
* Sets which algorithm to use to reduce the volume of the sound as it moves away from the listener.
|
|
43
44
|
* @param value - The distance model.
|
|
@@ -14,7 +14,7 @@ import { ComponentElement } from './component.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @category Components
|
|
16
16
|
*/
|
|
17
|
-
declare class SoundComponentElement extends ComponentElement {
|
|
17
|
+
declare class SoundComponentElement extends ComponentElement<SoundComponent> {
|
|
18
18
|
private _distanceModel;
|
|
19
19
|
private _maxDistance;
|
|
20
20
|
private _pitch;
|
|
@@ -34,10 +34,11 @@ declare class SoundComponentElement extends ComponentElement {
|
|
|
34
34
|
volume: number;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Gets the underlying PlayCanvas sound component.
|
|
38
|
-
*
|
|
37
|
+
* Gets the underlying PlayCanvas sound component. `null` until the element is
|
|
38
|
+
* ready — see {@link ComponentElement.component}.
|
|
39
|
+
* @returns The sound component, or `null`.
|
|
39
40
|
*/
|
|
40
|
-
get component(): SoundComponent;
|
|
41
|
+
get component(): SoundComponent | null;
|
|
41
42
|
/**
|
|
42
43
|
* Sets which algorithm to use to reduce the volume of the sound as it moves away from the listener.
|
|
43
44
|
* @param value - The distance model.
|