refactor: Beute-Frontend vereinfacht (findPart, subVec3, seededRandom)
Gemeinsame Helfer statt vier Kopien der Teilsuche, zwei Vektor- Subtraktionen und zwei Zufallsgeneratoren; hasPartSheet an einer Stelle; ungenutzte setOpacity und points-Ref entfernt. Verhalten unverändert (1050 Tests). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
0b0bc3c6dc
commit
9f6ab4ea3f
13 files changed
+85
-84
No files matched your search
@@ -6,6 +6,11 @@ import type { CatalogPartType, FrameType, HiveCatalog, HivePart, HivePartKind, H
|
||||
|
||||
export type Vec3 = [number, number, number];
|
||||
|
||||
/** a − b, component by component. */
|
||||
export function subVec3(a: Vec3, b: Vec3): Vec3 {
|
||||
return [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
|
||||
}
|
||||
|
||||
export interface PartBox {
|
||||
id: string;
|
||||
partTypeId: string;
|
||||
|
||||
Reference in new issue
Block a user