Sample Room Configuration
In the following example we put all these concepts together and create a three room structure.
Last updated
In the following example we put all these concepts together and create a three room structure.
Last updated
[
{
"name": "livingroom",
"diagonal": [
[0, 0],
[[5, 8], [5, 7]],
],
"components": [
{"type": "window", "size": 2, "segment": 2, "num": 2},
],
"connects": ["corridor"]
},
{
"name": "bedroom",
"diagonal": [
"[rooms['livingroom'].left+uniform(0.5, 2), rooms['livingroom'].bottom - uniform(0, 1)]",
"[-4, [3, 4]]",
],
"components": [
{"type": "door", "size": 1.2, "segment": 1, "u": [0.4, 0.6], "opening": [75, 90]},
{"type": "window", "size": 2, "segment": 2, "u": [0.4, 0.6]}
]
},
{
"name": "corridor",
"has_wall": False,
"diagonal": [
"[rooms['livingroom'].right, rooms['livingroom'].bottom]",
"[rooms['livingroom'].right + uniform(3, 7), rooms['livingroom'].bottom + uniform(1.5, 3)]",
],
"components": [
{"type": "door", "size": 1.2, "segment": 1, "u": [0.4, 0.6]},
]
},
{
"name": "bathroom",
"diagonal": [
"rooms['corridor'].corners[3]",
"[rooms['corridor'].left+uniform(2, 3), rooms['corridor'].top + uniform(3, 4)]",
],
"components": [
{"type": "door", "size": 1.2, "segment": 0, "u": [0.4, 0.6]},
{"type": "window", "size": 2, "segment": 2, "u": [0.4, 0.6]}
]
},
]