Mirror brush grid

This commit is contained in:
JannisX11 2021-01-24 21:10:43 +01:00
parent 1889b73a72
commit 3fd1ae7b8e

View File

@ -947,12 +947,22 @@ BARS.defineActions(function() {
} }
}) })
new Toggle('mirror_painting', { new Toggle('mirror_painting', {
//label: true,
icon: 'flip', icon: 'flip',
category: 'paint', category: 'paint',
condition: () => Modes.paint, condition: () => Modes.paint,
onChange: function (value) { onChange: function (value) {
Painter.mirror_painting = value; Painter.mirror_painting = value;
if (value) {
let size = 16*16;
var grid = new THREE.GridHelper(size, 16*2, gizmo_colors.outline);
grid.rotation.z = Math.PI/2;
grid.position.y = size/2;
scene.add(grid);
setTimeout(() => {
scene.remove(grid);
grid.geometry.dispose();
}, 1000)
}
} }
}) })
new Toggle('lock_alpha', { new Toggle('lock_alpha', {