UNPKG

@playcanvas/web-components

Version:

Web Components for the PlayCanvas Engine

120 lines (119 loc) 3.25 kB
import { SoundSlot } from 'playcanvas'; import { AsyncElement } from '../async-element'; import { SoundComponentElement } from './sound-component'; /** * The SoundSlotElement interface provides properties and methods for manipulating * `<pc-sound>` elements. The SoundSlotElement interface also inherits the properties and * methods of the {@link AsyncElement} interface. */ declare class SoundSlotElement extends AsyncElement { private _asset; private _autoPlay; private _duration; private _loop; private _name; private _overlap; private _pitch; private _startTime; private _volume; /** * The sound slot. */ soundSlot: SoundSlot | null; connectedCallback(): Promise<void>; disconnectedCallback(): void; protected get soundElement(): SoundComponentElement | null; /** * Sets the id of the `pc-asset` to use for the sound slot. * @param value - The asset. */ set asset(value: string); /** * Gets the id of the `pc-asset` to use for the sound slot. * @returns The asset. */ get asset(): string; /** * Sets the auto play flag of the sound slot. * @param value - The auto play flag. */ set autoPlay(value: boolean); /** * Gets the auto play flag of the sound slot. * @returns The auto play flag. */ get autoPlay(): boolean; /** * Sets the duration of the sound slot. * @param value - The duration. */ set duration(value: number); /** * Gets the duration of the sound slot. * @returns The duration. */ get duration(): number; /** * Sets the loop flag of the sound slot. * @param value - The loop flag. */ set loop(value: boolean); /** * Gets the loop flag of the sound slot. * @returns The loop flag. */ get loop(): boolean; /** * Sets the name of the sound slot. * @param value - The name. */ set name(value: string); /** * Gets the name of the sound slot. * @returns The name. */ get name(): string; /** * Sets the overlap flag of the sound slot. * @param value - The overlap flag. */ set overlap(value: boolean); /** * Gets the overlap flag of the sound slot. * @returns The overlap flag. */ get overlap(): boolean; /** * Sets the pitch of the sound slot. * @param value - The pitch. */ set pitch(value: number); /** * Gets the pitch of the sound slot. * @returns The pitch. */ get pitch(): number; /** * Sets the start time of the sound slot. * @param value - The start time. */ set startTime(value: number); /** * Gets the start time of the sound slot. * @returns The start time. */ get startTime(): number; /** * Sets the volume of the sound slot. * @param value - The volume. */ set volume(value: number); /** * Gets the volume of the sound slot. * @returns The volume. */ get volume(): number; static get observedAttributes(): string[]; attributeChangedCallback(name: string, _oldValue: string, newValue: string): void; } export { SoundSlotElement };