From 5f9b64444cdb63351a94c1f880881ef33d38029f Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 7 Mar 2016 10:19:21 -0800 Subject: [PATCH 1/6] second bubble system, quieter noise --- .../Home/fishTank/createFishTank.js | 76 ++++++++++++++++++- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js index 31a5d7058c..53338a978e 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js @@ -1,4 +1,4 @@ -var fishTank, bubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; +var fishTank, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; var CLEANUP = true; var TANK_DIMENSIONS = { @@ -103,7 +103,7 @@ function createBubbleSystem() { }, "emitDimensions": { "x": -0.2, - "y": 1.6000000000000002, + "y": TANK_DIMENSIONS.y, "z": 0 }, "polarStart": 0, @@ -147,6 +147,71 @@ function createBubbleSystem() { createBubbleSound(finalOffset); } +function createSecondBubbleSystem() { + + var tankProperties = Entities.getEntityProperties(fishTank); + var bubbleProperties = { + "name": 'hifi-home-fishtank-bubbles', + "color": {}, + "isEmitting": 1, + "maxParticles": 1880, + "lifespan": 1.6, + "emitRate": 10, + "emitSpeed": 0.025, + "speedSpread": 0.025, + "emitOrientation": { + "x": 0, + "y": 0.5, + "z": 0.5, + "w": 0 + }, + "emitDimensions": { + "x": -0.4, + "y": TANK_DIMENSIONS.y, + "z": 0 + }, + "polarStart": 0, + "polarFinish": 0, + "azimuthStart": 0.2, + "azimuthFinish": 0.1, + "emitAcceleration": { + "x": 0, + "y": 0.4, + "z": 0 + }, + "accelerationSpread": { + "x": 0.1, + "y": 0.1, + "z": 0.1 + }, + "particleRadius": 0.02, + "radiusSpread": 0, + "radiusStart": 0.043, + "radiusFinish": 0.02, + "colorSpread": {}, + "colorStart": {}, + "colorFinish": {}, + "alpha": 0.2, + "alphaSpread": 0, + "alphaStart": 0.3, + "alphaFinish": 0, + "emitterShouldTrail": 0, + "textures": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/bubble-white.png" + }; + + bubbleProperties.type = "ParticleEffect"; + bubbleProperties.parentID = fishTank; + bubbleProperties.dimensions = BUBBLE_SYSTEM_DIMENSIONS; + + var finalOffset = getOffsetFromTankCenter(BUBBLE_SYSTEM_VERTICAL_OFFSET, BUBBLE_SYSTEM_FORWARD_OFFSET, BUBBLE_SYSTEM_LATERAL_OFFSET - 0.076); + + bubbleProperties.position = finalOffset; + + secondBubbleSystem = Entities.addEntity(bubbleProperties); + +} + + function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET) { @@ -169,7 +234,7 @@ function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET function createBubbleSound(position) { var audioProperties = { - volume: 1, + volume: 0.05, position: position, loop: true }; @@ -288,9 +353,11 @@ createInnerContainer(); createBubbleSystem(); +createSecondBubbleSystem(); + createEntitiesAtCorners(); -createBubbleSound(); + createUrchin(); @@ -327,6 +394,7 @@ Script.setTimeout(function() { function cleanup() { Entities.deleteEntity(fishTank); Entities.deleteEntity(bubbleSystem); + Entities.deleteEntity(secondBubbleSystem); Entities.deleteEntity(innerContainer); Entities.deleteEntity(lowerCorner); Entities.deleteEntity(upperCorner); From 70fd3559eab58961bcde08bd5cb0cd96998f479b Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 7 Mar 2016 11:43:59 -0800 Subject: [PATCH 2/6] cleanup; --- .../Home/fishTank/bubbleSystemProperties.json | 47 ----------------- .../Home/fishTank/createFishTank.js | 6 +-- .../DomainContent/Home/fishTank/tank.js | 50 +++++++------------ 3 files changed, 20 insertions(+), 83 deletions(-) delete mode 100644 unpublishedScripts/DomainContent/Home/fishTank/bubbleSystemProperties.json diff --git a/unpublishedScripts/DomainContent/Home/fishTank/bubbleSystemProperties.json b/unpublishedScripts/DomainContent/Home/fishTank/bubbleSystemProperties.json deleted file mode 100644 index 07626c0fc5..0000000000 --- a/unpublishedScripts/DomainContent/Home/fishTank/bubbleSystemProperties.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "color": {}, - "isEmitting": 1, - "maxParticles": 1880, - "lifespan": 1.6, - "emitRate": 10, - "emitSpeed": 0.025, - "speedSpread": 0.025, - "emitOrientation": { - "x": 0, - "y": 0.5, - "z": 0.5, - "w": 0 - }, - "emitDimensions": { - "x": -0.2, - "y": 1.2000000000000002, - "z": 0 - }, - "polarStart": 0, - "polarFinish": 0, - "azimuthStart": 0.2, - "azimuthFinish": 0.1, - "emitAcceleration": { - "x": 0, - "y": 0.4, - "z": 0 - }, - "accelerationSpread": { - "x": 0.1, - "y": 0.1, - "z": 0.1 - }, - "particleRadius": 0.02, - "radiusSpread": 0, - "radiusStart": 0.043, - "radiusFinish": 0.02, - "colorSpread": {}, - "colorStart": {}, - "colorFinish": {}, - "alpha": 0.2, - "alphaSpread": 0, - "alphaStart": 0.3, - "alphaFinish": 0, - "emitterShouldTrail": 0, - "textures": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/bubble-white.png" -} \ No newline at end of file diff --git a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js index 53338a978e..3227513f60 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js @@ -1,6 +1,6 @@ var fishTank, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; -var CLEANUP = true; +var CLEANUP = false; var TANK_DIMENSIONS = { x: 1.3393, y: 1.3515, @@ -228,7 +228,6 @@ function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET var finalOffset = Vec3.sum(tankProperties.position, upOffset); finalOffset = Vec3.sum(finalOffset, frontOffset); finalOffset = Vec3.sum(finalOffset, rightOffset); - print('final offset is: ' + finalOffset) return finalOffset } @@ -310,8 +309,7 @@ function createEntitiesAtCorners() { lowerCorner = Entities.addEntity(lowerProps); upperCorner = Entities.addEntity(upperProps); - print('CORNERS :::' + JSON.stringify(upperCorner)) - print('CORNERS :::' + JSON.stringify(lowerCorner)) + } function createRocks() { diff --git a/unpublishedScripts/DomainContent/Home/fishTank/tank.js b/unpublishedScripts/DomainContent/Home/fishTank/tank.js index 0f42a000be..0f059b3919 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/tank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/tank.js @@ -25,7 +25,7 @@ function startUpdate() { //when the baton is claimed; - print('trying to claim the object' + _entityID) + // print('trying to claim the object' + _entityID) iOwn = true; connected = true; Script.update.connect(_this.update); @@ -33,7 +33,7 @@ function stopUpdateAndReclaim() { //when the baton is released; - print('i released the object ' + _entityID) + // print('i released the object ' + _entityID) iOwn = false; if (connected === true) { connected = false; @@ -54,7 +54,7 @@ overlayLineDistance: 3, debugSphere: null, findFishInTank: function() { - print('looking for a fish in the tank') + // print('looking for a fish in the tank') var results = Entities.findEntities(_this.currentProperties.position, TANK_SEARCH_RADIUS); var fishList = []; @@ -65,7 +65,7 @@ } }) - print('fish? ' + fishList.length) + // print('fish? ' + fishList.length) return fishList; }, @@ -75,27 +75,27 @@ if (properties.hasOwnProperty('userData') === false || properties.userData.length === 0) { _this.initTimeout = Script.setTimeout(function() { if (properties.hasOwnProperty('userData')) { - print('JBP has user data property') + // print('has user data property') } if (properties.userData.length === 0) { - print('JBP user data length is zero') + // print('user data length is zero') } - print('JBP try again in one second') + // print('try again in one second') _this.initialize(entityID); }, 1000) } else { - print('JBP userdata before parse attempt' + properties.userData) + // print('userdata before parse attempt' + properties.userData) _this.userData = null; try { _this.userData = JSON.parse(properties.userData); } catch (err) { - print('JBP error parsing json'); - print('JBP properties are:' + properties.userData); + // print('error parsing json'); + // print('properties are:' + properties.userData); return; } - print('after parse') + // print('after parse') _this.currentProperties = Entities.getEntityProperties(entityID); baton = virtualBaton({ batonName: 'io.highfidelity.fishtank:' + entityID, // One winner for each entity @@ -107,19 +107,16 @@ }, preload: function(entityID) { - print("preload"); + // print("preload"); this.entityID = entityID; _entityID = entityID; this.initialize(entityID); - // if(_this.initTimeout!==null){ - // Script.clearTimeout(_this.initTimeout) - // } this.initTimeout = null; }, unload: function() { - print(' UNLOAD') + // print(' UNLOAD') if (connected === true) { Script.update.disconnect(_this.update); } @@ -127,7 +124,7 @@ _this.overlayLineOff(); } if (baton) { - print('BATON RELEASE ') + // print('BATON RELEASE ') baton.release(function() {}); } @@ -135,8 +132,8 @@ update: function(deltaTime) { if (iOwn === false) { - print('i dont own') - //exit if we're not supposed to be simulating the fish + // print('i dont own') + //exit if we're not supposed to be simulating the fish return } // print('i am the owner!') @@ -214,8 +211,6 @@ _this.overlayLine = null; }, - - seeIfOwnerIsLookingAtTheTank: function() { var cameraPosition = Camera.getPosition(); var cameraOrientation = Camera.getOrientation(); @@ -228,7 +223,6 @@ if (WANT_LOOK_DEBUG_LINE === true) { _this.overlayLineOn(pickRay.origin, Vec3.sum(pickRay.origin, Vec3.multiply(front, _this.overlayLineDistance)), INTERSECT_COLOR); - }; var brn = _this.userData['hifi-home-fishtank']['corners'].brn; @@ -264,7 +258,6 @@ } } }, - //look attractors could be private to the tank... createLookAttractor: function(position, distance) { _this.lookAttractor = { position: position, @@ -296,13 +289,6 @@ // check for intersection // add attractor for closest person (?) - var intersection = Entities.findRayIntersection(pickRay, true, [_this.entityID]); - - if (intersection.intersects && intersection.entityID === _this.entityID) { - print('intersecting a tank') - - print('intersection:: ' + JSON.stringify(intersection)); - } } }; @@ -595,7 +581,7 @@ var STARTING_FRACTION = 0.25; function loadFish(howMany) { - print('LOADING FISH: ' + howMany) + // print('LOADING FISH: ' + howMany) var center = _this.currentProperties.position; @@ -654,7 +640,7 @@ } - print('initial fish::' + fish.length) + // print('initial fish::' + fish.length) _this.tankLocked = false; } From fdaa1f9ded4ce70d1b55d8a0c5bfe6994a696bb6 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 7 Mar 2016 11:45:38 -0800 Subject: [PATCH 3/6] cleanup by default --- .../DomainContent/Home/fishTank/createFishTank.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js index 3227513f60..465e411c8b 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js @@ -1,6 +1,6 @@ var fishTank, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; -var CLEANUP = false; +var CLEANUP = true; var TANK_DIMENSIONS = { x: 1.3393, y: 1.3515, From 249d88b619aa1bf26ac33bda3e15990e7e0a60ae Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 7 Mar 2016 19:59:27 -0800 Subject: [PATCH 4/6] add base to fishtank --- .../Home/fishTank/createFishTank.js | 64 +++++++++++++++---- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js index 465e411c8b..56a6f3d745 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js @@ -1,12 +1,19 @@ -var fishTank, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; +var fishTank, tankBase, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; var CLEANUP = true; +// var TANK_DIMENSIONS = { +// x: 1.3393, +// y: 1.3515, +// z: 3.5914 +// }; + var TANK_DIMENSIONS = { - x: 1.3393, - y: 1.3515, - z: 3.5914 + x: 0.8212, + y: 0.8116, + z: 2.1404 }; + var INNER_TANK_SCALE = 0.7; var INNER_TANK_DIMENSIONS = Vec3.multiply(INNER_TANK_SCALE, TANK_DIMENSIONS); INNER_TANK_DIMENSIONS.y = INNER_TANK_DIMENSIONS.y - 0.4; @@ -25,12 +32,24 @@ var TANK_POSITION = center; var TANK_SCRIPT = Script.resolvePath('tank.js?' + Math.random()) -var TANK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquarium-6.fbx"; +var TANK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquariumTank.fbx"; -var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x; +var TANK_BASE_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquariumBase.fbx'; + +var TANK_BASE_COLLISION_HULL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquariumBase.obj' + +var TANK_BASE_DIMENSIONS = { + x: 0.8599, + y: 1.8450, + z: 2.1936 +}; + +var BASE_VERTICAL_OFFSET=0.42; + +var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x+0.06; //depth of tank -var BUBBLE_SYSTEM_LATERAL_OFFSET = 0.15; -var BUBBLE_SYSTEM_VERTICAL_OFFSET = -0.5; +var BUBBLE_SYSTEM_LATERAL_OFFSET = 0.025; +var BUBBLE_SYSTEM_VERTICAL_OFFSET = -0.25; var BUBBLE_SYSTEM_DIMENSIONS = { x: TANK_DIMENSIONS.x / 8, @@ -44,7 +63,7 @@ var bubbleSound = SoundCache.getSound(BUBBLE_SOUND_URL); var URCHIN_FORWARD_OFFSET = -TANK_DIMENSIONS.x; //depth of tank var URCHIN_LATERAL_OFFSET = -0.15; -var URCHIN_VERTICAL_OFFSET = -0.37; +var URCHIN_VERTICAL_OFFSET = -0.17; var URCHIN_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/Urchin.fbx'; @@ -54,7 +73,7 @@ var URCHIN_DIMENSIONS = { z: 0.35 } -var ROCKS_FORWARD_OFFSET = (TANK_DIMENSIONS.x / 2) - 0.75; +var ROCKS_FORWARD_OFFSET = 0; //depth of tank var ROCKS_LATERAL_OFFSET = 0.0; var ROCKS_VERTICAL_OFFSET = (-TANK_DIMENSIONS.y / 2) + 0.25; @@ -62,9 +81,9 @@ var ROCKS_VERTICAL_OFFSET = (-TANK_DIMENSIONS.y / 2) + 0.25; var ROCK_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/Aquarium-Rocks-2.fbx'; var ROCK_DIMENSIONS = { - x: 0.88, + x: 0.707, y: 0.33, - z: 2.9 + z: 1.64 } function createFishTank() { @@ -344,6 +363,23 @@ function createUrchin() { } +function createTankBase() { + var properties = { + name: 'hifi-home-fishtank-base', + type: 'Model', + modelURL: TANK_BASE_MODEL_URL, + parentID: fishTank, + shapeType: 'compound', + compoundShapeURL: TANK_BASE_COLLISION_HULL, + position: { + x:TANK_POSITION.x, + y:TANK_POSITION.y-BASE_VERTICAL_OFFSET, + z:TANK_POSITION.z + } + } + tankBase = Entities.addEntity(properties); +} + createFishTank(); @@ -355,12 +391,11 @@ createSecondBubbleSystem(); createEntitiesAtCorners(); - - createUrchin(); createRocks(); +createTankBase(); var customKey = 'hifi-home-fishtank'; @@ -391,6 +426,7 @@ Script.setTimeout(function() { function cleanup() { Entities.deleteEntity(fishTank); + Entities.deleteEntity(tankBase); Entities.deleteEntity(bubbleSystem); Entities.deleteEntity(secondBubbleSystem); Entities.deleteEntity(innerContainer); From 645f0da280f9e5f2ef96d2fe169cb829f44af2b7 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Tue, 8 Mar 2016 13:50:04 -0800 Subject: [PATCH 5/6] code cleanupo --- .../Home/fishTank/createFishTank.js | 98 +++---------------- 1 file changed, 13 insertions(+), 85 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js index 56a6f3d745..59e3372750 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/createFishTank.js @@ -1,11 +1,6 @@ var fishTank, tankBase, bubbleSystem, secondBubbleSystem, innerContainer, bubbleInjector, lowerCorner, upperCorner, urchin, rocks; var CLEANUP = true; -// var TANK_DIMENSIONS = { -// x: 1.3393, -// y: 1.3515, -// z: 3.5914 -// }; var TANK_DIMENSIONS = { x: 0.8212, @@ -44,9 +39,9 @@ var TANK_BASE_DIMENSIONS = { z: 2.1936 }; -var BASE_VERTICAL_OFFSET=0.42; +var BASE_VERTICAL_OFFSET = 0.42; -var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x+0.06; +var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x + 0.06; //depth of tank var BUBBLE_SYSTEM_LATERAL_OFFSET = 0.025; var BUBBLE_SYSTEM_VERTICAL_OFFSET = -0.25; @@ -102,12 +97,11 @@ function createFishTank() { fishTank = Entities.addEntity(tankProperties); } -function createBubbleSystem() { +function createBubbleSystems() { var tankProperties = Entities.getEntityProperties(fishTank); var bubbleProperties = { "name": 'hifi-home-fishtank-bubbles', - "color": {}, "isEmitting": 1, "maxParticles": 1880, "lifespan": 1.6, @@ -143,9 +137,6 @@ function createBubbleSystem() { "radiusSpread": 0, "radiusStart": 0.043, "radiusFinish": 0.02, - "colorSpread": {}, - "colorStart": {}, - "colorFinish": {}, "alpha": 0.2, "alphaSpread": 0, "alphaStart": 0.3, @@ -161,75 +152,14 @@ function createBubbleSystem() { var finalOffset = getOffsetFromTankCenter(BUBBLE_SYSTEM_VERTICAL_OFFSET, BUBBLE_SYSTEM_FORWARD_OFFSET, BUBBLE_SYSTEM_LATERAL_OFFSET); bubbleProperties.position = finalOffset; - bubbleSystem = Entities.addEntity(bubbleProperties); + + bubbleProperties.position.z += -0.076; + secondBubbleSystem = Entities.addEntity(bubbleProperties) + createBubbleSound(finalOffset); } -function createSecondBubbleSystem() { - - var tankProperties = Entities.getEntityProperties(fishTank); - var bubbleProperties = { - "name": 'hifi-home-fishtank-bubbles', - "color": {}, - "isEmitting": 1, - "maxParticles": 1880, - "lifespan": 1.6, - "emitRate": 10, - "emitSpeed": 0.025, - "speedSpread": 0.025, - "emitOrientation": { - "x": 0, - "y": 0.5, - "z": 0.5, - "w": 0 - }, - "emitDimensions": { - "x": -0.4, - "y": TANK_DIMENSIONS.y, - "z": 0 - }, - "polarStart": 0, - "polarFinish": 0, - "azimuthStart": 0.2, - "azimuthFinish": 0.1, - "emitAcceleration": { - "x": 0, - "y": 0.4, - "z": 0 - }, - "accelerationSpread": { - "x": 0.1, - "y": 0.1, - "z": 0.1 - }, - "particleRadius": 0.02, - "radiusSpread": 0, - "radiusStart": 0.043, - "radiusFinish": 0.02, - "colorSpread": {}, - "colorStart": {}, - "colorFinish": {}, - "alpha": 0.2, - "alphaSpread": 0, - "alphaStart": 0.3, - "alphaFinish": 0, - "emitterShouldTrail": 0, - "textures": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/bubble-white.png" - }; - - bubbleProperties.type = "ParticleEffect"; - bubbleProperties.parentID = fishTank; - bubbleProperties.dimensions = BUBBLE_SYSTEM_DIMENSIONS; - - var finalOffset = getOffsetFromTankCenter(BUBBLE_SYSTEM_VERTICAL_OFFSET, BUBBLE_SYSTEM_FORWARD_OFFSET, BUBBLE_SYSTEM_LATERAL_OFFSET - 0.076); - - bubbleProperties.position = finalOffset; - - secondBubbleSystem = Entities.addEntity(bubbleProperties); - -} - function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET) { @@ -372,22 +302,20 @@ function createTankBase() { shapeType: 'compound', compoundShapeURL: TANK_BASE_COLLISION_HULL, position: { - x:TANK_POSITION.x, - y:TANK_POSITION.y-BASE_VERTICAL_OFFSET, - z:TANK_POSITION.z - } + x: TANK_POSITION.x, + y: TANK_POSITION.y - BASE_VERTICAL_OFFSET, + z: TANK_POSITION.z + }, + dimensions: TANK_BASE_DIMENSIONS } tankBase = Entities.addEntity(properties); } - createFishTank(); createInnerContainer(); -createBubbleSystem(); - -createSecondBubbleSystem(); +createBubbleSystems(); createEntitiesAtCorners(); From d4fd9d4157b5e42fe80d5a8f2b6c36f3f4a482c6 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Tue, 8 Mar 2016 13:55:28 -0800 Subject: [PATCH 6/6] Update tank.js --- unpublishedScripts/DomainContent/Home/fishTank/tank.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/fishTank/tank.js b/unpublishedScripts/DomainContent/Home/fishTank/tank.js index 0f059b3919..a25b3066fe 100644 --- a/unpublishedScripts/DomainContent/Home/fishTank/tank.js +++ b/unpublishedScripts/DomainContent/Home/fishTank/tank.js @@ -1,6 +1,6 @@ (function() { - Script.include('../../../../examples/libraries/virtualBaton.js?' + Math.random()); + Script.include('../../../../examples/libraries/virtualBaton.js'); //only one person should simulate the tank at a time -- we pass around a virtual baton var baton; @@ -693,4 +693,4 @@ } return new FishTank(); -}); \ No newline at end of file +});