From 88b7f9ec9d6edbda0659b48aef1594680627f6f3 Mon Sep 17 00:00:00 2001 From: humbletim Date: Tue, 17 Jan 2017 01:44:03 -0500 Subject: [PATCH] add ambient sound test --- scripts/developer/tests/ambientSoundTest.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/developer/tests/ambientSoundTest.js diff --git a/scripts/developer/tests/ambientSoundTest.js b/scripts/developer/tests/ambientSoundTest.js new file mode 100644 index 0000000000..2d5fd832c6 --- /dev/null +++ b/scripts/developer/tests/ambientSoundTest.js @@ -0,0 +1,18 @@ +var WAVE = 'http://cdn.rawgit.com/ambisonictoolkit/atk-sounds/aa31005c/stereo/Aurora_Surgit-Lux_Aeterna.wav'; +var uuid = Entities.addEntity({ + type: "Shape", + shape: "Icosahedron", + dimensions: Vec3.HALF, + script: Script.resolvePath('../../tutorials/entity_scripts/ambientSound.js'), + position: Vec3.sum(Vec3.multiply(5, Quat.getFront(MyAvatar.orientation)), MyAvatar.position), + userData: JSON.stringify({ + soundURL: WAVE, + maxVolume: 0.1, + range: 25, + disabled: true, + }), + lifetime: 600, +}); +Script.scriptEnding.connect(function() { + Entities.deleteEntity(uuid); +});