Compare commits
	
		
			2 Commits
		
	
	
		
			c281c4569a
			...
			46dfb808f4
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 46dfb808f4 | ||
|  | e7cb1856e0 | 
							
								
								
									
										12
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								main.js
									
									
									
									
									
								
							| @ -103,16 +103,18 @@ function setBackground(c) { | ||||
| } | ||||
| 
 | ||||
| function setLinkOpacity(o, primary) { | ||||
| 	if( primary ) { | ||||
| 		link_ms[0].opacity = o; | ||||
| 	if( structure.nolink2opacity ) { | ||||
| 		link_ms.map((lm) => lm.opacity = o); | ||||
| 	} else { | ||||
| 		for( const lm of link_ms.slice(1) ) { | ||||
| 			lm.opacity = o; | ||||
| 		if( primary ) { | ||||
| 			link_ms[0].opacity = o; | ||||
| 		} else { | ||||
| 			link_ms.slice(1).map((lm) => lm.opacity = o); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| let gui; // 
 | ||||
| let gui;  | ||||
| 
 | ||||
| 
 | ||||
| function changeShape() { | ||||
|  | ||||
							
								
								
									
										16
									
								
								polytopes.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								polytopes.js
									
									
									
									
									
								
							| @ -359,6 +359,16 @@ function link_labels(nodes, link) { | ||||
| // layer and the links follow that
 | ||||
| 
 | ||||
| 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 links = auto_detect_edges(nodes, 4); | ||||
| 
 | ||||
| @ -382,8 +392,8 @@ export const cell120_layered = (max) => { | ||||
| 
 | ||||
| 	for( const i of [ 0, 1, 2, 3, 4, 5, 6, 7 ] ) { | ||||
| 		layers.push(i); | ||||
| 		options.unshift({ | ||||
| 			name: "Layer " + String(i), | ||||
| 		options.push({ | ||||
| 			name: LAYER_NAMES[i], | ||||
| 			links: [...layers], | ||||
| 			nodes: [...layers] | ||||
| 		}) | ||||
| @ -397,6 +407,7 @@ export const cell120_layered = (max) => { | ||||
| 			node_size: 0.02, | ||||
| 			link_size: 0.02 | ||||
| 		}, | ||||
| 		nolink2opacity: true, | ||||
| 		options: options | ||||
| 	} | ||||
| } | ||||
| @ -598,7 +609,6 @@ function get_node(nodes, id) { | ||||
| } | ||||
| 
 | ||||
| function audit_link_labels(nodes, links) { | ||||
| 	console.log("Link audit"); | ||||
| 	for( const l of links ) { | ||||
| 		const n1 = get_node(nodes, l.source); | ||||
| 		const n2 = get_node(nodes, l.target); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user