@playcanvas/web-components 0.2.2 → 0.2.3
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/components/particlesystem-component.d.ts +52 -0
- package/dist/index.d.ts +3 -2
- package/dist/pwc.cjs +421 -81
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +421 -81
- 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 +421 -82
- package/dist/pwc.mjs.map +1 -1
- package/package.json +13 -12
- package/src/asset.ts +53 -1
- package/src/components/particlesystem-component.ts +155 -0
- package/src/index.ts +4 -2
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ PlayCanvas Web Components are a set of custom HTML elements for building 3D inte
|
|
|
28
28
|
|
|
29
29
|
## Examples
|
|
30
30
|
|
|
31
|
-
[](https://playcanvas.github.io/web-components/examples)
|
|
32
32
|
|
|
33
33
|
See PlayCanvas Web Components in action here: https://playcanvas.github.io/web-components/examples
|
|
34
34
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ParticleSystemComponent } from 'playcanvas';
|
|
2
|
+
import { ComponentElement } from './component';
|
|
3
|
+
/**
|
|
4
|
+
* The ParticleSystemComponentElement interface provides properties and methods for manipulating
|
|
5
|
+
* {@link https://developer.playcanvas.com/user-manual/engine/web-components/tags/pc-particles/ | `<pc-particles>`} elements.
|
|
6
|
+
* The ParticleSystemComponentElement interface also inherits the properties and methods of the
|
|
7
|
+
* {@link HTMLElement} interface.
|
|
8
|
+
*
|
|
9
|
+
* @category Components
|
|
10
|
+
*/
|
|
11
|
+
declare class ParticleSystemComponentElement extends ComponentElement {
|
|
12
|
+
private _asset;
|
|
13
|
+
/** @ignore */
|
|
14
|
+
constructor();
|
|
15
|
+
getInitialComponentData(): object;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the underlying PlayCanvas particle system component.
|
|
18
|
+
* @returns The particle system component.
|
|
19
|
+
*/
|
|
20
|
+
get component(): ParticleSystemComponent | null;
|
|
21
|
+
private applyConfig;
|
|
22
|
+
private _loadAsset;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the id of the `pc-asset` to use for the model.
|
|
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 model.
|
|
30
|
+
* @returns The asset ID.
|
|
31
|
+
*/
|
|
32
|
+
get asset(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Starts playing the particle system
|
|
35
|
+
*/
|
|
36
|
+
play(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Pauses the particle system
|
|
39
|
+
*/
|
|
40
|
+
pause(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Resets the particle system
|
|
43
|
+
*/
|
|
44
|
+
reset(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Stops the particle system
|
|
47
|
+
*/
|
|
48
|
+
stop(): void;
|
|
49
|
+
static get observedAttributes(): string[];
|
|
50
|
+
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
51
|
+
}
|
|
52
|
+
export { ParticleSystemComponentElement };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ 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 { SplatComponentElement } from './components/splat-component';
|
|
20
19
|
import { LightComponentElement } from './components/light-component';
|
|
20
|
+
import { ParticleSystemComponentElement } from './components/particlesystem-component';
|
|
21
21
|
import { RenderComponentElement } from './components/render-component';
|
|
22
22
|
import { RigidBodyComponentElement } from './components/rigidbody-component';
|
|
23
23
|
import { ScreenComponentElement } from './components/screen-component';
|
|
@@ -25,8 +25,9 @@ import { ScriptComponentElement } from './components/script-component';
|
|
|
25
25
|
import { ScriptElement } from './components/script';
|
|
26
26
|
import { SoundComponentElement } from './components/sound-component';
|
|
27
27
|
import { SoundSlotElement } from './components/sound-slot';
|
|
28
|
+
import { SplatComponentElement } from './components/splat-component';
|
|
28
29
|
import { MaterialElement } from './material';
|
|
29
30
|
import { ModelElement } from './model';
|
|
30
31
|
import { SceneElement } from './scene';
|
|
31
32
|
import { SkyElement } from './sky';
|
|
32
|
-
export { AsyncElement, ModuleElement, AppElement, EntityElement, AssetElement, CameraComponentElement, CollisionComponentElement, ComponentElement, ElementComponentElement,
|
|
33
|
+
export { AsyncElement, ModuleElement, AppElement, EntityElement, AssetElement, CameraComponentElement, CollisionComponentElement, ComponentElement, ElementComponentElement, ParticleSystemComponentElement, LightComponentElement, ListenerComponentElement, RenderComponentElement, RigidBodyComponentElement, ScreenComponentElement, ScriptComponentElement, ScriptElement, SoundComponentElement, SoundSlotElement, SplatComponentElement, MaterialElement, ModelElement, SceneElement, SkyElement };
|