diff --git a/src/Cluster.tsx b/src/Cluster.tsx index 7bc5cde5..0a58f4bd 100644 --- a/src/Cluster.tsx +++ b/src/Cluster.tsx @@ -43,7 +43,7 @@ export function Cluster({ const geometries: THREE.SphereGeometry[] = []; // Keep track of the points added so that we can remove duplicates const pointSet = new Set(); - data.forEach((point) => { + data.forEach(point => { const { position } = point; // Remove duplicates if (!pointSet.has(position.join(","))) { diff --git a/src/LassoSelect.tsx b/src/LassoSelect.tsx index f0cff596..8e5070c1 100644 --- a/src/LassoSelect.tsx +++ b/src/LassoSelect.tsx @@ -191,8 +191,10 @@ export function LassoSelect({ // Animation frames to draw the selections useFrame(({ camera }) => { - const { selectionShapeNeedsUpdate, selectionPoints } = - selectionState.current; + const { + selectionShapeNeedsUpdate, + selectionPoints, + } = selectionState.current; // Update the selection lasso lines if (selectionShapeNeedsUpdate) { const ogLength = selectionPoints.length; @@ -268,7 +270,7 @@ function updateSelection({ // A vector to re-use in calculating it's intersection with the polygon const pointVector = new THREE.Vector3(); - points.forEach((point) => { + points.forEach(point => { const isThreeD = point.position.length === 3; // Initialize the point vector from the point position const pointPosition = isThreeD diff --git a/src/Points.tsx b/src/Points.tsx index 1978548e..fda49e3b 100644 --- a/src/Points.tsx +++ b/src/Points.tsx @@ -208,15 +208,15 @@ export function Points({ { + onPointerUp={e => { if (e.intersections) { const instanceIds = e.intersections - .map((e) => e?.instanceId) + .map(e => e?.instanceId) .filter((i): i is NonNullable => i != null); // Multi click onPointsClicked && - onPointsClicked(instanceIds.map((i) => data[i])); + onPointsClicked(instanceIds.map(i => data[i])); // Single click instanceIds.length > 0 && @@ -224,10 +224,10 @@ export function Points({ onPointClicked(data[instanceIds[0]]); } }} - onPointerOver={(e) => { + onPointerOver={e => { if (e.intersections) { const instanceIds = e.intersections - .map((e) => e?.instanceId) + .map(e => e?.instanceId) .filter((i): i is NonNullable => i != null); // Single instance callback diff --git a/src/ThreeDimensionalBounds.tsx b/src/ThreeDimensionalBounds.tsx index ce740471..1fbbfda9 100644 --- a/src/ThreeDimensionalBounds.tsx +++ b/src/ThreeDimensionalBounds.tsx @@ -74,8 +74,9 @@ export function ThreeDimensionalBounds({ camera.zoom = Math.min(width / boundsWidth, height / boundsHeight) * boundsZoomPaddingFactor; - const furthestPointDim = - getMaxDimensionFromThreeDimensionalBounds(bounds); + const furthestPointDim = getMaxDimensionFromThreeDimensionalBounds( + bounds, + ); // Set the camera position to be a bit further away than the furthest coordinate value, to allow for rotation of the cloud without clipping through the near plane // The default near value is .1, so if we move the camera back this far, we are guaranteed to be not clip the near plane diff --git a/src/utils/threeDimensionalUtils.ts b/src/utils/threeDimensionalUtils.ts index 4b9a65c3..316ca62f 100644 --- a/src/utils/threeDimensionalUtils.ts +++ b/src/utils/threeDimensionalUtils.ts @@ -34,7 +34,7 @@ export function getThreeDimensionalBounds( minZ = Infinity, maxZ = -Infinity; - points.forEach((p) => { + points.forEach(p => { minX = Math.min(minX, p[0]); minY = Math.min(minY, p[1]); minZ = Math.min(minZ, p[2]); diff --git a/src/utils/twoDimensionalUtils.ts b/src/utils/twoDimensionalUtils.ts index 7a324b22..7659691b 100644 --- a/src/utils/twoDimensionalUtils.ts +++ b/src/utils/twoDimensionalUtils.ts @@ -30,7 +30,7 @@ export function getTwoDimensionalBounds( maxX = -Infinity, maxY = -Infinity; - points.forEach((p) => { + points.forEach(p => { minX = Math.min(minX, p[0]); minY = Math.min(minY, p[1]); maxX = Math.max(maxX, p[0]);