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.
 
 
 

47 lines
1.2 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. results.sort((b1, b2) => {
  36. e1 = b1.constructor();
  37. e2 = b2.constructor();
  38. return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value;
  39. });
  40. return results;
  41. }