Add anti-aliasing setting

This commit is contained in:
JannisX11 2020-10-06 21:57:57 +02:00
parent bda338c188
commit 2d796348a6
3 changed files with 4 additions and 1 deletions

View File

@ -101,6 +101,7 @@ const Settings = {
new Setting('shading', {category: 'preview', value: true, onChange() {
updateShading()
}});
new Setting('antialiasing', {category: 'preview', value: true});
new Setting('fov', {category: 'preview', value: 45, type: 'number', onChange(val) {
Preview.all.forEach(preview => preview.setFOV(val));
}});

View File

@ -195,7 +195,7 @@ class Preview {
try {
this.renderer = new THREE.WebGLRenderer({
canvas: this.canvas,
antialias: true,
antialias: Settings.get('antialiasing'),
alpha: true,
preserveDrawingBuffer: true
});

View File

@ -462,6 +462,8 @@
"settings.brightness.desc": "Brightness of the preview. Default is 50",
"settings.shading": "Shading",
"settings.shading.desc": "Enable shading",
"settings.antialiasing": "Anti-aliasing",
"settings.antialiasing.desc": "Toggle anti-aliasing in the preview. Restart Blockbench to apply changes",
"settings.render_sides": "Render Sides",
"settings.fov": "FOV",
"settings.fov.desc": "Camera Field of View. Default is 45",