mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-09 09:02:29 +02:00
sanatize files and remove unused messages stuff
This commit is contained in:
parent
514edee3f1
commit
7d0eb79115
5 changed files with 13 additions and 29 deletions
|
@ -81,10 +81,10 @@
|
|||
self.lastTargetLocation = self.targetLocation
|
||||
self.entityLocation = Entities.getEntityProperties(self.entityId, "position").position;
|
||||
self.targetLocation = Vec3.sum(self.entityLocation, TARGET_OFFSET);
|
||||
// print('JBP self.lastTargetLocation' + JSON.stringify(self.lastTargetLocation))
|
||||
// print('JBP self.targetLocation' + JSON.stringify(self.targetLocation))
|
||||
// print('Script.clearTimeout self.lastTargetLocation' + JSON.stringify(self.lastTargetLocation))
|
||||
// print('Script.clearTimeout self.targetLocation' + JSON.stringify(self.targetLocation))
|
||||
var diff = Vec3.distance(self.targetLocation, self.lastTargetLocation);
|
||||
// print('JBP diff is::' + diff)
|
||||
// print('Script.clearTimeout diff is::' + diff)
|
||||
self.addThrustToAvatar(deltaTime);
|
||||
}
|
||||
|
||||
|
@ -92,12 +92,12 @@
|
|||
this.addThrustToAvatar = function(deltaTime) {
|
||||
var targetCurrentLocationToLastLocation = Vec3.subtract(self.targetLocation, self.lastTargetLocation);
|
||||
|
||||
// print('JBP targetCurrentLocationToLastLocation' + JSON.stringify(targetCurrentLocationToLastLocation));
|
||||
// print('JBP deltaTime' + deltaTime)
|
||||
// print('JBP velocity' + JSON.stringify(self.velocity))
|
||||
// print('Script.clearTimeout targetCurrentLocationToLastLocation' + JSON.stringify(targetCurrentLocationToLastLocation));
|
||||
// print('Script.clearTimeout deltaTime' + deltaTime)
|
||||
// print('Script.clearTimeout velocity' + JSON.stringify(self.velocity))
|
||||
var thrustToAdd = Vec3.multiply(100, targetCurrentLocationToLastLocation);
|
||||
thrustToAdd = Vec3.multiply(thrustToAdd, 1 / deltaTime);
|
||||
// print('JBP adding thrust!' + JSON.stringify(thrustToAdd))
|
||||
// print('Script.clearTimeout adding thrust!' + JSON.stringify(thrustToAdd))
|
||||
|
||||
MyAvatar.addThrust(thrustToAdd);
|
||||
|
||||
|
@ -132,21 +132,5 @@
|
|||
Controller.mousePressEvent.disconnect(this.onMousePress);
|
||||
}
|
||||
|
||||
function handleMessages(channel, message, sender) {
|
||||
// print('HANDLING A MESSAGE IN PROTEIN')
|
||||
if (sender === MyAvatar.sessionUUID) {
|
||||
if (channel === "Hifi-Motor-Protein-Channel") {
|
||||
if (message === 'delete') {
|
||||
// print('SHOULD DELETE PROTEIN')
|
||||
Entities.deleteEntity(self.entityId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Messages.messageReceived.connect(handleMessages);
|
||||
|
||||
|
||||
|
||||
});
|
|
@ -7,7 +7,7 @@
|
|||
self.entityId = entityId;
|
||||
self.getUserData();
|
||||
self.soundURL = baseURL + "Audio/" + self.userData.name + ".wav?" + version;
|
||||
print("JBP creating WAV name location is " + baseURL + "Audio/" + self.userData.name + ".wav");
|
||||
print("Script.clearTimeout creating WAV name location is " + baseURL + "Audio/" + self.userData.name + ".wav");
|
||||
|
||||
self.soundOptions = {
|
||||
stereo: true,
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
volume: 0.5
|
||||
};
|
||||
this.teleportSound = SoundCache.getSound("https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/Audio/whoosh.wav");
|
||||
//print('JBP PRELOADING A ZOOM ENTITY')
|
||||
//print('Script.clearTimeout PRELOADING A ZOOM ENTITY')
|
||||
print(" portal destination is " + portalDestination);
|
||||
}
|
||||
|
||||
this.enterEntity = function(entityID) {
|
||||
print('JBP ENTERED A BOUNDARY ENTITY, SHOULD ZOOM', entityID)
|
||||
print('Script.clearTimeout ENTERED A BOUNDARY ENTITY, SHOULD ZOOM', entityID)
|
||||
|
||||
var data = JSON.parse(Entities.getEntityProperties(this.entityId).userData);
|
||||
|
||||
|
|
|
@ -805,7 +805,7 @@ function CreateInstances(scene) {
|
|||
}, idBounds, 150);
|
||||
|
||||
}
|
||||
print('JBP SCRIPT AT CREATE ENTITY: ' + script)
|
||||
print('Script.clearTimeout SCRIPT AT CREATE ENTITY: ' + script)
|
||||
CreateEntity(scene.instances[i].model, position, rotation, scene.instances[i].dimensions, url, script, scene.instances[i].userData, scene.instances[i].visible);
|
||||
}
|
||||
}
|
||||
|
@ -907,7 +907,7 @@ function CreateEntity(name, position, rotation, dimensions, url, script, userDat
|
|||
scriptLocation = baseLocation + "Scripts/" + script;
|
||||
}
|
||||
|
||||
print('JBP SCRIPT LOCATION IN CREATE ENTITY' + scriptLocation)
|
||||
print('Script.clearTimeout SCRIPT LOCATION IN CREATE ENTITY' + scriptLocation)
|
||||
Entities.addEntity({
|
||||
type: "Model",
|
||||
name: name,
|
||||
|
|
|
@ -78,7 +78,7 @@ function deleteAllMotorProteins() {
|
|||
results.forEach(function(r) {
|
||||
var name = Entities.getEntityProperties(r, 'name').name;
|
||||
if (name.indexOf('Hifi-Motor-Protein-Anchor') > -1) {
|
||||
print('JBP DELETING A MOTOR PROTEIN::' + r)
|
||||
print('Script.clearTimeout DELETING A MOTOR PROTEIN::' + r)
|
||||
Entities.deleteEntity(r);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue