less copy protection, more size visualization
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

50 行
2.4 KiB

  1. function makeFurniture() {
  2. results = [];
  3. const dataSofas = [
  4. {
  5. name: "Two Seat",
  6. sides: {
  7. "Front": { height: math.unit(30, "inches") },
  8. "Side": { height: math.unit(30, "inches") },
  9. "Top": { height: math.unit(30.5, "inches") },
  10. }
  11. },
  12. ]
  13. results.push({
  14. name: "Sofas",
  15. constructor: () => makeAutoVehicleGroup(dataSofas,
  16. "Sofas",
  17. "furniture")
  18. });
  19. results.push(
  20. makeHeight(
  21. [
  22. ["twin", 75, "inches"],
  23. ["twin-xl", 80, "inches"],
  24. ["twin-xl", 80, "inches"],
  25. ["full", 75, "inches"],
  26. ["queen", 80, "inches"],
  27. ["king", 80, "inches"],
  28. ["california-king", 84, "inches"],
  29. ],
  30. "Mattresses",
  31. "",
  32. "furniture"
  33. )
  34. )
  35. /* ***Tables*** */ results.push(makeModel({"name": "Tables", "kind": "furniture", "forms": [{"name": "Picnic Table", "views": [{"name": "Front", "height": 0.7535526156425476, "extra": 1.0058282909930716, "bottom": 0.005761135840809958}, {"name": "Angled", "height": 0.7535526156425476, "extra": 1.0092250922509225, "bottom": 0.009057971014492754}, {"name": "Side", "height": 0.7535526156425476, "extra": 1.0073926822157433, "bottom": 0.007284971260779868}, {"name": "Top", "height": 1.8287999629974365, "extra": 1.003046218487395, "bottom": 0.003027771977448346}, {"name": "Bottom", "height": 1.8287999629974365, "extra": 1.003046218487395, "bottom": 0.003027771977448346}]}, {"name": "Small Folding Table", "views": [{"name": "Front", "height": 0.8018024563789368, "extra": 1.0033813096412243, "bottom": 0.0033585967302146766}, {"name": "Angled", "height": 0.8018024563789368, "extra": 1.0040256234915528, "bottom": 0.003993471069651093}, {"name": "Side", "height": 0.8018024563789368, "extra": 1.003167808219178, "bottom": 0.0031478645567465553}, {"name": "Top", "height": 0.6096000075340271, "extra": 1.004279089376054, "bottom": 0.004242778915687869}, {"name": "Bottom", "height": 0.6096000075340271, "extra": 1.004279089376054, "bottom": 0.004242778915687869}]}]}));
  36. /* ***INSERT HERE*** */
  37. results.sort((b1, b2) => {
  38. e1 = b1.constructor();
  39. e2 = b2.constructor();
  40. return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value;
  41. });
  42. return results;
  43. }