@nebula-spatial/cad-loader 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +22 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1396 -1321
- package/dist/core/parser/bin-parser.d.ts +17 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +560 -551
- package/dist/loader/internal/external-variant-sidecar-fetch.d.ts +0 -1
- package/dist/loader/internal/geo-loader-pipeline.d.ts +2 -0
- package/dist/loader/internal/geo-node-builder.d.ts +1 -0
- package/dist/loader/internal/geo-prepare-worker-types.d.ts +1 -0
- package/dist/shared/text-builder.d.ts +25 -0
- package/dist/workers/geo-prepare.worker.js +1046 -973
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ export type FetchExternalVariantSidecarsOptions = {
|
|
|
5
5
|
readonly requiredVariantIds: readonly number[];
|
|
6
6
|
readonly fetchImpl?: typeof fetch;
|
|
7
7
|
readonly signal?: AbortSignal;
|
|
8
|
-
readonly concurrency?: number;
|
|
9
8
|
readonly onBuffer?: (variantId: number, buffer: ArrayBuffer) => void | Promise<void>;
|
|
10
9
|
};
|
|
11
10
|
export declare function fetchExternalVariantSidecars(options: FetchExternalVariantSidecarsOptions): Promise<{
|
|
@@ -45,6 +45,7 @@ export interface GeoLoaderPipelineAdapterInput {
|
|
|
45
45
|
externalVariantGeometryFetchIds?: ReadonlySet<number>;
|
|
46
46
|
deferExternalVariantGeometry?: boolean;
|
|
47
47
|
externalVariantDeltaOnly?: boolean;
|
|
48
|
+
cacheDocument?: boolean;
|
|
48
49
|
}
|
|
49
50
|
export interface GeoLoaderPipelineSession {
|
|
50
51
|
completion: Promise<void>;
|
|
@@ -81,6 +82,7 @@ export interface RunGeoLoaderPipelineOptions {
|
|
|
81
82
|
externalVariantGeometryFetchIds?: ReadonlySet<number>;
|
|
82
83
|
deferExternalVariantGeometry?: boolean;
|
|
83
84
|
externalVariantDeltaOnly?: boolean;
|
|
85
|
+
cacheDocument?: boolean;
|
|
84
86
|
appendExternalVariantDelta?: boolean;
|
|
85
87
|
onYield?: YieldCallback;
|
|
86
88
|
scheduler?: Partial<FrameBudgetSchedulerOptions>;
|
|
@@ -26,6 +26,7 @@ export interface BuildGeoNodeOptions {
|
|
|
26
26
|
externalVariantGeometryFetchIds?: ReadonlySet<number> | readonly number[];
|
|
27
27
|
deferExternalVariantGeometry?: boolean;
|
|
28
28
|
externalVariantDeltaOnly?: boolean;
|
|
29
|
+
cacheDocument?: boolean;
|
|
29
30
|
onFirstRenderableAppend?: () => void;
|
|
30
31
|
}
|
|
31
32
|
export declare function buildGeoNodeFromBuffer(node: GeoNode, buf: ArrayBuffer, onYield?: YieldCallback, options?: BuildGeoNodeOptions): Promise<void>;
|
|
@@ -26,6 +26,7 @@ export interface GeoPrepareParseRequest {
|
|
|
26
26
|
requiredExternalVariantIds?: number[];
|
|
27
27
|
externalVariantGeometryFetchIds?: number[];
|
|
28
28
|
externalVariantDeltaOnly?: boolean;
|
|
29
|
+
cacheDocument?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export interface GeoPrepareGrantMessage {
|
|
31
32
|
type: 'grant';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options accepted by Troika's global text builder configuration.
|
|
3
|
+
*
|
|
4
|
+
* This is intentionally a thin public surface over Troika. The configuration
|
|
5
|
+
* remains global to the module instance and must be supplied before the first
|
|
6
|
+
* font request. No defaults are applied here so an omitted configuration keeps
|
|
7
|
+
* Troika's original built-in behavior unchanged.
|
|
8
|
+
*/
|
|
9
|
+
export interface CadTextBuilderOptions {
|
|
10
|
+
readonly defaultFontURL?: string;
|
|
11
|
+
readonly unicodeFontsURL?: string;
|
|
12
|
+
readonly sdfGlyphSize?: number;
|
|
13
|
+
readonly sdfMargin?: number;
|
|
14
|
+
readonly sdfExponent?: number;
|
|
15
|
+
readonly textureWidth?: number;
|
|
16
|
+
readonly useWorker?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Configures the Troika text builder used by cad-loader.
|
|
20
|
+
*
|
|
21
|
+
* This function deliberately does not add its own lifecycle, retry, fallback,
|
|
22
|
+
* or per-viewer state. Troika remains responsible for its existing
|
|
23
|
+
* module-level, one-time configuration semantics.
|
|
24
|
+
*/
|
|
25
|
+
export declare function configureCadTextBuilder(options: CadTextBuilderOptions): void;
|