From ebc6f4e78ee4f3444e7e300254daf033daa9d379 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Wed, 23 Apr 2014 14:40:06 +0200 Subject: [PATCH] Removed UTF-8 new line characters, QT script errors on those lines in Windows. --- examples/clap.js | 2 +- examples/drumStick.js | 2 +- examples/playSound.js | 4 ++-- examples/spaceInvadersExample.js | 7 +++---- examples/toyball.js | 6 +++--- examples/voxelDrumming.js | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/clap.js b/examples/clap.js index a0efcfab7b..9da36ba094 100644 --- a/examples/clap.js +++ b/examples/clap.js @@ -50,7 +50,7 @@ function maybePlaySound(deltaTime) { const CLAP_DISTANCE = 0.2; if (!clapping[palm] && (distanceBetween < CLAP_DISTANCE) && (speed > CLAP_SPEED)) { - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); options.position = palm1Position; options.volume = speed / 2.0; if (options.volume > 1.0) options.volume = 1.0; diff --git a/examples/drumStick.js b/examples/drumStick.js index e9ac54f814..188661b000 100644 --- a/examples/drumStick.js +++ b/examples/drumStick.js @@ -61,7 +61,7 @@ function checkSticks(deltaTime) { // Waiting for change in velocity direction or slowing to trigger drum sound if ((palmVelocity.y > 0.0) || (speed < STOP_SPEED)) { state[palm] = 0; - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); options.position = Controller.getSpatialControlPosition(palm * 2 + 1); if (strokeSpeed[palm] > 1.0) { strokeSpeed[palm] = 1.0; } options.volume = strokeSpeed[palm]; diff --git a/examples/playSound.js b/examples/playSound.js index fb589bc9e3..317581ba36 100644 --- a/examples/playSound.js +++ b/examples/playSound.js @@ -9,12 +9,12 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // First, load the clap sound from a URL -var clap = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/bushtit_1.raw"); +var clap = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/bushtit_1.raw"); function maybePlaySound(deltaTime) { if (Math.random() < 0.01) { // Set the location and other info for the sound to play - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); var palmPosition = Controller.getSpatialControlPosition(0); options.position = palmPosition; options.volume = 0.5; diff --git a/examples/spaceInvadersExample.js b/examples/spaceInvadersExample.js index 5b25fa1236..5d62102d71 100644 --- a/examples/spaceInvadersExample.js +++ b/examples/spaceInvadersExample.js @@ -217,7 +217,7 @@ function update(deltaTime) { if (invaderStepOfCycle % stepsPerSound == 0) { // play the move sound - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); if (soundInMyHead) { options.position = { x: MyAvatar.position.x + 0.0, y: MyAvatar.position.y + 0.1, @@ -329,7 +329,7 @@ function fireMissile() { lifetime: 5 }); - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); if (soundInMyHead) { options.position = { x: MyAvatar.position.x + 0.0, y: MyAvatar.position.y + 0.1, @@ -379,7 +379,7 @@ function deleteIfInvader(possibleInvaderParticle) { Particles.deleteParticle(myMissile); // play the hit sound - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); if (soundInMyHead) { options.position = { x: MyAvatar.position.x + 0.0, y: MyAvatar.position.y + 0.1, @@ -417,4 +417,3 @@ initializeInvaders(); // shut down the game after 1 minute var gameTimer = Script.setTimeout(endGame, itemLifetimes * 1000); - diff --git a/examples/toyball.js b/examples/toyball.js index de68e97357..d312c1bc94 100644 --- a/examples/toyball.js +++ b/examples/toyball.js @@ -111,7 +111,7 @@ function checkControllerSide(whichSide) { velocity : { x: 0, y: 0, z: 0}, inHand: true }; Particles.editParticle(closestParticle, properties); - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); options.position = ballPosition; options.volume = 1.0; Audio.playSound(catchSound, options); @@ -152,7 +152,7 @@ function checkControllerSide(whichSide) { } // Play a new ball sound - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); options.position = ballPosition; options.volume = 1.0; Audio.playSound(catchSound, options); @@ -201,7 +201,7 @@ function checkControllerSide(whichSide) { rightHandParticle = false; } - var options = new AudioInjectionOptions();
 + var options = new AudioInjectionOptions(); options.position = ballPosition; options.volume = 1.0; Audio.playSound(throwSound, options); diff --git a/examples/voxelDrumming.js b/examples/voxelDrumming.js index 7f3495dea7..1b320ed755 100644 --- a/examples/voxelDrumming.js +++ b/examples/voxelDrumming.js @@ -64,7 +64,7 @@ collisionBubble[1] = Overlays.addOverlay("sphere", visible: false }); -var audioOptions = new AudioInjectionOptions();
 +var audioOptions = new AudioInjectionOptions(); audioOptions.position = { x: MyAvatar.position.x, y: MyAvatar.position.y + 1, z: MyAvatar.position.z }; audioOptions.volume = 1;