Skip to content

Commit

Permalink
Fix brush outline offset in java block/item models
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Jan 16, 2025
1 parent 54838b6 commit 3039c28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/preview/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,9 @@ class Preview {

let z_offset = world_normal.clone().multiplyScalar(z_fight_offset);
let matrix_offset = new THREE.Matrix4().makeTranslation(z_offset.x, z_offset.y, z_offset.z);
if (!Format.centered_grid) {
matrix_offset.makeTranslation(-Canvas.scene.position.x, -Canvas.scene.position.y, -Canvas.scene.position.z);
}
brush_matrix.multiplyMatrices(matrix_offset, brush_matrix);

Canvas.brush_outline.matrix = brush_matrix;
Expand Down

0 comments on commit 3039c28

Please sign in to comment.