less copy protection, more size visualization
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

53 line
1.5 KiB

  1. function makeFiction() {
  2. const results = [];
  3. results.push({
  4. name: "Halo",
  5. constructor: () => makeObject(
  6. "Halo",
  7. {
  8. side: {
  9. height: math.unit(10000, "km"),
  10. mass: math.unit(1e17, "kg"),
  11. image: { source: "./media/fiction/halo/halo/side.svg" },
  12. name: "Side"
  13. },
  14. edge: {
  15. height: math.unit(318, "km"),
  16. mass: math.unit(1e17, "kg"),
  17. image: { source: "./media/fiction/halo/halo/edge.svg" },
  18. name: "Edge"
  19. },
  20. angled: {
  21. height: math.unit(8819.1, "km"),
  22. mass: math.unit(1e17, "kg"),
  23. image: { source: "./media/fiction/halo/halo/angled.svg" },
  24. name: "Angled"
  25. },
  26. }
  27. )
  28. });
  29. results.push({
  30. name: "Traveler",
  31. constructor: () => makeObject(
  32. "Traveler",
  33. {
  34. orb: {
  35. height: math.unit(14, "km"),
  36. image: { source: "./media/naturals/planet-generic.svg" },
  37. name: "ORB"
  38. },
  39. }
  40. )
  41. });
  42. results.sort((b1, b2) => {
  43. e1 = b1.constructor();
  44. e2 = b2.constructor();
  45. return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value;
  46. });
  47. return results;
  48. }