Fix findUsages/undo/node-lookup bugs, split Viewport and Editor, share command and inspector helpers

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 09:22:49 +02:00
1 parent 1eb28314cf
commit f140c2fd77
58 files changed
+1969 -1171

No files matched your search

+9
View File
@@ -7,3 +7,12 @@ export function clamp(value: number, lo: number, hi: number): number {
export function centreY(containerHeight: number, itemHeight: number): number {
return Math.round((containerHeight - itemHeight) / 2);
}
/**
* Zoom multiplier for one wheel event. Exponential, so scrolling up and back down by the same
* amount lands exactly where it started. The caller clamps the result into its own range –
* the scene view and the graph editor allow very different zoom levels.
*/
export function zoomFactor(deltaY: number): number {
return Math.exp(-deltaY * 0.0015);
}