@johnmorrisdotca/uchusen-rockets 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/LICENSES/CC-BY-4.0.txt +396 -0
  4. package/LICENSES/MIT.txt +21 -0
  5. package/NOTICE.md +66 -0
  6. package/README.md +171 -2
  7. package/dist/assets/dragon-dragon-1-apart.painted.svg +1 -0
  8. package/dist/assets/dragon-dragon-1-apart.svg +1 -0
  9. package/dist/assets/dragon-dragon-1-apart.thick.svg +1 -0
  10. package/dist/assets/dragon-dragon-1-capsule.glb +0 -0
  11. package/dist/assets/dragon-dragon-1-capsule.painted.svg +1 -0
  12. package/dist/assets/dragon-dragon-1-capsule.svg +1 -0
  13. package/dist/assets/dragon-dragon-1-capsule.thick.svg +1 -0
  14. package/dist/assets/dragon-dragon-1-trunk.glb +0 -0
  15. package/dist/assets/dragon-dragon-1-trunk.painted.svg +1 -0
  16. package/dist/assets/dragon-dragon-1-trunk.svg +1 -0
  17. package/dist/assets/dragon-dragon-1-trunk.thick.svg +1 -0
  18. package/dist/assets/dragon-dragon-1.glb +0 -0
  19. package/dist/assets/dragon-dragon-1.painted.svg +1 -0
  20. package/dist/assets/dragon-dragon-1.svg +1 -0
  21. package/dist/assets/dragon-dragon-1.thick.svg +1 -0
  22. package/dist/assets/dragon-dragon-2-apart.painted.svg +1 -0
  23. package/dist/assets/dragon-dragon-2-apart.svg +1 -0
  24. package/dist/assets/dragon-dragon-2-apart.thick.svg +1 -0
  25. package/dist/assets/dragon-dragon-2-capsule.glb +0 -0
  26. package/dist/assets/dragon-dragon-2-capsule.painted.svg +1 -0
  27. package/dist/assets/dragon-dragon-2-capsule.svg +1 -0
  28. package/dist/assets/dragon-dragon-2-capsule.thick.svg +1 -0
  29. package/dist/assets/dragon-dragon-2-trunk.glb +0 -0
  30. package/dist/assets/dragon-dragon-2-trunk.painted.svg +1 -0
  31. package/dist/assets/dragon-dragon-2-trunk.svg +1 -0
  32. package/dist/assets/dragon-dragon-2-trunk.thick.svg +1 -0
  33. package/dist/assets/dragon-dragon-2.glb +0 -0
  34. package/dist/assets/dragon-dragon-2.painted.svg +1 -0
  35. package/dist/assets/dragon-dragon-2.svg +1 -0
  36. package/dist/assets/dragon-dragon-2.thick.svg +1 -0
  37. package/dist/assets/falcon-9-block-5-apart.painted.svg +1 -0
  38. package/dist/assets/falcon-9-block-5-apart.svg +1 -0
  39. package/dist/assets/falcon-9-block-5-apart.thick.svg +1 -0
  40. package/dist/assets/falcon-9-block-5-dragon-2-apart.painted.svg +1 -0
  41. package/dist/assets/falcon-9-block-5-dragon-2-apart.svg +1 -0
  42. package/dist/assets/falcon-9-block-5-dragon-2-apart.thick.svg +1 -0
  43. package/dist/assets/falcon-9-block-5-dragon-2-capsule.glb +0 -0
  44. package/dist/assets/falcon-9-block-5-dragon-2-capsule.painted.svg +1 -0
  45. package/dist/assets/falcon-9-block-5-dragon-2-capsule.svg +1 -0
  46. package/dist/assets/falcon-9-block-5-dragon-2-capsule.thick.svg +1 -0
  47. package/dist/assets/falcon-9-block-5-dragon-2-first-stage.glb +0 -0
  48. package/dist/assets/falcon-9-block-5-dragon-2-first-stage.painted.svg +1 -0
  49. package/dist/assets/falcon-9-block-5-dragon-2-first-stage.svg +1 -0
  50. package/dist/assets/falcon-9-block-5-dragon-2-first-stage.thick.svg +1 -0
  51. package/dist/assets/falcon-9-block-5-dragon-2-second-stage.glb +0 -0
  52. package/dist/assets/falcon-9-block-5-dragon-2-second-stage.painted.svg +1 -0
  53. package/dist/assets/falcon-9-block-5-dragon-2-second-stage.svg +1 -0
  54. package/dist/assets/falcon-9-block-5-dragon-2-second-stage.thick.svg +1 -0
  55. package/dist/assets/falcon-9-block-5-dragon-2-trunk.glb +0 -0
  56. package/dist/assets/falcon-9-block-5-dragon-2-trunk.painted.svg +1 -0
  57. package/dist/assets/falcon-9-block-5-dragon-2-trunk.svg +1 -0
  58. package/dist/assets/falcon-9-block-5-dragon-2-trunk.thick.svg +1 -0
  59. package/dist/assets/falcon-9-block-5-dragon-2.glb +0 -0
  60. package/dist/assets/falcon-9-block-5-dragon-2.painted.svg +1 -0
  61. package/dist/assets/falcon-9-block-5-dragon-2.svg +1 -0
  62. package/dist/assets/falcon-9-block-5-dragon-2.thick.svg +1 -0
  63. package/dist/assets/falcon-9-block-5-fairing.glb +0 -0
  64. package/dist/assets/falcon-9-block-5-fairing.painted.svg +1 -0
  65. package/dist/assets/falcon-9-block-5-fairing.svg +1 -0
  66. package/dist/assets/falcon-9-block-5-fairing.thick.svg +1 -0
  67. package/dist/assets/falcon-9-block-5-first-stage.glb +0 -0
  68. package/dist/assets/falcon-9-block-5-first-stage.painted.svg +1 -0
  69. package/dist/assets/falcon-9-block-5-first-stage.svg +1 -0
  70. package/dist/assets/falcon-9-block-5-first-stage.thick.svg +1 -0
  71. package/dist/assets/falcon-9-block-5-second-stage.glb +0 -0
  72. package/dist/assets/falcon-9-block-5-second-stage.painted.svg +1 -0
  73. package/dist/assets/falcon-9-block-5-second-stage.svg +1 -0
  74. package/dist/assets/falcon-9-block-5-second-stage.thick.svg +1 -0
  75. package/dist/assets/falcon-9-block-5.glb +0 -0
  76. package/dist/assets/falcon-9-block-5.painted.svg +1 -0
  77. package/dist/assets/falcon-9-block-5.svg +1 -0
  78. package/dist/assets/falcon-9-block-5.thick.svg +1 -0
  79. package/dist/assets/falcon-9-ft-apart.painted.svg +1 -0
  80. package/dist/assets/falcon-9-ft-apart.svg +1 -0
  81. package/dist/assets/falcon-9-ft-apart.thick.svg +1 -0
  82. package/dist/assets/falcon-9-ft-fairing.glb +0 -0
  83. package/dist/assets/falcon-9-ft-fairing.painted.svg +1 -0
  84. package/dist/assets/falcon-9-ft-fairing.svg +1 -0
  85. package/dist/assets/falcon-9-ft-fairing.thick.svg +1 -0
  86. package/dist/assets/falcon-9-ft-first-stage.glb +0 -0
  87. package/dist/assets/falcon-9-ft-first-stage.painted.svg +1 -0
  88. package/dist/assets/falcon-9-ft-first-stage.svg +1 -0
  89. package/dist/assets/falcon-9-ft-first-stage.thick.svg +1 -0
  90. package/dist/assets/falcon-9-ft-second-stage.glb +0 -0
  91. package/dist/assets/falcon-9-ft-second-stage.painted.svg +1 -0
  92. package/dist/assets/falcon-9-ft-second-stage.svg +1 -0
  93. package/dist/assets/falcon-9-ft-second-stage.thick.svg +1 -0
  94. package/dist/assets/falcon-9-ft.glb +0 -0
  95. package/dist/assets/falcon-9-ft.painted.svg +1 -0
  96. package/dist/assets/falcon-9-ft.svg +1 -0
  97. package/dist/assets/falcon-9-ft.thick.svg +1 -0
  98. package/dist/assets/falcon-9-v1.0-apart.painted.svg +1 -0
  99. package/dist/assets/falcon-9-v1.0-apart.svg +1 -0
  100. package/dist/assets/falcon-9-v1.0-apart.thick.svg +1 -0
  101. package/dist/assets/falcon-9-v1.0-fairing.glb +0 -0
  102. package/dist/assets/falcon-9-v1.0-fairing.painted.svg +1 -0
  103. package/dist/assets/falcon-9-v1.0-fairing.svg +1 -0
  104. package/dist/assets/falcon-9-v1.0-fairing.thick.svg +1 -0
  105. package/dist/assets/falcon-9-v1.0-first-stage.glb +0 -0
  106. package/dist/assets/falcon-9-v1.0-first-stage.painted.svg +1 -0
  107. package/dist/assets/falcon-9-v1.0-first-stage.svg +1 -0
  108. package/dist/assets/falcon-9-v1.0-first-stage.thick.svg +1 -0
  109. package/dist/assets/falcon-9-v1.0-second-stage.glb +0 -0
  110. package/dist/assets/falcon-9-v1.0-second-stage.painted.svg +1 -0
  111. package/dist/assets/falcon-9-v1.0-second-stage.svg +1 -0
  112. package/dist/assets/falcon-9-v1.0-second-stage.thick.svg +1 -0
  113. package/dist/assets/falcon-9-v1.0.glb +0 -0
  114. package/dist/assets/falcon-9-v1.0.painted.svg +1 -0
  115. package/dist/assets/falcon-9-v1.0.svg +1 -0
  116. package/dist/assets/falcon-9-v1.0.thick.svg +1 -0
  117. package/dist/assets/falcon-9-v1.1-apart.painted.svg +1 -0
  118. package/dist/assets/falcon-9-v1.1-apart.svg +1 -0
  119. package/dist/assets/falcon-9-v1.1-apart.thick.svg +1 -0
  120. package/dist/assets/falcon-9-v1.1-fairing.glb +0 -0
  121. package/dist/assets/falcon-9-v1.1-fairing.painted.svg +1 -0
  122. package/dist/assets/falcon-9-v1.1-fairing.svg +1 -0
  123. package/dist/assets/falcon-9-v1.1-fairing.thick.svg +1 -0
  124. package/dist/assets/falcon-9-v1.1-first-stage.glb +0 -0
  125. package/dist/assets/falcon-9-v1.1-first-stage.painted.svg +1 -0
  126. package/dist/assets/falcon-9-v1.1-first-stage.svg +1 -0
  127. package/dist/assets/falcon-9-v1.1-first-stage.thick.svg +1 -0
  128. package/dist/assets/falcon-9-v1.1-second-stage.glb +0 -0
  129. package/dist/assets/falcon-9-v1.1-second-stage.painted.svg +1 -0
  130. package/dist/assets/falcon-9-v1.1-second-stage.svg +1 -0
  131. package/dist/assets/falcon-9-v1.1-second-stage.thick.svg +1 -0
  132. package/dist/assets/falcon-9-v1.1.glb +0 -0
  133. package/dist/assets/falcon-9-v1.1.painted.svg +1 -0
  134. package/dist/assets/falcon-9-v1.1.svg +1 -0
  135. package/dist/assets/falcon-9-v1.1.thick.svg +1 -0
  136. package/dist/assets/falcon-heavy-falcon-heavy-apart.painted.svg +1 -0
  137. package/dist/assets/falcon-heavy-falcon-heavy-apart.svg +1 -0
  138. package/dist/assets/falcon-heavy-falcon-heavy-apart.thick.svg +1 -0
  139. package/dist/assets/falcon-heavy-falcon-heavy-centre.glb +0 -0
  140. package/dist/assets/falcon-heavy-falcon-heavy-centre.painted.svg +1 -0
  141. package/dist/assets/falcon-heavy-falcon-heavy-centre.svg +1 -0
  142. package/dist/assets/falcon-heavy-falcon-heavy-centre.thick.svg +1 -0
  143. package/dist/assets/falcon-heavy-falcon-heavy-side-left.glb +0 -0
  144. package/dist/assets/falcon-heavy-falcon-heavy-side-left.painted.svg +1 -0
  145. package/dist/assets/falcon-heavy-falcon-heavy-side-left.svg +1 -0
  146. package/dist/assets/falcon-heavy-falcon-heavy-side-left.thick.svg +1 -0
  147. package/dist/assets/falcon-heavy-falcon-heavy-side-right.glb +0 -0
  148. package/dist/assets/falcon-heavy-falcon-heavy-side-right.painted.svg +1 -0
  149. package/dist/assets/falcon-heavy-falcon-heavy-side-right.svg +1 -0
  150. package/dist/assets/falcon-heavy-falcon-heavy-side-right.thick.svg +1 -0
  151. package/dist/assets/falcon-heavy-falcon-heavy.glb +0 -0
  152. package/dist/assets/falcon-heavy-falcon-heavy.painted.svg +1 -0
  153. package/dist/assets/falcon-heavy-falcon-heavy.svg +1 -0
  154. package/dist/assets/falcon-heavy-falcon-heavy.thick.svg +1 -0
  155. package/dist/assets/grasshopper-grasshopper.glb +0 -0
  156. package/dist/assets/grasshopper-grasshopper.painted.svg +1 -0
  157. package/dist/assets/grasshopper-grasshopper.svg +1 -0
  158. package/dist/assets/grasshopper-grasshopper.thick.svg +1 -0
  159. package/dist/assets/models/dragon-dragon-1-capsule.glb +0 -0
  160. package/dist/assets/models/dragon-dragon-1-trunk.glb +0 -0
  161. package/dist/assets/models/dragon-dragon-2-capsule.glb +0 -0
  162. package/dist/assets/models/dragon-dragon-2-trunk.glb +0 -0
  163. package/dist/assets/models/falcon-9-block-5-fairing.glb +0 -0
  164. package/dist/assets/models/falcon-9-block-5-first-stage.glb +0 -0
  165. package/dist/assets/models/falcon-9-block-5-second-stage.glb +0 -0
  166. package/dist/assets/models/falcon-heavy-falcon-heavy-centre.glb +0 -0
  167. package/dist/assets/models/falcon-heavy-falcon-heavy-side-left.glb +0 -0
  168. package/dist/assets/models/falcon-heavy-falcon-heavy-side-right.glb +0 -0
  169. package/dist/assets/models/grasshopper-grasshopper-vehicle.glb +0 -0
  170. package/dist/assets/models/starship-2019-ship.glb +0 -0
  171. package/dist/assets/models/starship-v1-flight1-booster.glb +0 -0
  172. package/dist/assets/models/starship-v1-flight1-ship.glb +0 -0
  173. package/dist/assets/models/starship-v3-booster.glb +0 -0
  174. package/dist/assets/models/starship-v3-ship.glb +0 -0
  175. package/dist/assets/parts/flap-aft.glb +0 -0
  176. package/dist/assets/parts/flap-aft.painted.svg +1 -0
  177. package/dist/assets/parts/flap-aft.svg +1 -0
  178. package/dist/assets/parts/flap-aft.thick.svg +1 -0
  179. package/dist/assets/parts/flap-forward.glb +0 -0
  180. package/dist/assets/parts/flap-forward.painted.svg +1 -0
  181. package/dist/assets/parts/flap-forward.svg +1 -0
  182. package/dist/assets/parts/flap-forward.thick.svg +1 -0
  183. package/dist/assets/parts/grid-fin-four.glb +0 -0
  184. package/dist/assets/parts/grid-fin-four.painted.svg +1 -0
  185. package/dist/assets/parts/grid-fin-four.svg +1 -0
  186. package/dist/assets/parts/grid-fin-four.thick.svg +1 -0
  187. package/dist/assets/parts/grid-fin-three.glb +0 -0
  188. package/dist/assets/parts/grid-fin-three.painted.svg +1 -0
  189. package/dist/assets/parts/grid-fin-three.svg +1 -0
  190. package/dist/assets/parts/grid-fin-three.thick.svg +1 -0
  191. package/dist/assets/parts/merlin-sea-level.glb +0 -0
  192. package/dist/assets/parts/merlin-sea-level.painted.svg +1 -0
  193. package/dist/assets/parts/merlin-sea-level.svg +1 -0
  194. package/dist/assets/parts/merlin-sea-level.thick.svg +1 -0
  195. package/dist/assets/parts/raptor-sea-level.glb +0 -0
  196. package/dist/assets/parts/raptor-sea-level.painted.svg +1 -0
  197. package/dist/assets/parts/raptor-sea-level.svg +1 -0
  198. package/dist/assets/parts/raptor-sea-level.thick.svg +1 -0
  199. package/dist/assets/parts/raptor-vacuum.glb +0 -0
  200. package/dist/assets/parts/raptor-vacuum.painted.svg +1 -0
  201. package/dist/assets/parts/raptor-vacuum.svg +1 -0
  202. package/dist/assets/parts/raptor-vacuum.thick.svg +1 -0
  203. package/dist/assets/starship-2019.glb +0 -0
  204. package/dist/assets/starship-2019.painted.svg +1 -0
  205. package/dist/assets/starship-2019.svg +1 -0
  206. package/dist/assets/starship-2019.thick.svg +1 -0
  207. package/dist/assets/starship-v1-apart.painted.svg +1 -0
  208. package/dist/assets/starship-v1-apart.svg +1 -0
  209. package/dist/assets/starship-v1-apart.thick.svg +1 -0
  210. package/dist/assets/starship-v1-booster.glb +0 -0
  211. package/dist/assets/starship-v1-booster.painted.svg +1 -0
  212. package/dist/assets/starship-v1-booster.svg +1 -0
  213. package/dist/assets/starship-v1-booster.thick.svg +1 -0
  214. package/dist/assets/starship-v1-flight1-apart.painted.svg +1 -0
  215. package/dist/assets/starship-v1-flight1-apart.svg +1 -0
  216. package/dist/assets/starship-v1-flight1-apart.thick.svg +1 -0
  217. package/dist/assets/starship-v1-flight1-booster.glb +0 -0
  218. package/dist/assets/starship-v1-flight1-booster.painted.svg +1 -0
  219. package/dist/assets/starship-v1-flight1-booster.svg +1 -0
  220. package/dist/assets/starship-v1-flight1-booster.thick.svg +1 -0
  221. package/dist/assets/starship-v1-flight1-ship.glb +0 -0
  222. package/dist/assets/starship-v1-flight1-ship.painted.svg +1 -0
  223. package/dist/assets/starship-v1-flight1-ship.svg +1 -0
  224. package/dist/assets/starship-v1-flight1-ship.thick.svg +1 -0
  225. package/dist/assets/starship-v1-flight1.glb +0 -0
  226. package/dist/assets/starship-v1-flight1.painted.svg +1 -0
  227. package/dist/assets/starship-v1-flight1.svg +1 -0
  228. package/dist/assets/starship-v1-flight1.thick.svg +1 -0
  229. package/dist/assets/starship-v1-ship.glb +0 -0
  230. package/dist/assets/starship-v1-ship.painted.svg +1 -0
  231. package/dist/assets/starship-v1-ship.svg +1 -0
  232. package/dist/assets/starship-v1-ship.thick.svg +1 -0
  233. package/dist/assets/starship-v1.glb +0 -0
  234. package/dist/assets/starship-v1.painted.svg +1 -0
  235. package/dist/assets/starship-v1.svg +1 -0
  236. package/dist/assets/starship-v1.thick.svg +1 -0
  237. package/dist/assets/starship-v2-apart.painted.svg +1 -0
  238. package/dist/assets/starship-v2-apart.svg +1 -0
  239. package/dist/assets/starship-v2-apart.thick.svg +1 -0
  240. package/dist/assets/starship-v2-booster.glb +0 -0
  241. package/dist/assets/starship-v2-booster.painted.svg +1 -0
  242. package/dist/assets/starship-v2-booster.svg +1 -0
  243. package/dist/assets/starship-v2-booster.thick.svg +1 -0
  244. package/dist/assets/starship-v2-ship.glb +0 -0
  245. package/dist/assets/starship-v2-ship.painted.svg +1 -0
  246. package/dist/assets/starship-v2-ship.svg +1 -0
  247. package/dist/assets/starship-v2-ship.thick.svg +1 -0
  248. package/dist/assets/starship-v2.glb +0 -0
  249. package/dist/assets/starship-v2.painted.svg +1 -0
  250. package/dist/assets/starship-v2.svg +1 -0
  251. package/dist/assets/starship-v2.thick.svg +1 -0
  252. package/dist/assets/starship-v3-apart.painted.svg +1 -0
  253. package/dist/assets/starship-v3-apart.svg +1 -0
  254. package/dist/assets/starship-v3-apart.thick.svg +1 -0
  255. package/dist/assets/starship-v3-booster.glb +0 -0
  256. package/dist/assets/starship-v3-booster.painted.svg +1 -0
  257. package/dist/assets/starship-v3-booster.svg +1 -0
  258. package/dist/assets/starship-v3-booster.thick.svg +1 -0
  259. package/dist/assets/starship-v3-ship.glb +0 -0
  260. package/dist/assets/starship-v3-ship.painted.svg +1 -0
  261. package/dist/assets/starship-v3-ship.svg +1 -0
  262. package/dist/assets/starship-v3-ship.thick.svg +1 -0
  263. package/dist/assets/starship-v3.glb +0 -0
  264. package/dist/assets/starship-v3.painted.svg +1 -0
  265. package/dist/assets/starship-v3.svg +1 -0
  266. package/dist/assets/starship-v3.thick.svg +1 -0
  267. package/dist/assets/starship-v4-apart.painted.svg +1 -0
  268. package/dist/assets/starship-v4-apart.svg +1 -0
  269. package/dist/assets/starship-v4-apart.thick.svg +1 -0
  270. package/dist/assets/starship-v4-booster.glb +0 -0
  271. package/dist/assets/starship-v4-booster.painted.svg +1 -0
  272. package/dist/assets/starship-v4-booster.svg +1 -0
  273. package/dist/assets/starship-v4-booster.thick.svg +1 -0
  274. package/dist/assets/starship-v4-ship.glb +0 -0
  275. package/dist/assets/starship-v4-ship.painted.svg +1 -0
  276. package/dist/assets/starship-v4-ship.svg +1 -0
  277. package/dist/assets/starship-v4-ship.thick.svg +1 -0
  278. package/dist/assets/starship-v4.glb +0 -0
  279. package/dist/assets/starship-v4.painted.svg +1 -0
  280. package/dist/assets/starship-v4.svg +1 -0
  281. package/dist/assets/starship-v4.thick.svg +1 -0
  282. package/dist/build/glb.d.ts +12 -0
  283. package/dist/build/glb.js +157 -0
  284. package/dist/build/index.d.ts +59 -0
  285. package/dist/build/index.js +118 -0
  286. package/dist/build/lineup.d.ts +40 -0
  287. package/dist/build/lineup.js +97 -0
  288. package/dist/crossfade.d.ts +6 -0
  289. package/dist/crossfade.js +11 -0
  290. package/dist/data/credits.d.ts +87 -0
  291. package/dist/data/credits.js +82 -0
  292. package/dist/data/dragon.d.ts +2 -0
  293. package/dist/data/dragon.js +45 -0
  294. package/dist/data/falcon.d.ts +3 -0
  295. package/dist/data/falcon.js +121 -0
  296. package/dist/data/grasshopper.d.ts +2 -0
  297. package/dist/data/grasshopper.js +21 -0
  298. package/dist/data/sources.d.ts +173 -0
  299. package/dist/data/sources.js +25 -0
  300. package/dist/data/starship.d.ts +2 -0
  301. package/dist/data/starship.js +183 -0
  302. package/dist/data/types.d.ts +48 -0
  303. package/dist/data/types.js +8 -0
  304. package/dist/draw/svg.d.ts +26 -0
  305. package/dist/draw/svg.js +262 -0
  306. package/dist/element/paint.d.ts +9 -0
  307. package/dist/element/paint.js +138 -0
  308. package/dist/element/scene.d.ts +104 -0
  309. package/dist/element/scene.js +758 -0
  310. package/dist/element.d.ts +74 -0
  311. package/dist/element.js +488 -0
  312. package/dist/fit.d.ts +43 -0
  313. package/dist/fit.js +93 -0
  314. package/dist/framing.d.ts +32 -0
  315. package/dist/framing.js +52 -0
  316. package/dist/index.d.ts +23 -0
  317. package/dist/index.js +13 -0
  318. package/dist/layout.d.ts +17 -0
  319. package/dist/layout.js +33 -0
  320. package/dist/looks.d.ts +25 -0
  321. package/dist/looks.js +36 -0
  322. package/dist/model/falcon.d.ts +48 -0
  323. package/dist/model/falcon.js +206 -0
  324. package/dist/model/materials.d.ts +113 -0
  325. package/dist/model/materials.js +19 -0
  326. package/dist/model/pieces.d.ts +91 -0
  327. package/dist/model/pieces.js +223 -0
  328. package/dist/model/registry.d.ts +8 -0
  329. package/dist/model/registry.js +104 -0
  330. package/dist/model/starship.d.ts +67 -0
  331. package/dist/model/starship.js +503 -0
  332. package/dist/parts.d.ts +44 -0
  333. package/dist/parts.js +1 -0
  334. package/dist/react.d.ts +314 -0
  335. package/dist/react.js +8 -0
  336. package/dist/rockets.d.ts +27 -0
  337. package/dist/rockets.js +36 -0
  338. package/dist/tilt.d.ts +21 -0
  339. package/dist/tilt.js +23 -0
  340. package/package.json +65 -4
