@nebula-spatial/cad-loader 0.2.4 → 0.3.0
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 +5 -0
- package/dist/core/index.js +2 -1
- package/dist/core/parser/types.d.ts +2 -1
- package/dist/core/types.d.ts +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +775 -741
- package/dist/loader/internal/geo-node.d.ts +4 -0
- package/dist/render-resource/cad-render-node.d.ts +9 -0
- package/dist/session/cad-document-session.d.ts +8 -1
- package/dist/workers/geo-prepare.worker.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.3.0
|
|
6
|
+
|
|
7
|
+
- 新增图层批量可见性更新能力,并将一次批量操作合并为一次渲染资源刷新。
|
|
8
|
+
- CAD pack 文档元数据新增图纸单位,旧格式在未携带单位时保持兼容默认值。
|
|
9
|
+
|
|
5
10
|
## 0.2.4
|
|
6
11
|
|
|
7
12
|
- Expose `configureCadTextBuilder()` as an explicit pass-through to the package's Troika text builder.
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GeoMetaSnapshot, LayerBlockUsage, LayerSnapshot, TextEntity } from '../types';
|
|
1
|
+
import type { GeoMetaSnapshot, GeoMetaUnits, LayerBlockUsage, LayerSnapshot, TextEntity } from '../types';
|
|
2
2
|
type ParsedHeaderCounts = Pick<GeoMetaSnapshot, 'entityCount' | 'lineCount' | 'fillCount' | 'dotCount' | 'textCount'>;
|
|
3
3
|
export interface InsertRuntimeGeometry {
|
|
4
4
|
readonly count: number;
|
|
@@ -43,6 +43,7 @@ export interface ParsedHeader {
|
|
|
43
43
|
readonly layerBlockUsages?: ReadonlyMap<number, readonly LayerBlockUsage[]>;
|
|
44
44
|
readonly insertRuntime?: InsertRuntime;
|
|
45
45
|
readonly promotedInsertInstanceIds?: readonly number[];
|
|
46
|
+
readonly units?: GeoMetaUnits;
|
|
46
47
|
}
|
|
47
48
|
export interface GeoGeometrySegment {
|
|
48
49
|
readonly startVertex: number;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export interface GeoMeta {
|
|
|
116
116
|
instance_count?: number;
|
|
117
117
|
layers: LayerMeta[];
|
|
118
118
|
texts: readonly TextEntity[];
|
|
119
|
+
units?: GeoMetaUnits;
|
|
119
120
|
}
|
|
120
121
|
export type PackEncoding = 'flat' | 'instanced' | 'nested_instanced' | 'nested_instanced_external' | 'nested_instanced_external_annotations';
|
|
121
122
|
export interface GeoMetaSnapshot {
|
|
@@ -145,3 +146,8 @@ export interface ViewportRect {
|
|
|
145
146
|
maxX: number;
|
|
146
147
|
maxY: number;
|
|
147
148
|
}
|
|
149
|
+
export interface GeoMetaUnits {
|
|
150
|
+
readonly source?: string;
|
|
151
|
+
readonly scale_to_meters?: number;
|
|
152
|
+
readonly scaleToMeters?: number;
|
|
153
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type { ColorPipelineStatsSnapshot, GeoNodeChange, GeoNodeChangeKind, GeoN
|
|
|
14
14
|
export type { LineMemoryStatsSnapshot, LineCanonicalMemoryStats, } from './loader/internal/line-canonical';
|
|
15
15
|
export { readBlockAnnotationSidecar, readSceneAnnotationSidecar, } from './core';
|
|
16
16
|
export type { DecodedAnnotationSidecar, DxbsContainer, DxbsSectionEntry, ParsedHeader, } from './core';
|
|
17
|
-
export type { BlockInstanceBBox, BlockVariantMeta, ExternalAnnotationsManifest, ExternalAnnotationStats, ExternalBlockVariantManifestEntry, ExternalGeometryStats, ExternalSceneAnnotationManifestEntry, GeoGroup, GeoMeta, GeoMetaFeatures, GeoMetaSnapshot, GeoLoadSource, InsertUsage, LayerBlockUsage, LayerMeta, LayerSnapshot, LayerVertexChunk, LayerVertexStat, LineRenderMode, PackEncoding, ParsedGeoPayload, RenderDebugBreakdownEntry, SceneStats, SplitBlockLayerDetail, TextEntity, ViewportRect, } from './shared/types';
|
|
17
|
+
export type { BlockInstanceBBox, BlockVariantMeta, ExternalAnnotationsManifest, ExternalAnnotationStats, ExternalBlockVariantManifestEntry, ExternalGeometryStats, ExternalSceneAnnotationManifestEntry, GeoGroup, GeoMeta, GeoMetaUnits, GeoMetaFeatures, GeoMetaSnapshot, GeoLoadSource, InsertUsage, LayerBlockUsage, LayerMeta, LayerSnapshot, LayerVertexChunk, LayerVertexStat, LineRenderMode, PackEncoding, ParsedGeoPayload, RenderDebugBreakdownEntry, SceneStats, SplitBlockLayerDetail, TextEntity, ViewportRect, } from './shared/types';
|
|
18
18
|
export { expandViewportRect, mergeViewportRects, viewportRectContains, viewportRectIntersects, } from './shared/utils/viewport-rect';
|
|
19
19
|
export { transformBBoxByInstance } from './shared/utils/insert-bbox';
|
|
20
20
|
export type { InsertInstanceTransform } from './shared/utils/insert-bbox';
|
|
@@ -31,6 +31,6 @@ export type { CadTextDetails, CadTextPickOptions, CadTextSelection, CadTextSelec
|
|
|
31
31
|
export { CAD_SESSION_PHASES } from './session/cad-document-session';
|
|
32
32
|
export { createCadDocumentSession, getCadDocumentRenderResource } from './session/create-cad-document-session';
|
|
33
33
|
export { formatCadInsertId, parseCadInsertId } from './session/cad-insert-id';
|
|
34
|
-
export type { CadDisplayContext, CadDocumentHeader, CadDocumentSession, CadDocumentSessionOptions, CadFontResolver, CadInsertUsageSummary, CadLayerMeta, CadSessionEventMap, CadSessionLoadTiming, CadSessionPhase, CadViewportDemand, CadViewportRect, CadVisibilityFilter, CadWorldBounds, CadWorldPoint, } from './session/cad-document-session';
|
|
34
|
+
export type { CadDisplayContext, CadDocumentHeader, CadDocumentUnits, CadDocumentSession, CadDocumentSessionOptions, CadFontResolver, CadInsertUsageSummary, CadLayerMeta, CadSessionEventMap, CadSessionLoadTiming, CadSessionPhase, CadViewportDemand, CadViewportRect, CadVisibilityFilter, CadWorldBounds, CadWorldPoint, } from './session/cad-document-session';
|
|
35
35
|
export { CAD_RENDER_NODE_EDIT_METHODS, isCadRenderNodeEditMethod } from './render-resource/cad-render-node';
|
|
36
36
|
export type { CadInsertPreviewResource, CadRenderContentChunk, CadRenderNode, } from './render-resource/cad-render-node';
|