@ifc-lite/wasm 9.2.0 → 9.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/package.json +1 -1
- package/pkg/ifc-lite.d.ts +220 -0
- package/pkg/ifc-lite.js +481 -0
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -11,6 +11,127 @@ export interface RtcFrame {
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
export interface LandXmlTinDocumentJs {
|
|
15
|
+
format: "landxml";
|
|
16
|
+
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2";
|
|
17
|
+
capabilities: { renderable_tin: boolean; preserved_only_surfaces: number; unknown_extensions: number };
|
|
18
|
+
version: string;
|
|
19
|
+
/** serde_wasm_bindgen omits an absent Rust Option field rather than serializing null. `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit`, never from a declared LandXML/Units element (#5175). */
|
|
20
|
+
units?: { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean };
|
|
21
|
+
surfaces: LandXmlSurfaceJs[];
|
|
22
|
+
pipe_networks?: LandXmlPipeNetworkDocumentJs;
|
|
23
|
+
extensions: LandXmlExtensionJs[];
|
|
24
|
+
warnings: string[];
|
|
25
|
+
alignments: LandXmlAlignmentSummaryJs[]; profiles: LandXmlProfileJs[];
|
|
26
|
+
cross_sections: LandXmlCrossSectionJs[]; cross_section_surfaces: LandXmlCrossSectionSurfaceJs[];
|
|
27
|
+
roadways: LandXmlRoadwayJs[]; capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
|
|
28
|
+
preserved_only_extensions: LandXmlPreservedOnlyExtensionJs[];
|
|
29
|
+
/** COGO, parcel and plan-feature records from the same source bytes. */
|
|
30
|
+
plan: LandXmlPlanDocumentJs;
|
|
31
|
+
}
|
|
32
|
+
export interface LandXmlPlanDocumentJs {
|
|
33
|
+
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
|
|
34
|
+
capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
|
|
35
|
+
area_unit?: string; area_scale_to_square_meters?: number;
|
|
36
|
+
cogo_points: LandXmlCgPointJs[]; monuments: LandXmlMonumentJs[];
|
|
37
|
+
plan_features: LandXmlPlanFeatureJs[]; parcels: LandXmlParcelJs[]; warnings: string[];
|
|
38
|
+
source_batches: LandXmlPlanSourceBatchJs[]; parcel_probes: LandXmlParcelProbeJs[];
|
|
39
|
+
resolved_monuments: LandXmlResolvedMonumentJs[]; resolved_geometry: LandXmlResolvedGeometryJs[];
|
|
40
|
+
}
|
|
41
|
+
export interface LandXmlPlanSourceBatchJs { source_ids: string[]; }
|
|
42
|
+
export interface LandXmlParcelProbeJs { source_id: string; state: { kind: "analytic" } | { kind: "preserved_only"; reason: string }; perimeter_in_declared_linear_units?: number; area_in_declared_square_units?: number; declared_area?: number; declared_perimeter?: number; perimeter_in_meters?: number; area_in_square_meters?: number; }
|
|
43
|
+
export interface LandXmlResolvedMonumentJs { source_id: string; point?: LandXmlPlanPointJs; }
|
|
44
|
+
export interface LandXmlResolvedGeometryJs { source_id: string; start?: LandXmlPlanPointJs; end?: LandXmlPlanPointJs; center?: LandXmlPlanPointJs; pi?: LandXmlPlanPointJs; }
|
|
45
|
+
export interface LandXmlPlanPointJs { northing: number; easting: number; elevation?: number; }
|
|
46
|
+
export interface LandXmlCgPointJs { source_id: string; scope_id: string; ordinal: number; name?: string; code?: string; description?: string; point?: LandXmlPlanPointJs; pnt_ref?: string; properties: Record<string, string>; }
|
|
47
|
+
export interface LandXmlMonumentJs { source_id: string; point_scope_id?: string; ordinal: number; name?: string; code?: string; description?: string; pnt_ref?: string; point?: LandXmlPlanPointJs; properties: Record<string, string>; }
|
|
48
|
+
export interface LandXmlPlanFeatureJs { source_id: string; ordinal: number; name?: string; code?: string; description?: string; properties: Record<string, string>; locations: LandXmlPlanPointLocationJs[]; geometry: LandXmlPlanGeometryJs[]; }
|
|
49
|
+
export interface LandXmlParcelJs { source_id: string; ordinal: number; name?: string; code?: string; description?: string; title?: string; declared_area?: number; declared_perimeter?: number; declared_area_unit?: string; properties: Record<string, string>; loops: LandXmlPlanGeometryJs[][]; preservation_reason?: string; }
|
|
50
|
+
export interface LandXmlPlanGeometryJs { source_id: string; ordinal: number; kind: "line" | "curve" | "irregular_line"; point_scope_id?: string; start: LandXmlPlanPointLocationJs; end: LandXmlPlanPointLocationJs; center?: LandXmlPlanPointLocationJs; pi?: LandXmlPlanPointLocationJs; intermediate_points: LandXmlPlanPointJs[]; rotation?: string; radius?: number; declared_length?: number; properties: Record<string, string>; }
|
|
51
|
+
export type LandXmlPlanPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs; pnt_ref?: string } | { kind: "point_reference"; pnt_ref: string };
|
|
52
|
+
export interface LandXmlSurfaceJs {
|
|
53
|
+
source_id: string; ordinal: number; source_path: string;
|
|
54
|
+
properties: Record<string, string>; definition_properties: Record<string, string>;
|
|
55
|
+
name: string; kind: "tin" | "grid" | "volume" | "other";
|
|
56
|
+
render_state: "rendered" | "preserved_only" | "unsupported";
|
|
57
|
+
topology_origin: "authored_faces" | "constrained_triangulation" | "preserved_only";
|
|
58
|
+
terrain_diagnostic?: { code: "missing_outer_boundary" | "unsupported_boundary_semantics" | "unsupported_breakline_semantics" | "missing_elevation" | "conflicting_elevation" | "intersecting_constraints" | "degenerate_constraints" | "work_limit_exceeded" | "cancelled"; message: string };
|
|
59
|
+
points: LandXmlPointJs[]; canonical_vertices: LandXmlCanonicalVertexJs[]; source_data_points: LandXmlSourcePointJs[];
|
|
60
|
+
faces: [string, string, string][]; face_source_ids: string[]; face_visibility: boolean[];
|
|
61
|
+
hidden_face_count: number; boundaries: LandXmlPolylineJs[]; breaklines: LandXmlPolylineJs[]; contours: LandXmlPolylineJs[];
|
|
62
|
+
}
|
|
63
|
+
export interface LandXmlPointJs { source_id: string; id: string; northing: number; easting: number; elevation: number; }
|
|
64
|
+
export interface LandXmlCanonicalVertexJs { id: string; northing: number; easting: number; elevation: number; contributor_source_ids: string[]; }
|
|
65
|
+
export interface LandXmlSourcePointJs { source_id: string; ordinal: number; source_path: string; coordinate_dimension: 2 | 3; coordinates: number[]; }
|
|
66
|
+
/** serde_wasm_bindgen omits absent Rust Option fields rather than serializing null. */
|
|
67
|
+
export interface LandXmlPolylineJs { source_id: string; ordinal: number; name?: string; kind?: string; source_path: string; properties: Record<string, string>; coordinate_dimension: 2 | 3; points: number[][]; point_source_ids: string[]; }
|
|
68
|
+
export interface LandXmlExtensionJs { namespace: string; local_name: string; path: string; }
|
|
69
|
+
export interface LandXmlSourceDocumentJs { tin: LandXmlTinDocumentJs; alignments: LandXmlAlignmentDocumentJs; alignment_render_spans: LandXmlAlignmentRenderSpanJs[]; alignment_render_refusals: LandXmlAlignmentRenderRefusalJs[]; alignment_render_truncated: boolean; }
|
|
70
|
+
export interface LandXmlAlignmentRenderSpanJs { source_id: string; points: LandXmlPlanPointJs[]; }
|
|
71
|
+
export interface LandXmlAlignmentRenderRefusalJs { source_id: string; message: string; }
|
|
72
|
+
export interface LandXmlAlignmentDocumentJs {
|
|
73
|
+
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
|
|
74
|
+
capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
|
|
75
|
+
units?: LandXmlUnitsJs; alignments: LandXmlAlignmentJs[]; warnings: string[];
|
|
76
|
+
}
|
|
77
|
+
/** `assumed` is true only when these units came from `LandXmlParseOptionsJs.assumedLinearUnit`, never from a declared LandXML/Units element (#5175). */
|
|
78
|
+
export interface LandXmlUnitsJs { linear_unit: string; elevation_unit: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; assumed: boolean; }
|
|
79
|
+
/** Terrain-parser alignment linkage; use LandXmlAlignmentDocumentJs for complete alignment semantics. */
|
|
80
|
+
export interface LandXmlAlignmentSummaryJs { source_id: string; ordinal: number; name: string; length: number; sta_start: number; profile_source_ids: string[]; cross_section_source_ids: string[]; }
|
|
81
|
+
export interface LandXmlAlignmentJs { source_id: string; ordinal: number; name: string; length: number; sta_start: number; start?: LandXmlPointLocationJs; align_pis: LandXmlAlignmentPiJs[]; segments: LandXmlAlignmentSegmentJs[]; station_equations: LandXmlStationEquationJs[]; cant?: LandXmlCantJs; superelevations: LandXmlSuperelevationJs[]; unsupported_transitions: LandXmlUnsupportedTransitionJs[]; }
|
|
82
|
+
export type LandXmlPointLocationJs = { kind: "coordinates"; point: LandXmlPlanPointJs } | { kind: "point_reference"; pnt_ref: string };
|
|
83
|
+
export interface LandXmlAlignmentPiJs { source_id: string; location: LandXmlPointLocationJs; }
|
|
84
|
+
export type LandXmlAlignmentSegmentJs = { source_id: string; ordinal: number; primitive: LandXmlAlignmentPrimitiveJs };
|
|
85
|
+
export interface LandXmlSpiralJs { start: LandXmlPointLocationJs; pi: LandXmlPointLocationJs; end: LandXmlPointLocationJs; spi_type: string; radius_start: LandXmlRadiusJs; radius_end: LandXmlRadiusJs; rotation: "clockwise" | "counter_clockwise"; declared_length: number; }
|
|
86
|
+
export type LandXmlAlignmentPrimitiveJs = { kind: "line"; start: LandXmlPointLocationJs; end: LandXmlPointLocationJs; declared_length?: number } | { kind: "irregular_line"; start: LandXmlPointLocationJs; end: LandXmlPointLocationJs; points: LandXmlPlanPointJs[]; declared_length?: number } | { kind: "curve"; start: LandXmlPointLocationJs; center: LandXmlPointLocationJs; end: LandXmlPointLocationJs; pi?: LandXmlPointLocationJs; rotation: "clockwise" | "counter_clockwise"; radius?: number; declared_length?: number } | ({ kind: "spiral" } & LandXmlSpiralJs) | ({ kind: "unsupported_spiral" } & LandXmlSpiralJs);
|
|
87
|
+
export type LandXmlRadiusJs = { finite: number } | "infinite";
|
|
88
|
+
export interface LandXmlStationEquationJs { source_id: string; sta_internal: number; sta_ahead: number; sta_back?: number; sta_increment?: string; }
|
|
89
|
+
export interface LandXmlCantJs { source_id: string; name: string; gauge: number; rotation_point?: string; equilibrium_constant?: number; applied_cant_constant?: number; stations: LandXmlCantStationJs[]; speed_stations: LandXmlSpeedStationJs[]; }
|
|
90
|
+
export interface LandXmlCantStationJs { source_id: string; station: number; applied_cant: number; equilibrium_cant?: number; curvature: "clockwise" | "counter_clockwise"; cant_deficiency?: number; cant_excess?: number; rate_of_change_of_applied_cant_over_time?: number; rate_of_change_of_applied_cant_over_length?: number; rate_of_change_of_cant_deficiency_over_time?: number; cant_gradient?: number; speed?: number; transition_type?: string; adverse?: boolean; }
|
|
91
|
+
export interface LandXmlSpeedStationJs { source_id: string; station: number; speed: number; }
|
|
92
|
+
export interface LandXmlSuperelevationJs { source_id: string; sta_start?: number; sta_end?: number; events: LandXmlSuperelevationEventJs[]; }
|
|
93
|
+
export interface LandXmlSuperelevationEventJs { source_id: string; kind: string; value?: string; }
|
|
94
|
+
/** `spiral` is the Rust LandXmlSpiral payload, not a tagged primitive enum. */
|
|
95
|
+
export interface LandXmlUnsupportedTransitionJs { source_id: string; spi_type: string; spiral: LandXmlSpiralJs; reason: string; }
|
|
96
|
+
export interface LandXmlAlignmentProbeJs { alignment_source_id: string; segment_source_id: string; geometric_distance: number; station: { geometric_distance: number; displayed_back: number; displayed_ahead: number; is_equation_boundary: boolean }; northing: number; easting: number; tangent_northing: number; tangent_easting: number; }
|
|
97
|
+
export type LandXmlAlignmentProbesJs = LandXmlAlignmentProbeJs[];
|
|
98
|
+
/** Neighbouring authored CantStation records; values are never interpolated. */
|
|
99
|
+
export interface LandXmlAlignmentInspectionJs { cant?: { internal_station: number; station: { geometric_distance: number; displayed_back: number; displayed_ahead: number; is_equation_boundary: boolean }; previous?: LandXmlCantStationJs; next?: LandXmlCantStationJs }; superelevations: LandXmlSuperelevationJs[]; superelevation_block_count: number; superelevation_event_count: number; superelevation_truncated: boolean; }
|
|
100
|
+
/** `assumedLinearUnit`: see #5175. Accepts the same tokens a declared `<Units linearUnit="...">` accepts (e.g. `"meter"`, `"foot"`, `"USSurveyFoot"`); an unknown token refuses rather than defaulting to meters. Ignored, with a warning, when the source declares its own `<Units>`. */
|
|
101
|
+
export interface LandXmlParseOptionsJs { maxBytes?: number; maxDepth?: number; maxTextBytes?: number; maxPoints?: number; maxFaces?: number; maxWork?: number; maxAlignments?: number; maxAlignmentSegments?: number; maxAlignmentPoints?: number; maxStationEquations?: number; maxCantStations?: number; maxSuperelevationEvents?: number; assumedLinearUnit?: string; cancelled?: boolean; }
|
|
102
|
+
export interface LandXmlProfilePointJs { source_id: string; station: number; elevation?: number; }
|
|
103
|
+
export interface LandXmlGradeLineJs { source_id: string; parent_profile_source_id: string; ordinal: number; points: LandXmlProfilePointJs[]; }
|
|
104
|
+
export interface LandXmlVerticalCurveJs { source_id: string; parent_profile_source_id: string; kind: "parabolic" | "unsymmetrical_parabolic" | "circular"; station: number; elevation?: number; length?: number; length_in?: number; length_out?: number; radius?: number; }
|
|
105
|
+
export interface LandXmlProfileJs { source_id: string; parent_alignment_source_id: string; ordinal: number; name: string; kind: "design" | "sampled"; pvis: LandXmlProfilePointJs[]; vertical_curves: LandXmlVerticalCurveJs[]; grade_lines: LandXmlGradeLineJs[]; }
|
|
106
|
+
export interface LandXmlCrossSectionJs { source_id: string; parent_alignment_source_id: string; ordinal: number; station: number; surface_source_ids: string[]; }
|
|
107
|
+
export interface LandXmlCrossSectionPointJs { source_id: string; data_format: "offset_elevation" | "slope_distance"; offset?: number; elevation?: number; slope?: number; distance?: number; pnt_ref?: string; alignment_ref?: string; align_ref_station?: number; alignment_source_id?: string; plan_feature_ref?: string; plan_feature_ref_station?: number; parcel_ref?: string; parcel_ref_station?: number; }
|
|
108
|
+
export interface LandXmlCrossSectionSegmentJs { source_id: string; parent_surface_source_id: string; ordinal: number; points: LandXmlCrossSectionPointJs[]; }
|
|
109
|
+
export interface LandXmlCrossSectionSurfaceJs { source_id: string; parent_cross_section_source_id: string; kind: "sampled" | "design"; name?: string; segments: LandXmlCrossSectionSegmentJs[]; points: LandXmlCrossSectionPointJs[]; }
|
|
110
|
+
export interface LandXmlRoadwayJs { source_id: string; ordinal: number; name: string; alignment_refs: string[]; alignment_source_ids: string[]; surface_refs: string[]; surface_source_ids: string[]; grade_model_refs: string[]; }
|
|
111
|
+
export interface LandXmlCapabilityDiagnosticJs { code: string; source_id?: string; source_path: string; message: string; }
|
|
112
|
+
export interface LandXmlPreservedOnlyExtensionJs { source_id: string; parent_source_id?: string; local_name: string; source_path: string; kind: "corridor" | "string_line"; }
|
|
113
|
+
export interface LandXmlPipeUnitsJs { linear_unit: string; elevation_unit: string; diameter_unit: string; width_unit: string; height_unit: string; flow_unit?: string; linear_scale_to_meters: number; elevation_scale_to_meters: number; diameter_scale_to_meters: number; width_scale_to_meters: number; height_scale_to_meters: number; }
|
|
114
|
+
export interface LandXmlPipeNetworkDocumentJs {
|
|
115
|
+
schema: "LandXML-1.0" | "LandXML-1.1" | "LandXML-1.2"; version: string;
|
|
116
|
+
capability_diagnostics: LandXmlCapabilityDiagnosticJs[];
|
|
117
|
+
root_units?: LandXmlPipeUnitsJs; collections: LandXmlPipeCollectionJs[];
|
|
118
|
+
features: LandXmlPipeFeatureJs[]; networks: LandXmlPipeNetworkJs[]; refusals: LandXmlPipeRefusalJs[];
|
|
119
|
+
}
|
|
120
|
+
export interface LandXmlPipeCollectionJs { source_id: string; source_path: string; properties: Record<string, string>; }
|
|
121
|
+
export interface LandXmlPipeFeatureJs { source_id: string; source_path: string; owner_source_id: string; properties: Record<string, string>; }
|
|
122
|
+
export interface LandXmlPipeRefusalJs { source_id: string; source_path: string; code: string; message: string; }
|
|
123
|
+
export interface LandXmlPipeMeasureJs { value: number; unit: string; meters: number; }
|
|
124
|
+
export interface LandXmlPipePositionJs { northing: number; easting: number; northing_meters: number; easting_meters: number; elevation?: LandXmlPipeMeasureJs; }
|
|
125
|
+
export interface LandXmlPipeFlowJs { source_id: string; source_path: string; unit?: string; flow_in?: number; loss_in?: number; loss_out?: number; properties: Record<string, string>; }
|
|
126
|
+
export interface LandXmlPipeInvertJs { source_id: string; source_path: string; pipe_source_id: string; flow_direction: string; elevation: LandXmlPipeMeasureJs; properties: Record<string, string>; }
|
|
127
|
+
export interface LandXmlPipePartJs { kind: "circular" | "elliptical" | "egg" | "rectangular"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; span?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; height?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
|
|
128
|
+
export interface LandXmlStructurePartJs { kind: "circular" | "rectangular" | "inlet" | "outlet" | "connection"; properties: Record<string, string>; diameter?: LandXmlPipeMeasureJs; length?: LandXmlPipeMeasureJs; width?: LandXmlPipeMeasureJs; thickness?: LandXmlPipeMeasureJs; material?: string; }
|
|
129
|
+
export interface LandXmlPipeNetworkJs { source_id: string; source_path: string; name: string; pipe_network_type: string; properties: Record<string, string>; features: LandXmlPipeFeatureJs[]; structure_units?: LandXmlPipeUnitsJs; pipe_units?: LandXmlPipeUnitsJs; structures: LandXmlPipeStructureJs[]; pipes: LandXmlPipeJs[]; }
|
|
130
|
+
export interface LandXmlPipeStructureJs { source_id: string; source_path: string; name: string; properties: Record<string, string>; units: LandXmlPipeUnitsJs; center: LandXmlPipePositionJs; part: LandXmlStructurePartJs; rim_elevation?: LandXmlPipeMeasureJs; sump_elevation?: LandXmlPipeMeasureJs; inverts: LandXmlPipeInvertJs[]; flow?: LandXmlPipeFlowJs; }
|
|
131
|
+
export interface LandXmlPipeJs { source_id: string; source_path: string; name: string; properties: Record<string, string>; units: LandXmlPipeUnitsJs; connectivity: { start_structure_source_id: string; end_structure_source_id: string }; part: LandXmlPipePartJs; geometry: { kind: "straight" | "pass_through"; point?: LandXmlPipePositionJs }; length?: LandXmlPipeMeasureJs; flow?: LandXmlPipeFlowJs; }
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
14
135
|
/**
|
|
15
136
|
* The overlap solid of one clashing pair, or the reason there is none.
|
|
16
137
|
*/
|
|
@@ -343,6 +464,17 @@ export class IfcAPI {
|
|
|
343
464
|
* Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
|
|
344
465
|
*/
|
|
345
466
|
clearPrePassCache(): void;
|
|
467
|
+
/**
|
|
468
|
+
* Starts one owned raw-byte LandXML session. The caller must free or abort
|
|
469
|
+
* the session on every cancellation path.
|
|
470
|
+
*
|
|
471
|
+
* `options` is the same shape `parseLandXmlSourceBytesWithOptions`
|
|
472
|
+
* accepts (see `LandXmlParseOptionsJs`) and is optional so every
|
|
473
|
+
* existing single-argument call site keeps working unchanged. A bad
|
|
474
|
+
* `assumedLinearUnit` token (or any other invalid option) refuses here,
|
|
475
|
+
* at session construction, never partway through a stream (#5175).
|
|
476
|
+
*/
|
|
477
|
+
createLandXmlTinStreamSession(max_bytes: number, options?: LandXmlParseOptionsJs | null): LandXmlTinStreamSession;
|
|
346
478
|
/**
|
|
347
479
|
* Run geometry extraction on `content` and return its typed CSG / opening
|
|
348
480
|
* diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
|
|
@@ -611,6 +743,12 @@ export class IfcAPI {
|
|
|
611
743
|
* the degenerate-backstop drop count, and the CSG failure aggregates.
|
|
612
744
|
*/
|
|
613
745
|
getPipelineDiagnostics(): any;
|
|
746
|
+
/**
|
|
747
|
+
* Inspect authored cant and superelevation records at a physical distance.
|
|
748
|
+
* Cant exposes bracketing source records only; no transition value is
|
|
749
|
+
* fabricated. Superelevation blocks preserve their authored bounds.
|
|
750
|
+
*/
|
|
751
|
+
inspectLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number): LandXmlAlignmentInspectionJs;
|
|
614
752
|
/**
|
|
615
753
|
* Create and initialize the IFC API
|
|
616
754
|
*/
|
|
@@ -654,6 +792,27 @@ export class IfcAPI {
|
|
|
654
792
|
* Parse grid line vertices in the exact frame selected by the mesh pre-pass.
|
|
655
793
|
*/
|
|
656
794
|
parseGridLinesInFrame(content: string, frame: RtcFrame): Float32Array;
|
|
795
|
+
/**
|
|
796
|
+
* Parse all currently supported LandXML source families from the original
|
|
797
|
+
* bytes. Terrain-only and alignment-only sources both return an honest
|
|
798
|
+
* empty sibling collection, allowing the viewer's single load path to
|
|
799
|
+
* handle either form and mixed documents uniformly.
|
|
800
|
+
*/
|
|
801
|
+
parseLandXmlSourceBytes(data: Uint8Array): LandXmlSourceDocumentJs;
|
|
802
|
+
/**
|
|
803
|
+
* Parse a source with explicit hostile-input bounds. Passing
|
|
804
|
+
* `cancelled: true` refuses before entering WASM; in-flight browser
|
|
805
|
+
* cancellation is performed by terminating the worker that owns this
|
|
806
|
+
* synchronous operation.
|
|
807
|
+
*/
|
|
808
|
+
parseLandXmlSourceBytesWithOptions(data: Uint8Array, options: any): LandXmlSourceDocumentJs;
|
|
809
|
+
/**
|
|
810
|
+
* Parse a supported LandXML TIN document from its original bytes.
|
|
811
|
+
*
|
|
812
|
+
* The object is an owned serialization of the semantic document. Errors
|
|
813
|
+
* deliberately use `LandXmlError::Display`, including its stable LXML code.
|
|
814
|
+
*/
|
|
815
|
+
parseLandXmlTinBytes(data: Uint8Array): LandXmlTinDocumentJs;
|
|
657
816
|
/**
|
|
658
817
|
* Parse IFC file and extract symbolic representations (Plan,
|
|
659
818
|
* Annotation, FootPrint, Axis). These are 2D curves used for
|
|
@@ -734,6 +893,19 @@ export class IfcAPI {
|
|
|
734
893
|
* report (convertible paths, omissions with extent, exact/raster-only).
|
|
735
894
|
*/
|
|
736
895
|
preparePdfVectorPage(request_json: string): Uint8Array;
|
|
896
|
+
/**
|
|
897
|
+
* Evaluate one supported horizontal-alignment source span at an exact
|
|
898
|
+
* f64 distance. The binding reuses the native validator, so malformed
|
|
899
|
+
* deserialized records, discontinuities, unresolved references, and
|
|
900
|
+
* unsupported transition domains are rejected rather than approximated.
|
|
901
|
+
*/
|
|
902
|
+
probeLandXmlAlignmentAtDistance(data: Uint8Array, alignment_source_id: string, distance: number, offset_right: number): LandXmlAlignmentProbeJs;
|
|
903
|
+
/**
|
|
904
|
+
* Evaluate a bounded set of physical locations carrying a displayed
|
|
905
|
+
* station label. A duplicate label is real, never collapsed; an
|
|
906
|
+
* excessive number is refused rather than allocated synchronously.
|
|
907
|
+
*/
|
|
908
|
+
probeLandXmlAlignmentAtStation(data: Uint8Array, alignment_source_id: string, station: number, offset_right: number): LandXmlAlignmentProbesJs;
|
|
737
909
|
/**
|
|
738
910
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
739
911
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -1060,6 +1232,37 @@ export class IfcAPI {
|
|
|
1060
1232
|
readonly version: string;
|
|
1061
1233
|
}
|
|
1062
1234
|
|
|
1235
|
+
export class LandXmlTinStreamSession {
|
|
1236
|
+
private constructor();
|
|
1237
|
+
free(): void;
|
|
1238
|
+
[Symbol.dispose](): void;
|
|
1239
|
+
abort(): void;
|
|
1240
|
+
advanceChunk(data: Uint8Array): void;
|
|
1241
|
+
/**
|
|
1242
|
+
* Drain only after the renderer has credited this many transport bytes.
|
|
1243
|
+
*/
|
|
1244
|
+
drain(max_bytes: number): any;
|
|
1245
|
+
finish(): any;
|
|
1246
|
+
/**
|
|
1247
|
+
* Start the resumable metadata cursor. Consumers must continue draining
|
|
1248
|
+
* until [`Self::output_pending`] is false, then abort/free the session.
|
|
1249
|
+
*/
|
|
1250
|
+
finishCursor(): void;
|
|
1251
|
+
header(): any;
|
|
1252
|
+
/**
|
|
1253
|
+
* Whether the host must grant more credited output drain capacity.
|
|
1254
|
+
*/
|
|
1255
|
+
outputPending(): boolean;
|
|
1256
|
+
/**
|
|
1257
|
+
* Exact serialized transport bytes currently retained by the Rust queue.
|
|
1258
|
+
*/
|
|
1259
|
+
queuedBytes(): number;
|
|
1260
|
+
/**
|
|
1261
|
+
* Complete credited transport records currently retained by the Rust queue.
|
|
1262
|
+
*/
|
|
1263
|
+
queuedEvents(): number;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1063
1266
|
/**
|
|
1064
1267
|
* Collection of mesh data for returning multiple meshes
|
|
1065
1268
|
*/
|
|
@@ -2095,6 +2298,7 @@ export interface InitOutput {
|
|
|
2095
2298
|
readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
|
|
2096
2299
|
readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
|
|
2097
2300
|
readonly __wbg_ifcapi_free: (a: number, b: number) => void;
|
|
2301
|
+
readonly __wbg_landxmltinstreamsession_free: (a: number, b: number) => void;
|
|
2098
2302
|
readonly __wbg_meshcollection_free: (a: number, b: number) => void;
|
|
2099
2303
|
readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
|
|
2100
2304
|
readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
|
|
@@ -2156,6 +2360,7 @@ export interface InitOutput {
|
|
|
2156
2360
|
readonly ifcapi_calibrateAppearancePlane: (a: number, b: number, c: number, d: number) => void;
|
|
2157
2361
|
readonly ifcapi_catalogAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2158
2362
|
readonly ifcapi_clearPrePassCache: (a: number) => void;
|
|
2363
|
+
readonly ifcapi_createLandXmlTinStreamSession: (a: number, b: number, c: number, d: number) => void;
|
|
2159
2364
|
readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
|
|
2160
2365
|
readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
2161
2366
|
readonly ifcapi_exportDfjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -2176,6 +2381,7 @@ export interface InitOutput {
|
|
|
2176
2381
|
readonly ifcapi_finalizePrepassStylesFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number) => void;
|
|
2177
2382
|
readonly ifcapi_getMemory: (a: number) => number;
|
|
2178
2383
|
readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
|
|
2384
|
+
readonly ifcapi_inspectLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2179
2385
|
readonly ifcapi_is_ready: (a: number) => number;
|
|
2180
2386
|
readonly ifcapi_new: () => number;
|
|
2181
2387
|
readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
|
|
@@ -2184,6 +2390,9 @@ export interface InitOutput {
|
|
|
2184
2390
|
readonly ifcapi_parseGridAxesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2185
2391
|
readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
|
|
2186
2392
|
readonly ifcapi_parseGridLinesInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2393
|
+
readonly ifcapi_parseLandXmlSourceBytes: (a: number, b: number, c: number, d: number) => void;
|
|
2394
|
+
readonly ifcapi_parseLandXmlSourceBytesWithOptions: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2395
|
+
readonly ifcapi_parseLandXmlTinBytes: (a: number, b: number, c: number, d: number) => void;
|
|
2187
2396
|
readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
|
|
2188
2397
|
readonly ifcapi_parseSymbolicRepresentationsInFrame: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2189
2398
|
readonly ifcapi_planAnnotationPlane: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -2194,6 +2403,8 @@ export interface InitOutput {
|
|
|
2194
2403
|
readonly ifcapi_planPdfFillAnnotation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2195
2404
|
readonly ifcapi_planPointTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void;
|
|
2196
2405
|
readonly ifcapi_preparePdfVectorPage: (a: number, b: number, c: number, d: number) => void;
|
|
2406
|
+
readonly ifcapi_probeLandXmlAlignmentAtDistance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2407
|
+
readonly ifcapi_probeLandXmlAlignmentAtStation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2197
2408
|
readonly ifcapi_processGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
|
|
2198
2409
|
readonly ifcapi_processGeometryBatchFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
|
|
2199
2410
|
readonly ifcapi_processGeometryBatchInstanced: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number) => void;
|
|
@@ -2221,6 +2432,15 @@ export interface InitOutput {
|
|
|
2221
2432
|
readonly ifcapi_simplifyMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
|
|
2222
2433
|
readonly ifcapi_version: (a: number, b: number) => void;
|
|
2223
2434
|
readonly intersection2d: (a: number, b: number) => number;
|
|
2435
|
+
readonly landxmltinstreamsession_abort: (a: number) => void;
|
|
2436
|
+
readonly landxmltinstreamsession_advanceChunk: (a: number, b: number, c: number, d: number) => void;
|
|
2437
|
+
readonly landxmltinstreamsession_drain: (a: number, b: number, c: number) => void;
|
|
2438
|
+
readonly landxmltinstreamsession_finish: (a: number, b: number) => void;
|
|
2439
|
+
readonly landxmltinstreamsession_finishCursor: (a: number, b: number) => void;
|
|
2440
|
+
readonly landxmltinstreamsession_header: (a: number, b: number) => void;
|
|
2441
|
+
readonly landxmltinstreamsession_outputPending: (a: number) => number;
|
|
2442
|
+
readonly landxmltinstreamsession_queuedBytes: (a: number) => number;
|
|
2443
|
+
readonly landxmltinstreamsession_queuedEvents: (a: number) => number;
|
|
2224
2444
|
readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2225
2445
|
readonly meshcollection_buildingRotation: (a: number, b: number) => void;
|
|
2226
2446
|
readonly meshcollection_diagnostics: (a: number) => number;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -907,6 +907,34 @@ export class IfcAPI {
|
|
|
907
907
|
clearPrePassCache() {
|
|
908
908
|
wasm.ifcapi_clearPrePassCache(this.__wbg_ptr);
|
|
909
909
|
}
|
|
910
|
+
/**
|
|
911
|
+
* Starts one owned raw-byte LandXML session. The caller must free or abort
|
|
912
|
+
* the session on every cancellation path.
|
|
913
|
+
*
|
|
914
|
+
* `options` is the same shape `parseLandXmlSourceBytesWithOptions`
|
|
915
|
+
* accepts (see `LandXmlParseOptionsJs`) and is optional so every
|
|
916
|
+
* existing single-argument call site keeps working unchanged. A bad
|
|
917
|
+
* `assumedLinearUnit` token (or any other invalid option) refuses here,
|
|
918
|
+
* at session construction, never partway through a stream (#5175).
|
|
919
|
+
* @param {number} max_bytes
|
|
920
|
+
* @param {LandXmlParseOptionsJs | null} [options]
|
|
921
|
+
* @returns {LandXmlTinStreamSession}
|
|
922
|
+
*/
|
|
923
|
+
createLandXmlTinStreamSession(max_bytes, options) {
|
|
924
|
+
try {
|
|
925
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
926
|
+
wasm.ifcapi_createLandXmlTinStreamSession(retptr, this.__wbg_ptr, max_bytes, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
927
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
928
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
929
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
930
|
+
if (r2) {
|
|
931
|
+
throw takeObject(r1);
|
|
932
|
+
}
|
|
933
|
+
return LandXmlTinStreamSession.__wrap(r0);
|
|
934
|
+
} finally {
|
|
935
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
910
938
|
/**
|
|
911
939
|
* Run geometry extraction on `content` and return its typed CSG / opening
|
|
912
940
|
* diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
|
|
@@ -1643,6 +1671,34 @@ export class IfcAPI {
|
|
|
1643
1671
|
const ret = wasm.ifcapi_getPipelineDiagnostics(this.__wbg_ptr);
|
|
1644
1672
|
return takeObject(ret);
|
|
1645
1673
|
}
|
|
1674
|
+
/**
|
|
1675
|
+
* Inspect authored cant and superelevation records at a physical distance.
|
|
1676
|
+
* Cant exposes bracketing source records only; no transition value is
|
|
1677
|
+
* fabricated. Superelevation blocks preserve their authored bounds.
|
|
1678
|
+
* @param {Uint8Array} data
|
|
1679
|
+
* @param {string} alignment_source_id
|
|
1680
|
+
* @param {number} distance
|
|
1681
|
+
* @returns {LandXmlAlignmentInspectionJs}
|
|
1682
|
+
*/
|
|
1683
|
+
inspectLandXmlAlignmentAtDistance(data, alignment_source_id, distance) {
|
|
1684
|
+
try {
|
|
1685
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1686
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1688
|
+
const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1689
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1690
|
+
wasm.ifcapi_inspectLandXmlAlignmentAtDistance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, distance);
|
|
1691
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1692
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1693
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1694
|
+
if (r2) {
|
|
1695
|
+
throw takeObject(r1);
|
|
1696
|
+
}
|
|
1697
|
+
return takeObject(r0);
|
|
1698
|
+
} finally {
|
|
1699
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1646
1702
|
/**
|
|
1647
1703
|
* Check if API is initialized
|
|
1648
1704
|
* @returns {boolean}
|
|
@@ -1777,6 +1833,82 @@ export class IfcAPI {
|
|
|
1777
1833
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1778
1834
|
}
|
|
1779
1835
|
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Parse all currently supported LandXML source families from the original
|
|
1838
|
+
* bytes. Terrain-only and alignment-only sources both return an honest
|
|
1839
|
+
* empty sibling collection, allowing the viewer's single load path to
|
|
1840
|
+
* handle either form and mixed documents uniformly.
|
|
1841
|
+
* @param {Uint8Array} data
|
|
1842
|
+
* @returns {LandXmlSourceDocumentJs}
|
|
1843
|
+
*/
|
|
1844
|
+
parseLandXmlSourceBytes(data) {
|
|
1845
|
+
try {
|
|
1846
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1847
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1848
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1849
|
+
wasm.ifcapi_parseLandXmlSourceBytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1850
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1851
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1852
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1853
|
+
if (r2) {
|
|
1854
|
+
throw takeObject(r1);
|
|
1855
|
+
}
|
|
1856
|
+
return takeObject(r0);
|
|
1857
|
+
} finally {
|
|
1858
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* Parse a source with explicit hostile-input bounds. Passing
|
|
1863
|
+
* `cancelled: true` refuses before entering WASM; in-flight browser
|
|
1864
|
+
* cancellation is performed by terminating the worker that owns this
|
|
1865
|
+
* synchronous operation.
|
|
1866
|
+
* @param {Uint8Array} data
|
|
1867
|
+
* @param {any} options
|
|
1868
|
+
* @returns {LandXmlSourceDocumentJs}
|
|
1869
|
+
*/
|
|
1870
|
+
parseLandXmlSourceBytesWithOptions(data, options) {
|
|
1871
|
+
try {
|
|
1872
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1873
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1874
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1875
|
+
wasm.ifcapi_parseLandXmlSourceBytesWithOptions(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(options));
|
|
1876
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1877
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1878
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1879
|
+
if (r2) {
|
|
1880
|
+
throw takeObject(r1);
|
|
1881
|
+
}
|
|
1882
|
+
return takeObject(r0);
|
|
1883
|
+
} finally {
|
|
1884
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* Parse a supported LandXML TIN document from its original bytes.
|
|
1889
|
+
*
|
|
1890
|
+
* The object is an owned serialization of the semantic document. Errors
|
|
1891
|
+
* deliberately use `LandXmlError::Display`, including its stable LXML code.
|
|
1892
|
+
* @param {Uint8Array} data
|
|
1893
|
+
* @returns {LandXmlTinDocumentJs}
|
|
1894
|
+
*/
|
|
1895
|
+
parseLandXmlTinBytes(data) {
|
|
1896
|
+
try {
|
|
1897
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1898
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1899
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1900
|
+
wasm.ifcapi_parseLandXmlTinBytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1901
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1902
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1903
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1904
|
+
if (r2) {
|
|
1905
|
+
throw takeObject(r1);
|
|
1906
|
+
}
|
|
1907
|
+
return takeObject(r0);
|
|
1908
|
+
} finally {
|
|
1909
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1780
1912
|
/**
|
|
1781
1913
|
* Parse IFC file and extract symbolic representations (Plan,
|
|
1782
1914
|
* Annotation, FootPrint, Axis). These are 2D curves used for
|
|
@@ -2093,6 +2225,65 @@ export class IfcAPI {
|
|
|
2093
2225
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2094
2226
|
}
|
|
2095
2227
|
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Evaluate one supported horizontal-alignment source span at an exact
|
|
2230
|
+
* f64 distance. The binding reuses the native validator, so malformed
|
|
2231
|
+
* deserialized records, discontinuities, unresolved references, and
|
|
2232
|
+
* unsupported transition domains are rejected rather than approximated.
|
|
2233
|
+
* @param {Uint8Array} data
|
|
2234
|
+
* @param {string} alignment_source_id
|
|
2235
|
+
* @param {number} distance
|
|
2236
|
+
* @param {number} offset_right
|
|
2237
|
+
* @returns {LandXmlAlignmentProbeJs}
|
|
2238
|
+
*/
|
|
2239
|
+
probeLandXmlAlignmentAtDistance(data, alignment_source_id, distance, offset_right) {
|
|
2240
|
+
try {
|
|
2241
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2242
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
2243
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2244
|
+
const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2246
|
+
wasm.ifcapi_probeLandXmlAlignmentAtDistance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, distance, offset_right);
|
|
2247
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2248
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2249
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2250
|
+
if (r2) {
|
|
2251
|
+
throw takeObject(r1);
|
|
2252
|
+
}
|
|
2253
|
+
return takeObject(r0);
|
|
2254
|
+
} finally {
|
|
2255
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* Evaluate a bounded set of physical locations carrying a displayed
|
|
2260
|
+
* station label. A duplicate label is real, never collapsed; an
|
|
2261
|
+
* excessive number is refused rather than allocated synchronously.
|
|
2262
|
+
* @param {Uint8Array} data
|
|
2263
|
+
* @param {string} alignment_source_id
|
|
2264
|
+
* @param {number} station
|
|
2265
|
+
* @param {number} offset_right
|
|
2266
|
+
* @returns {LandXmlAlignmentProbesJs}
|
|
2267
|
+
*/
|
|
2268
|
+
probeLandXmlAlignmentAtStation(data, alignment_source_id, station, offset_right) {
|
|
2269
|
+
try {
|
|
2270
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2271
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
2272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2273
|
+
const ptr1 = passStringToWasm0(alignment_source_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2274
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2275
|
+
wasm.ifcapi_probeLandXmlAlignmentAtStation(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, station, offset_right);
|
|
2276
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2277
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2278
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2279
|
+
if (r2) {
|
|
2280
|
+
throw takeObject(r1);
|
|
2281
|
+
}
|
|
2282
|
+
return takeObject(r0);
|
|
2283
|
+
} finally {
|
|
2284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2096
2287
|
/**
|
|
2097
2288
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
2098
2289
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -2872,6 +3063,144 @@ export class IfcAPI {
|
|
|
2872
3063
|
}
|
|
2873
3064
|
if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
|
|
2874
3065
|
|
|
3066
|
+
export class LandXmlTinStreamSession {
|
|
3067
|
+
static __wrap(ptr) {
|
|
3068
|
+
const obj = Object.create(LandXmlTinStreamSession.prototype);
|
|
3069
|
+
obj.__wbg_ptr = ptr;
|
|
3070
|
+
LandXmlTinStreamSessionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3071
|
+
return obj;
|
|
3072
|
+
}
|
|
3073
|
+
__destroy_into_raw() {
|
|
3074
|
+
const ptr = this.__wbg_ptr;
|
|
3075
|
+
this.__wbg_ptr = 0;
|
|
3076
|
+
LandXmlTinStreamSessionFinalization.unregister(this);
|
|
3077
|
+
return ptr;
|
|
3078
|
+
}
|
|
3079
|
+
free() {
|
|
3080
|
+
const ptr = this.__destroy_into_raw();
|
|
3081
|
+
wasm.__wbg_landxmltinstreamsession_free(ptr, 0);
|
|
3082
|
+
}
|
|
3083
|
+
abort() {
|
|
3084
|
+
wasm.landxmltinstreamsession_abort(this.__wbg_ptr);
|
|
3085
|
+
}
|
|
3086
|
+
/**
|
|
3087
|
+
* @param {Uint8Array} data
|
|
3088
|
+
*/
|
|
3089
|
+
advanceChunk(data) {
|
|
3090
|
+
try {
|
|
3091
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3092
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
3093
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3094
|
+
wasm.landxmltinstreamsession_advanceChunk(retptr, this.__wbg_ptr, ptr0, len0);
|
|
3095
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3096
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3097
|
+
if (r1) {
|
|
3098
|
+
throw takeObject(r0);
|
|
3099
|
+
}
|
|
3100
|
+
} finally {
|
|
3101
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
/**
|
|
3105
|
+
* Drain only after the renderer has credited this many transport bytes.
|
|
3106
|
+
* @param {number} max_bytes
|
|
3107
|
+
* @returns {any}
|
|
3108
|
+
*/
|
|
3109
|
+
drain(max_bytes) {
|
|
3110
|
+
try {
|
|
3111
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3112
|
+
wasm.landxmltinstreamsession_drain(retptr, this.__wbg_ptr, max_bytes);
|
|
3113
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3114
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3115
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3116
|
+
if (r2) {
|
|
3117
|
+
throw takeObject(r1);
|
|
3118
|
+
}
|
|
3119
|
+
return takeObject(r0);
|
|
3120
|
+
} finally {
|
|
3121
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
/**
|
|
3125
|
+
* @returns {any}
|
|
3126
|
+
*/
|
|
3127
|
+
finish() {
|
|
3128
|
+
try {
|
|
3129
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3130
|
+
wasm.landxmltinstreamsession_finish(retptr, this.__wbg_ptr);
|
|
3131
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3132
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3133
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3134
|
+
if (r2) {
|
|
3135
|
+
throw takeObject(r1);
|
|
3136
|
+
}
|
|
3137
|
+
return takeObject(r0);
|
|
3138
|
+
} finally {
|
|
3139
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
/**
|
|
3143
|
+
* Start the resumable metadata cursor. Consumers must continue draining
|
|
3144
|
+
* until [`Self::output_pending`] is false, then abort/free the session.
|
|
3145
|
+
*/
|
|
3146
|
+
finishCursor() {
|
|
3147
|
+
try {
|
|
3148
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3149
|
+
wasm.landxmltinstreamsession_finishCursor(retptr, this.__wbg_ptr);
|
|
3150
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3151
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3152
|
+
if (r1) {
|
|
3153
|
+
throw takeObject(r0);
|
|
3154
|
+
}
|
|
3155
|
+
} finally {
|
|
3156
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* @returns {any}
|
|
3161
|
+
*/
|
|
3162
|
+
header() {
|
|
3163
|
+
try {
|
|
3164
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3165
|
+
wasm.landxmltinstreamsession_header(retptr, this.__wbg_ptr);
|
|
3166
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3167
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3168
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3169
|
+
if (r2) {
|
|
3170
|
+
throw takeObject(r1);
|
|
3171
|
+
}
|
|
3172
|
+
return takeObject(r0);
|
|
3173
|
+
} finally {
|
|
3174
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
/**
|
|
3178
|
+
* Whether the host must grant more credited output drain capacity.
|
|
3179
|
+
* @returns {boolean}
|
|
3180
|
+
*/
|
|
3181
|
+
outputPending() {
|
|
3182
|
+
const ret = wasm.landxmltinstreamsession_outputPending(this.__wbg_ptr);
|
|
3183
|
+
return ret !== 0;
|
|
3184
|
+
}
|
|
3185
|
+
/**
|
|
3186
|
+
* Exact serialized transport bytes currently retained by the Rust queue.
|
|
3187
|
+
* @returns {number}
|
|
3188
|
+
*/
|
|
3189
|
+
queuedBytes() {
|
|
3190
|
+
const ret = wasm.landxmltinstreamsession_queuedBytes(this.__wbg_ptr);
|
|
3191
|
+
return ret >>> 0;
|
|
3192
|
+
}
|
|
3193
|
+
/**
|
|
3194
|
+
* Complete credited transport records currently retained by the Rust queue.
|
|
3195
|
+
* @returns {number}
|
|
3196
|
+
*/
|
|
3197
|
+
queuedEvents() {
|
|
3198
|
+
const ret = wasm.landxmltinstreamsession_queuedEvents(this.__wbg_ptr);
|
|
3199
|
+
return ret >>> 0;
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
if (Symbol.dispose) LandXmlTinStreamSession.prototype[Symbol.dispose] = LandXmlTinStreamSession.prototype.free;
|
|
3203
|
+
|
|
2875
3204
|
/**
|
|
2876
3205
|
* Collection of mesh data for returning multiple meshes
|
|
2877
3206
|
*/
|
|
@@ -5605,6 +5934,10 @@ function __wbg_get_imports() {
|
|
|
5605
5934
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
5606
5935
|
return addHeapObject(ret);
|
|
5607
5936
|
},
|
|
5937
|
+
__wbg_Number_9a4e0ecb0fa16705: function(arg0) {
|
|
5938
|
+
const ret = Number(getObject(arg0));
|
|
5939
|
+
return ret;
|
|
5940
|
+
},
|
|
5608
5941
|
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
5609
5942
|
const ret = String(getObject(arg1));
|
|
5610
5943
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -5612,11 +5945,32 @@ function __wbg_get_imports() {
|
|
|
5612
5945
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
5613
5946
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5614
5947
|
},
|
|
5948
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
5949
|
+
const v = getObject(arg1);
|
|
5950
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
5951
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
5952
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
5953
|
+
},
|
|
5615
5954
|
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
5616
5955
|
const v = getObject(arg0);
|
|
5617
5956
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
5618
5957
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
5619
5958
|
},
|
|
5959
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
5960
|
+
const ret = debugString(getObject(arg1));
|
|
5961
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
5962
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5963
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
5964
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5965
|
+
},
|
|
5966
|
+
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
5967
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
5968
|
+
return ret;
|
|
5969
|
+
},
|
|
5970
|
+
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
5971
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
5972
|
+
return ret;
|
|
5973
|
+
},
|
|
5620
5974
|
__wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
|
|
5621
5975
|
const ret = getObject(arg0) === null;
|
|
5622
5976
|
return ret;
|
|
@@ -5626,10 +5980,22 @@ function __wbg_get_imports() {
|
|
|
5626
5980
|
const ret = typeof(val) === 'object' && val !== null;
|
|
5627
5981
|
return ret;
|
|
5628
5982
|
},
|
|
5983
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
5984
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
5985
|
+
return ret;
|
|
5986
|
+
},
|
|
5629
5987
|
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
5630
5988
|
const ret = getObject(arg0) === undefined;
|
|
5631
5989
|
return ret;
|
|
5632
5990
|
},
|
|
5991
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
5992
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
5993
|
+
return ret;
|
|
5994
|
+
},
|
|
5995
|
+
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
5996
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
5997
|
+
return ret;
|
|
5998
|
+
},
|
|
5633
5999
|
__wbg___wbindgen_memory_de265df8aadd6273: function() {
|
|
5634
6000
|
const ret = wasm.memory;
|
|
5635
6001
|
return addHeapObject(ret);
|
|
@@ -5670,13 +6036,45 @@ function __wbg_get_imports() {
|
|
|
5670
6036
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
5671
6037
|
return addHeapObject(ret);
|
|
5672
6038
|
}, arguments); },
|
|
6039
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
6040
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
6041
|
+
return addHeapObject(ret);
|
|
6042
|
+
},
|
|
5673
6043
|
__wbg_info_eadbe775a8e2e9eb: function(arg0) {
|
|
5674
6044
|
console.info(getObject(arg0));
|
|
5675
6045
|
},
|
|
6046
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
6047
|
+
let result;
|
|
6048
|
+
try {
|
|
6049
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
6050
|
+
} catch (_) {
|
|
6051
|
+
result = false;
|
|
6052
|
+
}
|
|
6053
|
+
const ret = result;
|
|
6054
|
+
return ret;
|
|
6055
|
+
},
|
|
6056
|
+
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
6057
|
+
let result;
|
|
6058
|
+
try {
|
|
6059
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
6060
|
+
} catch (_) {
|
|
6061
|
+
result = false;
|
|
6062
|
+
}
|
|
6063
|
+
const ret = result;
|
|
6064
|
+
return ret;
|
|
6065
|
+
},
|
|
5676
6066
|
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
5677
6067
|
const ret = Array.isArray(getObject(arg0));
|
|
5678
6068
|
return ret;
|
|
5679
6069
|
},
|
|
6070
|
+
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
6071
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
6072
|
+
return ret;
|
|
6073
|
+
},
|
|
6074
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
6075
|
+
const ret = getObject(arg0).length;
|
|
6076
|
+
return ret;
|
|
6077
|
+
},
|
|
5680
6078
|
__wbg_new_227d7c05414eb861: function() {
|
|
5681
6079
|
const ret = new Error();
|
|
5682
6080
|
return addHeapObject(ret);
|
|
@@ -5685,10 +6083,18 @@ function __wbg_get_imports() {
|
|
|
5685
6083
|
const ret = new Array();
|
|
5686
6084
|
return addHeapObject(ret);
|
|
5687
6085
|
},
|
|
6086
|
+
__wbg_new_7796ffc7ed656783: function() {
|
|
6087
|
+
const ret = new Map();
|
|
6088
|
+
return addHeapObject(ret);
|
|
6089
|
+
},
|
|
5688
6090
|
__wbg_new_b667d279fd5aa943: function(arg0, arg1) {
|
|
5689
6091
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
5690
6092
|
return addHeapObject(ret);
|
|
5691
6093
|
},
|
|
6094
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
6095
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
6096
|
+
return addHeapObject(ret);
|
|
6097
|
+
},
|
|
5692
6098
|
__wbg_new_da52cf8fe3429cb2: function() {
|
|
5693
6099
|
const ret = new Object();
|
|
5694
6100
|
return addHeapObject(ret);
|
|
@@ -5729,6 +6135,13 @@ function __wbg_get_imports() {
|
|
|
5729
6135
|
const ret = Date.now();
|
|
5730
6136
|
return ret;
|
|
5731
6137
|
},
|
|
6138
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
6139
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
6140
|
+
},
|
|
6141
|
+
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
6142
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
6143
|
+
return addHeapObject(ret);
|
|
6144
|
+
},
|
|
5732
6145
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
5733
6146
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5734
6147
|
},
|
|
@@ -5827,6 +6240,9 @@ const GridAxisJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
5827
6240
|
const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5828
6241
|
? { register: () => {}, unregister: () => {} }
|
|
5829
6242
|
: new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr, 1));
|
|
6243
|
+
const LandXmlTinStreamSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6244
|
+
? { register: () => {}, unregister: () => {} }
|
|
6245
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_landxmltinstreamsession_free(ptr, 1));
|
|
5830
6246
|
const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5831
6247
|
? { register: () => {}, unregister: () => {} }
|
|
5832
6248
|
: new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr, 1));
|
|
@@ -5894,6 +6310,71 @@ function addBorrowedObject(obj) {
|
|
|
5894
6310
|
return stack_pointer;
|
|
5895
6311
|
}
|
|
5896
6312
|
|
|
6313
|
+
function debugString(val) {
|
|
6314
|
+
// primitive types
|
|
6315
|
+
const type = typeof val;
|
|
6316
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
6317
|
+
return `${val}`;
|
|
6318
|
+
}
|
|
6319
|
+
if (type == 'string') {
|
|
6320
|
+
return `"${val}"`;
|
|
6321
|
+
}
|
|
6322
|
+
if (type == 'symbol') {
|
|
6323
|
+
const description = val.description;
|
|
6324
|
+
if (description == null) {
|
|
6325
|
+
return 'Symbol';
|
|
6326
|
+
} else {
|
|
6327
|
+
return `Symbol(${description})`;
|
|
6328
|
+
}
|
|
6329
|
+
}
|
|
6330
|
+
if (type == 'function') {
|
|
6331
|
+
const name = val.name;
|
|
6332
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
6333
|
+
return `Function(${name})`;
|
|
6334
|
+
} else {
|
|
6335
|
+
return 'Function';
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
// objects
|
|
6339
|
+
if (Array.isArray(val)) {
|
|
6340
|
+
const length = val.length;
|
|
6341
|
+
let debug = '[';
|
|
6342
|
+
if (length > 0) {
|
|
6343
|
+
debug += debugString(val[0]);
|
|
6344
|
+
}
|
|
6345
|
+
for(let i = 1; i < length; i++) {
|
|
6346
|
+
debug += ', ' + debugString(val[i]);
|
|
6347
|
+
}
|
|
6348
|
+
debug += ']';
|
|
6349
|
+
return debug;
|
|
6350
|
+
}
|
|
6351
|
+
// Test for built-in
|
|
6352
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
6353
|
+
let className;
|
|
6354
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
6355
|
+
className = builtInMatches[1];
|
|
6356
|
+
} else {
|
|
6357
|
+
// Failed to match the standard '[object ClassName]'
|
|
6358
|
+
return toString.call(val);
|
|
6359
|
+
}
|
|
6360
|
+
if (className == 'Object') {
|
|
6361
|
+
// we're a user defined class or Object
|
|
6362
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
6363
|
+
// easier than looping through ownProperties of `val`.
|
|
6364
|
+
try {
|
|
6365
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
6366
|
+
} catch (_) {
|
|
6367
|
+
return 'Object';
|
|
6368
|
+
}
|
|
6369
|
+
}
|
|
6370
|
+
// errors
|
|
6371
|
+
if (val instanceof Error) {
|
|
6372
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
6373
|
+
}
|
|
6374
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
6375
|
+
return className;
|
|
6376
|
+
}
|
|
6377
|
+
|
|
5897
6378
|
function dropObject(idx) {
|
|
5898
6379
|
if (idx < 1028) return;
|
|
5899
6380
|
heap[idx] = heap_next;
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|