Link only the stars that are drawn
The jump-link graph linked the whole catalogue: 3.7 million links at 8 pc, 7.4-7.8 s in the worker and a 443-515 ms frame on the main thread when they landed, and most of them between stars that were neither drawn nor clickable. A graph request now carries the star field's drawn stars, and the worker links only those, over an index of its own with cells as wide as the range. The scene asks again once a new drawn set has held still for 250 ms. The renderer is handed the graph's bounding sphere instead of computing it: three.js walked every vertex on the main thread in the first frame that drew a new graph, 48-55 ms at 8 pc. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jxMkwA2rbicdGxHosecYi
This commit is contained in:
@@ -306,6 +306,14 @@ export class StarFieldRenderer {
|
||||
return this.drawn.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* The catalogue indices being drawn. Replaced by a refocus that changes them, never changed in
|
||||
* place, so the same array means the same stars.
|
||||
*/
|
||||
get drawnStars(): Uint32Array {
|
||||
return this.drawn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Chooses the drawn stars again for where the view now is, and rewrites the instance buffers
|
||||
* with them. See {@link selectDrawnStars}.
|
||||
|
||||
Reference in New Issue
Block a user