diff --git a/src/app_context.ts b/src/app_context.ts index 58f4666..dd635cd 100644 --- a/src/app_context.ts +++ b/src/app_context.ts @@ -154,7 +154,7 @@ export class AppContext { const uiElements = this._ui.layout.build.elements; const voxelMeshParams: VoxelMeshParams = { - desiredHeight: uiElements.height.getCachedValue() as number, + desiredHeight: uiElements.height.getDisplayValue(), useMultisampleColouring: uiElements.multisampleColouring.getCachedValue() === 'on', textureFiltering: uiElements.textureFiltering.getCachedValue() === 'linear' ? TextureFiltering.Linear : TextureFiltering.Nearest, enableAmbientOcclusion: uiElements.ambientOcclusion.getCachedValue() === 'on', diff --git a/src/block_atlas.ts b/src/block_atlas.ts index 292ec79..1bcf0d2 100644 --- a/src/block_atlas.ts +++ b/src/block_atlas.ts @@ -1,5 +1,5 @@ import { HashMap } from './hash_map'; -import { UV, RGB, ASSERT, fileExists, ColourSpace, ATLASES_DIR, PALETTES_DIR, AppError, LOG_WARN, LOG } from './util'; +import { UV, RGB, ASSERT, fileExists, ColourSpace, ATLASES_DIR, PALETTES_DIR, AppError, LOG_WARN } from './util'; import { Vector3 } from './vector'; import fs from 'fs'; diff --git a/src/ui/elements/slider.ts b/src/ui/elements/slider.ts index b9dd97d..322b046 100644 --- a/src/ui/elements/slider.ts +++ b/src/ui/elements/slider.ts @@ -126,6 +126,10 @@ export class SliderElement extends LabelledElement { elementValue.innerHTML = this.getValue().toFixed(this._decimals); } + public getDisplayValue() { + return parseFloat(this.getValue().toFixed(this._decimals)); + } + protected _onEnabledChanged() { super._onEnabledChanged();