mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
add ambient sound test
This commit is contained in:
parent
27a2367634
commit
88b7f9ec9d
1 changed files with 18 additions and 0 deletions
18
scripts/developer/tests/ambientSoundTest.js
Normal file
18
scripts/developer/tests/ambientSoundTest.js
Normal file
|
@ -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);
|
||||
});
|
Loading…
Reference in a new issue