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;
this.preload=function(entityId){
print('JBP MOVE RANDOMLY PRELOAD')
this.isConnected = false;
this.entityId = entityId;
this.minVelocity = 1;

View file

@ -7,7 +7,7 @@
(function() {
var version = 11;
var version = 12;
var added = false;
this.frame = 0;
var utilsScript = Script.resolvePath('utils.js');
@ -17,29 +17,27 @@
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;
}
this.initialize = function(entityId) {
print('JBP nav button should initialize' + entityId)
var properties = Entities.getEntityProperties(entityId);
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) {
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);
}, 1000)
} else {
print('JBP userdata before parse attempt' + properties.userData)
// print('userdata before parse attempt' + properties.userData)
self.userData = null;
try {
self.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;
}
@ -47,9 +45,9 @@
var mySavedSettings = Settings.getValue(entityId);
if (mySavedSettings.buttons !== undefined) {
print('JBP preload buttons' + mySavedSettings.buttons)
// print(' preload buttons' + mySavedSettings.buttons)
mySavedSettings.buttons.forEach(function(b) {
print('JBP deleting button' + b)
// print(' deleting button' + b)
Overlays.deleteOverlay(b);
})
Settings.setValue(entityId, '')
@ -57,14 +55,14 @@
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) {
print('JBP NO BUTTON ADDING ONE!!')
// print(' NO BUTTON ADDING ONE!!')
self.button = true;
self.addButton();
} else {
print('JBP SELF ALREADY HAS A BUTTON!!')
//print(' SELF ALREADY HAS A BUTTON!!')
}
}
}

View file

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

View file

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

View file

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