Browse Source

add more rooms

master
Peter Hajas 3 years ago
parent
commit
d3cc9e2bb7
  1. 24
      data.json
  2. 1
      script.js

24
data.json

@ -29,6 +29,30 @@
"x" : 4.9784, "y" : 0,
"w" : 5.385, "h" : 4.37, "d" : 6.096,
"color" : "yellow"
},
{
"name" : "Kitchen",
"x" : 4.9784, "y" : 4.37,
"w" : 5.385, "h" : 3.7338, "d" : 3.048,
"color" : "skyblue"
},
{
"name" : "Garage",
"x" : 4.9784, "y" : 8.1038,
"w" : 9.7028, "h" : 6.8072, "d" : 3.048,
"color" : "gray"
},
{
"name" : "Guest Room",
"x" : 10.3634, "y" : 1.0668,
"w" : 4.0767, "h" : 3.6068, "d" : 3.048,
"color" : "purple"
},
{
"name" : "Guest Bathroom",
"x" : 12.2938, "y" : 4.6736,
"w" : 2.1082, "h" : 1.6383, "d" : 3.048,
"color" : "pink"
}
]
}

1
script.js

@ -30,6 +30,7 @@ animate();
function setPosition(mesh, x, y, z, w, h, d) {
// position sets the *center* position
// our coordinates are top/left/bottom
let meshX = x + w/2
let meshY = y + h/2
let meshZ = z - d/2

Loading…
Cancel
Save