Skip to content

Commit

Permalink
feat(core): Add set/get PipelineWorkerUrl PipelinesBaseUrl
Browse files Browse the repository at this point in the history
In the future, this will be the global default for derived packages that
can override.
  • Loading branch information
thewtex committed Jan 24, 2023
1 parent d2c275e commit 97f4f76
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

export * from '../core/index.js'

export * from '../core/pipeline-worker-url.js'
export * from '../core/pipelines-base-url.js'

export { default as ReadImageResult } from '../io/ReadImageResult.js'
export { default as ReadMeshResult } from '../io/ReadMeshResult.js'

Expand Down
9 changes: 9 additions & 0 deletions src/core/pipeline-worker-url.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let pipelineWorkerUrl: string | URL | null | undefined

export function setPipelineWorkerUrl (workerUrl: string | URL | null): void {
pipelineWorkerUrl = workerUrl
}

export function getPipelineWorkerUrl (): string | URL | null | undefined {
return pipelineWorkerUrl
}
9 changes: 9 additions & 0 deletions src/core/pipelines-base-url.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let pipelinesBaseUrl: string | URL | undefined

export function setPipelinesBaseUrl (baseUrl: string | URL): void {
pipelinesBaseUrl = baseUrl
}

export function getPipelinesBaseUrl (): string | URL | undefined {
return pipelinesBaseUrl
}

0 comments on commit 97f4f76

Please sign in to comment.