3.0.0 • Published 8 months ago

3d-webaudio-raub v3.0.0

Weekly downloads
33
License
MIT
Repository
github
Last release
8 months ago

Node.js 3D WebAudio

This is a part of Node3D project.

NPM ESLint Test

npm i -s 3d-webaudio-raub

Example

This plugin injects WebAudio API into Node3D's window. It ain't much, but it's honest work.

The WebAudio implementation is provided by webaudio-raub. Some WebAudio features may be missing, but it works with Three.js. With positional audio.

Refer to webaudio-raub for the full list of currently implemented API.

import { init } from '3d-core-raub';
import { init as initWebaudio } from '3d-webaudio-raub';

// Fetch `window` from standard Node3D init
const { window } = init();

// Initialize Webaudio
const { webaudio } = initWebaudio({ window });
// webaudio.AudioContext === window.AudioContext === global.AudioContext

Here, webaudio is directly re-exported webaudio-raub. You can also use it through window.AudioContext or just AudioContext. But the main idea is using it with Three.js, like this.

3.0.0

8 months ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.0

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago