set offset to zeros

This commit is contained in:
James B. Pollack 2016-03-09 12:01:22 -08:00
parent b08a9baa5c
commit 5daacdf952
4 changed files with 30 additions and 31 deletions

View file

@ -5,12 +5,12 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
var version = 1207; var version = 1209;
var WORLD_OFFSET = { var WORLD_OFFSET = {
x: -6000, x: 0,
y: -6000, y: 0,
z: -6000 z: 0
} }
var WORLD_SCALE_AMOUNT = 1.0; var WORLD_SCALE_AMOUNT = 1.0;
@ -21,7 +21,6 @@ function offsetVectorToWorld(vector) {
newVector = Vec3.sum(vector, WORLD_OFFSET); newVector = Vec3.sum(vector, WORLD_OFFSET);
print('JBP NEW VECTOR IS:: ' + JSON.stringify(newVector))
return newVector return newVector
} }
@ -58,7 +57,7 @@ assignVariables();
var locations = { var locations = {
cellLayout: [offsetVectorToWorld({ cellLayout: [offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}), offsetVectorToWorld({ }), offsetVectorToWorld({
x: 3276.6, x: 3276.6,
@ -67,11 +66,11 @@ var locations = {
}), 1800], }), 1800],
cells: [offsetVectorToWorld({ cells: [offsetVectorToWorld({
x: 13500, x: 13500,
y: 10500, y: 13500,
z: 13500 z: 13500
}), offsetVectorToWorld({ }), offsetVectorToWorld({
x: 13501, x: 13501,
y: 10501, y: 13501,
z: 13501 z: 13501
}), 400], }), 400],
ribosome: [offsetVectorToWorld({ ribosome: [offsetVectorToWorld({
@ -94,7 +93,7 @@ var locations = {
}), 2000], }), 2000],
mitochondria: [offsetVectorToWorld({ mitochondria: [offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}), offsetVectorToWorld({ }), offsetVectorToWorld({
x: 3240, x: 3240,
@ -103,16 +102,16 @@ var locations = {
}), 1000], }), 1000],
translation: [offsetVectorToWorld({ translation: [offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}), offsetVectorToWorld({ }), offsetVectorToWorld({
x: 2962, x: 2962,
y: 10492, y: 13492,
z: 3342 z: 3342
}), 1000] }), 1000]
}; };
print('JBP locations locations' +JSON.stringify(locations)) print('JBP locations locations' + JSON.stringify(locations))
var scenes = [{ var scenes = [{
name: "Cells", name: "Cells",
@ -603,7 +602,7 @@ function createLayoutLights() {
Entities.addEntity({ Entities.addEntity({
type: "Light", type: "Light",
name: "Cell layout light", name: "Cell layout light",
position:offsetVectorToWorld( { position: offsetVectorToWorld({
x: 3110, x: 3110,
y: 10660, y: 10660,
z: 3785 z: 3785
@ -625,7 +624,7 @@ function createLayoutLights() {
function CreateNavigationButton(scene, number) { function CreateNavigationButton(scene, number) {
var nav = Entities.addEntity({ var nav = Entities.addEntity({
type: "Box", type: "Box",
name: scene.name + " navigation button", name: scene.name + " navigation button",
color: { color: {
@ -657,7 +656,7 @@ function CreateNavigationButton(scene, number) {
script: baseLocation + "Scripts/navigationButton.js?" + version, script: baseLocation + "Scripts/navigationButton.js?" + version,
collisionless: true, collisionless: true,
}); });
print('JBP CREATE NAV AT::' +nav+" name: " + scene.name + ": " + JSON.stringify(scene.location)) print('JBP CREATE NAV AT::' + nav + " name: " + scene.name + ": " + JSON.stringify(scene.location))
} }
function CreateBoundary(scene) { function CreateBoundary(scene) {
@ -9014,7 +9013,7 @@ function assignVariables() {
for (var i = 0; i < scenes.length; i++) { for (var i = 0; i < scenes.length; i++) {
// print('setting up scene. first, delete' + JSON.stringify(scenes[i])) // print('setting up scene. first, delete' + JSON.stringify(scenes[i]))
// deleteAllInRadius(scenes[i].location, scenes[i].zone.dimensions.x); // deleteAllInRadius(scenes[i].location, scenes[i].zone.dimensions.x);
CreateNavigationButton(scenes[i], i); CreateNavigationButton(scenes[i], i);
ImportScene(scenes[i]); ImportScene(scenes[i]);
// print('setting up scene. then import') // print('setting up scene. then import')

View file

@ -8,7 +8,7 @@
var numDynein = 2; var numDynein = 2;
var numKinesin = 2; var numKinesin = 2;
var percentOnMainMT = 100; var percentOnMainMT = 100;
//print('RUNNING AC!!');
var baseLocation; var baseLocation;
if (USE_LOCAL_HOST === true) { if (USE_LOCAL_HOST === true) {
baseLocation = "http://localhost:8080/"; baseLocation = "http://localhost:8080/";
@ -17,9 +17,9 @@ if (USE_LOCAL_HOST === true) {
} }
var WORLD_OFFSET = { var WORLD_OFFSET = {
x: -6000, x: 0,
y: -6000, y: 0,
z: -6000 z: 0
} }
var WORLD_SCALE_AMOUNT = 1.0; var WORLD_SCALE_AMOUNT = 1.0;
@ -37,7 +37,7 @@ var USE_LOCAL_HOST = false;
var basePosition = offsetVectorToWorld({ var basePosition = offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}); });
@ -65,7 +65,7 @@ var t = 0;
var tInc = 0.001; var tInc = 0.001;
var sceneOffset = offsetVectorToWorld({ var sceneOffset = offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}); });
@ -82,7 +82,7 @@ var secondaryInit = false;
function deleteAllMotorProteins() { function deleteAllMotorProteins() {
var position = offsetVectorToWorld({ var position = offsetVectorToWorld({
x: 3280, x: 3280,
y: 10703, y: 13703,
z: 4405 z: 4405
}); });

View file

@ -5,9 +5,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
var WORLD_OFFSET = { var WORLD_OFFSET = {
x: -6000, x: 0,
y: -6000, y: 0,
z: -6000 z: 0
} }
var WORLD_SCALE_AMOUNT = 1.0; var WORLD_SCALE_AMOUNT = 1.0;
@ -24,7 +24,7 @@ function offsetVectorToWorld(vector) {
var basePosition = offsetVectorToWorld({ var basePosition = offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}, WORLD_OFFSET); }, WORLD_OFFSET);

View file

@ -5,9 +5,9 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
var WORLD_OFFSET = { var WORLD_OFFSET = {
x: -6000, x: 0,
y: -6000, y: 0,
z: -6000 z: 0
} }
var WORLD_SCALE_AMOUNT = 1.0; var WORLD_SCALE_AMOUNT = 1.0;
@ -23,7 +23,7 @@ function offsetVectorToWorld(vector) {
var basePosition = offsetVectorToWorld({ var basePosition = offsetVectorToWorld({
x: 3000, x: 3000,
y: 10500, y: 13500,
z: 3000 z: 3000
}, WORLD_OFFSET); }, WORLD_OFFSET);