diff --git a/data.json b/data.json index 5f11792..e974cf5 100644 --- a/data.json +++ b/data.json @@ -65,6 +65,12 @@ "x" : 12.2938, "y" :6.3119, "w" : 2.1082, "h" : 1.4732, "d" : 3.048, "color" : "lime" + }, + { + "name" : "Loft", + "x" : 0, "y" : 5.2832, "z" : 3.048, + "w" : 4.9774, "h" : 3.7338, "d" : 3.048, + "color" : "navy" } ] } diff --git a/script.js b/script.js index a567b81..106c090 100644 --- a/script.js +++ b/script.js @@ -38,7 +38,7 @@ function setPosition(mesh, x, y, z, w, h, d) { let meshX = x + w/2 let meshY = y + h/2 - let meshZ = z - d/2 + let meshZ = -z - d/2 mesh.position.x = meshX mesh.position.y = meshY mesh.position.z = meshZ