on main help sign in
bug fixes
commit1014ab6b44d9f28a8e1fa0d413c343b4050bc7f1 authorJohn Hyde <johnhydefour@gmail.com> dateFri 30 Sep 2022, 18:46 (4 years ago) parent7f93b9a
4 files changed+35−31
desk/desk.docket-0+2−2 desk/doc/usr/sigil.udon+1−1 ui/src/assets/sigil-example.png → ui/public/sigil-example.png ui/src/lib/graph.ts+32−28
desk/desk.docket-0+2−2
@@ -2,9 +2,9 @@
22 info+'Your guide to the Urbit constellations'
33 color+0x1f.243c
44 image+'https://raw.githubusercontent.com/johnhyde/astrolabe/main/ui/src/assets/astrolabe-tile.svg'
5− glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v1.pc6av.k7vu1.4nkef.lgob3.u6tae.glob' 0v1.pc6av.k7vu1.4nkef.lgob3.u6tae]
5+ glob-http+['https://s3.us-east-2.amazonaws.com/warkgnall.com/urbit/astrolabe/globs/glob-0v7.6404d.39fgn.ms148.c6qf4.9c0f3.glob' 0v7.6404d.39fgn.ms148.c6qf4.9c0f3]
66 base+'astrolabe'
7− version+[0 3 2]
7+ version+[0 3 3]
88 website+'https://github.com/johnhyde/astrolabe'
99 license+'MIT'
1010==
desk/doc/usr/sigil.udon+1−1
@@ -6,7 +6,7 @@ Each 3-letter syllable corresponds to sigil shape, or symbol.
66Since planet `@p`s have 4 syllables, a planet sigil is a 2x2 grid of 4 symbols.
77Star sigils have 2 symbols, and galaxies just 1.
88
9−![planet sigils](/apps/astrolabe/src/assets/sigil-example.png)
9+![planet sigils](/apps/astrolabe/sigil-example.png)
1010
1111## Is there a pattern to the sigil shapes?
1212
ui/src/assets/sigil-example.png → ui/public/sigil-example.pngrenamed

Binary file not shown.

ui/src/lib/graph.ts+32−28
@@ -314,35 +314,39 @@ export function populateGraph(g: Graph, chartData: ChartPoint[], bySponsor: bool
314314 g.setNodeAttribute(sPatp, 'color', colors.YOUR_STAR);
315315 g.setNodeAttribute(gPatp, 'color', colors.YOUR_GAL);
316316 }
317− g.addNode(pPatp, {
318− label: pPatp,
319− size: planetSize,
320− color: itsYou ? colors.YOU : (planet.dominion == 'l2' ? colors.GREEN : colors.BLUE),
321− x: planetX,
322− y: planetY,
323− zIndex: 6,
324− });
325− if (lastPlanetArm == arm) {
326− g.addEdge(pPatp, lastPlanetPatp, {
327− color: colors.DGREY,
328− size: planetEdgeSize,
329− zIndex: 5,
330− });
331− } else {
332− if (numPlanetArms == 1) {
333− g.addEdge(pPatp, sPatp, {
334− color: colors.DGREY,
335− size: planetEdgeSize,
336− zIndex: 5,
317+ try {
318+ g.addNode(pPatp, {
319+ label: pPatp,
320+ size: planetSize,
321+ color: itsYou ? colors.YOU : (planet.dominion == 'l2' ? colors.GREEN : colors.BLUE),
322+ x: planetX,
323+ y: planetY,
324+ zIndex: 6,
337325 });
338− }
339− }
340− if (planet.sponsor) {
341− sponsorEdges.push([pPatp, planet.sponsor, {
342− color: colors.GREEN,
343− size: planetEdgeSize,
344− zIndex: 11,
345− }]);
326+ if (lastPlanetArm == arm) {
327+ g.addEdge(pPatp, lastPlanetPatp, {
328+ color: colors.DGREY,
329+ size: planetEdgeSize,
330+ zIndex: 5,
331+ });
332+ } else {
333+ if (numPlanetArms == 1) {
334+ g.addEdge(pPatp, sPatp, {
335+ color: colors.DGREY,
336+ size: planetEdgeSize,
337+ zIndex: 5,
338+ });
339+ }
340+ }
341+ if (planet.sponsor) {
342+ sponsorEdges.push([pPatp, planet.sponsor, {
343+ color: colors.GREEN,
344+ size: planetEdgeSize,
345+ zIndex: 11,
346+ }]);
347+ }
348+ } catch (e) {
349+ console.error(`Couldn't add ${pPatp} to the graph`, e);
346350 }
347351 lastPlanetArm = arm;
348352 lastPlanetPatp = pPatp;