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

909 line
36 KiB

  1. function makeObject(name, viewInfo, sizes = []) {
  2. views = {};
  3. Object.entries(viewInfo).forEach(([key, value]) => {
  4. views[key] = {
  5. attributes: {
  6. height: {
  7. name: "Height",
  8. power: 1,
  9. type: "length",
  10. base: value.height
  11. }
  12. },
  13. image: value.image,
  14. name: value.name,
  15. rename: value.rename
  16. }
  17. if (value.mass) {
  18. views[key].attributes.mass = {
  19. name: "Mass",
  20. power: 3,
  21. type: "mass",
  22. base: value.mass
  23. };
  24. }
  25. if (value.volume) {
  26. views[key].attributes.capacity = {
  27. name: "Volume",
  28. power: 3,
  29. type: "volume",
  30. base: value.volume
  31. }
  32. }
  33. if (value.energy) {
  34. views[key].attributes.capacity = {
  35. name: "Energy",
  36. power: 3,
  37. type: "energy",
  38. base: value.energy
  39. }
  40. }
  41. });
  42. return makeEntity({ name: name }, views, sizes);
  43. }
  44. function makeHeight(info, category, prefix = "", type = "objects", rename = true) {
  45. const views = {};
  46. info.forEach(object => {
  47. let src;
  48. // this lets us provide our own source if needed
  49. // useful for reusing existing art
  50. if (object[3]) {
  51. src = object[3];
  52. } else {
  53. src = "./media/" + type + "/" + category.replace(/ /g, "-").toLowerCase() + "/" + prefix + object[0] + ".svg";
  54. }
  55. views[object[0]] = {
  56. height: math.unit(object[1], object[2]),
  57. image: { source: src },
  58. name: rename ? object[0].replace(/-/g, " ").replace(/\b\w/g, x => x.toUpperCase()).replace(/'[A-Z]/g, x => x.toLowerCase()) : object[0],
  59. rename: true
  60. }
  61. if (object[4] !== undefined) {
  62. views[object[0]].volume = object[4]
  63. }
  64. });
  65. return {
  66. name: category,
  67. constructor: () => makeObject(
  68. category,
  69. views
  70. )
  71. }
  72. }
  73. function makeHeightWeight(info, category, prefix = "", type = "objects") {
  74. const views = {};
  75. info.forEach(object => {
  76. let src;
  77. // this lets us provide our own source if needed
  78. // useful for reusing existing art
  79. if (object[5]) {
  80. src = object[5];
  81. } else {
  82. src = "./media/" + type + "/" + category.replace(/ /g, "-").toLowerCase() + "/" + prefix + object[0] + ".svg";
  83. }
  84. views[object[0]] = {
  85. height: math.unit(object[1], object[2]),
  86. mass: math.unit(object[3], object[4]),
  87. image: { source: src },
  88. name: object[0].replace(/-/g, " ").replace(/\b\w/g, x => x.toUpperCase()),
  89. rename: true
  90. }
  91. });
  92. return {
  93. name: category,
  94. constructor: () => makeObject(
  95. category,
  96. views
  97. )
  98. }
  99. }
  100. function makeHeightWeightSphere(info, category, prefix = "", type = "objects") {
  101. const views = {};
  102. info.forEach(object => {
  103. let src;
  104. // this lets us provide our own source if needed
  105. // useful for reusing existing art
  106. if (object[5]) {
  107. src = object[5];
  108. } else {
  109. src = "./media/" + type + "/" + category.replace(/ /g, "-").toLowerCase() + "/" + prefix + object[0] + ".svg";
  110. }
  111. views[object[0]] = {
  112. height: math.unit(object[1], object[2]),
  113. mass: math.unit(object[3], object[4]),
  114. volume: math.unit(Math.PI * 4 / 3 * Math.pow((object[1]/2), 3), object[2] + "^3"),
  115. image: { source: src },
  116. name: object[0].replace(/-/g, " ").replace(/\b\w/g, x => x.toUpperCase()),
  117. rename: true
  118. }
  119. if (object[6]) {
  120. views[object[0]].image.extra = object[6]
  121. views[object[0]].image.bottom = object[7]
  122. }
  123. });
  124. return {
  125. name: category,
  126. constructor: () => makeObject(
  127. category,
  128. views
  129. )
  130. }
  131. }
  132. function makeModel(data) {
  133. const views = {};
  134. const forms = {};
  135. data.forms.forEach(form => {
  136. forms[form.name] = { name: form.name }
  137. form.views.forEach(view => {
  138. const viewId = form.name + view.name
  139. views[viewId] = {
  140. name: view.name,
  141. attributes: {
  142. height: {
  143. name: "Height",
  144. power: 1,
  145. type: "length",
  146. base: math.unit(view.height, "meters")
  147. }
  148. },
  149. form: form.name
  150. }
  151. if (view.area) {
  152. views[viewId].attributes["area"] = {
  153. name: "Area",
  154. power: 2,
  155. type: "area",
  156. base: math.unit(view.area, "m^2")
  157. }
  158. }
  159. if (view.volume) {
  160. views[viewId].attributes["volume"] = {
  161. name: "Volume",
  162. power: 3,
  163. type: "volume",
  164. base: math.unit(view.volume, "m^3")
  165. }
  166. }
  167. if (view.image) {
  168. views[viewId].image = view.image
  169. } else {
  170. views[viewId].image = {
  171. source: "./media/" + data.kind + "/" + data.name + "/" + form.name + "-" + view.name + ".svg"
  172. }
  173. }
  174. })
  175. });
  176. return {
  177. name: data.name,
  178. constructor: () => makeEntity(
  179. {name: data.name},
  180. views,
  181. [],
  182. forms
  183. )
  184. }
  185. }
  186. function makeObjects() {
  187. const results = [];
  188. results.push({
  189. name: "Soda Can",
  190. constructor: () => makeObject(
  191. "Soda Can",
  192. {
  193. front: {
  194. height: math.unit(4.83, "inches"),
  195. mass: math.unit(15, "grams"),
  196. image: { source: "./media/objects/soda-can.svg" },
  197. name: "Side"
  198. }
  199. }
  200. )
  201. });
  202. results.push({
  203. name: "Sewing Pin",
  204. constructor: () => makeObject(
  205. "Sewing Pin",
  206. {
  207. side: {
  208. height: math.unit(1.5, "inches"),
  209. image: { source: "./media/objects/sewing-pin.svg" },
  210. name: "Side"
  211. },
  212. top: {
  213. height: math.unit(2, "millimeters"),
  214. image: { source: "./media/objects/pin-head.svg" },
  215. name: "Head"
  216. }
  217. }
  218. )
  219. });
  220. results.push({
  221. name: "Lamp",
  222. constructor: () => makeObject(
  223. "Lamp",
  224. {
  225. lamp: {
  226. height: math.unit(30, "inches"),
  227. mass: math.unit(10, "lbs"),
  228. image: { source: "./media/objects/lamp.svg" },
  229. name: "Lamp"
  230. }
  231. }
  232. )
  233. });
  234. results.push({
  235. name: "Nail Polish",
  236. constructor: () => makeObject(
  237. "Nail Polish",
  238. {
  239. bottle: {
  240. height: math.unit(3.25, "inches"),
  241. mass: math.unit(66, "g"),
  242. image: { source: "./media/objects/nail-polish.svg" },
  243. name: "Bottle"
  244. }
  245. }
  246. )
  247. });
  248. results.push({
  249. name: "Shot Glass",
  250. constructor: () => makeObject(
  251. "Shot Glass",
  252. {
  253. glass: {
  254. height: math.unit(2 + 3 / 8, "inches"),
  255. mass: math.unit(75, "g"),
  256. image: { source: "./media/objects/shot-glass.svg" },
  257. name: "Bottle"
  258. }
  259. }
  260. )
  261. });
  262. results.push({
  263. name: "Beer Bottle",
  264. constructor: () => makeObject(
  265. "Beer Bottle",
  266. {
  267. longneck: {
  268. height: math.unit(9, "inches"),
  269. mass: math.unit(200, "g"),
  270. image: { source: "./media/objects/beer-bottle.svg" },
  271. name: "Longneck Bottle"
  272. }
  273. }
  274. )
  275. });
  276. results.push({
  277. name: "Coin",
  278. constructor: () => makeObject(
  279. "Coin",
  280. {
  281. penny: {
  282. height: math.unit(0.75, "inches"),
  283. mass: math.unit(2.5, "g"),
  284. image: { source: "./media/objects/circle.svg" },
  285. name: "Penny",
  286. rename: true
  287. },
  288. nickel: {
  289. height: math.unit(0.835, "inches"),
  290. mass: math.unit(5, "g"),
  291. image: { source: "./media/objects/circle.svg" },
  292. name: "Nickel",
  293. rename: true
  294. },
  295. dime: {
  296. height: math.unit(0.705, "inches"),
  297. mass: math.unit(2.268, "g"),
  298. image: { source: "./media/objects/circle.svg" },
  299. name: "Dime",
  300. rename: true
  301. },
  302. quarter: {
  303. height: math.unit(0.955, "inches"),
  304. mass: math.unit(5.67, "g"),
  305. image: { source: "./media/objects/circle.svg" },
  306. name: "Quarter",
  307. rename: true
  308. },
  309. dollar: {
  310. height: math.unit(1.043, "inches"),
  311. mass: math.unit(8.1, "g"),
  312. image: { source: "./media/objects/circle.svg" },
  313. name: "Dollar Coin",
  314. rename: true
  315. },
  316. }
  317. )
  318. });
  319. results.push({
  320. name: "Pencil",
  321. constructor: () => makeObject(
  322. "Pencil",
  323. {
  324. pencil: {
  325. height: math.unit(7.5, "inches"),
  326. mass: math.unit(7, "g"),
  327. image: { source: "./media/objects/pencil.svg" },
  328. name: "Pencil"
  329. }
  330. }
  331. )
  332. });
  333. results.push({
  334. name: "Balls",
  335. constructor: () => makeObject(
  336. "Balls",
  337. {
  338. football: {
  339. height: math.unit("6.7", "inches"),
  340. mass: math.unit(415, "grams"),
  341. image: { source: "./media/objects/balls/football.svg"},
  342. name: "Football",
  343. rename: true
  344. },
  345. golf: {
  346. height: math.unit(1.62, "inches"),
  347. mass: math.unit(45, "g"),
  348. image: { source: "./media/objects/circle.svg" },
  349. name: "Golfball",
  350. rename: true
  351. },
  352. tennis: {
  353. height: math.unit(2.6, "inches"),
  354. mass: math.unit(57, "g"),
  355. image: { source: "./media/objects/circle.svg" },
  356. name: "Tennisball",
  357. rename: true
  358. },
  359. baseball: {
  360. height: math.unit(2.9, "inches"),
  361. mass: math.unit(145, "g"),
  362. image: { source: "./media/objects/circle.svg" },
  363. name: "Baseball",
  364. rename: true
  365. },
  366. volleyball: {
  367. height: math.unit(8, "inches"),
  368. mass: math.unit(270, "g"),
  369. image: { source: "./media/objects/circle.svg" },
  370. name: "Volleyball",
  371. rename: true
  372. }
  373. }
  374. )
  375. });
  376. results.push({
  377. name: "Paperclip",
  378. constructor: () => makeObject(
  379. "Paperclip",
  380. {
  381. paperclip: {
  382. height: math.unit(1.834, "inches"),
  383. mass: math.unit(1, "g"),
  384. image: { source: "./media/objects/paperclip.svg" },
  385. name: "Paperclip"
  386. }
  387. }
  388. )
  389. });
  390. results.push({
  391. name: "Pebbles",
  392. constructor: () => makeObject(
  393. "Pebbles",
  394. {
  395. gravelGrain: {
  396. height: math.unit(20, "mm"),
  397. image: { source: "./media/objects/pebble.svg" },
  398. name: "Grain of gravel",
  399. rename: true
  400. },
  401. sandGrain: {
  402. height: math.unit(0.5, "mm"),
  403. image: { source: "./media/objects/pebble.svg" },
  404. name: "Grain of sand",
  405. rename: true
  406. },
  407. siltGrain: {
  408. height: math.unit(0.03, "mm"),
  409. image: { source: "./media/objects/pebble.svg" },
  410. name: "Grain of silt",
  411. rename: true
  412. },
  413. }
  414. )
  415. });
  416. results.push({
  417. name: "Credit Card",
  418. constructor: () => makeObject(
  419. "Credit Card",
  420. {
  421. creditCard: {
  422. height: math.unit(53.98, "mm"),
  423. image: { source: "./media/objects/credit-card.svg" },
  424. name: "Credit card",
  425. },
  426. creditCardVertical: {
  427. height: math.unit(85.60, "mm"),
  428. image: { source: "./media/objects/credit-card-vertical.svg" },
  429. name: "Credit card (vertical)",
  430. },
  431. }
  432. )
  433. });
  434. results.push({
  435. name: "Molecular",
  436. constructor: () => makeObject(
  437. "Molecular",
  438. {
  439. hydrogen: {
  440. height: math.unit(1.06e-10, "m"),
  441. mass: math.unit(1, "dalton"),
  442. image: { source: "./media/objects/circle.svg" },
  443. name: "Hydrogen atom",
  444. rename: true
  445. },
  446. proton: {
  447. height: math.unit(0.877e-15, "m"),
  448. mass: math.unit(1, "dalton"),
  449. image: { source: "./media/objects/circle.svg" },
  450. name: "Proton",
  451. rename: true
  452. },
  453. }
  454. )
  455. });
  456. results.push({
  457. name: "Flagpole",
  458. constructor: () => makeObject(
  459. "Flagpole",
  460. {
  461. residential: {
  462. height: math.unit(20, "feet"),
  463. image: { source: "./media/objects/flagpole.svg" },
  464. name: "Residential"
  465. },
  466. medium: {
  467. height: math.unit(50, "feet"),
  468. image: { source: "./media/objects/flagpole.svg" },
  469. name: "Medium"
  470. },
  471. large: {
  472. height: math.unit(100, "feet"),
  473. image: { source: "./media/objects/flagpole.svg" },
  474. name: "Large"
  475. },
  476. }
  477. )
  478. });
  479. results.push({
  480. name: "Vending Machine",
  481. constructor: () => makeObject(
  482. "Vending Machine",
  483. {
  484. object: {
  485. height: math.unit(183, "cm"),
  486. mass: math.unit(347, "kg"),
  487. image: { source: "./media/objects/vending-machine.svg" },
  488. name: "Vending Machine"
  489. }
  490. }
  491. )
  492. })
  493. results.push({
  494. name: "International Space Station",
  495. constructor: () => makeObject(
  496. "International Space Station",
  497. {
  498. object: {
  499. height: math.unit(209, "feet"),
  500. mass: math.unit(925300, "lbs"),
  501. image: { source: "./media/objects/international-space-station.svg" },
  502. name: "International Space Station"
  503. }
  504. }
  505. )
  506. })
  507. results.push(makeHeight(
  508. [
  509. ["king", 4, "inches"],
  510. ["queen", 351 / 407 * 4, "inches"],
  511. ["bishop", 340 / 407 * 4, "inches"],
  512. ["knight", 309 / 407 * 4, "inches"],
  513. ["rook", 271 / 407 * 4, "inches"],
  514. ["pawn", 197 / 407 * 4, "inches"],
  515. ],
  516. "Chess Pieces",
  517. "chess_"
  518. ));
  519. results.push({
  520. name: "Strand",
  521. constructor: () => {
  522. views = {};
  523. viewInfo = {
  524. opticalFibre: {
  525. name: "Optical Fibre",
  526. thickness: math.unit(0.375, "mm")
  527. },
  528. hair: {
  529. name: "Hair",
  530. thickness: math.unit(0.07, "mm")
  531. },
  532. spiderSilk: {
  533. name: "Spider Silk",
  534. thickness: math.unit(0.003, "mm")
  535. },
  536. suspensionCables: {
  537. name: "Suspension Bridge Cables",
  538. thickness: math.unit(3, "feet")
  539. },
  540. capillary: {
  541. name: "Capillary",
  542. thickness: math.unit(7.5, "micrometers")
  543. },
  544. vein: {
  545. name: "Vein",
  546. thickness: math.unit(10, "mm")
  547. },
  548. thread: {
  549. name: "Thread",
  550. thickness: math.unit(0.4, "mm")
  551. },
  552. powerCord: {
  553. name: "Power Cord",
  554. thickness: math.unit(0.25, "inches")
  555. },
  556. pianoWireBass: {
  557. name: "Piano Wire (Bass)",
  558. thickness: math.unit(8.5, "mm")
  559. },
  560. pianoWireTreble: {
  561. name: "Piano Wire (Treble)",
  562. thickness: math.unit(0.85, "mm")
  563. },
  564. guitarString: {
  565. name: "Guitar String",
  566. thickness: math.unit(0.03, "inches")
  567. },
  568. powerLineThin: {
  569. name: "Power Line (Thin)",
  570. thickness: math.unit(0.325, "inches")
  571. },
  572. powerLineThick: {
  573. name: "Power Line (Thick)",
  574. thickness: math.unit(0.720, "inches")
  575. },
  576. carbonNanotube: {
  577. name: "Carbon Nanotube",
  578. thickness: math.unit(4, "nm")
  579. }
  580. }
  581. Object.entries(viewInfo).forEach(([key, value]) => {
  582. views[key] = {
  583. attributes: {
  584. height: {
  585. name: "Height",
  586. power: 1,
  587. type: "length",
  588. base: math.multiply(value.thickness, 253.4385 / 5)
  589. },
  590. thickness: {
  591. name: "Thickness",
  592. power: 1,
  593. type: "length",
  594. base: value.thickness
  595. },
  596. },
  597. image: {
  598. source: "./media/objects/strand.svg"
  599. },
  600. name: value.name,
  601. rename: true
  602. }
  603. if (value.mass) {
  604. views[key].attributes.mass = {
  605. name: "Mass",
  606. power: 3,
  607. type: "mass",
  608. base: value.mass
  609. };
  610. }
  611. });
  612. return makeEntity({ name: "Strand" }, views);
  613. }
  614. })
  615. results.push(makeHeight(
  616. [
  617. ["mitochondria", 0.5, "micrometer"],
  618. ["bacteria", 0.3, "micrometer"],
  619. ["sperm", 4.65, "micrometers"],
  620. ["red-blood-cell", 6.5, "micrometer"],
  621. ["white-blood-cell", 13, "micrometer"],
  622. ["animal-cell", 25, "micrometers"],
  623. ["plant-cell", 75, "micrometers"],
  624. ["amoeba-proteus", 500, "micrometers"],
  625. ["chaos-carolinensis", 1500, "micrometers"],
  626. ],
  627. "Cells",
  628. "cell_"
  629. ))
  630. results.push(makeHeight(
  631. [
  632. ["stop-sign", 36, "inches"],
  633. ["yield-sign", 36, "inches"],
  634. ["pedestrian-crossing", 30, "inches"],
  635. ["highway-exit", 150, "inches"]
  636. ],
  637. "Signs",
  638. ""
  639. ))
  640. results.push({
  641. name: "Game Consoles",
  642. constructor: () => makeVehicleGroup([
  643. {
  644. name: "Switch",
  645. mass: math.unit(10.48, "ounces"),
  646. sides: {
  647. "Front": { height: math.unit(4.01, "inches") },
  648. "Top": { height: math.unit(1.13, "inches") },
  649. "Side": { height: math.unit(4.01, "inches") },
  650. }
  651. }
  652. ],
  653. "Game Consoles",
  654. "",
  655. "objects")
  656. })
  657. results.push({
  658. name: "Electromagnetic Waves",
  659. constructor: () => {
  660. views = {};
  661. viewInfo = [
  662. ["Gamma rays", math.unit(1, "pm")],
  663. ["Hard X-rays", math.unit(20, "pm")],
  664. ["Soft X-rays", math.unit(1, "nm")],
  665. ["Extreme-ultraviolet", math.unit(50, "nm")],
  666. ["UVC", math.unit(200, "nm")],
  667. ["UVB", math.unit(295, "nm")],
  668. ["UVA", math.unit(350, "nm")],
  669. ["Violet", math.unit(415, "nm")],
  670. ["Blue", math.unit(470, "nm")],
  671. ["Cyan", math.unit(490, "nm")],
  672. ["Green", math.unit(530, "nm")],
  673. ["Yellow", math.unit(580, "nm")],
  674. ["Orange", math.unit(610, "nm")],
  675. ["Red", math.unit(690, "nm")],
  676. ["Near-infrared", math.unit(1.2, "um")],
  677. ["Short-wavelength infrared", math.unit(2.2, "um")],
  678. ["Mid-wavelength infrared", math.unit(6.5, "um")],
  679. ["Long-wavelength infrared", math.unit(12, "um")],
  680. ["Far infrared", math.unit(500, "um")],
  681. ["D-band microwaves (mm-wave)", math.unit(2, "mm")],
  682. ["S-band microwaves (ovens, wifi)", math.unit(11, "cm")],
  683. ["L-band microwaves (GPS)", math.unit(22, "cm")],
  684. ["UHF", math.unit(50, "cm")],
  685. ["FM radio", math.unit(3.5, "m")],
  686. ["VHF", math.unit(5, "m")],
  687. ["HF", math.unit(50, "m")],
  688. ["AM radio", math.unit(250, "m")],
  689. ["MF", math.unit(500, "m")],
  690. ["LF", math.unit(5, "km")],
  691. ["VLF", math.unit(50, "km")],
  692. ["ULF", math.unit(500, "km")],
  693. ["SLF", math.unit(5000, "km")],
  694. ["ELF", math.unit(50000, "km")],
  695. ]
  696. viewInfo.forEach(([name, length]) => {
  697. views[name] = {
  698. attributes: {
  699. height: {
  700. name: "Height",
  701. power: 1,
  702. type: "length",
  703. base: math.multiply(length, 2)
  704. }
  705. },
  706. image: {
  707. source: "./media/objects/sine-wave.svg"
  708. },
  709. name: name,
  710. rename: true,
  711. default: name === "Green"
  712. }
  713. });
  714. return makeEntity({ name: "Electromagnetic Waves" }, views);
  715. }
  716. })
  717. results.push(makeHeight(
  718. [
  719. [".308 Winchester", 71.374, "mm", "./media/objects/ammunition/.308 Winchester.svg"],
  720. [".22 LR", 25.40, "mm", "./media/objects/ammunition/.22 LR.svg"],
  721. ["9mm Luger", 29.69, "mm", "./media/objects/ammunition/9mm Luger.svg"],
  722. [".223 Remington", 2.260, "inches", "./media/objects/ammunition/.223 Remington.svg"],
  723. [".30-06 Springfield", 3.340, "inches", "./media/objects/ammunition/.30-06 Springfield.svg"],
  724. ],
  725. "Ammunition",
  726. "",
  727. "objects",
  728. false
  729. ))
  730. results.push(makeHeight(
  731. [
  732. ["No. 1 (11 Oz.)", 4, "inches", "./media/objects/tin-cans/No. 1 (11 Oz.).svg"],
  733. ["No. 2 (20 Oz.)", 4 + 9/16, "inches", "./media/objects/tin-cans/No. 2 (20 Oz.).svg"],
  734. ["No. 3 (52 Oz.)", 7, "inches", "./media/objects/tin-cans/No. 3 (52 Oz.).svg"],
  735. ["No. 5 (60 Oz.)", 5 + 5/8, "inches", "./media/objects/tin-cans/No. 5 (60 Oz.).svg"],
  736. ["No. 10 (110 Oz.)", 7, "inches", "./media/objects/tin-cans/No. 10 (110 Oz.).svg"],
  737. ],
  738. "Tin Cans",
  739. ""
  740. ))
  741. results.push(makeHeight(
  742. [
  743. ["Garden Hose", 0.875, "inches"],
  744. ["1 Inch Fire Hose", 1.25, "inches"],
  745. ["1.5 Inch Fire Hose", 1.85, "inches"],
  746. ["1.75 Inch Fire Hose", 2.1, "inches"],
  747. ["2.5 Inch Fire Hose", 3, "inches"],
  748. ["4 Inch Fire Hose", 4.5, "inches"],
  749. ["5 Inch Fire Hose", 5.6, "inches"],
  750. ],
  751. "Hoses",
  752. ""
  753. ))
  754. results.push(makeHeight(
  755. [
  756. ["12 Inch Culvert", 14.75, "inches"],
  757. ["24 Inch Culvert", 26.75, "inches"],
  758. ],
  759. "Pipes",
  760. ""
  761. ))
  762. results.push(makeHeight(
  763. [
  764. ["000 Capsule", 26.1, "mm"],
  765. ["00E Capsule", 25.3, "mm"],
  766. ["00 Capsule", 23.4, "mm"],
  767. ["0E Capsule", 23.5, "mm"],
  768. ["0 Capsule", 21.6, "mm"],
  769. ["1 Capsule", 19.4, "mm"],
  770. ["2 Capsule", 17.6, "mm"],
  771. ["3 Capsule", 15.7, "mm"],
  772. ["4 Capsule", 14.3, "mm"],
  773. ["5 Capsule", 11.1, "mm"],
  774. ],
  775. "Pills",
  776. ""
  777. ));
  778. results.push(makeHeight(
  779. [
  780. ["10' Container", 8 + 6/12, "feet", "./media/objects/shipping-containers/10-foot.svg", math.unit(536.3, "ft^3")],
  781. ["20' Container", 8 + 6/12, "feet", "./media/objects/shipping-containers/20-foot.svg", math.unit(1169, "ft^3")],
  782. ["40' Container", 8 + 6/12, "feet", "./media/objects/shipping-containers/40-foot.svg", math.unit(2385, "ft^3")],
  783. ["40' High Cube Container", 9 + 6/12, "feet", "./media/objects/shipping-containers/40-foot-high-cube.svg", math.unit(2660, "ft^3")],
  784. ["45' High Cube Container", 9 + 6/12, "feet", "./media/objects/shipping-containers/45-foot-high-cube.svg", math.unit(3040, "ft^3")],
  785. ["Container Front", 8 + 6/12, "feet", "./media/objects/shipping-containers/front-normal.svg", math.unit(2385, "ft^3")],
  786. ["High Cube Container Front", 9 + 6/12, "feet", "./media/objects/shipping-containers/front-high-cube.svg", math.unit(2660, "ft^3")],
  787. ],
  788. "Shipping Containers",
  789. ""
  790. ));
  791. results.push(makeHeight(
  792. [
  793. ["AA", 50, "mm"],
  794. ["AAA", 44.1, "mm"]
  795. ],
  796. "Batteries",
  797. ""
  798. ));
  799. results.push(makeHeight(
  800. [
  801. ["Regular", 32, "mm"],
  802. ["Micro", 15, "mm"]
  803. ],
  804. "SD Cards",
  805. ""
  806. ))
  807. results.push(makeModel({"name": "Dice", "kind": "objects", "forms": [{"name": "D6 Dotted", "views": [{"name": "Front", "height": 0.01415012776851654}, {"name": "Side", "height": 0.01415012776851654}, {"name": "Top", "height": 0.01415012776851654}]}, {"name": "D4", "views": [{"name": "Front", "height": 0.01699800044298172}, {"name": "Side", "height": 0.01699800044298172}, {"name": "Top", "height": 0.017878876999020576}]}, {"name": "D8", "views": [{"name": "Front", "height": 0.013862096704542637}, {"name": "Side", "height": 0.013862096704542637}, {"name": "Top", "height": 0.01808309182524681}]}, {"name": "D10", "views": [{"name": "Front", "height": 0.015351179987192154}, {"name": "Side", "height": 0.015351179987192154}, {"name": "Top", "height": 0.016876159235835075}]}, {"name": "D10 Percentile", "views": [{"name": "Front", "height": 0.015358946286141872}, {"name": "Side", "height": 0.015358946286141872}, {"name": "Top", "height": 0.016862813383340836}]}, {"name": "D12", "views": [{"name": "Front", "height": 0.017607660964131355}, {"name": "Side", "height": 0.017607660964131355}, {"name": "Top", "height": 0.02110980451107025}]}, {"name": "D20", "views": [{"name": "Front", "height": 0.01964765228331089}, {"name": "Side", "height": 0.01964765228331089}, {"name": "Top", "height": 0.023235414177179337}]}, {"name": "D6 Numbered", "views": [{"name": "Front", "height": 0.014152487739920616}, {"name": "Side", "height": 0.014152487739920616}, {"name": "Top", "height": 0.014152484014630318}]}]}))
  808. results.push(makeModel({"name": "Kitchenware", "kind": "objects", "forms": [{"name": "Fork", "views": [{"name": "Front", "height": 0.2818719744682312}, {"name": "Side", "height": 0.2818719744682312}, {"name": "Top", "height": 0.016759976744651794}]}, {"name": "Knife", "views": [{"name": "Front", "height": 0.3395436704158783}, {"name": "Side", "height": 0.3395436704158783}, {"name": "Top", "height": 0.010758467018604279}]}, {"name": "Spoon", "views": [{"name": "Front", "height": 0.2750821113586426}, {"name": "Side", "height": 0.2750821113586426}, {"name": "Top", "height": 0.019756551831960678}]}, {"name": "Wine Bottle", "views": [{"name": "Front", "height": 0.5660512447357178}, {"name": "Side", "height": 0.5660512447357178}, {"name": "Top", "height": 0.15603119134902954}]}, {"name": "Wooden Spoon", "views": [{"name": "Front", "height": 0.6168732643127441}, {"name": "Side", "height": 0.6168732643127441}, {"name": "Top", "height": 0.0339566171169281}]}, {"name": "Cutting Board", "views": [{"name": "Front", "height": 0.021497011184692383}, {"name": "Side", "height": 0.021497011184692383}, {"name": "Top", "height": 0.7172588109970093}]}, {"name": "Plate", "views": [{"name": "Front", "height": 0.05160319805145264}, {"name": "Side", "height": 0.05160319805145264}, {"name": "Top", "height": 0.40615978837013245}]}, {"name": "Bowl", "views": [{"name": "Front", "height": 0.1036841869354248}, {"name": "Side", "height": 0.1036841869354248}, {"name": "Top", "height": 0.24168895184993744}]}, {"name": "Coffee Cup", "views": [{"name": "Front", "height": 0.12534868717193604}, {"name": "Side", "height": 0.12534868717193604}, {"name": "Top", "height": 0.11728732287883759}]}, {"name": "Tea Cup", "views": [{"name": "Front", "height": 0.08793330192565918}, {"name": "Side", "height": 0.08793330192565918}, {"name": "Top", "height": 0.10884171724319458}]}]}))
  809. results.push(makeModel({"name": "Condoms", "kind": "objects", "forms": [{"name": "Narrow", "views": [{"name": "Front", "height": 0.196}]}, {"name": "Standard", "views": [{"name": "Front", "height": 0.208}]}, {"name": "Large", "views": [{"name": "Front", "height": 0.221}]}, {"name": "XL", "views": [{"name": "Front", "height": 0.229}]}]}))
  810. results.push(makeModel({
  811. "name": "Flat Shapes",
  812. "kind": "objects",
  813. "forms": [
  814. {
  815. "name": "Circle",
  816. "views": [
  817. {
  818. "name": "Top",
  819. "height": 1,
  820. "area": 0.78539816339
  821. }
  822. ]
  823. },
  824. {
  825. "name": "Square",
  826. "views": [
  827. {
  828. "name": "Top",
  829. "height": 1,
  830. "area": 1
  831. }
  832. ]
  833. },
  834. ]
  835. }))
  836. /* ***Glassware*** */ results.push(makeModel({"name": "Glassware", "kind": "objects", "forms": [{"name": "Erlenmeyer 250mL", "views": [{"name": "Front", "height": 0.13200001418590546}, {"name": "Side", "height": 0.13200001418590546}, {"name": "Top", "height": 0.0820000022649765}]}, {"name": "Erlenmeyer 50mL", "views": [{"name": "Front", "height": 0.07800000160932541}, {"name": "Side", "height": 0.07800000160932541}, {"name": "Top", "height": 0.050999999046325684}]}, {"name": "Florence 250mL", "views": [{"name": "Front", "height": 0.1444360464811325}, {"name": "Side", "height": 0.1444360464811325}, {"name": "Top", "height": 0.08079908788204193}]}, {"name": "Watch Glass", "views": [{"name": "Front", "height": 0.012000001035630703}, {"name": "Side", "height": 0.012000001035630703}, {"name": "Top", "height": 0.1213480606675148}]}, {"name": "Petri Dish 60mm", "views": [{"name": "Front", "height": 0.012477035634219646}, {"name": "Side", "height": 0.012477035634219646}, {"name": "Top", "height": 0.06493081152439117}]}, {"name": "Petri Dish 100mm", "views": [{"name": "Front", "height": 0.014974183402955532}, {"name": "Side", "height": 0.014974183402955532}, {"name": "Top", "height": 0.10384059697389603}]}]}));
  837. /* ***Shapes*** */ results.push(makeModel({"name": "Shapes", "kind": "objects", "forms": [{"name": "Cube", "views": [{"name": "Front", "height": 1.0, "volume": 0.9999999999999999}, {"name": "Side", "height": 1.0, "volume": 0.9999999999999999}, {"name": "Top", "height": 1.0, "volume": 0.9999999999999999}]}, {"name": "Sphere", "views": [{"name": "Front", "height": 1.0, "volume": 0.5242280941679499}, {"name": "Side", "height": 1.0, "volume": 0.5242280941679499}, {"name": "Top", "height": 0.9999998807907104, "volume": 0.5242280941679499}]}, {"name": "Cone", "views": [{"name": "Front", "height": 1.0, "volume": 0.26169426348501956}, {"name": "Side", "height": 1.0, "volume": 0.26169426348501956}, {"name": "Top", "height": 1.0, "volume": 0.26169426348501956}]}, {"name": "Cylinder", "views": [{"name": "Front", "height": 1.0, "volume": 0.7850827506448366}, {"name": "Side", "height": 1.0, "volume": 0.7850827506448366}, {"name": "Top", "height": 0.9999399781227112, "volume": 0.7850827506448366}]}]}));
  838. /* ***PO Boxes*** */ results.push(makeModel({"name": "PO Boxes", "kind": "objects", "forms": [{"name": "XS", "views": [{"name": "Front", "height": 0.07620000094175339, "volume": 0.003988201638571948}, {"name": "Side", "height": 0.07620000094175339, "volume": 0.003988201638571948}, {"name": "Top", "height": 0.3746500015258789, "volume": 0.003988201638571948}]}, {"name": "S", "views": [{"name": "Front", "height": 0.12700000405311584, "volume": 0.006647002860937575}, {"name": "Side", "height": 0.12700000405311584, "volume": 0.006647002860937575}, {"name": "Top", "height": 0.3746500015258789, "volume": 0.006647002860937575}]}, {"name": "M", "views": [{"name": "Front", "height": 0.1396999955177307, "volume": 0.014623405358175506}, {"name": "Side", "height": 0.1396999955177307, "volume": 0.014623405358175506}, {"name": "Top", "height": 0.3746500015258789, "volume": 0.014623405358175506}]}, {"name": "L", "views": [{"name": "Front", "height": 0.2793999910354614, "volume": 0.02924681071635101}, {"name": "Side", "height": 0.2793999910354614, "volume": 0.02924681071635101}, {"name": "Top", "height": 0.3746500015258789, "volume": 0.02924681071635101}]}, {"name": "XL", "views": [{"name": "Front", "height": 0.30480000376701355, "volume": 0.06526148383352366}, {"name": "Side", "height": 0.30480000376701355, "volume": 0.06526148383352366}, {"name": "Top", "height": 0.3746500015258789, "volume": 0.06526148383352366}]}]}));
  839. /* ***Sex Toys*** */ results.push(makeModel({"name": "Sex Toys", "kind": "objects", "forms": [{"name": "Chance", "views": [{"name": "Front", "height": 0.44450023770332336, "volume": 0.0024940192673095084}, {"name": "Side", "height": 0.44450023770332336, "volume": 0.0024940192673095084}, {"name": "Top", "height": 0.18736252188682556, "volume": 0.0024940192673095084}]}, {"name": "Fenrir", "views": [{"name": "Front", "height": 0.32130947709083557, "volume": 0.0014611460855557515}, {"name": "Side", "height": 0.32130947709083557, "volume": 0.0014611460855557515}, {"name": "Top", "height": 0.11701348423957825, "volume": 0.0014611460855557515}]}]}));
  840. /* ***INSERT HERE*** */
  841. return results;
  842. }