Skip to content

Commit

Permalink
Change name of effects plugin to spatial
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed Jun 17, 2016
1 parent dfab42e commit be3be33
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Howler.js now also has the concept of plugins. The core represents 100% compatib
- `ADDED`: Support for playback of CAFF audio files.
- `ADDED`: New codec recommendations and notes have been added to the documentation.
- `ADDED`: Web Audio AudioContext now automatically suspends and resumes to lower processing and power usage.
- `ADDED`: (Effects) New `Howler` listener methods `stereo`, `pos` and `orientation`.
- `ADDED`: (Effects) New `Howl` methods `stereo`, `pos`, `orientation` and `pannerAttr` to control stereo and spatial audio of single sounds or groups of sounds.
- `ADDED`: (Effects) `pannerAttr` allows for control of `coneInnerAngle`, `coneOUterAngle`, `coneOuterGain`, `distanceModel`, `maxDistance`, `panningModel`, `refDistance` and `rolloffFactor`.
- `UPDATED`: (Effects) When using Web Audio, a panner node is only added when spatial audio is used.
- `ADDED`: (Spatial) New `Howler` listener methods `stereo`, `pos` and `orientation`.
- `ADDED`: (Spatial) New `Howl` methods `stereo`, `pos`, `orientation` and `pannerAttr` to control stereo and spatial audio of single sounds or groups of sounds.
- `ADDED`: (Spatial) `pannerAttr` allows for control of `coneInnerAngle`, `coneOUterAngle`, `coneOuterGain`, `distanceModel`, `maxDistance`, `panningModel`, `refDistance` and `rolloffFactor`.
- `UPDATED`: (Spatial) When using Web Audio, a panner node is only added when spatial audio is used.
- `UPDATED`: The `play` method no longer takes a callback and immediately returns the playback sound id (this means you can no longer chain onto the `play` method, but all others work the same).
- `UPDATED`: Changed property names `buffer` to `html5` and `pos` to `seek`.
- `UPDATED`: The global, group and single sound `mute` and `unmute` methods have been combined into a single `mute` method.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Exposes the `AudioContext` with Web Audio API.
Exposes the master `GainNode` with Web Audio API. This can be useful for writing plugins or advanced usage.


### Plugin: Effects Methods
### Plugin: Spatial Methods
#### stereo(pan, [id])
Get/set the stereo panning of the audio source for this sound or all in the group.
* **pan**: `Number` A value of `-1.0` is all the way left and `1.0` is all the way right.
Expand Down Expand Up @@ -279,7 +279,7 @@ Get/set the panner node's attributes for a sound or group of sounds. This method
* **id**: `Number` `optional` The sound ID. If none is passed, all in group will be updated.


### Plugin: Effects Properties
### Plugin: Spatial Properties
#### orientation `Array` `[1, 0, 0]`
Sets the direction the audio source is pointing in the 3D cartesian coordinate space. Depending on how direction the sound is, based on the `cone` attributes, a sound pointing away from the listener can be quiet or silent.
#### stereo `Number` `null`
Expand All @@ -296,7 +296,7 @@ Fires when the current sound has the listener position changed. The first parame
Fires when the current sound has the direction of the listener changed. The first parameter is the ID of the sound.


### Plugin: Global Effects Methods
### Plugin: Global Spatial Methods
#### pos(x, y, z)
Helper method to update the stereo panning position of all current `Howls`. Future `Howls` will not use this value unless explicitely set.
* **pan**: `Number` A value of -1.0 is all the way left and 1.0 is all the way right.
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![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 Effects Plugin to add immersive spatial audio into 3D (or other) environments.
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.
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- Scripts -->
<script src="../../src/howler.core.js"></script>
<script src="../../src/plugins/howler.effects.js"></script>
<script src="../../src/plugins/howler.spatial.js"></script>
<script src="./js/sound.js"></script>
<script src="./js/player.js"></script>
<script src="./js/controls.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion howler.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion howler.effects.min.js → howler.spatial.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"src",
"howler.min.js",
"howler.core.min.js",
"howler.effects.min.js",
"howler.spatial.min.js",
"LICENSE.md"
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Effects Plugin - Adds advanced Web Audio API functionality.
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
*
* howler.js v2.0.0-beta14
* howlerjs.com
Expand All @@ -14,7 +14,7 @@

'use strict';

// Setup default effects properties.
// Setup default properties.
HowlerGlobal.prototype._pos = [0, 0, 0];
HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0];

Expand Down Expand Up @@ -521,7 +521,7 @@
})(Sound.prototype.init);

/**
* Override the Sound.reset method to clean up properties from the effects plugin.
* Override the Sound.reset method to clean up properties from the spatial plugin.
* @param {Function} _super Sound reset method.
* @return {Sound}
*/
Expand All @@ -530,7 +530,7 @@
var self = this;
var parent = self._parent;

// Reset all effects module properties on this sound.
// Reset all spatial plugin properties on this sound.
self._orientation = parent._orientation;
self._pos = parent._pos;
self._pannerAttr = parent._pannerAttr;
Expand Down
2 changes: 1 addition & 1 deletion tests/js/effects.js → tests/js/spatial.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var sound2 = new Howl({
// Enable the start button when the sounds have loaded.
sound1.once('load', function() {
start.removeAttribute('disabled');
start.innerHTML = 'BEGIN EFFECTS TESTS';
start.innerHTML = 'BEGIN SPATIAL TESTS';
});

// Define the tests to run.
Expand Down
6 changes: 3 additions & 3 deletions tests/effects.html → tests/spatial.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Howler.js Effects Plugin Tests</title>
<title>Howler.js Spatial Plugin Tests</title>
<link rel="stylesheet" href="./css/styles.css">
</head>
<body>
Expand All @@ -11,7 +11,7 @@
<button id="start" disabled>LOADING...</button>
</div>
<script src="../src/howler.core.js"></script>
<script src="../src/plugins/howler.effects.js"></script>
<script src="./js/effects.js"></script>
<script src="../src/plugins/howler.spatial.js"></script>
<script src="./js/spatial.js"></script>
</body>
</html>

0 comments on commit be3be33

Please sign in to comment.