feat: SnapCAD Studio'yu YakHub deposuna taşı
Build and Push Docker Images / build (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s

- DWG/DXF içe aktarma ve .skf yeniden açma düzeltmeleri

- YakNet Bulut eşitlemede boş/eski kopya koruması ve yerel-only proje bildirimi

- Panelden içe aktarma duyuruları ve erişilebilir Türkçe hata mesajları

- AGPL-3.0 lisansı, README ve YakHub bağlantıları
This commit is contained in:
Enes Yakıştır
2026-10-25 18:20:21 +03:00
parent e9cb8e8681
commit 33b0940012
149 changed files with 46978 additions and 1273 deletions
+51
View File
@@ -0,0 +1,51 @@
import { describe, it, expect } from "vitest";
import {
calculateSunPosition,
DEFAULT_SOLAR_SETTINGS,
SOLAR_LOCATIONS,
type SolarStudySettings,
} from "@/lib/solarSystem";
describe("Solar Study & Sun Position System (Mimari Güneş & Gölge Etüdü)", () => {
it("provides architectural location presets including Istanbul and Ankara", () => {
expect(SOLAR_LOCATIONS.length).toBeGreaterThanOrEqual(5);
const names = SOLAR_LOCATIONS.map((l) => l.name);
expect(names.some((n) => n.includes("İstanbul"))).toBe(true);
expect(names.some((n) => n.includes("Ankara"))).toBe(true);
});
it("calculates peak sun altitude at noon in June", () => {
const noonSummer: SolarStudySettings = {
...DEFAULT_SOLAR_SETTINGS,
hour: 12.0,
month: 5, // June
day: 21,
};
const pos = calculateSunPosition(noonSummer);
expect(pos.isDaylight).toBe(true);
expect(pos.altitudeDegrees).toBeGreaterThan(60); // In Istanbul, summer solstice noon is ~72 deg
expect(pos.lightVector[1]).toBeGreaterThan(150); // High Y position
});
it("calculates lower sun altitude and longer shadows in winter solstice (December)", () => {
const noonWinter: SolarStudySettings = {
...DEFAULT_SOLAR_SETTINGS,
hour: 12.0,
month: 11, // December
day: 21,
};
const pos = calculateSunPosition(noonWinter);
expect(pos.altitudeDegrees).toBeLessThan(35); // Winter noon in Istanbul is ~25-26 deg
});
it("produces warm golden hour lighting colors near sunrise/sunset", () => {
const sunsetSettings: SolarStudySettings = {
...DEFAULT_SOLAR_SETTINGS,
hour: 20.2, // Around sunset in summer in Istanbul
month: 5,
day: 21,
};
const pos = calculateSunPosition(sunsetSettings);
expect(pos.lightColorHex).toMatch(/^#(ffaa44|ffe4b5|fffcf2)$/);
});
});