@playcanvas/web-components 0.1.10 → 0.1.12
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/LICENSE +1 -1
- package/README.md +33 -273
- package/dist/app.d.ts +4 -1
- package/dist/asset.d.ts +3 -2
- package/dist/components/camera-component.d.ts +17 -3
- package/dist/components/collision-component.d.ts +4 -3
- package/dist/components/element-component.d.ts +84 -3
- package/dist/components/light-component.d.ts +4 -3
- package/dist/components/listener-component.d.ts +4 -3
- package/dist/components/render-component.d.ts +4 -3
- package/dist/components/rigidbody-component.d.ts +5 -4
- package/dist/components/screen-component.d.ts +4 -3
- package/dist/components/script-component.d.ts +4 -3
- package/dist/components/sound-component.d.ts +4 -3
- package/dist/components/sound-slot.d.ts +2 -2
- package/dist/components/splat-component.d.ts +36 -0
- package/dist/entity.d.ts +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/material.d.ts +3 -2
- package/dist/model.d.ts +6 -5
- package/dist/module.d.ts +3 -2
- package/dist/pwc.cjs +284 -87
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +284 -87
- 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.mjs +284 -87
- package/dist/pwc.mjs.map +1 -1
- package/dist/scene.d.ts +3 -2
- package/dist/sky.d.ts +64 -0
- package/package.json +23 -23
- package/src/app.ts +14 -10
- package/src/asset.ts +3 -2
- package/src/components/camera-component.ts +31 -3
- package/src/components/collision-component.ts +4 -3
- package/src/components/element-component.ts +84 -3
- package/src/components/light-component.ts +4 -3
- package/src/components/listener-component.ts +4 -3
- package/src/components/render-component.ts +4 -3
- package/src/components/rigidbody-component.ts +5 -4
- package/src/components/screen-component.ts +4 -3
- package/src/components/script-component.ts +4 -3
- package/src/components/sound-component.ts +4 -3
- package/src/components/sound-slot.ts +2 -2
- package/src/components/{gsplat-component.ts → splat-component.ts} +17 -8
- package/src/entity.ts +3 -2
- package/src/index.ts +2 -2
- package/src/material.ts +6 -5
- package/src/model.ts +8 -7
- package/src/module.ts +3 -2
- package/src/scene.ts +3 -2
- package/src/sky.ts +64 -0
- package/dist/components/gsplat-component.d.ts +0 -27
- package/dist/fog.d.ts +0 -28
- package/src/fog.ts +0 -121
|
@@ -2,8 +2,9 @@ import { ScreenComponent, Vec2 } from 'playcanvas';
|
|
|
2
2
|
import { ComponentElement } from './component';
|
|
3
3
|
/**
|
|
4
4
|
* The ScreenComponentElement interface provides properties and methods for manipulating
|
|
5
|
-
* `<pc-screen>` elements.
|
|
6
|
-
*
|
|
5
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-screen/ | `<pc-screen>`} elements.
|
|
6
|
+
* The ScreenComponentElement interface also inherits the properties and methods of the
|
|
7
|
+
* {@link HTMLElement} interface.
|
|
7
8
|
*
|
|
8
9
|
* @category Components
|
|
9
10
|
*/
|
|
@@ -25,7 +26,7 @@ declare class ScreenComponentElement extends ComponentElement {
|
|
|
25
26
|
screenSpace: boolean;
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
28
|
-
* Gets the screen component.
|
|
29
|
+
* Gets the underlying PlayCanvas screen component.
|
|
29
30
|
* @returns The screen component.
|
|
30
31
|
*/
|
|
31
32
|
get component(): ScreenComponent | null;
|
|
@@ -18,8 +18,9 @@ declare global {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The ScriptComponentElement interface provides properties and methods for manipulating
|
|
21
|
-
* `<pc-scripts>` elements.
|
|
22
|
-
*
|
|
21
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-scripts/ | `<pc-scripts>`} elements.
|
|
22
|
+
* The ScriptComponentElement interface also inherits the properties and methods of the
|
|
23
|
+
* {@link HTMLElement} interface.
|
|
23
24
|
*
|
|
24
25
|
* @category Components
|
|
25
26
|
*/
|
|
@@ -36,7 +37,7 @@ declare class ScriptComponentElement extends ComponentElement {
|
|
|
36
37
|
private handleMutations;
|
|
37
38
|
disconnectedCallback(): void;
|
|
38
39
|
/**
|
|
39
|
-
* Gets the script component.
|
|
40
|
+
* Gets the underlying PlayCanvas script component.
|
|
40
41
|
* @returns The script component.
|
|
41
42
|
*/
|
|
42
43
|
get component(): ScriptComponent | null;
|
|
@@ -2,8 +2,9 @@ import { SoundComponent } from 'playcanvas';
|
|
|
2
2
|
import { ComponentElement } from './component';
|
|
3
3
|
/**
|
|
4
4
|
* The SoundComponentElement interface provides properties and methods for manipulating
|
|
5
|
-
* `<pc-sounds>` elements.
|
|
6
|
-
*
|
|
5
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-sounds/ | `<pc-sounds>`} elements.
|
|
6
|
+
* The SoundComponentElement interface also inherits the properties and methods of the
|
|
7
|
+
* {@link HTMLElement} interface.
|
|
7
8
|
*
|
|
8
9
|
* @category Components
|
|
9
10
|
*/
|
|
@@ -27,7 +28,7 @@ declare class SoundComponentElement extends ComponentElement {
|
|
|
27
28
|
volume: number;
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
|
-
* Gets the sound component.
|
|
31
|
+
* Gets the underlying PlayCanvas sound component.
|
|
31
32
|
* @returns The sound component.
|
|
32
33
|
*/
|
|
33
34
|
get component(): SoundComponent | null;
|
|
@@ -24,12 +24,12 @@ declare class SoundSlotElement extends AsyncElement {
|
|
|
24
24
|
disconnectedCallback(): void;
|
|
25
25
|
protected get soundElement(): SoundComponentElement | null;
|
|
26
26
|
/**
|
|
27
|
-
* Sets the
|
|
27
|
+
* Sets the id of the `pc-asset` to use for the sound slot.
|
|
28
28
|
* @param value - The asset.
|
|
29
29
|
*/
|
|
30
30
|
set asset(value: string);
|
|
31
31
|
/**
|
|
32
|
-
* Gets the
|
|
32
|
+
* Gets the id of the `pc-asset` to use for the sound slot.
|
|
33
33
|
* @returns The asset.
|
|
34
34
|
*/
|
|
35
35
|
get asset(): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { GSplatComponent } from 'playcanvas';
|
|
2
|
+
import { ComponentElement } from './component';
|
|
3
|
+
/**
|
|
4
|
+
* The SplatComponentElement interface provides properties and methods for manipulating
|
|
5
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-splat/ | `<pc-splat>`} elements.
|
|
6
|
+
* The SplatComponentElement interface also inherits the properties and methods of the
|
|
7
|
+
* {@link HTMLElement} interface.
|
|
8
|
+
*
|
|
9
|
+
* @category Components
|
|
10
|
+
*/
|
|
11
|
+
declare class SplatComponentElement extends ComponentElement {
|
|
12
|
+
private _asset;
|
|
13
|
+
/** @ignore */
|
|
14
|
+
constructor();
|
|
15
|
+
getInitialComponentData(): {
|
|
16
|
+
asset: import("playcanvas").Asset | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Gets the underlying PlayCanvas splat component.
|
|
20
|
+
* @returns The splat component.
|
|
21
|
+
*/
|
|
22
|
+
get component(): GSplatComponent | null;
|
|
23
|
+
/**
|
|
24
|
+
* Sets id of the `pc-asset` to use for the splat.
|
|
25
|
+
* @param value - The asset ID.
|
|
26
|
+
*/
|
|
27
|
+
set asset(value: string);
|
|
28
|
+
/**
|
|
29
|
+
* Gets the id of the `pc-asset` to use for the splat.
|
|
30
|
+
* @returns The asset ID.
|
|
31
|
+
*/
|
|
32
|
+
get asset(): string;
|
|
33
|
+
static get observedAttributes(): string[];
|
|
34
|
+
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
35
|
+
}
|
|
36
|
+
export { SplatComponentElement };
|
package/dist/entity.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { Application, Entity, Vec3 } from 'playcanvas';
|
|
|
2
2
|
import { AsyncElement } from './async-element';
|
|
3
3
|
/**
|
|
4
4
|
* The EntityElement interface provides properties and methods for manipulating
|
|
5
|
-
* `<pc-entity>` elements.
|
|
6
|
-
*
|
|
5
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-entity/ | `<pc-entity>`} elements.
|
|
6
|
+
* The EntityElement interface also inherits the properties and methods of the
|
|
7
|
+
* {@link HTMLElement} interface.
|
|
7
8
|
*/
|
|
8
9
|
declare class EntityElement extends AsyncElement {
|
|
9
10
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { CameraComponentElement } from './components/camera-component';
|
|
|
16
16
|
import { CollisionComponentElement } from './components/collision-component';
|
|
17
17
|
import { ComponentElement } from './components/component';
|
|
18
18
|
import { ElementComponentElement } from './components/element-component';
|
|
19
|
-
import {
|
|
19
|
+
import { SplatComponentElement } from './components/splat-component';
|
|
20
20
|
import { LightComponentElement } from './components/light-component';
|
|
21
21
|
import { RenderComponentElement } from './components/render-component';
|
|
22
22
|
import { RigidBodyComponentElement } from './components/rigidbody-component';
|
|
@@ -29,4 +29,4 @@ import { MaterialElement } from './material';
|
|
|
29
29
|
import { ModelElement } from './model';
|
|
30
30
|
import { SceneElement } from './scene';
|
|
31
31
|
import { SkyElement } from './sky';
|
|
32
|
-
export { AsyncElement, ModuleElement, AppElement, EntityElement, AssetElement, CameraComponentElement, CollisionComponentElement, ComponentElement, ElementComponentElement,
|
|
32
|
+
export { AsyncElement, ModuleElement, AppElement, EntityElement, AssetElement, CameraComponentElement, CollisionComponentElement, ComponentElement, ElementComponentElement, SplatComponentElement, LightComponentElement, ListenerComponentElement, RenderComponentElement, RigidBodyComponentElement, ScreenComponentElement, ScriptComponentElement, ScriptElement, SoundComponentElement, SoundSlotElement, MaterialElement, ModelElement, SceneElement, SkyElement };
|
package/dist/material.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Color, StandardMaterial } from 'playcanvas';
|
|
2
2
|
/**
|
|
3
3
|
* The MaterialElement interface provides properties and methods for manipulating
|
|
4
|
-
* `<pc-material>` elements.
|
|
5
|
-
*
|
|
4
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-material/ | `<pc-material>`} elements.
|
|
5
|
+
* The MaterialElement interface also inherits the properties and methods of the
|
|
6
|
+
* {@link HTMLElement} interface.
|
|
6
7
|
*/
|
|
7
8
|
declare class MaterialElement extends HTMLElement {
|
|
8
9
|
private _diffuse;
|
package/dist/model.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AsyncElement } from './async-element';
|
|
2
2
|
/**
|
|
3
3
|
* The ModelElement interface provides properties and methods for manipulating
|
|
4
|
-
* `<pc-model>` elements.
|
|
5
|
-
*
|
|
4
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-model/ | `<pc-model>`} elements.
|
|
5
|
+
* The ModelElement interface also inherits the properties and methods of the
|
|
6
|
+
* {@link HTMLElement} interface.
|
|
6
7
|
*/
|
|
7
8
|
declare class ModelElement extends AsyncElement {
|
|
8
9
|
private _asset;
|
|
@@ -13,13 +14,13 @@ declare class ModelElement extends AsyncElement {
|
|
|
13
14
|
private _loadModel;
|
|
14
15
|
private _unloadModel;
|
|
15
16
|
/**
|
|
16
|
-
* Sets the asset
|
|
17
|
+
* Sets the id of the `pc-asset` to use for the model.
|
|
17
18
|
* @param value - The asset ID.
|
|
18
19
|
*/
|
|
19
20
|
set asset(value: string);
|
|
20
21
|
/**
|
|
21
|
-
* Gets the
|
|
22
|
-
* @returns The
|
|
22
|
+
* Gets the id of the `pc-asset` to use for the model.
|
|
23
|
+
* @returns The asset ID.
|
|
23
24
|
*/
|
|
24
25
|
get asset(): string;
|
|
25
26
|
static get observedAttributes(): string[];
|
package/dist/module.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The ModuleElement interface provides properties and methods for manipulating
|
|
3
|
-
* `<pc-module>` elements.
|
|
4
|
-
*
|
|
3
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-module/ | `<pc-module>`} elements.
|
|
4
|
+
* The ModuleElement interface also inherits the properties and methods of the
|
|
5
|
+
* {@link HTMLElement} interface.
|
|
5
6
|
*/
|
|
6
7
|
declare class ModuleElement extends HTMLElement {
|
|
7
8
|
private loadPromise;
|