Remove dead code highlight entity in edit.js

This commit is contained in:
Atlante45 2016-05-16 16:25:40 -07:00
parent 5acbed647c
commit 4b1497fdf4

View file

@ -714,7 +714,6 @@ function mousePressEvent(event) {
}
}
var highlightedEntityID = null;
var mouseCapturedByTool = false;
var lastMousePosition = null;
var idleMouseTimerId = null;
@ -780,33 +779,6 @@ function handleIdleMouse() {
idleMouseTimerId = null;
}
function highlightEntityUnderCursor(position, accurateRay) {
var pickRay = Camera.computePickRay(position.x, position.y);
var entityIntersection = Entities.findRayIntersection(pickRay, accurateRay);
if (entityIntersection.accurate) {
if (highlightedEntityID && highlightedEntityID != entityIntersection.entityID) {
selectionDisplay.unhighlightSelectable(highlightedEntityID);
highlightedEntityID = {
id: -1
};
}
var halfDiagonal = Vec3.length(entityIntersection.properties.dimensions) / 2.0;
var angularSize = 2 * Math.atan(halfDiagonal / Vec3.distance(Camera.getPosition(),
entityIntersection.properties.position)) * 180 / 3.14;
var sizeOK = (allowLargeModels || angularSize < MAX_ANGULAR_SIZE) && (allowSmallModels || angularSize > MIN_ANGULAR_SIZE);
if (entityIntersection.entityID && sizeOK) {
highlightedEntityID = entityIntersection.entityID;
selectionDisplay.highlightSelectable(entityIntersection.entityID);
}
}
}
function mouseReleaseEvent(event) {
mouseDown = false;