@fc3/wireframe-renderer 0.0.0-stage → 0.2.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 (343) hide show
  1. package/LICENSE +673 -0
  2. package/README.md +165 -2
  3. package/bin/bootstrap/terminal-demo +7 -0
  4. package/bin/compile +55 -0
  5. package/bin/install +5 -0
  6. package/bin/lint +12 -0
  7. package/bin/postpublish +5 -0
  8. package/bin/precompile +71 -0
  9. package/bin/prepublish +7 -0
  10. package/bin/remap-paths +172 -0
  11. package/bin/test +9 -0
  12. package/bin/test-one +32 -0
  13. package/dist/.last-compile-time +1 -0
  14. package/dist/.last-publish-time +1 -0
  15. package/dist/src/bootstrap/terminal-demo.d.ts +1 -0
  16. package/dist/src/bootstrap/terminal-demo.js +14 -0
  17. package/dist/src/bootstrap/terminal-demo.js.map +1 -0
  18. package/dist/src/camera.d.ts +26 -0
  19. package/dist/src/camera.js +90 -0
  20. package/dist/src/camera.js.map +1 -0
  21. package/dist/src/canvas-renderer.d.ts +20 -0
  22. package/dist/src/canvas-renderer.js +137 -0
  23. package/dist/src/canvas-renderer.js.map +1 -0
  24. package/dist/src/constant/axis-colors.d.ts +3 -0
  25. package/dist/src/constant/axis-colors.js +13 -0
  26. package/dist/src/constant/axis-colors.js.map +1 -0
  27. package/dist/src/constant/box-edge-index-pairs.d.ts +2 -0
  28. package/dist/src/constant/box-edge-index-pairs.js +18 -0
  29. package/dist/src/constant/box-edge-index-pairs.js.map +1 -0
  30. package/dist/src/constant/camera-limits.d.ts +7 -0
  31. package/dist/src/constant/camera-limits.js +10 -0
  32. package/dist/src/constant/camera-limits.js.map +1 -0
  33. package/dist/src/constant/default-camera-state.d.ts +3 -0
  34. package/dist/src/constant/default-camera-state.js +19 -0
  35. package/dist/src/constant/default-camera-state.js.map +1 -0
  36. package/dist/src/constant/default-palette.d.ts +2 -0
  37. package/dist/src/constant/default-palette.js +17 -0
  38. package/dist/src/constant/default-palette.js.map +1 -0
  39. package/dist/src/constant/default-render-options.d.ts +3 -0
  40. package/dist/src/constant/default-render-options.js +8 -0
  41. package/dist/src/constant/default-render-options.js.map +1 -0
  42. package/dist/src/constant/interaction-rates.d.ts +5 -0
  43. package/dist/src/constant/interaction-rates.js +8 -0
  44. package/dist/src/constant/interaction-rates.js.map +1 -0
  45. package/dist/src/constant/rendering-defaults.d.ts +11 -0
  46. package/dist/src/constant/rendering-defaults.js +14 -0
  47. package/dist/src/constant/rendering-defaults.js.map +1 -0
  48. package/dist/src/constant/stylesheet.d.ts +2 -0
  49. package/dist/src/constant/stylesheet.js +140 -0
  50. package/dist/src/constant/stylesheet.js.map +1 -0
  51. package/dist/src/constant/theme.d.ts +9 -0
  52. package/dist/src/constant/theme.js +12 -0
  53. package/dist/src/constant/theme.js.map +1 -0
  54. package/dist/src/constant/view-orientations.d.ts +4 -0
  55. package/dist/src/constant/view-orientations.js +19 -0
  56. package/dist/src/constant/view-orientations.js.map +1 -0
  57. package/dist/src/enum/axis.d.ts +6 -0
  58. package/dist/src/enum/axis.js +10 -0
  59. package/dist/src/enum/axis.js.map +1 -0
  60. package/dist/src/enum/opening-shape.d.ts +5 -0
  61. package/dist/src/enum/opening-shape.js +9 -0
  62. package/dist/src/enum/opening-shape.js.map +1 -0
  63. package/dist/src/enum/plane.d.ts +6 -0
  64. package/dist/src/enum/plane.js +10 -0
  65. package/dist/src/enum/plane.js.map +1 -0
  66. package/dist/src/enum/primitive-type.d.ts +8 -0
  67. package/dist/src/enum/primitive-type.js +12 -0
  68. package/dist/src/enum/primitive-type.js.map +1 -0
  69. package/dist/src/enum/view-preset.d.ts +10 -0
  70. package/dist/src/enum/view-preset.js +14 -0
  71. package/dist/src/enum/view-preset.js.map +1 -0
  72. package/dist/src/enum/viewer-class-name.d.ts +15 -0
  73. package/dist/src/enum/viewer-class-name.js +19 -0
  74. package/dist/src/enum/viewer-class-name.js.map +1 -0
  75. package/dist/src/example/house-computer.d.ts +3 -0
  76. package/dist/src/example/house-computer.js +2081 -0
  77. package/dist/src/example/house-computer.js.map +1 -0
  78. package/dist/src/index.d.ts +20 -0
  79. package/dist/src/index.js +27 -0
  80. package/dist/src/index.js.map +1 -0
  81. package/dist/src/interaction-controller.d.ts +17 -0
  82. package/dist/src/interaction-controller.js +106 -0
  83. package/dist/src/interaction-controller.js.map +1 -0
  84. package/dist/src/sidebar.d.ts +24 -0
  85. package/dist/src/sidebar.js +121 -0
  86. package/dist/src/sidebar.js.map +1 -0
  87. package/dist/src/terminal/braille-canvas.d.ts +17 -0
  88. package/dist/src/terminal/braille-canvas.js +137 -0
  89. package/dist/src/terminal/braille-canvas.js.map +1 -0
  90. package/dist/src/terminal/constant/terminal-key-rates.d.ts +6 -0
  91. package/dist/src/terminal/constant/terminal-key-rates.js +9 -0
  92. package/dist/src/terminal/constant/terminal-key-rates.js.map +1 -0
  93. package/dist/src/terminal/constant/view-preset-keys.d.ts +3 -0
  94. package/dist/src/terminal/constant/view-preset-keys.js +17 -0
  95. package/dist/src/terminal/constant/view-preset-keys.js.map +1 -0
  96. package/dist/src/terminal/enum/terminal-focus.d.ts +5 -0
  97. package/dist/src/terminal/enum/terminal-focus.js +9 -0
  98. package/dist/src/terminal/enum/terminal-focus.js.map +1 -0
  99. package/dist/src/terminal/index.d.ts +3 -0
  100. package/dist/src/terminal/index.js +11 -0
  101. package/dist/src/terminal/index.js.map +1 -0
  102. package/dist/src/terminal/render-frame.d.ts +6 -0
  103. package/dist/src/terminal/render-frame.js +46 -0
  104. package/dist/src/terminal/render-frame.js.map +1 -0
  105. package/dist/src/terminal/terminal-viewer.d.ts +38 -0
  106. package/dist/src/terminal/terminal-viewer.js +290 -0
  107. package/dist/src/terminal/terminal-viewer.js.map +1 -0
  108. package/dist/src/terminal/type/rgb-color.d.ts +6 -0
  109. package/dist/src/terminal/type/rgb-color.js +3 -0
  110. package/dist/src/terminal/type/rgb-color.js.map +1 -0
  111. package/dist/src/terminal/utility/blend-color.d.ts +3 -0
  112. package/dist/src/terminal/utility/blend-color.js +19 -0
  113. package/dist/src/terminal/utility/blend-color.js.map +1 -0
  114. package/dist/src/terminal/utility/clip-segment.d.ts +5 -0
  115. package/dist/src/terminal/utility/clip-segment.js +38 -0
  116. package/dist/src/terminal/utility/clip-segment.js.map +1 -0
  117. package/dist/src/terminal/utility/escape-tags.d.ts +2 -0
  118. package/dist/src/terminal/utility/escape-tags.js +14 -0
  119. package/dist/src/terminal/utility/escape-tags.js.map +1 -0
  120. package/dist/src/terminal/utility/format-component-row.d.ts +3 -0
  121. package/dist/src/terminal/utility/format-component-row.js +32 -0
  122. package/dist/src/terminal/utility/format-component-row.js.map +1 -0
  123. package/dist/src/terminal/utility/format-hex-color.d.ts +3 -0
  124. package/dist/src/terminal/utility/format-hex-color.js +14 -0
  125. package/dist/src/terminal/utility/format-hex-color.js.map +1 -0
  126. package/dist/src/terminal/utility/format-status-line.d.ts +3 -0
  127. package/dist/src/terminal/utility/format-status-line.js +24 -0
  128. package/dist/src/terminal/utility/format-status-line.js.map +1 -0
  129. package/dist/src/terminal/utility/parse-color.d.ts +3 -0
  130. package/dist/src/terminal/utility/parse-color.js +45 -0
  131. package/dist/src/terminal/utility/parse-color.js.map +1 -0
  132. package/dist/src/terminal/utility/resolve-terminal-color.d.ts +2 -0
  133. package/dist/src/terminal/utility/resolve-terminal-color.js +20 -0
  134. package/dist/src/terminal/utility/resolve-terminal-color.js.map +1 -0
  135. package/dist/src/type/bounding-box.d.ts +6 -0
  136. package/dist/src/type/bounding-box.js +3 -0
  137. package/dist/src/type/bounding-box.js.map +1 -0
  138. package/dist/src/type/camera-state.d.ts +10 -0
  139. package/dist/src/type/camera-state.js +3 -0
  140. package/dist/src/type/camera-state.js.map +1 -0
  141. package/dist/src/type/display-component.d.ts +18 -0
  142. package/dist/src/type/display-component.js +3 -0
  143. package/dist/src/type/display-component.js.map +1 -0
  144. package/dist/src/type/drag-state.d.ts +6 -0
  145. package/dist/src/type/drag-state.js +3 -0
  146. package/dist/src/type/drag-state.js.map +1 -0
  147. package/dist/src/type/frame-dot.d.ts +6 -0
  148. package/dist/src/type/frame-dot.js +3 -0
  149. package/dist/src/type/frame-dot.js.map +1 -0
  150. package/dist/src/type/frame-label.d.ts +7 -0
  151. package/dist/src/type/frame-label.js +3 -0
  152. package/dist/src/type/frame-label.js.map +1 -0
  153. package/dist/src/type/frame-path.d.ts +8 -0
  154. package/dist/src/type/frame-path.js +3 -0
  155. package/dist/src/type/frame-path.js.map +1 -0
  156. package/dist/src/type/frame.d.ts +9 -0
  157. package/dist/src/type/frame.js +3 -0
  158. package/dist/src/type/frame.js.map +1 -0
  159. package/dist/src/type/inherited-style.d.ts +8 -0
  160. package/dist/src/type/inherited-style.js +3 -0
  161. package/dist/src/type/inherited-style.js.map +1 -0
  162. package/dist/src/type/plane-axes.d.ts +7 -0
  163. package/dist/src/type/plane-axes.js +3 -0
  164. package/dist/src/type/plane-axes.js.map +1 -0
  165. package/dist/src/type/polyline.d.ts +3 -0
  166. package/dist/src/type/polyline.js +3 -0
  167. package/dist/src/type/polyline.js.map +1 -0
  168. package/dist/src/type/primitive/box.d.ts +8 -0
  169. package/dist/src/type/primitive/box.js +3 -0
  170. package/dist/src/type/primitive/box.js.map +1 -0
  171. package/dist/src/type/primitive/cylinder.d.ts +11 -0
  172. package/dist/src/type/primitive/cylinder.js +3 -0
  173. package/dist/src/type/primitive/cylinder.js.map +1 -0
  174. package/dist/src/type/primitive/opening.d.ts +24 -0
  175. package/dist/src/type/primitive/opening.js +3 -0
  176. package/dist/src/type/primitive/opening.js.map +1 -0
  177. package/dist/src/type/primitive/polyline.d.ts +8 -0
  178. package/dist/src/type/primitive/polyline.js +3 -0
  179. package/dist/src/type/primitive/polyline.js.map +1 -0
  180. package/dist/src/type/primitive/sphere.d.ts +8 -0
  181. package/dist/src/type/primitive/sphere.js +3 -0
  182. package/dist/src/type/primitive/sphere.js.map +1 -0
  183. package/dist/src/type/primitive-geometry.d.ts +9 -0
  184. package/dist/src/type/primitive-geometry.js +3 -0
  185. package/dist/src/type/primitive-geometry.js.map +1 -0
  186. package/dist/src/type/primitive.d.ts +7 -0
  187. package/dist/src/type/primitive.js +3 -0
  188. package/dist/src/type/primitive.js.map +1 -0
  189. package/dist/src/type/render-options.d.ts +5 -0
  190. package/dist/src/type/render-options.js +3 -0
  191. package/dist/src/type/render-options.js.map +1 -0
  192. package/dist/src/type/screen-point.d.ts +5 -0
  193. package/dist/src/type/screen-point.js +3 -0
  194. package/dist/src/type/screen-point.js.map +1 -0
  195. package/dist/src/type/sidebar-callbacks.d.ts +9 -0
  196. package/dist/src/type/sidebar-callbacks.js +3 -0
  197. package/dist/src/type/sidebar-callbacks.js.map +1 -0
  198. package/dist/src/type/stroke.d.ts +6 -0
  199. package/dist/src/type/stroke.js +3 -0
  200. package/dist/src/type/stroke.js.map +1 -0
  201. package/dist/src/type/vector3.d.ts +6 -0
  202. package/dist/src/type/vector3.js +3 -0
  203. package/dist/src/type/vector3.js.map +1 -0
  204. package/dist/src/type/view-orientation.d.ts +5 -0
  205. package/dist/src/type/view-orientation.js +3 -0
  206. package/dist/src/type/view-orientation.js.map +1 -0
  207. package/dist/src/type/viewer-state.d.ts +11 -0
  208. package/dist/src/type/viewer-state.js +3 -0
  209. package/dist/src/type/viewer-state.js.map +1 -0
  210. package/dist/src/type/viewport.d.ts +5 -0
  211. package/dist/src/type/viewport.js +3 -0
  212. package/dist/src/type/viewport.js.map +1 -0
  213. package/dist/src/type/visibility-map.d.ts +2 -0
  214. package/dist/src/type/visibility-map.js +3 -0
  215. package/dist/src/type/visibility-map.js.map +1 -0
  216. package/dist/src/type/wireframe-component.d.ts +13 -0
  217. package/dist/src/type/wireframe-component.js +3 -0
  218. package/dist/src/type/wireframe-component.js.map +1 -0
  219. package/dist/src/type/wireframe-scene.d.ts +10 -0
  220. package/dist/src/type/wireframe-scene.js +3 -0
  221. package/dist/src/type/wireframe-scene.js.map +1 -0
  222. package/dist/src/utility/add-vectors.d.ts +3 -0
  223. package/dist/src/utility/add-vectors.js +11 -0
  224. package/dist/src/utility/add-vectors.js.map +1 -0
  225. package/dist/src/utility/build-box-outlines.d.ts +4 -0
  226. package/dist/src/utility/build-box-outlines.js +32 -0
  227. package/dist/src/utility/build-box-outlines.js.map +1 -0
  228. package/dist/src/utility/build-circle-outline.d.ts +5 -0
  229. package/dist/src/utility/build-circle-outline.js +25 -0
  230. package/dist/src/utility/build-circle-outline.js.map +1 -0
  231. package/dist/src/utility/build-cylinder-outlines.d.ts +4 -0
  232. package/dist/src/utility/build-cylinder-outlines.js +34 -0
  233. package/dist/src/utility/build-cylinder-outlines.js.map +1 -0
  234. package/dist/src/utility/build-frame.d.ts +8 -0
  235. package/dist/src/utility/build-frame.js +75 -0
  236. package/dist/src/utility/build-frame.js.map +1 -0
  237. package/dist/src/utility/build-initial-visibility.d.ts +4 -0
  238. package/dist/src/utility/build-initial-visibility.js +11 -0
  239. package/dist/src/utility/build-initial-visibility.js.map +1 -0
  240. package/dist/src/utility/build-opening-outlines.d.ts +4 -0
  241. package/dist/src/utility/build-opening-outlines.js +31 -0
  242. package/dist/src/utility/build-opening-outlines.js.map +1 -0
  243. package/dist/src/utility/build-primitive-geometry.d.ts +4 -0
  244. package/dist/src/utility/build-primitive-geometry.js +40 -0
  245. package/dist/src/utility/build-primitive-geometry.js.map +1 -0
  246. package/dist/src/utility/build-rectangle-outline.d.ts +5 -0
  247. package/dist/src/utility/build-rectangle-outline.js +23 -0
  248. package/dist/src/utility/build-rectangle-outline.js.map +1 -0
  249. package/dist/src/utility/build-sphere-outlines.d.ts +4 -0
  250. package/dist/src/utility/build-sphere-outlines.js +16 -0
  251. package/dist/src/utility/build-sphere-outlines.js.map +1 -0
  252. package/dist/src/utility/clamp.d.ts +2 -0
  253. package/dist/src/utility/clamp.js +7 -0
  254. package/dist/src/utility/clamp.js.map +1 -0
  255. package/dist/src/utility/collect-display-points.d.ts +4 -0
  256. package/dist/src/utility/collect-display-points.js +13 -0
  257. package/dist/src/utility/collect-display-points.js.map +1 -0
  258. package/dist/src/utility/compute-bounding-box.d.ts +4 -0
  259. package/dist/src/utility/compute-bounding-box.js +29 -0
  260. package/dist/src/utility/compute-bounding-box.js.map +1 -0
  261. package/dist/src/utility/compute-centroid.d.ts +3 -0
  262. package/dist/src/utility/compute-centroid.js +17 -0
  263. package/dist/src/utility/compute-centroid.js.map +1 -0
  264. package/dist/src/utility/create-element.d.ts +2 -0
  265. package/dist/src/utility/create-element.js +11 -0
  266. package/dist/src/utility/create-element.js.map +1 -0
  267. package/dist/src/utility/create-viewer-state.d.ts +4 -0
  268. package/dist/src/utility/create-viewer-state.js +29 -0
  269. package/dist/src/utility/create-viewer-state.js.map +1 -0
  270. package/dist/src/utility/fit-camera-to-bounding-box.d.ts +4 -0
  271. package/dist/src/utility/fit-camera-to-bounding-box.js +23 -0
  272. package/dist/src/utility/fit-camera-to-bounding-box.js.map +1 -0
  273. package/dist/src/utility/flatten-components.d.ts +4 -0
  274. package/dist/src/utility/flatten-components.js +70 -0
  275. package/dist/src/utility/flatten-components.js.map +1 -0
  276. package/dist/src/utility/get-bounding-box-center.d.ts +4 -0
  277. package/dist/src/utility/get-bounding-box-center.js +14 -0
  278. package/dist/src/utility/get-bounding-box-center.js.map +1 -0
  279. package/dist/src/utility/get-bounding-box-size.d.ts +4 -0
  280. package/dist/src/utility/get-bounding-box-size.js +12 -0
  281. package/dist/src/utility/get-bounding-box-size.js.map +1 -0
  282. package/dist/src/utility/get-focal-length.d.ts +2 -0
  283. package/dist/src/utility/get-focal-length.js +9 -0
  284. package/dist/src/utility/get-focal-length.js.map +1 -0
  285. package/dist/src/utility/get-perpendicular-axes.d.ts +3 -0
  286. package/dist/src/utility/get-perpendicular-axes.js +18 -0
  287. package/dist/src/utility/get-perpendicular-axes.js.map +1 -0
  288. package/dist/src/utility/get-plane-axes.d.ts +4 -0
  289. package/dist/src/utility/get-plane-axes.js +19 -0
  290. package/dist/src/utility/get-plane-axes.js.map +1 -0
  291. package/dist/src/utility/get-primitive-anchor.d.ts +4 -0
  292. package/dist/src/utility/get-primitive-anchor.js +20 -0
  293. package/dist/src/utility/get-primitive-anchor.js.map +1 -0
  294. package/dist/src/utility/get-vector-component.d.ts +4 -0
  295. package/dist/src/utility/get-vector-component.js +18 -0
  296. package/dist/src/utility/get-vector-component.js.map +1 -0
  297. package/dist/src/utility/get-vector-length.d.ts +3 -0
  298. package/dist/src/utility/get-vector-length.js +7 -0
  299. package/dist/src/utility/get-vector-length.js.map +1 -0
  300. package/dist/src/utility/has-hidden-ancestor.d.ts +4 -0
  301. package/dist/src/utility/has-hidden-ancestor.js +9 -0
  302. package/dist/src/utility/has-hidden-ancestor.js.map +1 -0
  303. package/dist/src/utility/inject-stylesheet.d.ts +2 -0
  304. package/dist/src/utility/inject-stylesheet.js +21 -0
  305. package/dist/src/utility/inject-stylesheet.js.map +1 -0
  306. package/dist/src/utility/is-component-shown.d.ts +4 -0
  307. package/dist/src/utility/is-component-shown.js +10 -0
  308. package/dist/src/utility/is-component-shown.js.map +1 -0
  309. package/dist/src/utility/offset-vector-along-axis.d.ts +4 -0
  310. package/dist/src/utility/offset-vector-along-axis.js +14 -0
  311. package/dist/src/utility/offset-vector-along-axis.js.map +1 -0
  312. package/dist/src/utility/pick-palette-color.d.ts +2 -0
  313. package/dist/src/utility/pick-palette-color.js +12 -0
  314. package/dist/src/utility/pick-palette-color.js.map +1 -0
  315. package/dist/src/utility/project-polyline.d.ts +5 -0
  316. package/dist/src/utility/project-polyline.js +22 -0
  317. package/dist/src/utility/project-polyline.js.map +1 -0
  318. package/dist/src/utility/project-vector.d.ts +6 -0
  319. package/dist/src/utility/project-vector.js +30 -0
  320. package/dist/src/utility/project-vector.js.map +1 -0
  321. package/dist/src/utility/rotate-vector.d.ts +3 -0
  322. package/dist/src/utility/rotate-vector.js +17 -0
  323. package/dist/src/utility/rotate-vector.js.map +1 -0
  324. package/dist/src/utility/scale-vector.d.ts +3 -0
  325. package/dist/src/utility/scale-vector.js +11 -0
  326. package/dist/src/utility/scale-vector.js.map +1 -0
  327. package/dist/src/utility/subtract-vectors.d.ts +3 -0
  328. package/dist/src/utility/subtract-vectors.js +11 -0
  329. package/dist/src/utility/subtract-vectors.js.map +1 -0
  330. package/dist/src/utility/unrotate-vector.d.ts +3 -0
  331. package/dist/src/utility/unrotate-vector.js +17 -0
  332. package/dist/src/utility/unrotate-vector.js.map +1 -0
  333. package/dist/src/utility/validate-scene.d.ts +3 -0
  334. package/dist/src/utility/validate-scene.js +70 -0
  335. package/dist/src/utility/validate-scene.js.map +1 -0
  336. package/dist/src/utility/with-vector-component.d.ts +4 -0
  337. package/dist/src/utility/with-vector-component.js +18 -0
  338. package/dist/src/utility/with-vector-component.js.map +1 -0
  339. package/dist/src/wireframe-viewer.d.ts +27 -0
  340. package/dist/src/wireframe-viewer.js +128 -0
  341. package/dist/src/wireframe-viewer.js.map +1 -0
  342. package/dist/tsconfig.tsbuildinfo +1 -0
  343. package/package.json +64 -5
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vector3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector3.js","sourceRoot":"","sources":["../../../src/type/vector3.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ type ViewOrientation = {
2
+ readonly yaw: number;
3
+ readonly elevation: number;
4
+ };
5
+ export default ViewOrientation;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=view-orientation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-orientation.js","sourceRoot":"","sources":["../../../src/type/view-orientation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import Camera from './../camera';
2
+ import BoundingBox from './bounding-box';
3
+ import VisibilityMap from './visibility-map';
4
+ import DisplayComponent from './display-component';
5
+ type ViewerState = {
6
+ readonly components: DisplayComponent[];
7
+ readonly visibility: VisibilityMap;
8
+ readonly bounding_box: BoundingBox;
9
+ readonly camera: Camera;
10
+ };
11
+ export default ViewerState;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=viewer-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewer-state.js","sourceRoot":"","sources":["../../../src/type/viewer-state.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ type Viewport = {
2
+ readonly width: number;
3
+ readonly height: number;
4
+ };
5
+ export default Viewport;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=viewport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../src/type/viewport.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ type VisibilityMap = Map<string, boolean>;
2
+ export default VisibilityMap;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=visibility-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility-map.js","sourceRoot":"","sources":["../../../src/type/visibility-map.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import Primitive from './primitive';
2
+ interface WireframeComponent {
3
+ readonly id: string;
4
+ readonly label?: string;
5
+ readonly note?: string;
6
+ readonly color?: string;
7
+ readonly alpha?: number;
8
+ readonly line_width?: number;
9
+ readonly visible?: boolean;
10
+ readonly primitives?: Primitive[];
11
+ readonly children?: WireframeComponent[];
12
+ }
13
+ export default WireframeComponent;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=wireframe-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireframe-component.js","sourceRoot":"","sources":["../../../src/type/wireframe-component.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import CameraState from './camera-state';
2
+ import WireframeComponent from './wireframe-component';
3
+ type WireframeScene = {
4
+ readonly title: string;
5
+ readonly subtitle?: string;
6
+ readonly units?: string;
7
+ readonly components: WireframeComponent[];
8
+ readonly camera?: Partial<CameraState>;
9
+ };
10
+ export default WireframeScene;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=wireframe-scene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireframe-scene.js","sourceRoot":"","sources":["../../../src/type/wireframe-scene.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import Vector3 from './../type/vector3';
2
+ declare function addVectors(a: Vector3, b: Vector3): Vector3;
3
+ export default addVectors;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function addVectors(a, b) {
4
+ return {
5
+ x: a.x + b.x,
6
+ y: a.y + b.y,
7
+ z: a.z + b.z
8
+ };
9
+ }
10
+ exports.default = addVectors;
11
+ //# sourceMappingURL=add-vectors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-vectors.js","sourceRoot":"","sources":["../../../src/utility/add-vectors.ts"],"names":[],"mappings":";;AAEA,SAAS,UAAU,CAAC,CAAU,EAAE,CAAU;IACzC,OAAO;QACN,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACZ,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACZ,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KACZ,CAAC;AACH,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Polyline from './../type/polyline';
2
+ import BoxPrimitive from './../type/primitive/box';
3
+ declare function buildBoxOutlines(box: BoxPrimitive): Polyline[];
4
+ export default buildBoxOutlines;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const add_vectors_1 = __importDefault(require("./add-vectors.js"));
7
+ const scale_vector_1 = __importDefault(require("./scale-vector.js"));
8
+ const subtract_vectors_1 = __importDefault(require("./subtract-vectors.js"));
9
+ const box_edge_index_pairs_1 = __importDefault(require("./../constant/box-edge-index-pairs.js"));
10
+ function buildBoxCorners(box) {
11
+ const half_size = (0, scale_vector_1.default)(box.size, 0.5);
12
+ const minimum = (0, subtract_vectors_1.default)(box.center, half_size);
13
+ const maximum = (0, add_vectors_1.default)(box.center, half_size);
14
+ return [
15
+ { x: minimum.x, y: minimum.y, z: minimum.z },
16
+ { x: maximum.x, y: minimum.y, z: minimum.z },
17
+ { x: minimum.x, y: maximum.y, z: minimum.z },
18
+ { x: maximum.x, y: maximum.y, z: minimum.z },
19
+ { x: minimum.x, y: minimum.y, z: maximum.z },
20
+ { x: maximum.x, y: minimum.y, z: maximum.z },
21
+ { x: minimum.x, y: maximum.y, z: maximum.z },
22
+ { x: maximum.x, y: maximum.y, z: maximum.z }
23
+ ];
24
+ }
25
+ function buildBoxOutlines(box) {
26
+ const corners = buildBoxCorners(box);
27
+ return box_edge_index_pairs_1.default.map(([start_index, end_index]) => {
28
+ return [corners[start_index], corners[end_index]];
29
+ });
30
+ }
31
+ exports.default = buildBoxOutlines;
32
+ //# sourceMappingURL=build-box-outlines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-box-outlines.js","sourceRoot":"","sources":["../../../src/utility/build-box-outlines.ts"],"names":[],"mappings":";;;;;AAEA,sEAA6C;AAC7C,wEAA+C;AAE/C,gFAAuD;AACvD,yFAAiE;AAEjE,SAAS,eAAe,CAAC,GAAiB;IACzC,MAAM,SAAS,GAAG,IAAA,sBAAW,EAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7C,MAA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AAC,GAAG,CAAC,CAAC;IAErC,OAAO,8BAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE;QAC5D,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import Axis from './../enum/axis';
2
+ import Vector3 from './../type/vector3';
3
+ import Polyline from './../type/polyline';
4
+ declare function buildCircleOutline(center: Vector3, axis: Axis, radius: number, segment_count?: number): Polyline;
5
+ export default buildCircleOutline;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const rendering_defaults_1 = __importDefault(require("./../constant/rendering-defaults.js"));
7
+ const get_perpendicular_axes_1 = __importDefault(require("./get-perpendicular-axes.js"));
8
+ const offset_vector_along_axis_1 = __importDefault(require("./offset-vector-along-axis.js"));
9
+ function buildCircleOutline(center, axis, radius, segment_count = rendering_defaults_1.default.CIRCLE_SEGMENT_COUNT) {
10
+ const [u_axis, v_axis] = (0, get_perpendicular_axes_1.default)(axis);
11
+ const points = [];
12
+ let index = 0;
13
+ while (index <= segment_count) {
14
+ const angle = (index / segment_count) * Math.PI * 2;
15
+ const u_offset = radius * Math.cos(angle);
16
+ const v_offset = radius * Math.sin(angle);
17
+ const u_shifted = (0, offset_vector_along_axis_1.default)(center, u_axis, u_offset);
18
+ const point = (0, offset_vector_along_axis_1.default)(u_shifted, v_axis, v_offset);
19
+ points.push(point);
20
+ index++;
21
+ }
22
+ return points;
23
+ }
24
+ exports.default = buildCircleOutline;
25
+ //# sourceMappingURL=build-circle-outline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-circle-outline.js","sourceRoot":"","sources":["../../../src/utility/build-circle-outline.ts"],"names":[],"mappings":";;;;;AAGA,qFAA6D;AAC7D,4FAAkE;AAClE,gGAAqE;AAErE,SAAS,kBAAkB,CAC1B,MAAe,EACf,IAAU,EACV,MAAc,EACd,gBAAwB,4BAAkB,CAAC,oBAAoB;IAE/D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAA,gCAAoB,EAAC,IAAI,CAAC,CAAC;IACpD,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,KAAK,IAAI,aAAa,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,aAAa,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAA,kCAAqB,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClE,MAAM,KAAK,GAAG,IAAA,kCAAqB,EAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,KAAK,EAAE,CAAC;IACT,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,kBAAe,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Polyline from './../type/polyline';
2
+ import CylinderPrimitive from './../type/primitive/cylinder';
3
+ declare function buildCylinderOutlines(cylinder: CylinderPrimitive): Polyline[];
4
+ export default buildCylinderOutlines;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const build_circle_outline_1 = __importDefault(require("./build-circle-outline.js"));
7
+ const get_perpendicular_axes_1 = __importDefault(require("./get-perpendicular-axes.js"));
8
+ const offset_vector_along_axis_1 = __importDefault(require("./offset-vector-along-axis.js"));
9
+ const LONGITUDINAL_LINE_COUNT = 4;
10
+ function buildCylinderOutlines(cylinder) {
11
+ const { axis, center, radius, length } = cylinder;
12
+ const half_length = length / 2;
13
+ const start_center = (0, offset_vector_along_axis_1.default)(center, axis, half_length * -1);
14
+ const end_center = (0, offset_vector_along_axis_1.default)(center, axis, half_length);
15
+ const start_circle = (0, build_circle_outline_1.default)(start_center, axis, radius);
16
+ const end_circle = (0, build_circle_outline_1.default)(end_center, axis, radius);
17
+ const [u_axis, v_axis] = (0, get_perpendicular_axes_1.default)(axis);
18
+ const outlines = [start_circle, end_circle];
19
+ let index = 0;
20
+ while (index < LONGITUDINAL_LINE_COUNT) {
21
+ const angle = (index / LONGITUDINAL_LINE_COUNT) * Math.PI * 2;
22
+ const u_offset = radius * Math.cos(angle);
23
+ const v_offset = radius * Math.sin(angle);
24
+ const start_u = (0, offset_vector_along_axis_1.default)(start_center, u_axis, u_offset);
25
+ const start_point = (0, offset_vector_along_axis_1.default)(start_u, v_axis, v_offset);
26
+ const end_u = (0, offset_vector_along_axis_1.default)(end_center, u_axis, u_offset);
27
+ const end_point = (0, offset_vector_along_axis_1.default)(end_u, v_axis, v_offset);
28
+ outlines.push([start_point, end_point]);
29
+ index++;
30
+ }
31
+ return outlines;
32
+ }
33
+ exports.default = buildCylinderOutlines;
34
+ //# sourceMappingURL=build-cylinder-outlines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-cylinder-outlines.js","sourceRoot":"","sources":["../../../src/utility/build-cylinder-outlines.ts"],"names":[],"mappings":";;;;;AAEA,wFAA8D;AAC9D,4FAAkE;AAClE,gGAAqE;AAErE,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAS,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UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClE,MAAM,SAAS,GAAG,IAAA,kCAAqB,EAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjE,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;QACxC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import Frame from './../type/frame';
2
+ import Camera from './../camera';
3
+ import BoundingBox from './../type/bounding-box';
4
+ import RenderOptions from './../type/render-options';
5
+ import VisibilityMap from './../type/visibility-map';
6
+ import DisplayComponent from './../type/display-component';
7
+ declare function buildFrame(camera: Camera, components: DisplayComponent[], visibility: VisibilityMap, options: RenderOptions, bounding_box: BoundingBox): Frame;
8
+ export default buildFrame;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const axis_1 = __importDefault(require("./../enum/axis.js"));
7
+ const theme_1 = __importDefault(require("./../constant/theme.js"));
8
+ const project_polyline_1 = __importDefault(require("./project-polyline.js"));
9
+ const is_component_shown_1 = __importDefault(require("./is-component-shown.js"));
10
+ const rendering_defaults_1 = __importDefault(require("./../constant/rendering-defaults.js"));
11
+ const get_bounding_box_size_1 = __importDefault(require("./get-bounding-box-size.js"));
12
+ const get_bounding_box_center_1 = __importDefault(require("./get-bounding-box-center.js"));
13
+ const build_rectangle_outline_1 = __importDefault(require("./build-rectangle-outline.js"));
14
+ function buildPath(camera, polylines, color, alpha, width) {
15
+ const runs = polylines.flatMap((polyline) => {
16
+ return (0, project_polyline_1.default)(camera, polyline);
17
+ });
18
+ return { runs, color, alpha, width };
19
+ }
20
+ function buildGroundPath(camera, bounding_box) {
21
+ const center = (0, get_bounding_box_center_1.default)(bounding_box);
22
+ const size = (0, get_bounding_box_size_1.default)(bounding_box);
23
+ const ground_center = { ...center, y: bounding_box.minimum.y };
24
+ const margin = rendering_defaults_1.default.GROUND_MARGIN_FACTOR;
25
+ const outline = (0, build_rectangle_outline_1.default)(ground_center, axis_1.default.X, axis_1.default.Z, size.x * margin, size.z * margin);
26
+ return buildPath(camera, [outline], theme_1.default.LINE, 1, 1);
27
+ }
28
+ function buildDot(camera, point, color) {
29
+ if (point === undefined) {
30
+ return [];
31
+ }
32
+ const screen_point = camera.project(point);
33
+ if (screen_point === null) {
34
+ return [];
35
+ }
36
+ return [{ point: screen_point, color }];
37
+ }
38
+ function buildLabel(camera, component) {
39
+ const screen_point = camera.project(component.centroid);
40
+ if (screen_point === null) {
41
+ return [];
42
+ }
43
+ return [{ point: screen_point, text: component.label, color: component.color }];
44
+ }
45
+ function buildFrame(camera, components, visibility, options, bounding_box) {
46
+ const paths = [];
47
+ const dots = [];
48
+ const labels = [];
49
+ if (options.show_ground) {
50
+ paths.push(buildGroundPath(camera, bounding_box));
51
+ }
52
+ const shown_components = components.filter((component) => {
53
+ return (0, is_component_shown_1.default)(component, visibility);
54
+ });
55
+ shown_components.forEach((component) => {
56
+ const { outlines, strokes, color, alpha, line_width } = component;
57
+ paths.push(buildPath(camera, outlines, color, alpha, line_width));
58
+ strokes.forEach((stroke) => {
59
+ const stroke_alpha = Math.min(1, alpha);
60
+ const first_point = stroke.points[0];
61
+ const last_point = stroke.points[stroke.points.length - 1];
62
+ paths.push(buildPath(camera, [stroke.points], color, stroke_alpha, stroke.width));
63
+ dots.push(...buildDot(camera, first_point, color));
64
+ dots.push(...buildDot(camera, last_point, color));
65
+ });
66
+ });
67
+ if (options.show_labels) {
68
+ shown_components.forEach((component) => {
69
+ labels.push(...buildLabel(camera, component));
70
+ });
71
+ }
72
+ return { paths, dots, labels };
73
+ }
74
+ exports.default = buildFrame;
75
+ //# sourceMappingURL=build-frame.js.map
@@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+ import DisplayComponent from './../type/display-component';
3
+ declare function buildInitialVisibility(components: DisplayComponent[]): VisibilityMap;
4
+ export default buildInitialVisibility;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function buildInitialVisibility(components) {
4
+ const visibility = new Map();
5
+ components.forEach((component) => {
6
+ visibility.set(component.id, component.initially_visible);
7
+ });
8
+ return visibility;
9
+ }
10
+ exports.default = buildInitialVisibility;
11
+ //# sourceMappingURL=build-initial-visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-initial-visibility.js","sourceRoot":"","sources":["../../../src/utility/build-initial-visibility.ts"],"names":[],"mappings":";;AAGA,SAAS,sBAAsB,CAAC,UAA8B;IAC7D,MAAM,UAAU,GAAkB,IAAI,GAAG,EAAE,CAAC;IAE5C,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAChC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACnB,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Polyline from './../type/polyline';
2
+ import OpeningPrimitive from './../type/primitive/opening';
3
+ declare function buildOpeningOutlines(opening: OpeningPrimitive): Polyline[];
4
+ export default buildOpeningOutlines;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const opening_shape_1 = __importDefault(require("./../enum/opening-shape.js"));
7
+ const get_plane_axes_1 = __importDefault(require("./get-plane-axes.js"));
8
+ const build_circle_outline_1 = __importDefault(require("./build-circle-outline.js"));
9
+ const build_rectangle_outline_1 = __importDefault(require("./build-rectangle-outline.js"));
10
+ const offset_vector_along_axis_1 = __importDefault(require("./offset-vector-along-axis.js"));
11
+ const FACE_DIRECTIONS = [-1, 1];
12
+ function buildOutlineOnFace(opening, face_center) {
13
+ const { u, v, normal } = (0, get_plane_axes_1.default)(opening.plane);
14
+ switch (opening.shape) {
15
+ case opening_shape_1.default.RECTANGLE:
16
+ return (0, build_rectangle_outline_1.default)(face_center, u, v, opening.width, opening.height);
17
+ case opening_shape_1.default.CIRCLE:
18
+ return (0, build_circle_outline_1.default)(face_center, normal, opening.radius);
19
+ }
20
+ }
21
+ function buildOpeningOutlines(opening) {
22
+ const { normal } = (0, get_plane_axes_1.default)(opening.plane);
23
+ const half_depth = opening.depth / 2;
24
+ return FACE_DIRECTIONS.map((direction) => {
25
+ const face_offset = half_depth * direction;
26
+ const face_center = (0, offset_vector_along_axis_1.default)(opening.center, normal, face_offset);
27
+ return buildOutlineOnFace(opening, face_center);
28
+ });
29
+ }
30
+ exports.default = buildOpeningOutlines;
31
+ //# sourceMappingURL=build-opening-outlines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-opening-outlines.js","sourceRoot":"","sources":["../../../src/utility/build-opening-outlines.ts"],"names":[],"mappings":";;;;;AAEA,uEAA8C;AAC9C,4EAAkD;AAElD,wFAA8D;AAC9D,8FAAoE;AACpE,gGAAqE;AAErE,MAAM,eAAe,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhC,SAAS,kBAAkB,CAC1B,OAAyB,EACzB,WAAoB;IAEpB,MAAM,EAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAC,GAAG,IAAA,wBAAY,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnD,QAAQ,OAAO,CAAC,KAAK,EAAE,CAAC;QACvB,KAAK,uBAAY,CAAC,SAAS;YAC1B,OAAO,IAAA,iCAAqB,EAC3B,WAAW,EACX,CAAC,EACD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,MAAM,CACd,CAAC;QACH,KAAK,uBAAY,CAAC,MAAM;YACvB,OAAO,IAAA,8BAAkB,EAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;AACF,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAyB;IACtD,MAAM,EAAC,MAAM,EAAC,GAAG,IAAA,wBAAY,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;IAErC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACxC,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAA,kCAAqB,EACxC,OAAO,CAAC,MAAM,EACd,MAAM,EACN,WAAW,CACX,CAAC;QAEF,OAAO,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Primitive from './../type/primitive';
2
+ import PrimitiveGeometry from './../type/primitive-geometry';
3
+ declare function buildPrimitiveGeometry(primitive: Primitive): PrimitiveGeometry;
4
+ export default buildPrimitiveGeometry;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const primitive_type_1 = __importDefault(require("./../enum/primitive-type.js"));
7
+ const build_box_outlines_1 = __importDefault(require("./build-box-outlines.js"));
8
+ const rendering_defaults_1 = __importDefault(require("./../constant/rendering-defaults.js"));
9
+ const get_primitive_anchor_1 = __importDefault(require("./get-primitive-anchor.js"));
10
+ const build_sphere_outlines_1 = __importDefault(require("./build-sphere-outlines.js"));
11
+ const build_opening_outlines_1 = __importDefault(require("./build-opening-outlines.js"));
12
+ const build_cylinder_outlines_1 = __importDefault(require("./build-cylinder-outlines.js"));
13
+ function buildPrimitiveGeometry(primitive) {
14
+ const anchor = (0, get_primitive_anchor_1.default)(primitive);
15
+ switch (primitive.type) {
16
+ case primitive_type_1.default.BOX: {
17
+ const outlines = (0, build_box_outlines_1.default)(primitive);
18
+ return { outlines, strokes: [], anchor };
19
+ }
20
+ case primitive_type_1.default.CYLINDER: {
21
+ const outlines = (0, build_cylinder_outlines_1.default)(primitive);
22
+ return { outlines, strokes: [], anchor };
23
+ }
24
+ case primitive_type_1.default.SPHERE: {
25
+ const outlines = (0, build_sphere_outlines_1.default)(primitive);
26
+ return { outlines, strokes: [], anchor };
27
+ }
28
+ case primitive_type_1.default.OPENING: {
29
+ const outlines = (0, build_opening_outlines_1.default)(primitive);
30
+ return { outlines, strokes: [], anchor };
31
+ }
32
+ case primitive_type_1.default.POLYLINE: {
33
+ const width = primitive.width ?? rendering_defaults_1.default.STROKE_WIDTH;
34
+ const stroke = { points: primitive.points, width };
35
+ return { outlines: [], strokes: [stroke], anchor };
36
+ }
37
+ }
38
+ }
39
+ exports.default = buildPrimitiveGeometry;
40
+ //# sourceMappingURL=build-primitive-geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-primitive-geometry.js","sourceRoot":"","sources":["../../../src/utility/build-primitive-geometry.ts"],"names":[],"mappings":";;;;;AACA,yEAAgD;AAChD,oFAA0D;AAE1D,qFAA6D;AAC7D,wFAA8D;AAC9D,0FAAgE;AAChE,4FAAkE;AAClE,8FAAoE;AAEpE,SAAS,sBAAsB,CAAC,SAAoB;IACnD,MAAM,MAAM,GAAG,IAAA,8BAAkB,EAAC,SAAS,CAAC,CAAC;IAE7C,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,wBAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YACxB,MAAM,QAAQ,GAAG,IAAA,4BAAgB,EAAC,SAAS,CAAC,CAAC;YAE7C,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAC,CAAC;QACxC,CAAC;QACD,KAAK,wBAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7B,MAAM,QAAQ,GAAG,IAAA,iCAAqB,EAAC,SAAS,CAAC,CAAC;YAElD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAC,CAAC;QACxC,CAAC;QACD,KAAK,wBAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3B,MAAM,QAAQ,GAAG,IAAA,+BAAmB,EAAC,SAAS,CAAC,CAAC;YAEhD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAC,CAAC;QACxC,CAAC;QACD,KAAK,wBAAa,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5B,MAAM,QAAQ,GAAG,IAAA,gCAAoB,EAAC,SAAS,CAAC,CAAC;YAEjD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAC,CAAC;QACxC,CAAC;QACD,KAAK,wBAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7B,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,4BAAkB,CAAC,YAAY,CAAC;YACjE,MAAM,MAAM,GAAG,EAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,EAAC,CAAC;YAEjD,OAAO,EAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAC,CAAC;QAClD,CAAC;IACF,CAAC;AACF,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import Axis from './../enum/axis';
2
+ import Vector3 from './../type/vector3';
3
+ import Polyline from './../type/polyline';
4
+ declare function buildRectangleOutline(center: Vector3, u_axis: Axis, v_axis: Axis, width: number, height: number): Polyline;
5
+ export default buildRectangleOutline;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const offset_vector_along_axis_1 = __importDefault(require("./offset-vector-along-axis.js"));
7
+ function buildRectangleOutline(center, u_axis, v_axis, width, height) {
8
+ const half_width = width / 2;
9
+ const half_height = height / 2;
10
+ const corner_offsets = [
11
+ [half_width * -1, half_height * -1],
12
+ [half_width, half_height * -1],
13
+ [half_width, half_height],
14
+ [half_width * -1, half_height],
15
+ [half_width * -1, half_height * -1]
16
+ ];
17
+ return corner_offsets.map(([u_offset, v_offset]) => {
18
+ const u_shifted = (0, offset_vector_along_axis_1.default)(center, u_axis, u_offset);
19
+ return (0, offset_vector_along_axis_1.default)(u_shifted, v_axis, v_offset);
20
+ });
21
+ }
22
+ exports.default = buildRectangleOutline;
23
+ //# sourceMappingURL=build-rectangle-outline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-rectangle-outline.js","sourceRoot":"","sources":["../../../src/utility/build-rectangle-outline.ts"],"names":[],"mappings":";;;;;AAGA,gGAAqE;AAErE,SAAS,qBAAqB,CAC7B,MAAe,EACf,MAAY,EACZ,MAAY,EACZ,KAAa,EACb,MAAc;IAEd,MAAM,UAAU,GAAG,KAAK,GAAG,CAAC,CAAC;IAC7B,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,CAAC;IAE/B,MAAM,cAAc,GAAuB;QAC1C,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,UAAU,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC;QAC9B,CAAC,UAAU,EAAE,WAAW,CAAC;QACzB,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC;QAC9B,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC;KACnC,CAAC;IAEF,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE;QAClD,MAAM,SAAS,GAAG,IAAA,kCAAqB,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAElE,OAAO,IAAA,kCAAqB,EAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Polyline from './../type/polyline';
2
+ import SpherePrimitive from './../type/primitive/sphere';
3
+ declare function buildSphereOutlines(sphere: SpherePrimitive): Polyline[];
4
+ export default buildSphereOutlines;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const axis_1 = __importDefault(require("./../enum/axis.js"));
7
+ const build_circle_outline_1 = __importDefault(require("./build-circle-outline.js"));
8
+ function buildSphereOutlines(sphere) {
9
+ const { center, radius } = sphere;
10
+ const axes = Object.values(axis_1.default);
11
+ return axes.map((axis) => {
12
+ return (0, build_circle_outline_1.default)(center, axis, radius);
13
+ });
14
+ }
15
+ exports.default = buildSphereOutlines;
16
+ //# sourceMappingURL=build-sphere-outlines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-sphere-outlines.js","sourceRoot":"","sources":["../../../src/utility/build-sphere-outlines.ts"],"names":[],"mappings":";;;;;AAAA,qDAA6B;AAG7B,wFAA8D;AAE9D,SAAS,mBAAmB,CAAC,MAAuB;IACnD,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,GAAG,MAAM,CAAC;IAChC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,cAAI,CAAC,CAAC;IAEjC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,OAAO,IAAA,8BAAkB,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare function clamp(value: number, minimum: number, maximum: number): number;
2
+ export default clamp;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function clamp(value, minimum, maximum) {
4
+ return Math.max(minimum, Math.min(maximum, value));
5
+ }
6
+ exports.default = clamp;
7
+ //# sourceMappingURL=clamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../../src/utility/clamp.ts"],"names":[],"mappings":";;AAAA,SAAS,KAAK,CAAC,KAAa,EAAE,OAAe,EAAE,OAAe;IAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Vector3 from './../type/vector3';
2
+ import DisplayComponent from './../type/display-component';
3
+ declare function collectDisplayPoints(components: DisplayComponent[]): Vector3[];
4
+ export default collectDisplayPoints;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function collectDisplayPoints(components) {
4
+ return components.flatMap((component) => {
5
+ const outline_points = component.outlines.flat();
6
+ const stroke_points = component.strokes.flatMap((stroke) => {
7
+ return stroke.points;
8
+ });
9
+ return [...outline_points, ...stroke_points];
10
+ });
11
+ }
12
+ exports.default = collectDisplayPoints;
13
+ //# sourceMappingURL=collect-display-points.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect-display-points.js","sourceRoot":"","sources":["../../../src/utility/collect-display-points.ts"],"names":[],"mappings":";;AAGA,SAAS,oBAAoB,CAAC,UAA8B;IAC3D,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QACvC,MAAM,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEjD,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC1D,OAAO,MAAM,CAAC,MAAM,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,cAAc,EAAE,GAAG,aAAa,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Vector3 from './../type/vector3';
2
+ import BoundingBox from './../type/bounding-box';
3
+ declare function computeBoundingBox(points: Vector3[]): BoundingBox;
4
+ export default computeBoundingBox;