You've already forked decomp.dev
mirror of
https://github.com/encounter/decomp.dev.git
synced 2026-07-10 03:18:48 -07:00
39fa6ad3bb
* Fix package-lock * Implement treemap filtering * Fix missing return * Switch treemap algorithm to binary to reduce thin rectangles * Dim filtered out units instead of hiding them * Draw stroke behind fill This prevents a unit's color from being covered up by its own black outline. * Clip filtered unit outlines This is to prevent thin highlighted units from being hidden behind the outline of a filtered out unit. * Fix near-100 percentages being rounded up to 100% * Use radial gradients in treemap units * Also update svg generation to use blue for near-complete * Restore cached canvas, biome fmt * Update svg rendering with gradients * Implement filter URL param to link a treemap search * One more type hint * Increase blue saturation for partial match * Update blue colors --------- Co-authored-by: Luke Street <luke@street.dev>
45 lines
966 B
TypeScript
45 lines
966 B
TypeScript
/// <reference types="@rsbuild/core/types" />
|
|
|
|
type Unit = {
|
|
name: string;
|
|
fuzzy_match_percent: number;
|
|
total_code: number;
|
|
color: string;
|
|
x: number;
|
|
y: number;
|
|
w: number;
|
|
h: number;
|
|
// Runtime fields
|
|
filtered: boolean;
|
|
};
|
|
|
|
type Measures = {
|
|
fuzzy_match_percent: number;
|
|
total_code: number;
|
|
matched_code: number;
|
|
matched_code_percent: number;
|
|
total_data: number;
|
|
matched_data: number;
|
|
matched_data_percent: number;
|
|
total_functions: number;
|
|
matched_functions: number;
|
|
matched_functions_percent: number;
|
|
complete_code: number;
|
|
complete_code_percent: number;
|
|
complete_data: number;
|
|
complete_data_percent: number;
|
|
total_units: number;
|
|
complete_units: number;
|
|
};
|
|
|
|
type ReportHistoryEntry = {
|
|
timestamp: string;
|
|
commit_sha: string;
|
|
measures: Measures;
|
|
};
|
|
|
|
interface Window {
|
|
drawTreemap: (id: string, clickable: boolean, units: Unit[]) => void;
|
|
renderChart: (id: string, data: ReportHistoryEntry[]) => void;
|
|
}
|