Commit e17784b
Fix view-dependent atom occlusion + atom palette + tile-copy labels
Three issues from the same user report:
1. Atoms were sometimes hidden inside their iso spheres depending on
camera angle. Tile-copy atoms have transparent material; combined
with the (also transparent) iso, Three.js's per-frame z-sort flipped
visibility as the camera moved. Atoms now always `depthWrite=true`
(the small alpha-cut artifact on transparent atoms is invisible at
their size) and `renderOrder=1`, so they consistently sit over iso.
2. Bi/Rh/O all rendered in similar pink/red tones because Bi and Rh
were missing from the CPK table and fell through to the default
`#ff1493` (deep pink). Added Bi (purple), Rh (teal), and ~30 other
transition metals + lanthanides + post-transition elements that show
up in MP materials (Pd, Ir, Te, I, Sb, In, Cd, Hg, Tl, Re, Os, Ta,
Hf, Y, Nb, Tc, Ru, La, Ce, Pr, ..., Th, U). Now Bi-Rh-O contrast
clearly.
3. Atom labels only rendered for atoms with fractional position inside
the primary cell, which made periodic copies in the tile/padded
region invisible label-wise. Now every drawn copy gets a label,
faded with the same `atomOpacity` used for the spheres.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1422b9a commit e17784b
2 files changed
Lines changed: 49 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | | - | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 146 | + | |
152 | 147 | | |
153 | 148 | | |
154 | 149 | | |
| |||
258 | 253 | | |
259 | 254 | | |
260 | 255 | | |
261 | | - | |
| 256 | + | |
262 | 257 | | |
263 | 258 | | |
264 | 259 | | |
265 | 260 | | |
266 | | - | |
| 261 | + | |
267 | 262 | | |
268 | 263 | | |
269 | 264 | | |
| |||
358 | 353 | | |
359 | 354 | | |
360 | 355 | | |
361 | | - | |
| 356 | + | |
362 | 357 | | |
363 | | - | |
| 358 | + | |
364 | 359 | | |
365 | 360 | | |
366 | 361 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
| 49 | + | |
44 | 50 | | |
| 51 | + | |
45 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 | | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
48 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
49 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
50 | 87 | | |
51 | 88 | | |
| 89 | + | |
| 90 | + | |
52 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
53 | 95 | | |
54 | 96 | | |
55 | 97 | | |
| |||
0 commit comments