Compare commits

..

No commits in common. "5494660d765ef663306290c2f3d94693dcac7949" and "c281c4569a0960a5ea4753ff92c407a31217972d" have entirely different histories.

2 changed files with 8 additions and 20 deletions

View File

@ -103,18 +103,16 @@ function setBackground(c) {
} }
function setLinkOpacity(o, primary) { function setLinkOpacity(o, primary) {
if( structure.nolink2opacity ) {
link_ms.map((lm) => lm.opacity = o);
} else {
if( primary ) { if( primary ) {
link_ms[0].opacity = o; link_ms[0].opacity = o;
} else { } else {
link_ms.slice(1).map((lm) => lm.opacity = o); for( const lm of link_ms.slice(1) ) {
lm.opacity = o;
} }
} }
} }
let gui; let gui; //
function changeShape() { function changeShape() {

View File

@ -359,16 +359,6 @@ function link_labels(nodes, link) {
// layer and the links follow that // layer and the links follow that
export const cell120_layered = (max) => { export const cell120_layered = (max) => {
const LAYER_NAMES = {
0: "North pole",
1: "Arctic circle",
2: "North temperate",
3: "Tropic of Cancer",
4: "Equator",
5: "Tropic of Capricorn",
6: "South temperate",
7: "Antarctic circle (all)"
};
const nodes = make_120cell_vertices(); const nodes = make_120cell_vertices();
const links = auto_detect_edges(nodes, 4); const links = auto_detect_edges(nodes, 4);
@ -392,8 +382,8 @@ export const cell120_layered = (max) => {
for( const i of [ 0, 1, 2, 3, 4, 5, 6, 7 ] ) { for( const i of [ 0, 1, 2, 3, 4, 5, 6, 7 ] ) {
layers.push(i); layers.push(i);
options.push({ options.unshift({
name: LAYER_NAMES[i], name: "Layer " + String(i),
links: [...layers], links: [...layers],
nodes: [...layers] nodes: [...layers]
}) })
@ -407,7 +397,6 @@ export const cell120_layered = (max) => {
node_size: 0.02, node_size: 0.02,
link_size: 0.02 link_size: 0.02
}, },
nolink2opacity: true,
options: options options: options
} }
} }
@ -609,6 +598,7 @@ function get_node(nodes, id) {
} }
function audit_link_labels(nodes, links) { function audit_link_labels(nodes, links) {
console.log("Link audit");
for( const l of links ) { for( const l of links ) {
const n1 = get_node(nodes, l.source); const n1 = get_node(nodes, l.source);
const n2 = get_node(nodes, l.target); const n2 = get_node(nodes, l.target);