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.
 
 
 

98 line
2.4 KiB

  1. function makeFen() {
  2. const views = {
  3. body: {
  4. attributes: {
  5. height: {
  6. name: "Height",
  7. power: 1,
  8. type: "length",
  9. base: math.unit(2.2428, "meter")
  10. },
  11. weight: {
  12. name: "Weight",
  13. power: 3,
  14. type: "mass",
  15. base: math.unit(124.738, "kg")
  16. }
  17. },
  18. image: {
  19. source: "./media/characters/fen/back.svg",
  20. bottom: 0.01,
  21. top: 0.93
  22. },
  23. name: "Body"
  24. },
  25. paw: {
  26. attributes: {
  27. height: {
  28. name: "Length",
  29. power: 1,
  30. type: "length",
  31. base: math.unit(20, "centimeter")
  32. },
  33. width: {
  34. name: "Length",
  35. power: 1,
  36. type: "length",
  37. base: math.unit(20, "centimeter")
  38. },
  39. area: {
  40. name: "Area",
  41. power: 2,
  42. type: "area",
  43. base: math.unit(0.04, "meter^2")
  44. }
  45. },
  46. image: {
  47. source: "./media/characters/generic/paw.svg"
  48. },
  49. name: "Paw"
  50. }
  51. };
  52. const entity = makeEntity("Fen", "Fen", views);
  53. entity.views.body.height = math.unit(1, "km");
  54. return entity;
  55. }
  56. function makeMan() {
  57. const views = {
  58. body: {
  59. attributes: {
  60. height: {
  61. name: "Height",
  62. power: 1,
  63. type: "length",
  64. base: math.unit(2, "meter")
  65. },
  66. weight: {
  67. name: "Weight",
  68. power: 3,
  69. type: "mass",
  70. base: math.unit(80, "kg")
  71. }
  72. },
  73. image: {
  74. source: "./man.svg"
  75. },
  76. name: "Body"
  77. }
  78. };
  79. return makeEntity("Man", "Fen", views);
  80. }
  81. function makeCharacters() {
  82. const results = [];
  83. results.push({
  84. name: "Fen",
  85. constructor: makeFen
  86. });
  87. results.push({
  88. name: "Normal man",
  89. constructor: makeMan
  90. });
  91. return results;
  92. }