mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 12:04:03 +02:00
Remove dead code highlight entity in edit.js
This commit is contained in:
parent
5acbed647c
commit
4b1497fdf4
1 changed files with 0 additions and 28 deletions
|
@ -714,7 +714,6 @@ function mousePressEvent(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var highlightedEntityID = null;
|
|
||||||
var mouseCapturedByTool = false;
|
var mouseCapturedByTool = false;
|
||||||
var lastMousePosition = null;
|
var lastMousePosition = null;
|
||||||
var idleMouseTimerId = null;
|
var idleMouseTimerId = null;
|
||||||
|
@ -780,33 +779,6 @@ function handleIdleMouse() {
|
||||||
idleMouseTimerId = null;
|
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) {
|
function mouseReleaseEvent(event) {
|
||||||
mouseDown = false;
|
mouseDown = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue