mwg API
    Preparing search index...

    Function parseSoundMarkers

    • Splits inline sound markers from display text and records their visible positions.

      Parameters

      • source: string

      Returns ParsedSoundText

      import { parseSoundMarkers } from '@datamoc/mw_games/i18n';

      parseSoundMarkers('Strike! {sound:hit.wav}');
      // { text: 'Strike! ', cues: [{ path: 'hit.wav', index: 8 }] }