-
Notifications
You must be signed in to change notification settings - Fork 1
Terrain Quad Tree example idea
Angry-Potato edited this page Mar 12, 2015
·
1 revision
{
id: "root",
x: 0,
y: 0,
width: 100,
height: 100,
parent: null,
type: null,
children: [
"node1", //x: 0, y: 0, width: 50, height: 50
"node2", //x: 50, y: 0, width: 50, height: 50
"node3", //x: 0, y: 50, width: 50, height: 50
"node4" //x: 50, y: 50, width: 50, height: 50
]
}
{
id: "node1",
x: 0,
y: 0,
width: 50,
height: 50,
parent: "root",
type: null,
children: [
"node5", //x: 0, y: 0, width: 25, height: 25
"node6", //x: 25, y: 0, width: 25, height: 25
"node7", //x: 0, y: 25, width: 25, height: 25
"node8" //x: 25, y: 25, width: 25, height: 25
]
}
{
id: "node5",
x: 0,
y: 0,
width: 25,
height: 25,
parent: "node1",
type: "GRASS",
children: [
//empty for now, could end up containing game objects
]
}