fix east/west facings directions
This commit is contained in:
@@ -51,8 +51,8 @@ export function buildGeometry(model, atlas, variant = {}) {
|
||||
// 1. Pre-calculate the blockstate rotation matrix (around block center)
|
||||
const blockMatrix = mat4Identity(new Float32Array(16));
|
||||
mat4Translate(blockMatrix, blockMatrix, [0.5, 0.5, 0.5]);
|
||||
if (variant.x) mat4RotateX(blockMatrix, blockMatrix, variant.x * Math.PI / 180);
|
||||
if (variant.y) mat4RotateY(blockMatrix, blockMatrix, variant.y * Math.PI / 180);
|
||||
if (variant.x) mat4RotateX(blockMatrix, blockMatrix, -variant.x * Math.PI / 180);
|
||||
if (variant.y) mat4RotateY(blockMatrix, blockMatrix, -variant.y * Math.PI / 180);
|
||||
mat4Translate(blockMatrix, blockMatrix, [-0.5, -0.5, -0.5]);
|
||||
|
||||
for (const el of model.elements || []) {
|
||||
|
||||
Reference in New Issue
Block a user