quiet prints

This commit is contained in:
James B. Pollack 2016-02-12 19:38:40 -08:00
parent f346ac7023
commit e828a7e6e2
5 changed files with 15 additions and 24 deletions

View file

@ -9,7 +9,6 @@
var self = this; var self = this;
this.preload=function(entityId){ this.preload=function(entityId){
print('JBP MOVE RANDOMLY PRELOAD')
this.isConnected = false; this.isConnected = false;
this.entityId = entityId; this.entityId = entityId;
this.minVelocity = 1; this.minVelocity = 1;

View file

@ -7,7 +7,7 @@
(function() { (function() {
var version = 11; var version = 12;
var added = false; var added = false;
this.frame = 0; this.frame = 0;
var utilsScript = Script.resolvePath('utils.js'); var utilsScript = Script.resolvePath('utils.js');
@ -17,29 +17,27 @@
var baseURL = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/"; var baseURL = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
this.preload = function(entityId) { this.preload = function(entityId) {
print('JBP NAV PRELOAD')
this.entityId = entityId; this.entityId = entityId;
this.initialize(entityId); this.initialize(entityId);
this.initTimeout = null; this.initTimeout = null;
} }
this.initialize = function(entityId) { this.initialize = function(entityId) {
print('JBP nav button should initialize' + entityId)
var properties = Entities.getEntityProperties(entityId); var properties = Entities.getEntityProperties(entityId);
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) { if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) {
self.initTimeout = Script.setTimeout(function() { self.initTimeout = Script.setTimeout(function() {
print('JBP no user data yet, try again in one second') // print(' no user data yet, try again in one second')
self.initialize(entityId); self.initialize(entityId);
}, 1000) }, 1000)
} else { } else {
print('JBP userdata before parse attempt' + properties.userData) // print('userdata before parse attempt' + properties.userData)
self.userData = null; self.userData = null;
try { try {
self.userData = JSON.parse(properties.userData); self.userData = JSON.parse(properties.userData);
} catch (err) { } catch (err) {
print('JBP error parsing json'); // print(' error parsing json');
print('JBP properties are:' + properties.userData); // print(' properties are:' + properties.userData);
return; return;
} }
@ -47,9 +45,9 @@
var mySavedSettings = Settings.getValue(entityId); var mySavedSettings = Settings.getValue(entityId);
if (mySavedSettings.buttons !== undefined) { if (mySavedSettings.buttons !== undefined) {
print('JBP preload buttons' + mySavedSettings.buttons) // print(' preload buttons' + mySavedSettings.buttons)
mySavedSettings.buttons.forEach(function(b) { mySavedSettings.buttons.forEach(function(b) {
print('JBP deleting button' + b) // print(' deleting button' + b)
Overlays.deleteOverlay(b); Overlays.deleteOverlay(b);
}) })
Settings.setValue(entityId, '') Settings.setValue(entityId, '')
@ -57,14 +55,14 @@
self.buttonImageURL = baseURL + "GUI/GUI_" + self.userData.name + ".png?" + version; self.buttonImageURL = baseURL + "GUI/GUI_" + self.userData.name + ".png?" + version;
print('JBP BUTTON IMAGE URL:' + self.buttonImageURL) // print(' BUTTON IMAGE URL:' + self.buttonImageURL)
if (self.button === undefined) { if (self.button === undefined) {
print('JBP NO BUTTON ADDING ONE!!') // print(' NO BUTTON ADDING ONE!!')
self.button = true; self.button = true;
self.addButton(); self.addButton();
} else { } else {
print('JBP SELF ALREADY HAS A BUTTON!!') //print(' SELF ALREADY HAS A BUTTON!!')
} }
} }
} }

View file

@ -12,7 +12,6 @@
var version = 3; var version = 3;
this.preload = function(entityId) { this.preload = function(entityId) {
print('JBP SHOW IDENTIFICATION PRELOAD')
this.soundPlaying = null; this.soundPlaying = null;
this.entityId = entityId; this.entityId = entityId;
self.initTimeout = null; self.initTimeout = null;

View file

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

View file

@ -5,7 +5,7 @@
// 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 = 1041; var version = 1043;
var cellLayout; var cellLayout;
var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/"; var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
@ -609,12 +609,10 @@ function ImportScene(scene) {
clearAllNav(); clearAllNav();
function clearAllNav() { function clearAllNav() {
// print('NAV CLEARING ALL NAV');
var result = Entities.findEntities(MyAvatar.position, 25000); var result = Entities.findEntities(MyAvatar.position, 25000);
result.forEach(function(r) { result.forEach(function(r) {
var properties = Entities.getEntityProperties(r, "name"); var properties = Entities.getEntityProperties(r, "name");
if (properties.name.indexOf('navigation button') > -1) { if (properties.name.indexOf('navigation button') > -1) {
// print('NAV DELETING NAV BUTTON AT START:: '+r)
Entities.deleteEntity(r); Entities.deleteEntity(r);
} }
}) })
@ -645,8 +643,6 @@ function createLayoutLights() {
} }
function CreateNavigationButton(scene, number) { function CreateNavigationButton(scene, number) {
print('JBP NAVIGATION CREATING NAV!!' +scene.name + " " + number)
Entities.addEntity({ Entities.addEntity({
type: "Box", type: "Box",
name: scene.name + " navigation button", name: scene.name + " navigation button",
@ -656,11 +652,11 @@ function CreateNavigationButton(scene, number) {
blue: 0 blue: 0
}, },
dimensions: { dimensions: {
x: 14000, x: 16000,
y: 14000, y: 16000,
z: 14000 z: 16000
}, },
visible: true, visible: false,
userData: JSON.stringify({ userData: JSON.stringify({
name: scene.name, name: scene.name,
entryPoint: scene.entryPoint, entryPoint: scene.entryPoint,