Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map): move map loading into worker #33

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

fallenoak
Copy link
Member

@fallenoak fallenoak commented Jan 7, 2024

Similar to #30 and #32, this PR moves map and map area loading into a worker. Since map areas can be upwards of 1MiB on the large end, this significantly reduces the impact map loading has on frame rates.

This PR also eliminates the dedicated terrain manager in favor of one tied (more appropriately) to the map manager. Terrain is a component of map files, not a discrete model format like models (.m2) or map objects (.wmo).

Finally, as a result of the previous PRs introducing the loader pattern, this PR eliminates the old FormatManager and legacy SceneWorker classes.

@codecov-commenter
Copy link

Codecov Report

Attention: 166 lines in your changes are missing coverage. Please review.

Comparison is base (5f8340b) 10.24% compared to head (826d6a6) 10.27%.

Files Patch % Lines
src/lib/map/loader/util.ts 0.00% 73 Missing and 2 partials ⚠️
src/lib/map/loader/MapLoaderWorker.ts 0.00% 41 Missing and 5 partials ⚠️
src/lib/map/terrain/TerrainManager.ts 0.00% 24 Missing and 2 partials ⚠️
src/lib/map/MapManager.ts 0.00% 8 Missing ⚠️
src/lib/map/loader/MapLoader.ts 0.00% 8 Missing ⚠️
src/lib/map/DoodadManager.ts 0.00% 1 Missing ⚠️
src/lib/map/loader/const.ts 0.00% 1 Missing ⚠️
src/lib/map/loader/worker.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   10.24%   10.27%   +0.02%     
==========================================
  Files          44       40       -4     
  Lines        1483     1480       -3     
  Branches      270      265       -5     
==========================================
  Hits          152      152              
- Misses       1161     1162       +1     
+ Partials      170      166       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fallenoak fallenoak merged commit 86189e5 into main Jan 7, 2024
2 checks passed
@fallenoak fallenoak deleted the feat-map-move-map-loading-into-worker branch January 7, 2024 04:26
@github-actions github-actions bot mentioned this pull request Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants