bravais 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4 - 2026-10-19
4
+
5
+ - Switching structures is faster: the viewer keeps its compiled shaders
6
+ instead of compiling them again, builds the axes once instead of leaking a
7
+ new set on every switch, and resizes the canvas only when its size changes.
8
+ - The README, the package description and the doc comments are shorter and
9
+ plainer.
10
+
11
+ ## 0.1.3 - 2026-10-19
12
+
13
+ - A layer at opacity 0 is no longer drawn but still frames the view, so a
14
+ viewer switching between two states of a structure keeps one centre and
15
+ scale.
16
+ - moyo is a separate file, `dist/moyo-wasm.js`, loaded the first time a
17
+ structure needs it, so `dist/bravais.js` shrinks from 1.1 MB to 87 kB. A
18
+ CIF with an operator loop never loads it.
19
+ - Large structures read, expand and bond in about linear time: a P1 cell of
20
+ 27,000 atoms reads in 0.1 s instead of 5.6 s and expands in 0.03 s
21
+ instead of 12 s.
22
+ - Bonds are listed by `start`, then `end`.
23
+ - `latticeFromParameters` and `latticeFromVectors` are exported, to build a
24
+ structure from cell parameters or vectors.
25
+ - A thumbnail centres on its view's target when the target is not the
26
+ origin.
27
+ - If three.js drops or renames a shader include that bravais patches, drawing
28
+ fails with an error naming the include, instead of showing flat squares.
29
+ - `package.json` marks the package free of side effects and exports itself.
30
+ - The third-party notices credit three.js for the bundled TrackballControls
31
+ addon.
32
+
3
33
  ## 0.1.2 - 2026-10-16
4
34
 
5
35
  - README revised.
package/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  [![npm](https://img.shields.io/npm/v/bravais)](https://www.npmjs.com/package/bravais)
4
4
  [![CI](https://github.com/jcwang587/bravais/actions/workflows/ci.yml/badge.svg)](https://github.com/jcwang587/bravais/actions/workflows/ci.yml)
5
5
 
6
- A minimal crystal structure viewer for the web.
6
+ A minimal crystal structure viewer for the web. Try the
7
+ [demo](https://jcwang.dev/bravais/).
7
8
 
8
9
  ## Install
9
10
 
@@ -22,26 +23,19 @@ createViewer(document.getElementById("viewer")).setLayers([{ scene }]);
22
23
 
23
24
  ## Built with
24
25
 
25
- - [three.js](https://threejs.org/): rendering, as a peer dependency.
26
- - [moyo](https://github.com/spglib/moyo): space-group
27
- operations, bundled as WebAssembly.
28
- - [VESTA](https://jp-minerals.org/vesta/en/): the bond cutoffs, the element
29
- colours, used here in Pretty Lattice's softened version, and the
30
- occupancy pies.
31
- - [pymatgen](https://github.com/materialsproject/pymatgen): the copy of
32
- VESTA's cutoff table this package ships.
33
- - OKLab: Björn Ottosson's public-domain colour formulas. They supply no
34
- colours: they measure how alike two colours look, and move an element's
35
- colour only when it would clash with one already on screen.
26
+ - [three.js](https://threejs.org/) for rendering.
27
+ - [moyo](https://github.com/spglib/moyo) for space-group symmetry.
28
+ - [VESTA](https://jp-minerals.org/vesta/en/)'s bond cutoffs and occupancy
29
+ pies, with the cutoff table from
30
+ [pymatgen](https://github.com/materialsproject/pymatgen).
31
+ - Björn Ottosson's OKLab colour space, to keep element colours apart.
36
32
 
37
33
  Thanks to Feitong Song's
38
- [Pretty Lattice](https://github.com/songfeitong/pretty-lattice), which this
39
- viewer follows in its lighting and materials, depth fading, trackball feel,
40
- axes gizmo, legend swatch, standard view and softened element colours.
34
+ [Pretty Lattice](https://github.com/songfeitong/pretty-lattice), whose look,
35
+ controls and softened element colours this viewer follows.
41
36
 
42
37
  The code was written by Claude Code, under the author's direction and review.
43
38
 
44
39
  ## License
45
40
 
46
- [MIT](LICENSE). Notices for the bundled third-party material are in
47
- [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
41
+ [MIT](LICENSE)
@@ -1,9 +1,17 @@
1
1
  # Third-party notices
2
2
 
3
3
  bravais is MIT licensed (see [LICENSE](LICENSE)). It ships material from the
4
- three MIT-licensed projects below, bundled into `dist/bravais.js`. Each is
5
- reproduced with its copyright notice, and the MIT permission notice at the
6
- end applies to all three.
4
+ four MIT-licensed projects below, bundled into `dist/`. Each is reproduced
5
+ with its copyright notice, and the MIT permission notice at the end applies
6
+ to all four.
7
+
8
+ ## three.js
9
+
10
+ The TrackballControls addon of [three.js](https://github.com/mrdoob/three.js)
11
+ is bundled, used under its MIT licence. three.js itself is a peer dependency
12
+ and is not bundled.
13
+
14
+ Copyright © 2010-2026 three.js authors
7
15
 
8
16
  ## moyo
9
17