From d7034878e2b56c7c5a58a066654b20e4a881a8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Piellard?= Date: Wed, 6 Mar 2024 18:34:38 +0100 Subject: [PATCH] Simplify enum --- src/lib/terrain/i-voxel-map.ts | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/lib/terrain/i-voxel-map.ts b/src/lib/terrain/i-voxel-map.ts index 6d9f1bf..8127bc1 100644 --- a/src/lib/terrain/i-voxel-map.ts +++ b/src/lib/terrain/i-voxel-map.ts @@ -18,32 +18,32 @@ interface IVoxelMaterial { } enum ENeighbour { - xMyMzM = 0, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z - 1 } - xMyMz0 = 1, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z } - xMyMzP = 2, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z + 1 } - xMy0zM = 3, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z - 1 } - xMy0z0 = 4, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z } - xMy0zP = 5, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z + 1 } - xMyPzM = 6, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z - 1 } - xMyPz0 = 7, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z } - xMyPzP = 8, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z + 1 } - x0yMzM = 9, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z - 1 } - x0yMz0 = 10, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z } - x0yMzP = 11, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z + 1 } - x0y0zM = 12, // whether or not there is a neighbour voxel at coords { X , Y , Z - 1 } - x0y0zP = 13, // whether or not there is a neighbour voxel at coords { X , Y , Z + 1 } - x0yPzM = 14, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z - 1 } - x0yPz0 = 15, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z } - x0yPzP = 16, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z + 1 } - xPyMzM = 17, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z - 1 } - xPyMz0 = 18, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z } - xPyMzP = 19, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z + 1 } - xPy0zM = 20, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z - 1 } - xPy0z0 = 21, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z } - xPy0zP = 22, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z + 1 } - xPyPzM = 23, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z - 1 } - xPyPz0 = 24, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z } - xPyPzP = 25, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z + 1 } + xMyMzM, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z - 1 } + xMyMz0, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z } + xMyMzP, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z + 1 } + xMy0zM, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z - 1 } + xMy0z0, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z } + xMy0zP, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z + 1 } + xMyPzM, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z - 1 } + xMyPz0, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z } + xMyPzP, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z + 1 } + x0yMzM, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z - 1 } + x0yMz0, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z } + x0yMzP, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z + 1 } + x0y0zM, // whether or not there is a neighbour voxel at coords { X , Y , Z - 1 } + x0y0zP, // whether or not there is a neighbour voxel at coords { X , Y , Z + 1 } + x0yPzM, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z - 1 } + x0yPz0, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z } + x0yPzP, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z + 1 } + xPyMzM, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z - 1 } + xPyMz0, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z } + xPyMzP, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z + 1 } + xPy0zM, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z - 1 } + xPy0z0, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z } + xPy0zP, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z + 1 } + xPyPzM, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z - 1 } + xPyPz0, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z } + xPyPzP, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z + 1 } } /**