Commit eb8abd2
committed
refactor: drop webgl-constants dep, inline the 9 values we use
webgl-constants only got us minifier-friendly WebGL enum literals
(`34962` etc.) instead of property accesses on the `gl` context. We use
exactly 9 of them, inside calculateMagicPixelId. Inlining as module-local
`const` declarations yields the same inlinable literals without a
runtime dep — the Khronos spec URL in the leading comment pins the
values.
Bundle: 7.97 kB → 7.65 kB (gzip 3.68 kB → 3.61 kB).1 parent ab79f54 commit eb8abd2
3 files changed
Lines changed: 14 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 1 | | |
16 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments