Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha240100 committed Mar 11, 2017
1 parent dac98f6 commit cb8c50f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/whs-module-audio/positional/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as UTILS from '../../globals';
import PositionalAudioModule from '../../../modules/whs-module-audio/src';

const controlsModule = new WHS.controls.OrbitModule();

Expand All @@ -24,7 +23,7 @@ const world = new WHS.App([

controlsModule.controls.autoRotate = true;

const audioModule = new PositionalAudioModule({
const audioModule = new AudioModule({
loop: true
});

Expand Down Expand Up @@ -52,8 +51,8 @@ const sphere = new WHS.Sphere({
});
sphere.addTo(world);

sphere.addAudioListener(cameraModule);
sphere.playAudio(`${process.assetsPath}/sounds/folk.mp3`);
audioModule.addListener(cameraModule.camera);
audioModule.playAudio(`${process.assetsPath}/sounds/folk.mp3`);

new WHS.PointLight({
light: {
Expand Down

0 comments on commit cb8c50f

Please sign in to comment.