0.0.37 • Published 2 years ago

divine-audio-engine v0.0.37

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

A JavaScript game audio engine.

Suppourts varationsm, spatial sounds, and effects.

Check out live examples here: Examples

import {DAE} from "divine-audio-engine";

await DAE.effects.preloadReverbBuffers(
 [
    "Vaneev/Deep Space",
    "Vaneev/Rays",
    "Vaneev/On a Star",
    "Vaneev/St Nicolaes Church",
],
    []
);

DAE.sfx.registerSFX([
{
    path: "./assets/audio/sfx/electric-gong.wav",
    id: "electric-gong",
    channel: "sfx",
    is3dSound: true,
    _3dSoundData: {
    rolloffFactor: 1,
    },
     varations: [
        {
          playBackRate: 0.9,
        },
        {
          playBackRate: 0.8,
        },
        {
          playBackRate: 1.2,
        },
        {
          playBackRate: 0.5,
        },
      ],
},
]);

await DAE.$INIT();

DAE.sfx.play("electric-gong", {
  level: 1,
  _3dSoundPosition: {
    x: 1,
    y: 1,
    z: 1,
  },
  effects: {
    reverb: {
      builtIn: "Vaneev/Deep Space",
      level: 0.1,
    },
  },
});
0.0.37

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago