Skip to content

Commit

Permalink
Ignore height scale multiplier while resizing mesh by Z and update pu…
Browse files Browse the repository at this point in the history
…blic app limits

* Public limits update.

* Public limits update.

* Disable dissolving.

* Ignore height scale multiplier while resizing mesh.
  • Loading branch information
iwatkot authored Feb 23, 2025
1 parent c70fa39 commit af2f004
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion maps4fs/generator/component/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def plane_from_np(
mesh = self.mesh_from_np(
dem_data,
include_zeros=include_zeros,
z_scaling_factor=self.get_z_scaling_factor(),
z_scaling_factor=self.get_z_scaling_factor(ignore_height_scale_multiplier=True),
resize_factor=self.map.background_settings.resize_factor,
apply_decimation=self.map.background_settings.apply_decimation,
decimation_percent=self.map.background_settings.decimation_percent,
Expand Down
8 changes: 3 additions & 5 deletions webui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@
}
FAQ_MD = os.path.join(DOCS_DIRECTORY, "FAQ.md")

QUEUE_LIMIT = 3
QUEUE_LIMIT = 5
DEFAULT_LAT = 45.28571409289627
DEFAULT_LON = 20.237433441210115

QUEUE_FILE = os.path.join(WORKING_DIRECTORY, "queue.json")
HISTORY_FILE = os.path.join(WORKING_DIRECTORY, "history.json")
HISTORY_INTERVAL = 60 * 60 * 2 # 2 hours
HISTORY_LIMIT = 5
QUEUE_TIMEOUT = 180 # 3 minutes
QUEUE_INTERVAL = 10
QUEUE_TIMEOUT = 120 # 2 minutes
QUEUE_INTERVAL = 5

REMOVE_DELAY = 300 # 5 minutes

Expand Down
2 changes: 1 addition & 1 deletion webui/generator/advanced_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ def is_disabled_on_public(self, raw_field_name: str) -> bool:
if not self.public:
return False

disabled_fields = ["resize_factor", "zoom_level"] # , "download_images"]
disabled_fields = ["resize_factor", "zoom_level", "dissolve"]
return raw_field_name in disabled_fields
2 changes: 1 addition & 1 deletion webui/generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def limit_on_public(self, settings_json: dict) -> dict:

limited_settings = settings_json.copy()
limited_settings["BackgroundSettings"]["resize_factor"] = 8
# limited_settings["TextureSettings"]["dissolve"] = False
limited_settings["TextureSettings"]["dissolve"] = False
limited_settings["SatelliteSettings"]["zoom_level"] = 16
# limited_settings["SatelliteSettings"]["download_images"] = False
return limited_settings
Expand Down
2 changes: 1 addition & 1 deletion webui/queuing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_queue(force: bool = False) -> dict[int, str]:
queue = json.load(f)

for epoch, session in queue.items():
if int(epoch) + QUEUE_TIMEOUT * 2 < int(time()):
if int(epoch) + int(QUEUE_TIMEOUT * 1.5) < int(time()):
remove_from_queue(session, queue)

return queue
Expand Down

0 comments on commit af2f004

Please sign in to comment.