mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
Fix bug: options are not applied when changing layer
This commit is contained in:
parent
ab61c30e20
commit
b871b63c7e
1 changed files with 4 additions and 1 deletions
|
|
@ -351,7 +351,10 @@ function extendWater(width, height) {
|
|||
|
||||
async function update3dTexture() {
|
||||
if (texture) texture.dispose();
|
||||
const url = await getMapURL("mesh");
|
||||
const mapOptions = []
|
||||
if (options.labels3d) mapOptions.push("noLabels");
|
||||
if (options.extendedWater) mapOptions.push("noWater");
|
||||
const url = await getMapURL("mesh", mapOptions);
|
||||
window.setTimeout(() => window.URL.revokeObjectURL(url), 3000);
|
||||
texture = new THREE.TextureLoader().load(url, render);
|
||||
material.map = texture;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue