less copy protection, more size visualization
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

87 строки
2.1 KiB

  1. function makeBuilding(name, height, image) {
  2. views = {
  3. building: {
  4. attributes: {
  5. height: {
  6. name: "Height",
  7. power: 1,
  8. type: "length",
  9. base: height
  10. }
  11. },
  12. image: image,
  13. name: "building"
  14. },
  15. };
  16. return makeEntity(name, "Building", views);
  17. }
  18. function makeBuildings() {
  19. const results = [];
  20. results.push({
  21. name: "Burj Khalifa",
  22. constructor: () => makeBuilding(
  23. "Burj Khalifa",
  24. math.unit(829.8, "meter"),
  25. { source: "./media/buildings/burj-khalifa.svg" }
  26. )
  27. });
  28. results.push({
  29. name: "Canton Tower",
  30. constructor: () => makeBuilding(
  31. "Canton Tower",
  32. math.unit(604, "meter"),
  33. { source: "./media/buildings/canton-tower.svg" }
  34. )
  35. });
  36. results.push({
  37. name: "CN Tower",
  38. constructor: () => makeBuilding(
  39. "CN Tower",
  40. math.unit(553.3, "meter"),
  41. { source: "./media/buildings/cn-tower.svg" }
  42. )
  43. });
  44. results.push({
  45. name: "Taipei 101",
  46. constructor: () => makeBuilding(
  47. "Taipei 101",
  48. math.unit(509.2, "meter"),
  49. { source: "./media/buildings/taipei-101.svg" }
  50. )
  51. });
  52. results.push({
  53. name: "Empire State Building",
  54. constructor: () => makeBuilding(
  55. "Empire State Building",
  56. math.unit(443.2, "meter"),
  57. { source: "./media/buildings/empire-state-building.svg" }
  58. )
  59. });
  60. results.push({
  61. name: "Eiffel Tower",
  62. constructor: () => makeBuilding(
  63. "Eiffel Tower",
  64. math.unit(324, "meter"),
  65. { source: "./media/buildings/eiffel-tower.svg" }
  66. )
  67. });
  68. results.push({
  69. name: "Chrysler Building",
  70. constructor: () => makeBuilding(
  71. "Chrysler Building",
  72. math.unit(318.9, "meter"),
  73. { source: "./media/buildings/chrysler-building.svg" }
  74. )
  75. });
  76. return results;
  77. }