gameforge - v0.1.12
    Preparing search index...

    Class SoundSprite

    Object that represents a single Sound's sprite. To add sound sprites use the Sound#addSprites method.

    import { sound } from '@pixi/sound';
    sound.add('alias', {
    url: 'path/to/file.ogg',
    sprites: {
    blast: { start: 0, end: 0.2 },
    boom: { start: 0.3, end: 0.5 },
    },
    loaded() {
    sound.play('alias', 'blast');
    }
    );
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    duration: number

    The duration of the sound in seconds.

    end: number

    The ending location in seconds

    loop: boolean

    Whether to loop the sound sprite.

    parent: Sound

    The reference sound

    speed: number

    The speed override where 1 is 100% speed playback.

    start: number

    The starting location in seconds.

    Methods

    • Destroy and don't use after this

      Returns void

    • Play the sound sprite.

      Parameters

      • Optionalcomplete: CompleteCallback

        Function call when complete

      Returns IMediaInstance | Promise<IMediaInstance>

      Sound instance being played.