-
Notifications
You must be signed in to change notification settings - Fork 10
Remove three.js types from public LoadSpec interface
#405
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
base: main
Are you sure you want to change the base?
Changes from all commits
241a5f8
4e982f3
cd5e2ab
424bd97
7113eba
e402f14
958f49a
32dbbd7
e7dbe5c
31b1970
c5fd64f
2e2fde5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ import type { | |
| WorkerResponsePayload, | ||
| } from "./types.js"; | ||
| import { WorkerEventType, WorkerMsgType, WorkerResponseResult } from "./types.js"; | ||
| import { rebuildLoadSpec } from "./util.js"; | ||
|
|
||
| type LoaderEntry = { loader: ThreadableVolumeLoader; copyOnLoad: boolean }; | ||
|
|
||
|
|
@@ -74,20 +73,20 @@ const messageHandlers: { [T in WorkerMsgType]: MessageHandler<T> } = { | |
| [WorkerMsgType.CREATE_VOLUME]: async (loadSpec, loaderId) => { | ||
| const { loader } = getLoader(loaderId); | ||
|
|
||
| return await loader.createImageInfo(rebuildLoadSpec(loadSpec)); | ||
| return await loader.createImageInfo(loadSpec); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this safe to do now because it now uses primitive types instead of the threejs classes?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep! All |
||
| }, | ||
|
|
||
| [WorkerMsgType.LOAD_DIMS]: async (loadSpec, loaderId) => { | ||
| const { loader } = getLoader(loaderId); | ||
| return await loader.loadDims(rebuildLoadSpec(loadSpec)); | ||
| return await loader.loadDims(loadSpec); | ||
| }, | ||
|
|
||
| [WorkerMsgType.LOAD_VOLUME_DATA]: ({ imageInfo, loadSpec, loadId }, loaderId) => { | ||
| const { loader, copyOnLoad } = getLoader(loaderId); | ||
|
|
||
| return loader.loadRawChannelData( | ||
| imageInfo, | ||
| rebuildLoadSpec(loadSpec), | ||
| loadSpec, | ||
| (imageInfo, loadSpec) => { | ||
| const message: WorkerResponse<WorkerMsgType> = { | ||
| responseResult: WorkerResponseResult.EVENT, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is there a place that is more "math utils"-like to put the regionToBox3 and box3toRegion functions?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's utils/num_utils.ts, but it seems to be geared more towards formatting numbers for display