Merge pull request #7296 from imgntn/cellscience

Various Cellscience Fixes
This commit is contained in:
James B. Pollack 2016-03-09 15:11:58 -08:00
commit 7cdd3d5b3e
5 changed files with 137 additions and 71 deletions

View file

@ -24,7 +24,7 @@
this.initialize = function(entityId) {
var properties = Entities.getEntityProperties(entityId);
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) {
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false || properties.userData==="") {
self.initTimeout = Script.setTimeout(function() {
// print(' no user data yet, try again in one second')
self.initialize(entityId);

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@
var numDynein = 2;
var numKinesin = 2;
var percentOnMainMT = 100;
//print('RUNNING AC!!');
var baseLocation;
if (USE_LOCAL_HOST === true) {
baseLocation = "http://localhost:8080/";
@ -16,13 +16,32 @@ if (USE_LOCAL_HOST === true) {
baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/"
}
var WORLD_OFFSET = {
x: 0,
y: 0,
z: 0
}
var WORLD_SCALE_AMOUNT = 1.0;
function offsetVectorToWorld(vector) {
var newVector;
newVector = Vec3.sum(vector, WORLD_OFFSET);
print('JBP NEW VECTOR IS:: ' + JSON.stringify(newVector))
return newVector
}
var USE_LOCAL_HOST = false;
EntityViewer.setPosition({
var basePosition = offsetVectorToWorld({
x: 3000,
y: 13500,
z: 3000
});
EntityViewer.setPosition(basePosition);
EntityViewer.setKeyholeRadius(60000);
var octreeQueryInterval = Script.setInterval(function() {
EntityViewer.queryOctree();
@ -44,11 +63,12 @@ var scriptURL = this.baseLocation + "Scripts/clickToRideAndLook.js?" + Math.rand
var t = 0;
var tInc = 0.001;
var sceneOffset = {
var sceneOffset = offsetVectorToWorld({
x: 3000,
y: 13500,
z: 3000
};
});
var yOffset = {
dynein: 16,
kinesin: -28
@ -60,11 +80,11 @@ var terms;
var secondaryInit = false;
function deleteAllMotorProteins() {
var position = {
var position = offsetVectorToWorld({
x: 3280,
y: 13703,
z: 4405
};
});
if (secondaryInit === true) {
return;

View file

@ -4,12 +4,29 @@
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var WORLD_OFFSET = {
x: 0,
y: 0,
z: 0
}
var basePosition = {
var WORLD_SCALE_AMOUNT = 1.0;
function offsetVectorToWorld(vector) {
var newVector;
newVector = Vec3.sum(vector, WORLD_OFFSET);
print('JBP NEW VECTOR IS:: ' + JSON.stringify(newVector))
return newVector
}
var basePosition = offsetVectorToWorld({
x: 3000,
y: 13500,
z: 3000
};
}, WORLD_OFFSET);
var initialized = false;

View file

@ -4,12 +4,29 @@
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var WORLD_OFFSET = {
x: 0,
y: 0,
z: 0
}
var basePosition = {
var WORLD_SCALE_AMOUNT = 1.0;
function offsetVectorToWorld(vector) {
var newVector;
newVector = Vec3.sum(vector, WORLD_OFFSET);
print('JBP NEW VECTOR IS:: ' + JSON.stringify(newVector))
return newVector
}
var basePosition = offsetVectorToWorld({
x: 3000,
y: 13500,
z: 3000
};
}, WORLD_OFFSET);
var initialized = false;