This commit is contained in:
James B. Pollack 2016-02-12 13:58:02 -08:00
parent 0bf822f17b
commit f346ac7023
7 changed files with 23 additions and 21 deletions

View file

@ -17,8 +17,8 @@ var SIZE = 10.0;
var SEPARATION = 20.0;
var ROWS_X = 30;
var ROWS_Z = 30;
var TYPE = "Sphere"; // Right now this can be "Box" or "Model" or "Sphere"
var MODEL_URL = "https://hifi-public.s3.amazonaws.com/models/props/LowPolyIsland/CypressTreeGroup.fbx";
var TYPE = "Model"; // Right now this can be "Box" or "Model" or "Sphere"
var MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/CellScience/Instances/vesicle.fbx";
var MODEL_DIMENSION = { x: 33, y: 16, z: 49 };
var RATE_PER_SECOND = 1000; // The entity server will drop data if we create things too fast.
var SCRIPT_INTERVAL = 100;
@ -38,6 +38,7 @@ Script.setInterval(function () {
var numToCreate = RATE_PER_SECOND * (SCRIPT_INTERVAL / 1000.0);
for (var i = 0; i < numToCreate; i++) {
var position = { x: SIZE + (x * SEPARATION), y: SIZE, z: SIZE + (z * SEPARATION) };
print('position:'+JSON.stringify(position))
if (TYPE == "Model") {
Entities.addEntity({
type: TYPE,

View file

@ -9,6 +9,7 @@
var self = this;
this.preload=function(entityId){
print('JBP MOVE RANDOMLY PRELOAD')
this.isConnected = false;
this.entityId = entityId;
this.minVelocity = 1;
@ -22,7 +23,7 @@
this.getTotalWait = function() {
var avatars = AvatarList.getAvatarIdentifiers();
var avatarCount = avatars.length;
var random = Math.random() * 2000;
var random = Math.random() * 5000;
var totalWait = random * (avatarCount * 2);
return totalWait
@ -30,11 +31,6 @@
this.move = function() {
print('jbp im the owner so move it')
var magnitudeV = self.maxVelocity;
var directionV = {
x: Math.random() - 0.5,

View file

@ -17,6 +17,7 @@
var baseURL = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
this.preload = function(entityId) {
print('JBP NAV PRELOAD')
this.entityId = entityId;
this.initialize(entityId);
this.initTimeout = null;
@ -58,14 +59,13 @@
self.buttonImageURL = baseURL + "GUI/GUI_" + self.userData.name + ".png?" + version;
print('JBP BUTTON IMAGE URL:' + self.buttonImageURL)
if (self.button === undefined) {
// print('NAV NO BUTTON ADDING ONE!!')
print('JBP NO BUTTON ADDING ONE!!')
self.button = true;
self.addButton();
} else {
// print('NAV SELF ALREADY HAS A BUTTON!!')
print('JBP SELF ALREADY HAS A BUTTON!!')
}
}
}

View file

@ -10,8 +10,9 @@
var self = this;
var baseURL = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
var version = 2;
var version = 3;
this.preload = function(entityId) {
print('JBP SHOW IDENTIFICATION PRELOAD')
this.soundPlaying = null;
this.entityId = entityId;
self.initTimeout = null;

View file

@ -14,6 +14,7 @@
this.entered = true;
this.preload = function(entityID) {
print('JBP Zoom PRELOAD')
this.entityId = entityID;
this.initialize(entityID);
this.initTimeout = null;

View file

@ -124,7 +124,6 @@
this.move = function() {
print('jbp im the owner so move it')
var magnitudeV = self.maxVelocity;
var directionV = {

View file

@ -5,7 +5,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var version = 1039;
var version = 1041;
var cellLayout;
var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
@ -645,8 +645,7 @@ function createLayoutLights() {
}
function CreateNavigationButton(scene, number) {
// print('NAV NAVIGATION CREATING NAV!!' +scene.name + " " + number)
print('JBP NAVIGATION CREATING NAV!!' +scene.name + " " + number)
Entities.addEntity({
type: "Box",
@ -657,11 +656,11 @@ function CreateNavigationButton(scene, number) {
blue: 0
},
dimensions: {
x: 16000,
y: 16000,
z: 16000
x: 14000,
y: 14000,
z: 14000
},
visible: false,
visible: true,
userData: JSON.stringify({
name: scene.name,
entryPoint: scene.entryPoint,
@ -9045,4 +9044,9 @@ createLayoutLights();
Script.scriptEnding.connect(function() {
Entities.addingEntity.disconnect(makeUngrabbable);
});
});
Script.setTimeout(function(){
print('JBP stopping cell science import');
Script.stop();
},30000)