# Run the web cone query the way the native one does · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/0adefefe20210eaaff8bcd4f027d986cec9874a3)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 0adefefe20210eaaff8bcd4f027d986cec9874a3

Requested commit: 0adefefe20210eaaff8bcd4f027d986cec9874a3

Commit: 0adefefe20210eaaff8bcd4f027d986cec9874a3

Tree: 73646dcf8e5f582bb18456149b7eea1363da8bff

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Run the web cone query the way the native one does

On the web there is no native library, so every cone runs the Dart
query. It had fallen behind ish_query: it cast rays at seams and beside
corners a wall runs straight through, kept every collinear outline
point, and hashed Offsets and doubles, which is slow once compiled to
JavaScript. Port ish_query's events, sector culling and same-edge
outline simplification, index vertices once instead of hashing them,
remember which vertices are seams until the wall mask changes, and test
each tree node's bounds once per ray.

A dragged Lotus cone's query drops from 9.3 ms to 1.7 ms (median) in
Edge, and from 14.5 ms to 1.8 ms on Breeze. Over 256 Lotus queries the
Dart and native cones cast the same rays and draw the same outline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

```

## Parents

- [ffd7c63012e40064e9acc4bc8677811577928f57](https://git.cafe/dara/icarus/commit/ffd7c63012e40064e9acc4bc8677811577928f57?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/0adefefe20210eaaff8bcd4f027d986cec9874a3?format=markdown)
