fix incorrect fills
This commit is contained in:
parent
56147ed325
commit
4078e026ef
@ -28,7 +28,6 @@ let surfaceTest = () =>
|
||||
let voxels = [];
|
||||
voxels[Region.I(2, 2, 2)] = true;
|
||||
voxels[Region.I(2, 3, 2)] = true;
|
||||
voxels[Region.I(3, 2, 2)] = true;
|
||||
let surface = Region.Surface(voxels)
|
||||
console.log(surface);
|
||||
|
||||
|
10
region.js
10
region.js
@ -104,17 +104,19 @@ export const Region =
|
||||
{
|
||||
let [x, y, z] = Region.XYZ(i);
|
||||
|
||||
console.log("at", x, y, z);
|
||||
|
||||
// bottom: at, "up", corner, right
|
||||
BA = i;
|
||||
BU = Region.I(x+1, y, z);
|
||||
BU = Region.I(x, y+1, z );
|
||||
BC = Region.I(x+1, y+1, z );
|
||||
BR = Region.I(x, y+1, z);
|
||||
BR = Region.I(x+1, y, z );
|
||||
|
||||
// top: at, "up" corner, right
|
||||
TA = Region.I(x, y, z+1);
|
||||
TU = Region.I(x+1, y, z+1);
|
||||
TU = Region.I(x, y+1, z+1);
|
||||
TC = Region.I(x+1, y+1, z+1);
|
||||
TR = Region.I(x, y+1, z+1);
|
||||
TR = Region.I(x+1, y, z+1);
|
||||
|
||||
// check: left, "down", below
|
||||
CL = Region.I(x-1, y, z );
|
||||
|
Loading…
Reference in New Issue
Block a user