mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fix mirror modeling counting meshes with 1e-15 X origin as off-center
This commit is contained in:
parent
4fb7bec299
commit
3ddf9c8c2f
@ -2,8 +2,8 @@ const MirrorModeling = {
|
||||
initial_transformer_position: 0,
|
||||
isCentered(element) {
|
||||
let center = Format.centered_grid ? 0 : 8;
|
||||
if (!element.to && element.origin[0] != center) return false;
|
||||
if (element.rotation[1] || element.rotation[2]) return false;
|
||||
if (!element.to && Math.roundTo(element.origin[0], 3) != center) return false;
|
||||
if (Math.roundTo(element.rotation[1], 3) || Math.roundTo(element.rotation[2], 3)) return false;
|
||||
if (element instanceof Cube && !Math.epsilon(element.to[0], MirrorModeling.flipCoord(element.from[0]), 0.01)) return false;
|
||||
|
||||
let checkParent = (parent) => {
|
||||
|
Loading…
Reference in New Issue
Block a user