Remove unneeded variable
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
const triangleContainer = document.querySelector('#triangles');
|
||||
const lineContainer = document.querySelector('#lines');
|
||||
const edgePts = wallCorners.map((pt, i) => [pt, wallCorners[(i + 1) % wallCorners.length]]);
|
||||
const drawCollisionLines = false;
|
||||
const drawCollisionLines = true;
|
||||
|
||||
function drawEdges(lpts) {
|
||||
let edges = lpts.map(e => e.join(' '));
|
||||
@@ -214,7 +214,6 @@
|
||||
function updateTriangles([positionX, positionY]) {
|
||||
const delim = ' ';
|
||||
const className = 'clockwise-orientation';
|
||||
const visible = [];
|
||||
|
||||
triangles.forEach(t => {
|
||||
const attr = t.getAttribute('points').split(delim);
|
||||
@@ -253,10 +252,7 @@
|
||||
t.classList[isClockwise && !isAcute ? "add" : "remove"]("obtuse");
|
||||
t.classList[!isClockwise ? "add" : "remove"]("anti-clockwise");
|
||||
}
|
||||
if (isClockwise && isAcute) visible.push(t);
|
||||
});
|
||||
|
||||
return visible;
|
||||
}
|
||||
|
||||
function wrapPos(positionX, positionY) {
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Reference in New Issue
Block a user