# 3D Spatial Audio ([Live Demo](https://howlerjs.com/#spatial))

![3D Spatial Audio](https://s3.amazonaws.com/howler.js/screenshot-3d.jpg "3D Audio Screenshot")

## Description
This example displays how to use howler.js and the Spatial Plugin to add immersive spatial audio into 3D (or other) environments.

* Controls: Arrow Keys, WASD and Touch
* Simulates 3D game using minimal ray casting code.
* Full-screen and responsive for desktop/mobile.
* Separate Audio class that controls the different sound effects and spatial sounds.
* All game sounds implemented with a single sound sprite and `Howl` instance.

## How-To
1. Clone the git repo or download the source:
    * **Clone:** `git clone https://github.com/goldfire/howler.js.git`
    * **Download:** [https://github.com/goldfire/howler.js/archive/master.zip](https://github.com/goldfire/howler.js/archive/master.zip)
2. Open `index.html` in your favorite browser.

## Credits
Inspired by the great post on JavaScript ray casting on [PlayfulJS](http://www.playfuljs.com/a-first-person-engine-in-265-lines/).