@@ -0,0 +1,113 @@
1
+ import type { FillName } from "../looks.ts";
2
+ export interface MaterialSpec {
3
+ color: string;
4
+ metal: number;
5
+ rough: number;
6
+ /** The fill it takes in a drawing. */
7
+ fill: FillName;
8
+ }
9
+ export declare const MATERIALS: {
10
+ readonly steel: {
11
+ readonly color: "#c3c7cb";
12
+ readonly metal: 1;
13
+ readonly rough: 0.3;
14
+ readonly fill: "hull";
15
+ };
16
+ readonly tile: {
17
+ readonly color: "#101114";
18
+ readonly metal: 0;
19
+ readonly rough: 0.62;
20
+ readonly fill: "tile";
21
+ };
22
+ readonly "tile-plain": {
23
+ readonly color: "#101114";
24
+ readonly metal: 0;
25
+ readonly rough: 0.6;
26
+ readonly fill: "tile";
27
+ };
28
+ readonly soot: {
29
+ readonly color: "#17181a";
30
+ readonly metal: 0.2;
31
+ readonly rough: 0.85;
32
+ readonly fill: "dark";
33
+ };
34
+ readonly dark: {
35
+ readonly color: "#1c1d20";
36
+ readonly metal: 0.4;
37
+ readonly rough: 0.55;
38
+ readonly fill: "dark";
39
+ };
40
+ readonly bell: {
41
+ readonly color: "#2c2d31";
42
+ readonly metal: 0.55;
43
+ readonly rough: 0.42;
44
+ readonly fill: "bell";
45
+ };
46
+ readonly "bell-inside": {
47
+ readonly color: "#0a0a0c";
48
+ readonly metal: 0.2;
49
+ readonly rough: 0.8;
50
+ readonly fill: "dark";
51
+ };
52
+ readonly "engine-metal": {
53
+ readonly color: "#6d7075";
54
+ readonly metal: 0.85;
55
+ readonly rough: 0.4;
56
+ readonly fill: "metal";
57
+ };
58
+ readonly "engine-pale": {
59
+ readonly color: "#b9bcc0";
60
+ readonly metal: 0.6;
61
+ readonly rough: 0.5;
62
+ readonly fill: "metal";
63
+ };
64
+ readonly fin: {
65
+ readonly color: "#6b6e73";
66
+ readonly metal: 0.85;
67
+ readonly rough: 0.5;
68
+ readonly fill: "metal";
69
+ };
70
+ readonly "fin-dark": {
71
+ readonly color: "#2a2b2f";
72
+ readonly metal: 0.4;
73
+ readonly rough: 0.55;
74
+ readonly fill: "dark";
75
+ };
76
+ readonly white: {
77
+ readonly color: "#cfcfca";
78
+ readonly metal: 0;
79
+ readonly rough: 0.5;
80
+ readonly fill: "white";
81
+ };
82
+ readonly black: {
83
+ readonly color: "#141518";
84
+ readonly metal: 0;
85
+ readonly rough: 0.45;
86
+ readonly fill: "dark";
87
+ };
88
+ readonly gold: {
89
+ readonly color: "#c8a24c";
90
+ readonly metal: 1;
91
+ readonly rough: 0.28;
92
+ readonly fill: "metal";
93
+ };
94
+ readonly solar: {
95
+ readonly color: "#10163a";
96
+ readonly metal: 0.4;
97
+ readonly rough: 0.22;
98
+ readonly fill: "dark";
99
+ };
100
+ readonly glass: {
101
+ readonly color: "#141c26";
102
+ readonly metal: 0.1;
103
+ readonly rough: 0.08;
104
+ readonly fill: "dark";
105
+ };
106
+ readonly blue: {
107
+ readonly color: "#1d4f96";
108
+ readonly metal: 0.25;
109
+ readonly rough: 0.5;
110
+ readonly fill: "metal";
111
+ };
112
+ };
113
+ export type MaterialName = keyof typeof MATERIALS;
@@ -0,0 +1,19 @@
1
+ export const MATERIALS = {
2
+ steel: { color: "#c3c7cb", metal: 1, rough: 0.3, fill: "hull" },
3
+ tile: { color: "#101114", metal: 0, rough: 0.62, fill: "tile" },
4
+ "tile-plain": { color: "#101114", metal: 0, rough: 0.6, fill: "tile" },
5
+ soot: { color: "#17181a", metal: 0.2, rough: 0.85, fill: "dark" },
6
+ dark: { color: "#1c1d20", metal: 0.4, rough: 0.55, fill: "dark" },
7
+ bell: { color: "#2c2d31", metal: 0.55, rough: 0.42, fill: "bell" },
8
+ "bell-inside": { color: "#0a0a0c", metal: 0.2, rough: 0.8, fill: "dark" },
9
+ "engine-metal": { color: "#6d7075", metal: 0.85, rough: 0.4, fill: "metal" },
10
+ "engine-pale": { color: "#b9bcc0", metal: 0.6, rough: 0.5, fill: "metal" },
11
+ fin: { color: "#6b6e73", metal: 0.85, rough: 0.5, fill: "metal" },
12
+ "fin-dark": { color: "#2a2b2f", metal: 0.4, rough: 0.55, fill: "dark" },
13
+ white: { color: "#cfcfca", metal: 0, rough: 0.5, fill: "white" },
14
+ black: { color: "#141518", metal: 0, rough: 0.45, fill: "dark" },
15
+ gold: { color: "#c8a24c", metal: 1, rough: 0.28, fill: "metal" },
16
+ solar: { color: "#10163a", metal: 0.4, rough: 0.22, fill: "dark" },
17
+ glass: { color: "#141c26", metal: 0.1, rough: 0.08, fill: "dark" },
18
+ blue: { color: "#1d4f96", metal: 0.25, rough: 0.5, fill: "metal" },
19
+ };
@@ -0,0 +1,91 @@
1
+ import type { Vec3 } from "../framing.ts";
2
+ import type { MaterialName } from "./materials.ts";
3
+ export type { Vec3 };
4
+ export interface Frame {
5
+ o: Vec3;
6
+ u: Vec3;
7
+ v: Vec3;
8
+ w: Vec3;
9
+ }
10
+ /** A body of revolution: `profile` is [radius, y] points going up the outside (going the other way faces inward). */
11
+ export interface Lathe {
12
+ kind: "lathe";
13
+ material: MaterialName;
14
+ profile: readonly (readonly [number, number])[];
15
+ at?: readonly [number, number];
16
+ segs: number;
17
+ /** The part of the circle it covers at a height, as [from, to] radians; left out: all of it. */
18
+ arc?: (y: number) => readonly [number, number];
19
+ /** Heights with a ring of weld line. */
20
+ welds?: readonly number[];
21
+ /** Heights with a ring of feature line. */
22
+ rings?: readonly number[];
23
+ /** Texture coordinates for the painted look. */
24
+ uv?: boolean;
25
+ /** A shell the drawing skips, because a hull's outline already covers it. */
26
+ only?: "mesh" | "drawing";
27
+ /** It hangs under the body: drawn over the body from below and behind it from above. */
28
+ under?: boolean;
29
+ /** Part of the main body: a drawing draws these first and treats them as the depth others compare with. */
30
+ body?: boolean;
31
+ /** Its outline is drawn in a drawing. */
32
+ outline?: boolean;
33
+ }
34
+ /** A flat outline with a thickness, in a frame: `outline` is [u, v] points, going round; it stands from -thickness/2 to +thickness/2 along w. Convex, or it is drawn as its hull. */
35
+ export interface Plate {
36
+ kind: "plate";
37
+ material: MaterialName;
38
+ /** The material of the +w face, when it differs. */
39
+ top?: MaterialName;
40
+ frame: Frame;
41
+ outline: readonly (readonly [number, number])[];
42
+ thickness: number;
43
+ /** Lines on its +w and -w faces, as [u, v] pairs. */
44
+ ribs?: readonly (readonly [readonly [number, number], readonly [number, number]])[];
45
+ only?: "mesh" | "drawing";
46
+ /** No feature lines of its own. */
47
+ plain?: boolean;
48
+ }
49
+ /** Lines only, in the part's own space. */
50
+ export interface Lines {
51
+ kind: "lines";
52
+ weight: "feature" | "weld";
53
+ paths: readonly (readonly Vec3[])[];
54
+ only?: "mesh" | "drawing";
55
+ }
56
+ export type Piece = Lathe | Plate | Lines;
57
+ /** A frame standing on the axis: u points outwards at `az` radians, v is up, w is along the circle. */
58
+ export declare function radial(az: number, y?: number, atRadius?: number): Frame;
59
+ /** A frame lying flat: u outwards at `az`, v along the circle, w up. */
60
+ export declare function flat(az: number, y: number, atRadius?: number): Frame;
61
+ export declare const pointOf: (f: Frame, a: number, b: number, c?: number) => Vec3;
62
+ /** A long thin box from a to b, its width along `side`. */
63
+ export declare function strut(material: MaterialName, a: Vec3, b: Vec3, width: number, depth: number, extra?: Partial<Plate>): Plate;
64
+ /** A radius on a profile at a height. */
65
+ export declare function radiusAt(profile: readonly (readonly [number, number])[], y: number): number;
66
+ export interface Buffers {
67
+ positions: number[];
68
+ normals: number[];
69
+ uvs: number[];
70
+ indices: number[];
71
+ hasUv: boolean;
72
+ }
73
+ export interface LineBuffers {
74
+ positions: number[];
75
+ indices: number[];
76
+ }
77
+ export interface PartMesh {
78
+ faces: Map<MaterialName, Buffers>;
79
+ feature: LineBuffers;
80
+ weld: LineBuffers;
81
+ }
82
+ /** A ring just proud of the surface at a height, so it is not lost in it. */
83
+ export declare function ringPath(piece: Lathe, y: number, lift?: number): Vec3[];
84
+ /** The triangles and lines of a part. */
85
+ export declare function meshOf(pieces: readonly Piece[]): PartMesh;
86
+ export interface Bounds {
87
+ min: Vec3;
88
+ max: Vec3;
89
+ }
90
+ /** The box a part's triangles fill. */
91
+ export declare function boundsOf(mesh: PartMesh): Bounds;
@@ -0,0 +1,223 @@
1
+ /** A frame standing on the axis: u points outwards at `az` radians, v is up, w is along the circle. */
2
+ export function radial(az, y = 0, atRadius = 0) {
3
+ const u = [Math.sin(az), 0, Math.cos(az)];
4
+ return { o: [u[0] * atRadius, y, u[2] * atRadius], u, v: [0, 1, 0], w: [u[2], 0, -u[0]] };
5
+ }
6
+ /** A frame lying flat: u outwards at `az`, v along the circle, w up. */
7
+ export function flat(az, y, atRadius = 0) {
8
+ const u = [Math.sin(az), 0, Math.cos(az)];
9
+ return { o: [u[0] * atRadius, y, u[2] * atRadius], u, v: [-u[2], 0, u[0]], w: [0, 1, 0] };
10
+ }
11
+ export const pointOf = (f, a, b, c = 0) => [f.o[0] + f.u[0] * a + f.v[0] * b + f.w[0] * c, f.o[1] + f.u[1] * a + f.v[1] * b + f.w[1] * c, f.o[2] + f.u[2] * a + f.v[2] * b + f.w[2] * c];
12
+ /** A long thin box from a to b, its width along `side`. */
13
+ export function strut(material, a, b, width, depth, extra = {}) {
14
+ const along = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
15
+ const length = Math.hypot(...along) || 1;
16
+ const u = [along[0] / length, along[1] / length, along[2] / length];
17
+ // any direction across it, keeping the same one for the same struts
18
+ const seed = Math.abs(u[1]) > 0.9 ? [Math.hypot(a[0], a[2]) > 1e-6 ? a[0] : 1, 0, a[2]] : [0, 1, 0];
19
+ const raw = [u[1] * seed[2] - u[2] * seed[1], u[2] * seed[0] - u[0] * seed[2], u[0] * seed[1] - u[1] * seed[0]];
20
+ const l = Math.hypot(...raw) || 1;
21
+ const v = [raw[0] / l, raw[1] / l, raw[2] / l];
22
+ const w = [u[1] * v[2] - u[2] * v[1], u[2] * v[0] - u[0] * v[2], u[0] * v[1] - u[1] * v[0]];
23
+ return { kind: "plate", material, frame: { o: a, u, v, w }, outline: [[0, -width / 2], [length, -width / 2], [length, width / 2], [0, width / 2]], thickness: depth, plain: true, ...extra };
24
+ }
25
+ /** A radius on a profile at a height. */
26
+ export function radiusAt(profile, y) {
27
+ for (let i = 0; i + 1 < profile.length; i++) {
28
+ const [r0, y0] = profile[i];
29
+ const [r1, y1] = profile[i + 1];
30
+ if (y >= Math.min(y0, y1) && y <= Math.max(y0, y1))
31
+ return y1 === y0 ? Math.max(r0, r1) : r0 + ((r1 - r0) * (y - y0)) / (y1 - y0);
32
+ }
33
+ return 0;
34
+ }
35
+ const newBuffers = () => ({ positions: [], normals: [], uvs: [], indices: [], hasUv: false });
36
+ function buffersOf(mesh, material) {
37
+ let b = mesh.faces.get(material);
38
+ if (!b) {
39
+ b = newBuffers();
40
+ mesh.faces.set(material, b);
41
+ }
42
+ return b;
43
+ }
44
+ /** A lathe's triangles. Each segment has its own vertices where the profile turns sharply and shares them where it runs smoothly. */
45
+ function latheFaces(mesh, piece) {
46
+ const out = buffersOf(mesh, piece.material);
47
+ const [cx, cz] = piece.at ?? [0, 0];
48
+ const { profile, segs, arc } = piece;
49
+ if (piece.uv)
50
+ out.hasUv = true;
51
+ const normalOf = (i) => {
52
+ const [r0, y0] = profile[i];
53
+ const [r1, y1] = profile[i + 1];
54
+ const l = Math.hypot(r1 - r0, y1 - y0) || 1;
55
+ return [(y1 - y0) / l, -(r1 - r0) / l];
56
+ };
57
+ const SMOOTH = Math.cos((40 * Math.PI) / 180);
58
+ // the span round the circle: the widest of the stations, so vertex counts agree
59
+ const spans = profile.map(([, y]) => (arc ? arc(y)[1] - arc(y)[0] : 2 * Math.PI));
60
+ const span = Math.max(...spans);
61
+ const n = Math.max(2, Math.ceil((segs * span) / (2 * Math.PI)));
62
+ for (let s = 0; s + 1 < profile.length; s++) {
63
+ const nHere = normalOf(s);
64
+ const smoothWith = (other) => {
65
+ if (other < 0 || other + 1 >= profile.length)
66
+ return nHere;
67
+ const nb = normalOf(other);
68
+ if (nHere[0] * nb[0] + nHere[1] * nb[1] < SMOOTH)
69
+ return nHere;
70
+ const l = Math.hypot(nHere[0] + nb[0], nHere[1] + nb[1]) || 1;
71
+ return [(nHere[0] + nb[0]) / l, (nHere[1] + nb[1]) / l];
72
+ };
73
+ const base = out.positions.length / 3;
74
+ for (const [station, normal] of [
75
+ [s, smoothWith(s - 1)],
76
+ [s + 1, smoothWith(s + 1)],
77
+ ]) {
78
+ const [r, y] = profile[station];
79
+ const [a0, a1] = arc ? arc(y) : [0, 2 * Math.PI];
80
+ for (let j = 0; j <= n; j++) {
81
+ const a = a0 + ((a1 - a0) * j) / n;
82
+ const sa = Math.sin(a);
83
+ const ca = Math.cos(a);
84
+ out.positions.push(cx + r * sa, y, cz + r * ca);
85
+ out.normals.push(normal[0] * sa, normal[1], normal[0] * ca);
86
+ // u: round the hull; v: height over a hundred metres, so one picture repeats the same on every part
87
+ // an arc that starts on the far side of the windward line is shifted a half turn, so it stays between 0 and 1
88
+ out.uvs.push(a / (2 * Math.PI) + (a0 < 0 ? 0.5 : 0), y / 100);
89
+ }
90
+ }
91
+ const row = n + 1;
92
+ for (let j = 0; j < n; j++) {
93
+ const a = base + j;
94
+ const b = base + j + 1;
95
+ const c = base + row + j;
96
+ const d = base + row + j + 1;
97
+ // going up the outside faces outward
98
+ out.indices.push(a, b, d, a, d, c);
99
+ }
100
+ }
101
+ }
102
+ const addPath = (lines, path) => {
103
+ const base = lines.positions.length / 3;
104
+ for (const p of path)
105
+ lines.positions.push(p[0], p[1], p[2]);
106
+ for (let i = 0; i + 1 < path.length; i++)
107
+ lines.indices.push(base + i, base + i + 1);
108
+ };
109
+ /** A ring just proud of the surface at a height, so it is not lost in it. */
110
+ export function ringPath(piece, y, lift = 0.012) {
111
+ const [cx, cz] = piece.at ?? [0, 0];
112
+ const r = radiusAt(piece.profile, y) + lift;
113
+ const [a0, a1] = piece.arc ? piece.arc(y) : [0, 2 * Math.PI];
114
+ const n = Math.max(2, Math.ceil((piece.segs * (a1 - a0)) / (2 * Math.PI)));
115
+ const path = [];
116
+ for (let j = 0; j <= n; j++) {
117
+ const a = a0 + ((a1 - a0) * j) / n;
118
+ path.push([cx + r * Math.sin(a), y, cz + r * Math.cos(a)]);
119
+ }
120
+ return path;
121
+ }
122
+ function plateFaces(mesh, piece) {
123
+ const { frame, outline, thickness } = piece;
124
+ const half = thickness / 2;
125
+ const n = outline.length;
126
+ const addFan = (material, c, normal, reverse) => {
127
+ const out = buffersOf(mesh, material);
128
+ const base = out.positions.length / 3;
129
+ for (const [a, b] of outline) {
130
+ out.positions.push(...pointOf(frame, a, b, c));
131
+ out.normals.push(...normal);
132
+ out.uvs.push(0, 0);
133
+ }
134
+ for (let i = 1; i + 1 < n; i++) {
135
+ if (reverse)
136
+ out.indices.push(base, base + i + 1, base + i);
137
+ else
138
+ out.indices.push(base, base + i, base + i + 1);
139
+ }
140
+ };
141
+ // the turn of the outline: which way round decides which face is outward
142
+ let area = 0;
143
+ for (let i = 0; i < n; i++) {
144
+ const [a0, b0] = outline[i];
145
+ const [a1, b1] = outline[(i + 1) % n];
146
+ area += a0 * b1 - a1 * b0;
147
+ }
148
+ const ccw = area > 0;
149
+ // u x v against w: a frame may be either hand
150
+ const hand = frame.u[1] * frame.v[2] - frame.u[2] * frame.v[1];
151
+ const hand2 = frame.u[2] * frame.v[0] - frame.u[0] * frame.v[2];
152
+ const hand3 = frame.u[0] * frame.v[1] - frame.u[1] * frame.v[0];
153
+ const right = hand * frame.w[0] + hand2 * frame.w[1] + hand3 * frame.w[2] > 0;
154
+ addFan(piece.top ?? piece.material, half, frame.w, ccw !== right);
155
+ addFan(piece.material, -half, [-frame.w[0], -frame.w[1], -frame.w[2]], ccw === right);
156
+ const out = buffersOf(mesh, piece.material);
157
+ for (let i = 0; i < n; i++) {
158
+ const [a0, b0] = outline[i];
159
+ const [a1, b1] = outline[(i + 1) % n];
160
+ const du = a1 - a0;
161
+ const dv = b1 - b0;
162
+ const sign = ccw ? 1 : -1;
163
+ const nu = dv * sign;
164
+ const nv = -du * sign;
165
+ const l = Math.hypot(nu, nv) || 1;
166
+ const normal = [(frame.u[0] * nu + frame.v[0] * nv) / l, (frame.u[1] * nu + frame.v[1] * nv) / l, (frame.u[2] * nu + frame.v[2] * nv) / l];
167
+ const base = out.positions.length / 3;
168
+ for (const p of [pointOf(frame, a0, b0, -half), pointOf(frame, a1, b1, -half), pointOf(frame, a1, b1, half), pointOf(frame, a0, b0, half)]) {
169
+ out.positions.push(...p);
170
+ out.normals.push(...normal);
171
+ out.uvs.push(0, 0);
172
+ }
173
+ if (right)
174
+ out.indices.push(base, base + 1, base + 2, base, base + 2, base + 3);
175
+ else
176
+ out.indices.push(base, base + 2, base + 1, base, base + 3, base + 2);
177
+ }
178
+ }
179
+ /** The triangles and lines of a part. */
180
+ export function meshOf(pieces) {
181
+ const mesh = { faces: new Map(), feature: { positions: [], indices: [] }, weld: { positions: [], indices: [] } };
182
+ for (const piece of pieces) {
183
+ if (piece.only === "drawing")
184
+ continue;
185
+ if (piece.kind === "lathe") {
186
+ latheFaces(mesh, piece);
187
+ for (const y of piece.rings ?? [])
188
+ addPath(mesh.feature, ringPath(piece, y));
189
+ for (const y of piece.welds ?? [])
190
+ addPath(mesh.weld, ringPath(piece, y));
191
+ }
192
+ else if (piece.kind === "plate") {
193
+ plateFaces(mesh, piece);
194
+ if (!piece.plain) {
195
+ const half = piece.thickness / 2 + 0.006;
196
+ for (const c of [half, -half])
197
+ addPath(mesh.feature, [...piece.outline, piece.outline[0]].map(([a, b]) => pointOf(piece.frame, a, b, c)));
198
+ for (const [p, q] of piece.ribs ?? [])
199
+ for (const c of [half, -half])
200
+ addPath(mesh.weld, [pointOf(piece.frame, p[0], p[1], c), pointOf(piece.frame, q[0], q[1], c)]);
201
+ }
202
+ }
203
+ else {
204
+ for (const path of piece.paths)
205
+ addPath(piece.weight === "feature" ? mesh.feature : mesh.weld, path);
206
+ }
207
+ }
208
+ return mesh;
209
+ }
210
+ /** The box a part's triangles fill. */
211
+ export function boundsOf(mesh) {
212
+ const min = [Infinity, Infinity, Infinity];
213
+ const max = [-Infinity, -Infinity, -Infinity];
214
+ for (const b of mesh.faces.values())
215
+ for (let i = 0; i < b.positions.length; i += 3)
216
+ for (let c = 0; c < 3; c++) {
217
+ if (b.positions[i + c] < min[c])
218
+ min[c] = b.positions[i + c];
219
+ if (b.positions[i + c] > max[c])
220
+ max[c] = b.positions[i + c];
221
+ }
222
+ return { min, max };
223
+ }
@@ -0,0 +1,8 @@
1
+ import type { PartRecord } from "../parts.ts";
2
+ import type { Piece } from "./pieces.ts";
3
+ export interface PartEntry {
4
+ record: PartRecord;
5
+ pieces: () => Piece[];
6
+ }
7
+ export declare const PART_ENTRIES: readonly PartEntry[];
8
+ export declare const partEntry: (id: string) => PartEntry | undefined;
@@ -0,0 +1,104 @@
1
+ // Every part there is, with its record and how to make its pieces. A new rocket adds its rows here and nothing else changes.
2
+ import { DRAGON_VARIANTS } from "../data/dragon.js";
3
+ import { FALCON_9_VARIANTS } from "../data/falcon.js";
4
+ import { STARSHIP_VARIANTS } from "../data/starship.js";
5
+ import { capsule, centreCore, DRAGON_DRAWS, falconFairing, falconFirstStage, FALCON_DRAWS, falconSecondStage, grasshopper, merlin, sideBooster, trunk } from "./falcon.js";
6
+ import { boosterPieces, flap, gridFin, raptor, shipPieces, STARSHIP_DRAWS } from "./starship.js";
7
+ const blankFigure = { value: null, source: null, note: "No source gives this part's size: it is drawn from photographs." };
8
+ const STAGE = "stage";
9
+ /** Which licensed model paints which part. */
10
+ const PAINTED = {
11
+ "starship-v3-booster": { file: "starship-v3-booster.glb", credit: "clarence365-block3" },
12
+ "starship-v3-ship": { file: "starship-v3-ship.glb", credit: "clarence365-block3" },
13
+ "starship-v1-flight1-booster": { file: "starship-v1-flight1-booster.glb", credit: "clarence365-s24b7" },
14
+ "starship-v1-flight1-ship": { file: "starship-v1-flight1-ship.glb", credit: "clarence365-s24b7" },
15
+ "starship-2019-ship": { file: "starship-2019-ship.glb", credit: "martiandays-2019" },
16
+ "falcon-9-block-5-first-stage": { file: "falcon-9-block-5-first-stage.glb", credit: "stanley-falcon-9" },
17
+ "falcon-9-block-5-second-stage": { file: "falcon-9-block-5-second-stage.glb", credit: "stanley-falcon-9" },
18
+ "falcon-9-block-5-fairing": { file: "falcon-9-block-5-fairing.glb", credit: "stanley-falcon-9" },
19
+ "dragon-dragon-2-capsule": { file: "dragon-dragon-2-capsule.glb", credit: "kubaha-dragon-2" },
20
+ "dragon-dragon-2-trunk": { file: "dragon-dragon-2-trunk.glb", credit: "kubaha-dragon-2" },
21
+ "dragon-dragon-1-capsule": { file: "dragon-dragon-1-capsule.glb", credit: "progressth-dragon-1" },
22
+ "dragon-dragon-1-trunk": { file: "dragon-dragon-1-trunk.glb", credit: "progressth-dragon-1" },
23
+ "falcon-heavy-falcon-heavy-centre": { file: "falcon-heavy-falcon-heavy-centre.glb", credit: "antonio-falcon-heavy" },
24
+ "falcon-heavy-falcon-heavy-side-left": { file: "falcon-heavy-falcon-heavy-side-left.glb", credit: "antonio-falcon-heavy" },
25
+ "falcon-heavy-falcon-heavy-side-right": { file: "falcon-heavy-falcon-heavy-side-right.glb", credit: "antonio-falcon-heavy" },
26
+ "grasshopper-grasshopper-vehicle": { file: "grasshopper-grasshopper-vehicle.glb", credit: "echo3-grasshopper" },
27
+ };
28
+ const DRAWN_FROM = {
29
+ v1: "This package's code, sized from the block table; parts' proportions judged from photographs of Block 1 and from Clarence365's Ship 24 and Booster 7.",
30
+ "v1-flight1": "This package's code for the two line looks, Clarence365's Ship 24 and Booster 7 for the painted look, both at the sourced sizes.",
31
+ v2: "This package's code, sized from the block table; parts' proportions judged from photographs and the documented flap changes. No licensed model shows Block 2.",
32
+ v3: "This package's code for the two line looks, proportions measured from Clarence365's Block 3 at the sourced sizes; Clarence365's model for the painted look.",
33
+ v4: "This package's code: Block 3's details on Block 4's sourced sizes. Thin evidence: no source shows its parts.",
34
+ "2019": "This package's code for the two line looks, proportions measured from MartianDays' model; MartianDays' model for the painted look. An artist's model of a design.",
35
+ };
36
+ const entries = [];
37
+ const KIND_OF_SLOT = { booster: "booster", ship: "ship" };
38
+ function starshipPart(variant, slot) {
39
+ const draw = STARSHIP_DRAWS[variant.id];
40
+ const id = `starship-${variant.id}-${slot}`;
41
+ const height = slot === "booster" ? draw.boosterHeight : draw.shipHeight;
42
+ const diameter = draw.radius * 2;
43
+ return {
44
+ record: {
45
+ id,
46
+ kind: KIND_OF_SLOT[slot],
47
+ name: `${slot === "booster" ? "Super Heavy" : "Ship"}, ${variant.name}`,
48
+ rocket: "starship",
49
+ trueTo: [variant.id],
50
+ height,
51
+ diameter,
52
+ sourced: { height: variant.facts.parts[slot] ?? blankFigure, diameter: variant.facts.diameter },
53
+ joints: slot === "booster" ? { top: { kind: STAGE, y: height, diameter } } : { bottom: { kind: STAGE, y: 0, diameter } },
54
+ painted: PAINTED[id] ?? null,
55
+ drawnFrom: DRAWN_FROM[variant.id],
56
+ },
57
+ pieces: () => (slot === "booster" ? boosterPieces(draw) : shipPieces(draw)),
58
+ };
59
+ }
60
+ for (const variant of STARSHIP_VARIANTS)
61
+ for (const slot of variant.slots)
62
+ entries.push(starshipPart(variant, slot));
63
+ /** A small part on its own: nothing to mate with, sizes as drawn. */
64
+ function detail(id, kind, name, height, diameter, sourced, pieces) {
65
+ return { record: { id, kind, name, rocket: "starship", trueTo: [], height, diameter, sourced, joints: {}, painted: null, drawnFrom: "This package's code." }, pieces };
66
+ }
67
+ // ---------------------------------------------------------------------------------------------------------------------------------
68
+ // Falcon 9, Dragon, Falcon Heavy and Grasshopper
69
+ const facts = (variants, id, slot) => {
70
+ const variant = variants.find((one) => one.id === id);
71
+ const height = variant?.facts.parts[slot];
72
+ return { height: height?.brief ? { ...blankFigure, note: `${height.value} m, ${height.brief}.` } : (height ?? blankFigure), diameter: variant?.facts.diameter ?? blankFigure };
73
+ };
74
+ const FROM_CODE = "This package's code, sized from sourced totals; parts' proportions judged from photographs. No licensed model shows this version.";
75
+ const FROM_F9 = "This package's code for the two line looks, proportions taken from Stanley Creative's Falcon 9 at the sourced sizes; Stanley Creative's model for the painted look. It shows Block 5: black interstage and legs, grid fins.";
76
+ for (const id of Object.keys(FALCON_DRAWS)) {
77
+ const d = FALCON_DRAWS[id];
78
+ const painted = (slot) => PAINTED[`falcon-9-${id}-${slot}`] ?? null;
79
+ const drawnFrom = id === "block-5" ? FROM_F9 : FROM_CODE;
80
+ entries.push({ record: { id: `falcon-9-${id}-first-stage`, kind: "first-stage", name: `First stage, Falcon 9 ${id}`, rocket: "falcon-9", trueTo: id === "block-5" ? [id, "block-5-dragon-2"] : [id], height: d.first.height, diameter: 3.7, sourced: facts(FALCON_9_VARIANTS, id, "first-stage"), joints: { top: { kind: "stage", y: d.first.height, diameter: 3.7 } }, painted: painted("first-stage"), drawnFrom }, pieces: () => falconFirstStage(id) }, { record: { id: `falcon-9-${id}-second-stage`, kind: "second-stage", name: `Second stage, Falcon 9 ${id}`, rocket: "falcon-9", trueTo: id === "block-5" ? [id, "block-5-dragon-2"] : [id], height: d.second.height, diameter: 3.7, sourced: facts(FALCON_9_VARIANTS, id, "second-stage"), joints: { bottom: { kind: "stage", y: d.second.joint, diameter: 3.7 }, top: { kind: "stage", y: d.second.height, diameter: 3.7 } }, painted: painted("second-stage"), drawnFrom }, pieces: () => falconSecondStage(id) }, { record: { id: `falcon-9-${id}-fairing`, kind: "fairing", name: `Fairing, Falcon 9 ${id}`, rocket: "falcon-9", trueTo: [id], height: d.fairing.height, diameter: d.fairing.radius * 2, sourced: { height: facts(FALCON_9_VARIANTS, id, "fairing").height, diameter: blankFigure }, joints: { bottom: { kind: "stage", y: 0, diameter: 3.7 } }, painted: painted("fairing"), drawnFrom }, pieces: () => falconFairing(id) });
81
+ }
82
+ const DRAGON_FROM = {
83
+ "dragon-1": "This package's code for the two line looks, proportions taken from ProgressTH's model; ProgressTH's model for the painted look. It shows the original Dragon 1, with solar wings, not Cargo Dragon 2.",
84
+ "dragon-2": "This package's code for the two line looks, proportions taken from KUBAHA's model; KUBAHA's model for the painted look. It shows Crew Dragon, with windows.",
85
+ };
86
+ for (const variant of DRAGON_VARIANTS) {
87
+ const d = DRAGON_DRAWS[variant.id];
88
+ const trueTo = variant.id === "dragon-2" ? [variant.id, "block-5-dragon-2"] : [variant.id];
89
+ const joint = 3.7;
90
+ entries.push({ record: { id: `dragon-${variant.id}-trunk`, kind: "trunk", name: `Trunk, ${variant.name}`, rocket: "dragon", trueTo, height: d.trunk, diameter: d.trunkRadius * 2, sourced: { height: variant.facts.parts.trunk, diameter: blankFigure }, joints: { bottom: { kind: "stage", y: 0, diameter: joint }, top: { kind: "stage", y: d.trunk, diameter: joint } }, painted: PAINTED[`dragon-${variant.id}-trunk`] ?? null, drawnFrom: DRAGON_FROM[variant.id] }, pieces: () => trunk(d) }, { record: { id: `dragon-${variant.id}-capsule`, kind: "capsule", name: `Capsule, ${variant.name}`, rocket: "dragon", trueTo, height: d.capsule, diameter: d.baseRadius * 2, sourced: { height: variant.facts.parts.capsule, diameter: variant.facts.diameter }, joints: { bottom: { kind: "stage", y: d.nest, diameter: joint } }, painted: PAINTED[`dragon-${variant.id}-capsule`] ?? null, drawnFrom: DRAGON_FROM[variant.id] }, pieces: () => capsule(d) });
91
+ }
92
+ const FH_FROM = "This package's code for the two line looks, proportions taken from Antonio_Adams's low-poly model at the sourced sizes; that model for the painted look. It shows the whole vehicle in one shell, so its centre core, upper stage and fairing stay one part.";
93
+ const FH_SIDE_HEIGHT = 45.6;
94
+ const FH_OFFSET = 4.25;
95
+ const figure = (value, source) => ({ value, source });
96
+ entries.push({ record: { id: "falcon-heavy-falcon-heavy-centre", kind: "first-stage", name: "Falcon Heavy centre core, with its upper stage and fairing", rocket: "falcon-heavy", trueTo: ["falcon-heavy"], height: 70, diameter: 5.2, sourced: { height: figure(70, "wikipedia-falcon-heavy"), diameter: { ...blankFigure, note: "3.7 m the core; 5.2 m the fairing." } }, joints: {}, painted: PAINTED["falcon-heavy-falcon-heavy-centre"], drawnFrom: FH_FROM }, pieces: () => centreCore(70, 1.85) }, { record: { id: "falcon-heavy-falcon-heavy-side-left", kind: "first-stage", name: "Falcon Heavy side booster, left", rocket: "falcon-heavy", trueTo: ["falcon-heavy"], height: FH_SIDE_HEIGHT, diameter: 3.7, strapOn: { x: -FH_OFFSET, z: 0 }, sourced: { height: blankFigure, diameter: figure(3.7, "wikipedia-falcon-heavy") }, joints: {}, painted: PAINTED["falcon-heavy-falcon-heavy-side-left"], drawnFrom: FH_FROM }, pieces: () => sideBooster(FH_SIDE_HEIGHT, 1.85, -1) }, { record: { id: "falcon-heavy-falcon-heavy-side-right", kind: "first-stage", name: "Falcon Heavy side booster, right", rocket: "falcon-heavy", trueTo: ["falcon-heavy"], height: FH_SIDE_HEIGHT, diameter: 3.7, strapOn: { x: FH_OFFSET, z: 0 }, sourced: { height: blankFigure, diameter: figure(3.7, "wikipedia-falcon-heavy") }, joints: {}, painted: PAINTED["falcon-heavy-falcon-heavy-side-right"], drawnFrom: FH_FROM }, pieces: () => sideBooster(FH_SIDE_HEIGHT, 1.85, 1) }, { record: { id: "grasshopper-grasshopper-vehicle", kind: "test-vehicle", name: "Grasshopper, test vehicle", rocket: "grasshopper", trueTo: ["grasshopper"], height: 32, diameter: 3.2, sourced: { height: figure(32, "wikipedia-grasshopper"), diameter: blankFigure }, joints: {}, painted: PAINTED["grasshopper-grasshopper-vehicle"], drawnFrom: "This package's code for the two line looks, proportions taken from Echo_3's low-poly model at the sourced height; that model for the painted look." }, pieces: () => grasshopper(32) });
97
+ const RAPTOR_DIAMETER = { value: 1.3, source: "wikipedia-raptor", note: "The family's engine diameter." };
98
+ const RAPTOR_LENGTH = { value: 3.1, source: "wikipedia-raptor", note: "The family's length." };
99
+ const b3 = STARSHIP_DRAWS.v3;
100
+ const b2 = STARSHIP_DRAWS.v2;
101
+ entries.push(detail("raptor-sea-level", "engine", "Raptor, sea-level", 3.1, 1.24, { height: RAPTOR_LENGTH, diameter: RAPTOR_DIAMETER }, () => raptor([0, 0], 0, "sea")), detail("raptor-vacuum", "engine", "Raptor, vacuum", 4.4, 2.3, { height: blankFigure, diameter: blankFigure }, () => raptor([0, 0], 0, "vacuum")), detail("grid-fin-four", "fin", "Grid fin, Blocks 1 and 2", 0.9, 2.9, { height: blankFigure, diameter: blankFigure }, () => gridFin(90, 0, b2.radius, b2.fins.reach, b2.fins.width, b2.fins.thick, false)), detail("grid-fin-three", "fin", "Grid fin, Block 3", 0.9, 3.4, { height: blankFigure, diameter: blankFigure }, () => gridFin(90, 0, b3.radius, b3.fins.reach, b3.fins.width, b3.fins.thick, true)), detail("flap-aft", "flap", "Aft flap", 11.6, 3.8, { height: blankFigure, diameter: blankFigure }, () => [flap(b3.aft, 1)]), detail("flap-forward", "flap", "Forward flap, Blocks 2 and 3", 8.1, 4.7, { height: blankFigure, diameter: blankFigure }, () => [flap(b3.forward, 1)]), detail("merlin-sea-level", "engine", "Merlin, sea-level", 2, 0.92, { height: blankFigure, diameter: blankFigure }, () => merlin([0, 0], 0, 0.46, 2)));
102
+ export const PART_ENTRIES = entries;
103
+ const byId = new Map(entries.map((entry) => [entry.record.id, entry]));
104
+ export const partEntry = (id) => byId.get(id);
@@ -0,0 +1,67 @@
1
+ import { type Piece, type Plate } from "./pieces.ts";
2
+ export interface FlapDraw {
3
+ /** Where its root is, degrees round from the windward side. */
4
+ az: number;
5
+ /** [radius, height] points of its outline. */
6
+ outline: readonly (readonly [number, number])[];
7
+ thickness: number;
8
+ }
9
+ export interface EngineDraw {
10
+ ring: number;
11
+ count: number;
12
+ /** Degrees to the first engine. */
13
+ start: number;
14
+ type: "sea" | "vacuum";
15
+ }
16
+ export interface StarshipDraw {
17
+ radius: number;
18
+ boosterHeight: number;
19
+ shipHeight: number;
20
+ /** Where the booster's steel starts over its engines. */
21
+ boosterSkirt: number;
22
+ /** The bay's ceiling. */
23
+ boosterBay: number;
24
+ /** Whether a skirt shields the engines (Blocks 1 and 2) or they stand bare (Block 3). */
25
+ shielded: boolean;
26
+ ring: {
27
+ height: number;
28
+ struts: number;
29
+ integrated: boolean;
30
+ };
31
+ fins: {
32
+ az: readonly number[];
33
+ y: number;
34
+ reach: number;
35
+ width: number;
36
+ thick: number;
37
+ octagon: boolean;
38
+ };
39
+ chines: {
40
+ az: readonly number[];
41
+ from: number;
42
+ to: number;
43
+ out: number;
44
+ };
45
+ boosterEngines: readonly EngineDraw[];
46
+ shipEngines: readonly EngineDraw[];
47
+ noseStart: number;
48
+ /** Degrees each way from the windward line that tiles cover, by height. */
49
+ tile: readonly (readonly [number, number])[];
50
+ forward: FlapDraw;
51
+ aft: FlapDraw;
52
+ /** Payload door on the leeward side, as [from, to] heights. */
53
+ door: readonly [number, number] | null;
54
+ /** Block 3's docking ports. */
55
+ docking: boolean;
56
+ }
57
+ export declare const STARSHIP_DRAWS: Readonly<Record<string, StarshipDraw>>;
58
+ /** One Raptor from its exit up: the bell, its dark inside and the machinery over it. Its origin is the middle of its exit. */
59
+ export declare function raptor(at: readonly [number, number], y: number, type: "sea" | "vacuum"): Piece[];
60
+ /** A grid fin held out flat: a frame and a lattice, u outwards and v along the circle. */
61
+ export declare function gridFin(azDeg: number, y: number, rootRadius: number, reach: number, width: number, thick: number, octagon: boolean): Piece[];
62
+ /** A flap's plate, tiled on its windward face. `outline` is [radius, height]. */
63
+ export declare function flap(draw: FlapDraw, side: 1 | -1): Plate;
64
+ /** Super Heavy: its base on the axis at the bells' exit. */
65
+ export declare function boosterPieces(d: StarshipDraw): Piece[];
66
+ /** The ship: its base on the axis at the bottom of its skirt. */
67
+ export declare function shipPieces(d: StarshipDraw): Piece[];