mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Add settings to toggle 2D and 3D brush cursor
Fix #1969 3D brush cursor visible in screenshots
This commit is contained in:
parent
4050753ff6
commit
650252a4b7
@ -490,8 +490,12 @@ const Settings = {
|
||||
new Setting('color_wheel', {category: 'paint', value: false, onChange(value) {
|
||||
Interface.Panels.color.vue.picker_type = value ? 'wheel' : 'box';
|
||||
}});
|
||||
new Setting('pick_color_opacity', {category: 'paint', value: false});
|
||||
new Setting('brush_cursor_2d', {category: 'paint', value: true});
|
||||
new Setting('brush_cursor_3d', {category: 'paint', value: true, onChange(value) {
|
||||
if (!value) scene.remove(Canvas.brush_outline);
|
||||
}});
|
||||
new Setting('outlines_in_paint_mode', {category: 'paint', value: true});
|
||||
new Setting('pick_color_opacity', {category: 'paint', value: false});
|
||||
new Setting('paint_through_transparency', {category: 'paint', value: true});
|
||||
new Setting('paint_side_restrict', {category: 'paint', value: true});
|
||||
new Setting('paint_with_stylus_only', {category: 'paint', value: false});
|
||||
|
@ -655,6 +655,7 @@ const Canvas = {
|
||||
alphaTest: 0.2
|
||||
})
|
||||
Canvas.brush_outline = new THREE.Mesh(new THREE.PlaneBufferGeometry(1, 1), brush_outline_material);
|
||||
Canvas.gizmos.push(Canvas.brush_outline);
|
||||
|
||||
/*
|
||||
// Vertex gizmos
|
||||
|
@ -1031,7 +1031,7 @@ class Preview {
|
||||
var data = this.raycast(event);
|
||||
updateCubeHighlights(data && data.element);
|
||||
|
||||
if (Toolbox.selected.brush?.size) {
|
||||
if (Toolbox.selected.brush?.size && Settings.get('brush_cursor_3d')) {
|
||||
if (!data) {
|
||||
scene.remove(Canvas.brush_outline);
|
||||
return;
|
||||
|
@ -3177,7 +3177,7 @@ Interface.definePanels(function() {
|
||||
return [...min, ...max];
|
||||
},
|
||||
getBrushOutlineStyle() {
|
||||
if (Toolbox.selected.brush) {
|
||||
if (Toolbox.selected.brush && Settings.get('brush_cursor_2d')) {
|
||||
var pixel_size = this.inner_width / (this.texture ? this.texture.width : Project.texture_width);
|
||||
//pos
|
||||
let offset = 0;
|
||||
|
@ -925,6 +925,10 @@
|
||||
"settings.color_wheel.desc": "Use the color wheel as the main color picker",
|
||||
"settings.pick_color_opacity": "Pick Color Opacity",
|
||||
"settings.pick_color_opacity.desc": "Pick the color opacity with the Color Picker and set it as brush opacity",
|
||||
"settings.brush_cursor_2d": "2D Brush Cursor",
|
||||
"settings.brush_cursor_2d.desc": "Display an outline around the brush in the 2D workspace",
|
||||
"settings.brush_cursor_3d": "3D Brush Cursor",
|
||||
"settings.brush_cursor_3d.desc": "Display an outline around the brush in the 3D workspace",
|
||||
"settings.outlines_in_paint_mode": "Selection Outlines in Paint Mode",
|
||||
"settings.outlines_in_paint_mode.desc": "Display element selection outlines while in paint mode",
|
||||
"settings.paint_through_transparency": "Paint Through Transparency",
|
||||
|
Loading…
Reference in New Issue
Block a user