Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2.0 #35

Merged
merged 10 commits into from
Oct 12, 2024
Prev Previous commit
Next Next commit
sort capsomeres, levo/dextro fixes didn't carry-over from main...
dnanto committed Oct 1, 2024
commit 9404f43298af50ec0dd7d7214a9f874b9a631f04
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ function update(e) {
`T-Number=(${h})²+(${h})(${k})+(${k})²=` + (h * h + h * k + k * k),
`Q-Number=(${H})²+(${H})(${K})+(${K})²=` + (H * H + H * K + K * K),
].join("\n");
if (PARAMS.c === "levo") paper.view.scale(1, -1);
if (PARAMS.c === "dextro") paper.view.scale(1, -1);
} catch (e) {
console.log(e);
paper.clear();
5 changes: 4 additions & 1 deletion js/democapsid.js
Original file line number Diff line number Diff line change
@@ -880,7 +880,9 @@ function calc_facets(lat_cfg, PARAMS) {
x.style.fillColor = PARAMS["mer_color_" + x.data.offset] + PARAMS["mer_alpha_" + x.data.offset];
x.data.has_centroid = e.contains(x.data.centroid);
x.data.centroid_on_vertex = x.segments.findIndex((e) => e.point.getDistance(x.data.centroid) < 1e-5) > -1;
console.log(x.data.offset);
if (x.data.centroid_on_vertex === true) {
// if (x.data.offset === 1) {
x.style.strokeColor = null;
return x;
}
@@ -897,6 +899,7 @@ function calc_facets(lat_cfg, PARAMS) {
return y;
})
)
.sort((a, b) => a.data.offset - b.data.offset)
.filter((e) => e.segments.length),
data: e.data,
})
@@ -994,7 +997,7 @@ function draw_net(PARAMS) {
facets.forEach((e) => e.remove());
lat_cfg.lattice.forEach((e) => e.forEach((f) => f.remove()));

return g.scale(-1, 1);
return g;
}

function draw_capsid(PARAMS) {