π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix unused friend orbit angle export
Anand Baburajan1365e95d969d
diff --git a/web/apps/space/src/utils/friend-orbit.ts b/web/apps/space/src/utils/friend-orbit.tsindex ae68231f3d..0f4717c395 100644--- a/web/apps/space/src/utils/friend-orbit.ts+++ b/web/apps/space/src/utils/friend-orbit.ts@@ -50,8 +50,7 @@ export const friendOrbitCircleSize = (return Math.max(48, Math.min(maximum, diameter)) / bounds.scale;};-export const friendOrbitAngle = (elapsed: number) =>- (elapsed / 240000) * Math.PI * 2;+const friendOrbitAngle = (elapsed: number) => (elapsed / 240000) * Math.PI * 2;export const stepFriendOrbit = (circles: FriendOrbitCircle[],diff --git a/web/apps/space/tests/friend-orbit.test.ts b/web/apps/space/tests/friend-orbit.test.tsindex 04fa96927b..fe0027ba74 100644--- a/web/apps/space/tests/friend-orbit.test.ts+++ b/web/apps/space/tests/friend-orbit.test.ts@@ -2,15 +2,26 @@ import { describe, expect, it } from "vitest";import {arrangeFriendOrbit,createFriendOrbitCircle,- friendOrbitAngle,friendOrbitCircleSize,stepFriendOrbit,} from "../src/utils/friend-orbit";describe("friend orbit", () => {it("completes the reference orbit in four minutes", () => {- expect(friendOrbitAngle(60000)).toBeCloseTo(Math.PI / 2);- expect(friendOrbitAngle(240000)).toBeCloseTo(Math.PI * 2);+ const bounds = { width: 1280, height: 720, scale: 1.4 };+ const circles = Array.from({ length: 2 }, (_, index) =>+ createFriendOrbitCircle(String(index), index),+ );+ arrangeFriendOrbit(circles, bounds, 60000);+ for (const circle of circles) {+ expect(circle.x).toBeCloseTo(-circle.homeY);+ expect(circle.y).toBeCloseTo(circle.homeX);+ }+ arrangeFriendOrbit(circles, bounds, 240000);+ for (const circle of circles) {+ expect(circle.x).toBeCloseTo(circle.homeX);+ expect(circle.y).toBeCloseTo(circle.homeY);+ }});for (const [width, height, scale, count] of [