Fix for Worklist Job #19503

Formatting errors
This commit is contained in:
gaitat 2014-02-15 23:04:58 -05:00
parent fcd44f5817
commit e30cf33a03
4 changed files with 10 additions and 38 deletions

View file

@ -10,31 +10,18 @@
// in response to the audio intensity.
//
// add two vectors
function vPlus(a, b) {
var rval = { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };
return rval;
}
// multiply scalar with vector
function vsMult(s, v) {
var rval = { x: s * v.x, y: s * v.y, z: s * v.z };
return rval;
}
var sound = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/mexicanWhipoorwill.raw");
var FACTOR = 0.75;
var countParticles = 0; // the first time around we want to create the particle and thereafter to modify it.
var particleID;
function updateParticle()
{
function updateParticle() {
// the particle should be placed in front of the user's avatar
var avatarFront = Quat.getFront(MyAvatar.orientation);
// move particle three units in front of the avatar
var particlePosition = vPlus(MyAvatar.position, vsMult (3, avatarFront));
var particlePosition = Vec3.sum(MyAvatar.position, Vec3.multiply(avatarFront, 3));
// play a sound at the location of the particle
var options = new AudioInjectionOptions();
@ -45,8 +32,7 @@ function updateParticle()
var audioAverageLoudness = MyAvatar.audioAverageLoudness * FACTOR;
//print ("Audio Loudness = " + MyAvatar.audioLoudness + " -- Audio Average Loudness = " + MyAvatar.audioAverageLoudness);
if (countParticles < 1)
{
if (countParticles < 1) {
var particleProperies = {
position: particlePosition // the particle should stay in front of the user's avatar as he moves
, color: { red: 0, green: 255, blue: 0 }
@ -59,8 +45,7 @@ function updateParticle()
particleID = Particles.addParticle (particleProperies);
countParticles++;
}
else
{
else {
// animates the particles radius and color in response to the changing audio intensity
var newProperties = {
position: particlePosition // the particle should stay in front of the user's avatar as he moves

View file

@ -10,28 +10,15 @@
// in response to the audio intensity.
//
// add two vectors
function vPlus(a, b) {
var rval = { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };
return rval;
}
// multiply scalar with vector
function vsMult(s, v) {
var rval = { x: s * v.x, y: s * v.y, z: s * v.z };
return rval;
}
var sound = new Sound("https://s3-us-west-1.amazonaws.com/highfidelity-public/sounds/Animals/mexicanWhipoorwill.raw");
var FACTOR = 0.75;
function addParticle()
{
function addParticle() {
// the particle should be placed in front of the user's avatar
var avatarFront = Quat.getFront(MyAvatar.orientation);
// move particle three units in front of the avatar
var particlePosition = vPlus(MyAvatar.position, vsMult (3, avatarFront));
var particlePosition = Vec3.sum(MyAvatar.position, Vec3.multiply (avatarFront, 3));
// play a sound at the location of the particle
var options = new AudioInjectionOptions();