@playcanvas/web-components 0.2.1 → 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 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
- [![image](https://github.com/user-attachments/assets/6106ec23-30ab-4662-8370-c3b286386ce9)](https://playcanvas.github.io/web-components/examples)
31
+ [![image](https://github.com/user-attachments/assets/25ac8dd3-abc9-4d65-8950-3d72ed1f7152)](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
 
package/dist/app.d.ts CHANGED
@@ -36,6 +36,7 @@ declare class AppElement extends AsyncElement {
36
36
  _onWindowResize(): void;
37
37
  _pickerCreate(): void;
38
38
  _pickerDestroy(): void;
39
+ private _getPickerCoordinates;
39
40
  _onPointerMove(event: PointerEvent): void;
40
41
  _onPointerDown(event: PointerEvent): void;
41
42
  _onPointerUp(event: PointerEvent): void;
@@ -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, SplatComponentElement, LightComponentElement, ListenerComponentElement, RenderComponentElement, RigidBodyComponentElement, ScreenComponentElement, ScriptComponentElement, ScriptElement, SoundComponentElement, SoundSlotElement, MaterialElement, ModelElement, SceneElement, SkyElement };
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 };