From d3cc9e2bb7c566a0c61f84467870d104e8bc9797 Mon Sep 17 00:00:00 2001 From: Peter Hajas Date: Sat, 7 May 2022 16:54:07 -0600 Subject: [PATCH] add more rooms --- data.json | 24 ++++++++++++++++++++++++ script.js | 1 + 2 files changed, 25 insertions(+) diff --git a/data.json b/data.json index f07de8c..8a63ea4 100644 --- a/data.json +++ b/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" } ] } diff --git a/script.js b/script.js index 43f28f9..b0c38fb 100644 --- a/script.js +++ b/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