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(model): move model loading into worker #30

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

fallenoak
Copy link
Member

This PR introduces an alternative SceneWorker implementation (expected to be bundled, not inlined), and sets up a ModelLoader built on top of SceneWorker to shift model loading off the main thread. Heavy model data like the vertex buffer and index buffer is flagged as transferable to avoid copies.

@codecov-commenter
Copy link

Codecov Report

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

Comparison is base (fac62a2) 14.59% compared to head (1fa411a) 13.36%.

Files Patch % Lines
src/lib/model/loader/ModelLoaderWorker.ts 0.00% 42 Missing and 2 partials ⚠️
src/lib/worker/SceneWorker.ts 0.00% 26 Missing and 6 partials ⚠️
src/lib/model/loader/util.ts 0.00% 16 Missing and 6 partials ⚠️
src/lib/worker/SceneWorkerController.ts 0.00% 18 Missing and 1 partial ⚠️
src/lib/model/ModelManager.ts 0.00% 14 Missing and 3 partials ⚠️
src/lib/model/types.ts 0.00% 11 Missing and 2 partials ⚠️
src/lib/model/shader/vertex.ts 0.00% 4 Missing and 4 partials ⚠️
src/lib/model/loader/ModelLoader.ts 0.00% 6 Missing ⚠️
src/lib/model/shader/fragment.ts 0.00% 3 Missing and 3 partials ⚠️
src/lib/AssetManager.ts 0.00% 4 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   14.59%   13.36%   -1.23%     
==========================================
  Files          33       41       +8     
  Lines        1357     1481     +124     
  Branches      253      272      +19     
==========================================
  Hits          198      198              
- Misses       1013     1118     +105     
- Partials      146      165      +19     

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

@fallenoak fallenoak merged commit 1b11362 into main Jan 6, 2024
2 checks passed
@fallenoak fallenoak deleted the feat-model-move-model-loading-into-worker branch January 6, 2024 04:22
@github-actions github-actions bot mentioned this pull request Jan 6, 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