Merge branch 'master' of https://github.com/highfidelity/hifi into metavoxels

This commit is contained in:
Andrzej Kapolka 2014-06-20 18:12:29 -07:00
commit 811815e61f
2 changed files with 6 additions and 4 deletions

View file

@ -328,7 +328,8 @@ function controller(wichSide) {
origin: this.palmPosition,
direction: this.front
});
if (intersection.accurate && intersection.modelID.isKnownID) {
var angularSize = 2 * Math.atan(intersection.modelProperties.radius / Vec3.distance(Camera.getPosition(), intersection.modelProperties.position)) * 180 / 3.14;
if (intersection.accurate && intersection.modelID.isKnownID && angularSize > MIN_ANGULAR_SIZE && angularSize < MAX_ANGULAR_SIZE) {
this.glowedIntersectingModel = intersection.modelID;
Models.editModel(this.glowedIntersectingModel, { glowLevel: 0.25 });
}
@ -887,7 +888,8 @@ function mouseMoveEvent(event) {
glowedModelID.isKnownID = false;
}
if (modelIntersection.modelID.isKnownID) {
var angularSize = 2 * Math.atan(modelIntersection.modelProperties.radius / Vec3.distance(Camera.getPosition(), modelIntersection.modelProperties.position)) * 180 / 3.14;
if (modelIntersection.modelID.isKnownID && angularSize > MIN_ANGULAR_SIZE && angularSize < MAX_ANGULAR_SIZE) {
Models.editModel(modelIntersection.modelID, { glowLevel: 0.25 });
glowedModelID = modelIntersection.modelID;
}
@ -1117,8 +1119,8 @@ function handeMenuEvent(menuItem){
Models.editModel(editModelID, properties);
}
}
tooltip.show(false);
}
tooltip.show(false);
}
Menu.menuItemEvent.connect(handeMenuEvent);

View file

@ -1196,7 +1196,7 @@ function menuItemEvent(menuItem) {
print("deleting...");
if (isImporting) {
cancelImport();
} else {
} else if (voxelToolSelected) {
Clipboard.deleteVoxel(selectedVoxel.x, selectedVoxel.y, selectedVoxel.z, selectedVoxel.s);
}
}