beckhoff-xts-viewer-3d 6.2.0 → 6.4.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/LICENSE +21 -21
- package/README.md +285 -273
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -11
- package/dist/index.d.ts +139 -11
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/docs/screenshots/README.md +123 -123
- package/package.json +208 -208
- package/scripts/postinstall-disclaimer.mjs +72 -72
package/dist/index.d.cts
CHANGED
|
@@ -12,7 +12,7 @@ import { GLTF } from 'three-stdlib';
|
|
|
12
12
|
* Run `npm run sync-version` (or any script that depends on it) to refresh
|
|
13
13
|
* after bumping the package version.
|
|
14
14
|
*/
|
|
15
|
-
declare const VERSION: "6.
|
|
15
|
+
declare const VERSION: "6.4.0";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Default CDN URL for the GLB asset bundle (`beckhoff-xts-viewer-3d-assets`).
|
|
@@ -260,6 +260,8 @@ interface DisplayOptions {
|
|
|
260
260
|
moduleCornerMarkerOptions?: CalibrationMarkerOptions;
|
|
261
261
|
/** Size and colour of the mover anchor marker. */
|
|
262
262
|
moverAnchorMarkerOptions?: CalibrationMarkerOptions;
|
|
263
|
+
/** Default look of the `moduleJointMarkers` on `<XtsViewer3D>`. */
|
|
264
|
+
moduleJointMarkerOptions?: ModuleJointMarkerOptions;
|
|
263
265
|
/** Lighting, environment map and tone mapping. */
|
|
264
266
|
lighting?: LightingOptions;
|
|
265
267
|
/** Screen-space effects (SSAO, bloom). */
|
|
@@ -278,6 +280,14 @@ interface CalibrationMarkerOptions {
|
|
|
278
280
|
/** CSS colour. Default: `'#FF2030'` (red). */
|
|
279
281
|
color?: string;
|
|
280
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Defaults for the markers drawn on module joints (`moduleJointMarkers`).
|
|
285
|
+
* A marker's own `color` wins over these.
|
|
286
|
+
*/
|
|
287
|
+
interface ModuleJointMarkerOptions {
|
|
288
|
+
/** CSS colour. Default: `'#E6007E'` (magenta, apart from every status tint). */
|
|
289
|
+
color?: string;
|
|
290
|
+
}
|
|
281
291
|
/**
|
|
282
292
|
* Lighting and the renderer's colour pipeline.
|
|
283
293
|
*
|
|
@@ -675,6 +685,21 @@ interface InfoBarMarkerConfig {
|
|
|
675
685
|
sizeMm: number;
|
|
676
686
|
color?: string;
|
|
677
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* A live station status. Deliberately a union so it can grow; `'blocked'` is
|
|
690
|
+
* the only value today.
|
|
691
|
+
*/
|
|
692
|
+
type StationStatus = 'blocked';
|
|
693
|
+
/**
|
|
694
|
+
* One station's live status, pushed through
|
|
695
|
+
* `XtsViewer3DRef.setStationStatuses(entries)`. The entries passed are the
|
|
696
|
+
* whole set: a station not listed has no status.
|
|
697
|
+
*/
|
|
698
|
+
interface StationStatusEntry {
|
|
699
|
+
/** = `StationConfig.stationId`. Unknown ids are ignored. */
|
|
700
|
+
stationId: number;
|
|
701
|
+
status: StationStatus;
|
|
702
|
+
}
|
|
678
703
|
|
|
679
704
|
/**
|
|
680
705
|
* The configuration tree — what a host hands `<XtsViewer3D config={...}>`.
|
|
@@ -1703,7 +1728,8 @@ declare function checkAllModuleCollisions(config: NormalizedXtsConfig, orientati
|
|
|
1703
1728
|
*
|
|
1704
1729
|
* The types a host exchanges with the viewer at runtime rather than at
|
|
1705
1730
|
* configuration time: what is addressed (`ModuleRef`, `MoverRef`), what is
|
|
1706
|
-
* picked out (`SelectionState`, `ModuleHighlight`, `FeedSegmentHighlight
|
|
1731
|
+
* picked out (`SelectionState`, `ModuleHighlight`, `FeedSegmentHighlight`,
|
|
1732
|
+
* `ModuleJointMarker`),
|
|
1707
1733
|
* and where the camera looks (`CameraState`, `FocusTarget`).
|
|
1708
1734
|
*/
|
|
1709
1735
|
|
|
@@ -1819,6 +1845,32 @@ interface FeedSegmentHighlight {
|
|
|
1819
1845
|
/** Highlight color (CSS color string, e.g. `'#00AAFF'`). */
|
|
1820
1846
|
color: string;
|
|
1821
1847
|
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Declarative marker on the joint between two modules of a part — where a
|
|
1850
|
+
* track is split for transport or assembly, for instance.
|
|
1851
|
+
*
|
|
1852
|
+
* Drawn as a flat plate across the track on the joint face at the END of the
|
|
1853
|
+
* addressed module, a little wider and taller than the module profile. On a
|
|
1854
|
+
* closed chain (`isChainClosed`) a marker after the last module sits on the
|
|
1855
|
+
* seam to the first; on an open chain it has no joint to sit on and is
|
|
1856
|
+
* ignored, as is a `globalNumber` that matches no module.
|
|
1857
|
+
*
|
|
1858
|
+
* Display only: the marker takes no part in picking, selection,
|
|
1859
|
+
* measurements, collision checks or the `fitScene` bounds.
|
|
1860
|
+
*
|
|
1861
|
+
* Toggle on/off by setting `moduleJointMarkers` on `<XtsViewer3D>` to an
|
|
1862
|
+
* array (enabled) or `undefined` / `[]` (disabled).
|
|
1863
|
+
*/
|
|
1864
|
+
interface ModuleJointMarker {
|
|
1865
|
+
/** `ModuleEntry.globalNumber` of the module the joint FOLLOWS, in chain order. */
|
|
1866
|
+
afterModuleGlobalNumber: number;
|
|
1867
|
+
/**
|
|
1868
|
+
* CSS color; defaults to `DisplayOptions.moduleJointMarkerOptions.color`.
|
|
1869
|
+
*/
|
|
1870
|
+
color?: string;
|
|
1871
|
+
/** Optional short label drawn beside the marker (uses the label font). */
|
|
1872
|
+
label?: string;
|
|
1873
|
+
}
|
|
1822
1874
|
/**
|
|
1823
1875
|
* One feed segment (Einspeisestrang) as detected in the configuration: the
|
|
1824
1876
|
* contiguous run of modules starting at an infeed module (Einspeisemodul,
|
|
@@ -3032,6 +3084,41 @@ interface MeasurementApi {
|
|
|
3032
3084
|
fromJSON(document: MeasurementDocument): void;
|
|
3033
3085
|
}
|
|
3034
3086
|
|
|
3087
|
+
/**
|
|
3088
|
+
* StationStatusStore — out-of-React channel for live station status, the
|
|
3089
|
+
* station counterpart of `ModuleStatusStore`.
|
|
3090
|
+
*
|
|
3091
|
+
* The host pushes the full set of stations that carry a status through
|
|
3092
|
+
* `XtsViewer3DRef.setStationStatuses(entries)`; whatever the new set leaves
|
|
3093
|
+
* out is cleared. Each `<Station>` subscribes to its own `stationId` with
|
|
3094
|
+
* `useSyncExternalStore`, so a change re-renders only the stations it
|
|
3095
|
+
* touches and the config tree is never rebuilt.
|
|
3096
|
+
*
|
|
3097
|
+
* Keyed by `StationConfig.stationId`. The store does not know which stations
|
|
3098
|
+
* exist: an id no station has is stored and simply never read, which is what
|
|
3099
|
+
* lets a host push its list without filtering it first.
|
|
3100
|
+
*/
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* The tint of a blocked station's tube: chartreuse, hue 95°. Exported so a
|
|
3104
|
+
* host can draw its legend in exactly this colour.
|
|
3105
|
+
*
|
|
3106
|
+
* Chosen by hue distance, because a station tube already carries a colour of
|
|
3107
|
+
* the host's choosing and a status tint near that hue reads only as "brighter".
|
|
3108
|
+
* Checked against:
|
|
3109
|
+
* - the station presets of the XTS Project Builder, the main host: blue
|
|
3110
|
+
* 217°, red 0°, green 142°, yellow 45°, purple 271°, orange 25°, cyan
|
|
3111
|
+
* 189°, pink 330°. The widest gap between them is yellow to green; 95°
|
|
3112
|
+
* sits in its middle, at least 47° from every preset.
|
|
3113
|
+
* - the viewer's own tints, at least 50° away: drive warning amber 41°,
|
|
3114
|
+
* drive error red 0°, the default selection colours 43° and 197°, the
|
|
3115
|
+
* module joint marker magenta 327°. Feed-segment tints have no viewer
|
|
3116
|
+
* default; the host picks them. `stationStatus.test.tsx` holds this
|
|
3117
|
+
* part of the check.
|
|
3118
|
+
* The old amber (#FFB000) sat 4° from the yellow preset and 16° from orange.
|
|
3119
|
+
*/
|
|
3120
|
+
declare const STATION_BLOCKED_COLOR = "#6CFF00";
|
|
3121
|
+
|
|
3035
3122
|
/**
|
|
3036
3123
|
* Imperative ref API for <XtsViewer3D>.
|
|
3037
3124
|
*
|
|
@@ -3145,6 +3232,16 @@ interface XtsViewer3DRef {
|
|
|
3145
3232
|
setModuleStatuses(statuses: ReadonlyArray<ModuleStatusEntry | null | undefined>): void;
|
|
3146
3233
|
/** Clear all live module statuses (revert to config-time `ModuleEntry.status`). */
|
|
3147
3234
|
clearModuleStatuses(): void;
|
|
3235
|
+
/**
|
|
3236
|
+
* Push live station statuses, keyed by `StationConfig.stationId`. The
|
|
3237
|
+
* entries are the whole set: a station missing from it loses its status.
|
|
3238
|
+
* A `'blocked'` station's tube glows in `STATION_BLOCKED_COLOR`; only its
|
|
3239
|
+
* material changes. The same set again is a no-op, and an id no station
|
|
3240
|
+
* has is ignored.
|
|
3241
|
+
*/
|
|
3242
|
+
setStationStatuses(entries: ReadonlyArray<StationStatusEntry>): void;
|
|
3243
|
+
/** Clear every live station status. */
|
|
3244
|
+
clearStationStatuses(): void;
|
|
3148
3245
|
/**
|
|
3149
3246
|
* Push live mover-tool state, keyed by `MoverConfig.id` and then by
|
|
3150
3247
|
* `MoverToolConfig.id` — `update[mover.id][tool.id] = { visible }`.
|
|
@@ -3720,6 +3817,32 @@ interface XtsViewer3DProps {
|
|
|
3720
3817
|
* ```
|
|
3721
3818
|
*/
|
|
3722
3819
|
feedSegmentHighlights?: FeedSegmentHighlight[];
|
|
3820
|
+
/**
|
|
3821
|
+
* Mark joints between modules — where a track is split for transport or
|
|
3822
|
+
* assembly, for instance. Each marker is a flat plate across the track on
|
|
3823
|
+
* the joint face at the END of the module whose `globalNumber` it names,
|
|
3824
|
+
* a little wider and taller than the module profile, with an optional
|
|
3825
|
+
* label beside it.
|
|
3826
|
+
*
|
|
3827
|
+
* On a closed chain a marker after the last module sits on the seam to the
|
|
3828
|
+
* first; on an open chain it is ignored, as is a `globalNumber` that
|
|
3829
|
+
* matches no module. Display only: the plates are not pickable, not
|
|
3830
|
+
* measured, not collision-checked and not part of the `fitScene` bounds.
|
|
3831
|
+
*
|
|
3832
|
+
* Colour defaults to `display.moduleJointMarkerOptions.color`. Toggle off
|
|
3833
|
+
* with `undefined` / `[]`.
|
|
3834
|
+
*
|
|
3835
|
+
* @example
|
|
3836
|
+
* ```tsx
|
|
3837
|
+
* <XtsViewer3D
|
|
3838
|
+
* moduleJointMarkers={[
|
|
3839
|
+
* { afterModuleGlobalNumber: 4, label: 'T1' },
|
|
3840
|
+
* { afterModuleGlobalNumber: 9, label: 'T2', color: '#00C853' },
|
|
3841
|
+
* ]}
|
|
3842
|
+
* />
|
|
3843
|
+
* ```
|
|
3844
|
+
*/
|
|
3845
|
+
moduleJointMarkers?: ModuleJointMarker[];
|
|
3723
3846
|
/** Callbacks. */
|
|
3724
3847
|
onSelectionChange?: (s: SelectionState) => void;
|
|
3725
3848
|
onCameraChange?: (c: CameraState) => void;
|
|
@@ -3815,6 +3938,11 @@ interface XtsViewer3DProps {
|
|
|
3815
3938
|
showOriginAxes?: boolean;
|
|
3816
3939
|
showModuleLabels?: boolean;
|
|
3817
3940
|
overlayFps?: boolean;
|
|
3941
|
+
/**
|
|
3942
|
+
* Ground grid (default `true`). The grid is infinite and fades out at a
|
|
3943
|
+
* distance taken from the layout's size, so it reaches past the track
|
|
3944
|
+
* on any layout without showing an edge.
|
|
3945
|
+
*/
|
|
3818
3946
|
showGrid?: boolean;
|
|
3819
3947
|
};
|
|
3820
3948
|
className?: string;
|
|
@@ -4203,14 +4331,7 @@ interface ModuleHeightSpan {
|
|
|
4203
4331
|
* box, so a type the asset package does not describe behaves as it always did.
|
|
4204
4332
|
*/
|
|
4205
4333
|
declare function coarseHeightSpan(heightMm: number): ModuleHeightSpan;
|
|
4206
|
-
/**
|
|
4207
|
-
* Compose `approximateBoundsMm` through `originCorrection` and keep the Z range.
|
|
4208
|
-
*
|
|
4209
|
-
* All eight corners are transformed rather than only the two extremes: every
|
|
4210
|
-
* shipped correction happens to be a multiple of 90°, which would keep the box
|
|
4211
|
-
* axis-aligned, but nothing in the sidecar format promises that, and under a
|
|
4212
|
-
* 45° correction two corners would describe a box far too small.
|
|
4213
|
-
*/
|
|
4334
|
+
/** The Z range of `pathFrameBoundsOf`, or null when it is empty. */
|
|
4214
4335
|
declare function heightSpanOf(sidecar: ModuleSidecar): ModuleHeightSpan | null;
|
|
4215
4336
|
/**
|
|
4216
4337
|
* How tall `moduleType` is and where it sits, or the coarse fallback.
|
|
@@ -4624,6 +4745,13 @@ declare const GIZMO_AXIS_LABELS: readonly [string, string, string];
|
|
|
4624
4745
|
* `<DimensionLabel>` / `<MoverIdLabel>` additionally wrap their `<Text>`
|
|
4625
4746
|
* in a local Suspense boundary, so even a font that parses badly costs
|
|
4626
4747
|
* one label rather than the scene.
|
|
4748
|
+
*
|
|
4749
|
+
* The `blob:` URL can still be refused: a host whose Content-Security-
|
|
4750
|
+
* Policy leaves `blob:` out of `connect-src` blocks troika's request for
|
|
4751
|
+
* it, and every label then suspends for good while lines and geometry keep
|
|
4752
|
+
* drawing (issue #140). So the built-in font is checked once, the way
|
|
4753
|
+
* troika will load it. A blocked `blob:` URL is swapped for the `data:`
|
|
4754
|
+
* copy, and the host gets one warning that names the policy and the fix.
|
|
4627
4755
|
*/
|
|
4628
4756
|
/**
|
|
4629
4757
|
* Default 3D-text font: Roboto Condensed (Latin, regular weight).
|
|
@@ -5041,4 +5169,4 @@ declare function snapToGrid(positionMm: Vec3, gridMm: number): Vec3;
|
|
|
5041
5169
|
/** Convenience: `resolveSceneContext` + `toEntityRef`. */
|
|
5042
5170
|
declare function resolveEntityFromObject(object: Object3D | null, instanceId?: number): MeasuredEntityRef | null;
|
|
5043
5171
|
|
|
5044
|
-
export { type AngleMeasurement, type Annotation, type AnnotationAnchor, type AnnotationInput, type AreaConfig, type AreaOptions, AssetLoader, type AssetManifest, BUILTIN_MODULE_SIDECARS, BUILTIN_MOVER_SIDECARS, BUILTIN_RAIL_SIDECARS, BUILTIN_TOOL_SIDECARS, type BorePlacement, type BracketRun, type BuiltChain, type BuiltModule, CLOTHOID_HALF_PAIRS, type CalibrationMarkerOptions, type CameraProjection, type CameraState, type CaptureDimensions, type CaptureMode, type CaptureRequest, type CheckModuleCollisionsOptions, type CheckMoverCollisionsOptions, type ClickModifiers, type ClothoidHalfPair, type CollisionOptions, type CoordinateSystem, type CustomAssetBinding, type CustomAssetConfig, type CustomAssetRef, type CustomMoverLayout, DEFAULT_LABEL_FONT_URL, DEFAULT_MAGNET_PLATE_TYPE, DEFAULT_MEASUREMENT_STYLE, DEFAULT_MODULE_HALF_WIDTH_MM, DEFAULT_MODULE_HEIGHT_MM, DEFAULT_MODULE_MANIFEST, DEFAULT_MOVER_MANIFEST, DEFAULT_ORIGIN_CORRECTION, DEFAULT_RAIL_MANIFEST, DEFAULT_SNAP_KINDS, DEFAULT_SNAP_RADIUS_PX, DEFAULT_TOOL_MANIFEST, DEFAULT_TRACK_Z_MM, type DimensionOptions, type DisplayOptions, type DistanceMeasurement, EMPTY_SELECTION, type EndDelta, type FeedSegment, type FeedSegmentHighlight, type FeedSegmentSelector, type FeedSegmentSpan, type FocusOptions, type FocusTarget, type FrameCaptureOptions, type FrameCaptureSession, GIZMO_AXIS_COLORS, GIZMO_AXIS_LABELS, HEPCO_GFX_PROFILE, HEPCO_PRT2_PROFILE, HEPCO_RAIL_BY_MOVER, type HeatmapSample, type HepcoGfxRailProfileDims, type HepcoPrt2RailProfileDims, type HepcoRailVariant, IDENTITY_POSE, INFEED_MODULE_TYPES, type InfoBarConfig, type InfoBarMarkerConfig, type InfoBarOptions, type InteractionLocks, JSDELIVR_ASSETS_BASE_URL, type KeyboardNavigationOptions, type LightingOptions, MAGNET_PLATE_CATALOG, MODULE_CATALOG, MODULE_GUIDING_RAIL_MAP, MOVER_CATALOG, MOVER_INTEGRATED_PLATE, type MagnetPlateAssetEntry, type MagnetPlateCatalogEntry, type MagnetPlateType3D, type MarkerOptions, type MarkerShape, type MeasuredEntityRef, type Measurement, type MeasurementApi, type MeasurementAxis, type MeasurementDocument, type MeasurementDraft, type MeasurementFormatOptions, type MeasurementId, type MeasurementInput, type MeasurementKind, type MeasurementOptions, type MeasurementPatch, type MeasurementPoint, type MeasurementResult, type MeasurementSnapshot, type MeasurementStyle, type MeasurementTool, type ModuleAssetEntry, type ModuleCatalogEntry, type ModuleCollision, type ModuleCollisionOptions, type ModuleCollisionPartInput, type ModuleCollisionXpuInput, ModuleCornerMarkers, type ModuleEntry, type ModuleHeightSpan, type ModuleHighlight, type ModuleProbe, type ModuleRef, type ModuleSidecar, type ModuleStatusEntry, type ModuleType3D, type MoverAssetEntry, type MoverCatalogEntry, type MoverCollision, type MoverCollisionOptions, type MoverConfig, MoverIdLabel, type MoverIdLabelOptions, type MoverPositionEntry, type MoverProbe, type MoverRef, type MoverSidecar, type MoverToolAssetEntry, type MoverToolConfig, type MoverToolSidecar, type MoverToolStateEntry, type MoverToolType3D, type MoverType3D, type NormalizationWarning, type NormalizedXtsConfig, type Orientation, type OriginCorrection, type PartConfig, type PartPath, type PartTransformation, type PathMeasurement, type PathSample, type PathType, type PerformanceOptions, type PlanarPose, type PointCloud, type PointProjector, type PositionFrame, type PostProcessingOptions, type ProcessingUnitConfig, type ProfilePoint, type RailAssetEntry, type RailSidecar, type RailSystem, type RailType3D, type RenderQuality, type ResolvedMeasurementStyle, SIDECAR_KINDS, type ScreenshotFormat, type ScreenshotMode, type ScreenshotOptions, type ScreenshotResult, type SelectionColors, type SelectionMode, type SelectionScope, type SelectionState, type SidecarIdOf, type SidecarKind, type SidecarKindSpec, type SidecarKinds, SidecarLoader, type SidecarOf, type SidecarOverrides, type SidecarSourceConfig, SidecarSourceContext, type SnapCandidate, type SnapKind, type SnapOptions, type Span, type SplitFeedSegmentsOptions, type StationConfig, type StationOptions, type StatorHeatmap, type StopPositionMoverOptions, type TextOptions, type TrackAnchor, type TrackDistanceMeasurement, type TrackIndex, type TrackIndexEntry, type TrackMetrics, type TrackMetricsResolver, type TrackProjection, type TrackRef, type TrackTransform, type TransformGizmoChange, type TransformGizmoMode, type TransformGizmoOptions, type TransformGizmoPose, type TransformGizmoTarget, VERSION, type Vec2, type Vec3, type ViewCubeAlignment, type ViewCubeOptions, XtsModuleCurve3 as XtsArcCurve3, type XtsConfig, XtsConfigNormalizer, type XtsModelDocument, XtsModuleCurve3, XtsModuleCurve3 as XtsPointCloudCurve3, type XtsRuntimeState, XtsViewer3D, type XtsViewer3DProps, type XtsViewer3DRef, type XtsViewerError, type XtsViewerErrorCode, XtsViewerErrorException, angleDeg, applyBeckhoffXtsConvention, applyBeckhoffXtsConventionToOverrides, applyBeckhoffXtsConventionToTrackTransform, applyCustomAssetClick, applyEmptyClick, applyModuleClick, applyMoverClick, applyTrackClick, arcPoints, argbIntToHex, axisDistanceMm, buildChain, buildHepcoGfxBaseplateBridgeOutline, buildHepcoGfxBaseplateOutline, buildHepcoGfxBracketBaseOutline, buildHepcoGfxBracketEndBlockOutline, buildHepcoGfxBracketOutline, buildHepcoGfxBracketWallOutline, buildHepcoGfxRailOutline, buildHepcoPrt2RailOutline, buildModuleProbes, buildPartPath, buildTrackIndex, bundledLabelFontUrl, chainToUserPositionMm, checkAllModuleCollisions, checkAllMoverCollisions, checkModuleCollisions, checkSamePathCollisions, chooseSnapCandidate, coarseHeightSpan, collectFeedSegments, collectFeedSegmentsForXpu, collectTriangleSnapCandidates, composeAssetUrl, computeMeasurementResult, createHepcoGfxBaseplateBridgeShape, createHepcoGfxBaseplateShape, createHepcoGfxBracketBaseShape, createHepcoGfxBracketEndBlockShape, createHepcoGfxBracketShape, createHepcoGfxBracketWallShape, createHepcoGfxRailShape, createHepcoPrt2RailShape, deselectAll, distanceMm, findModuleAt, formatAngleDeg, formatLengthMm, getMagnetPlateEntry, getModuleEntry, getMoverEntry, getPointCloud, getSharedAssetLoader, heightSpanOf, hepcoGfxBaseplateBridgeSpans, hepcoGfxBracketBores, hepcoGfxBracketEndBlockSpans, hepcoGfxBracketRuns, hepcoGfxBracketWallSpans, hepcoGfxPlateBores, hepcoPrt2ApexPointsMm, hepcoRailVariantFor, hexToArgbInt, interpolateHeatmapValue, isChainClosed, isCustomAssetSelected, isKnownMagnetPlateType, isKnownModuleType, isKnownMoverType, isModuleSelected, isMoverSelected, isTrackSelected, labelAnchorFor, moduleAnchorWorld, moduleEndDelta, moduleHeightSpan, moduleSidecarFilename, moverAnchorWorld, moverSidecarFilename, moverWorldAt, nearestTrackPoint, normaliseToHeatmapRange, normalizeXtsConfig, pathLengthsMm, pickGlbForRail, poseToMatrix4, railSidecarFilename, registerPointCloud, resolveAttachedPlateType, resolveEntityFromObject, resolveGuidingRailGlbUrl, resolveGuidingRailType, resolveHepcoGfxProfile, resolveHepcoPrt2Profile, resolveMeasurementStyle, resolveModuleGlbUrl, resolveMoverGlbUrl, resolveOriginCorrection, resolvePlateGlbUrl, resolveStopPositionMm, resolveToolGlbUrl, sampleChainPoint, sampleChainRange, sampleModulePath, snapToGrid, sortHeatmapSamples, splitIntoFeedSegments, toModuleCollisionInputs, toolSidecarFilename, trackAnchorWorld, trackDistanceMm, trackLengthOf, trackPolylineWorld, unregisterPointCloud, useSidecarSource, userToChainPositionMm, worldPointOnPart };
|
|
5172
|
+
export { type AngleMeasurement, type Annotation, type AnnotationAnchor, type AnnotationInput, type AreaConfig, type AreaOptions, AssetLoader, type AssetManifest, BUILTIN_MODULE_SIDECARS, BUILTIN_MOVER_SIDECARS, BUILTIN_RAIL_SIDECARS, BUILTIN_TOOL_SIDECARS, type BorePlacement, type BracketRun, type BuiltChain, type BuiltModule, CLOTHOID_HALF_PAIRS, type CalibrationMarkerOptions, type CameraProjection, type CameraState, type CaptureDimensions, type CaptureMode, type CaptureRequest, type CheckModuleCollisionsOptions, type CheckMoverCollisionsOptions, type ClickModifiers, type ClothoidHalfPair, type CollisionOptions, type CoordinateSystem, type CustomAssetBinding, type CustomAssetConfig, type CustomAssetRef, type CustomMoverLayout, DEFAULT_LABEL_FONT_URL, DEFAULT_MAGNET_PLATE_TYPE, DEFAULT_MEASUREMENT_STYLE, DEFAULT_MODULE_HALF_WIDTH_MM, DEFAULT_MODULE_HEIGHT_MM, DEFAULT_MODULE_MANIFEST, DEFAULT_MOVER_MANIFEST, DEFAULT_ORIGIN_CORRECTION, DEFAULT_RAIL_MANIFEST, DEFAULT_SNAP_KINDS, DEFAULT_SNAP_RADIUS_PX, DEFAULT_TOOL_MANIFEST, DEFAULT_TRACK_Z_MM, type DimensionOptions, type DisplayOptions, type DistanceMeasurement, EMPTY_SELECTION, type EndDelta, type FeedSegment, type FeedSegmentHighlight, type FeedSegmentSelector, type FeedSegmentSpan, type FocusOptions, type FocusTarget, type FrameCaptureOptions, type FrameCaptureSession, GIZMO_AXIS_COLORS, GIZMO_AXIS_LABELS, HEPCO_GFX_PROFILE, HEPCO_PRT2_PROFILE, HEPCO_RAIL_BY_MOVER, type HeatmapSample, type HepcoGfxRailProfileDims, type HepcoPrt2RailProfileDims, type HepcoRailVariant, IDENTITY_POSE, INFEED_MODULE_TYPES, type InfoBarConfig, type InfoBarMarkerConfig, type InfoBarOptions, type InteractionLocks, JSDELIVR_ASSETS_BASE_URL, type KeyboardNavigationOptions, type LightingOptions, MAGNET_PLATE_CATALOG, MODULE_CATALOG, MODULE_GUIDING_RAIL_MAP, MOVER_CATALOG, MOVER_INTEGRATED_PLATE, type MagnetPlateAssetEntry, type MagnetPlateCatalogEntry, type MagnetPlateType3D, type MarkerOptions, type MarkerShape, type MeasuredEntityRef, type Measurement, type MeasurementApi, type MeasurementAxis, type MeasurementDocument, type MeasurementDraft, type MeasurementFormatOptions, type MeasurementId, type MeasurementInput, type MeasurementKind, type MeasurementOptions, type MeasurementPatch, type MeasurementPoint, type MeasurementResult, type MeasurementSnapshot, type MeasurementStyle, type MeasurementTool, type ModuleAssetEntry, type ModuleCatalogEntry, type ModuleCollision, type ModuleCollisionOptions, type ModuleCollisionPartInput, type ModuleCollisionXpuInput, ModuleCornerMarkers, type ModuleEntry, type ModuleHeightSpan, type ModuleHighlight, type ModuleJointMarker, type ModuleJointMarkerOptions, type ModuleProbe, type ModuleRef, type ModuleSidecar, type ModuleStatusEntry, type ModuleType3D, type MoverAssetEntry, type MoverCatalogEntry, type MoverCollision, type MoverCollisionOptions, type MoverConfig, MoverIdLabel, type MoverIdLabelOptions, type MoverPositionEntry, type MoverProbe, type MoverRef, type MoverSidecar, type MoverToolAssetEntry, type MoverToolConfig, type MoverToolSidecar, type MoverToolStateEntry, type MoverToolType3D, type MoverType3D, type NormalizationWarning, type NormalizedXtsConfig, type Orientation, type OriginCorrection, type PartConfig, type PartPath, type PartTransformation, type PathMeasurement, type PathSample, type PathType, type PerformanceOptions, type PlanarPose, type PointCloud, type PointProjector, type PositionFrame, type PostProcessingOptions, type ProcessingUnitConfig, type ProfilePoint, type RailAssetEntry, type RailSidecar, type RailSystem, type RailType3D, type RenderQuality, type ResolvedMeasurementStyle, SIDECAR_KINDS, STATION_BLOCKED_COLOR, type ScreenshotFormat, type ScreenshotMode, type ScreenshotOptions, type ScreenshotResult, type SelectionColors, type SelectionMode, type SelectionScope, type SelectionState, type SidecarIdOf, type SidecarKind, type SidecarKindSpec, type SidecarKinds, SidecarLoader, type SidecarOf, type SidecarOverrides, type SidecarSourceConfig, SidecarSourceContext, type SnapCandidate, type SnapKind, type SnapOptions, type Span, type SplitFeedSegmentsOptions, type StationConfig, type StationOptions, type StationStatus, type StationStatusEntry, type StatorHeatmap, type StopPositionMoverOptions, type TextOptions, type TrackAnchor, type TrackDistanceMeasurement, type TrackIndex, type TrackIndexEntry, type TrackMetrics, type TrackMetricsResolver, type TrackProjection, type TrackRef, type TrackTransform, type TransformGizmoChange, type TransformGizmoMode, type TransformGizmoOptions, type TransformGizmoPose, type TransformGizmoTarget, VERSION, type Vec2, type Vec3, type ViewCubeAlignment, type ViewCubeOptions, XtsModuleCurve3 as XtsArcCurve3, type XtsConfig, XtsConfigNormalizer, type XtsModelDocument, XtsModuleCurve3, XtsModuleCurve3 as XtsPointCloudCurve3, type XtsRuntimeState, XtsViewer3D, type XtsViewer3DProps, type XtsViewer3DRef, type XtsViewerError, type XtsViewerErrorCode, XtsViewerErrorException, angleDeg, applyBeckhoffXtsConvention, applyBeckhoffXtsConventionToOverrides, applyBeckhoffXtsConventionToTrackTransform, applyCustomAssetClick, applyEmptyClick, applyModuleClick, applyMoverClick, applyTrackClick, arcPoints, argbIntToHex, axisDistanceMm, buildChain, buildHepcoGfxBaseplateBridgeOutline, buildHepcoGfxBaseplateOutline, buildHepcoGfxBracketBaseOutline, buildHepcoGfxBracketEndBlockOutline, buildHepcoGfxBracketOutline, buildHepcoGfxBracketWallOutline, buildHepcoGfxRailOutline, buildHepcoPrt2RailOutline, buildModuleProbes, buildPartPath, buildTrackIndex, bundledLabelFontUrl, chainToUserPositionMm, checkAllModuleCollisions, checkAllMoverCollisions, checkModuleCollisions, checkSamePathCollisions, chooseSnapCandidate, coarseHeightSpan, collectFeedSegments, collectFeedSegmentsForXpu, collectTriangleSnapCandidates, composeAssetUrl, computeMeasurementResult, createHepcoGfxBaseplateBridgeShape, createHepcoGfxBaseplateShape, createHepcoGfxBracketBaseShape, createHepcoGfxBracketEndBlockShape, createHepcoGfxBracketShape, createHepcoGfxBracketWallShape, createHepcoGfxRailShape, createHepcoPrt2RailShape, deselectAll, distanceMm, findModuleAt, formatAngleDeg, formatLengthMm, getMagnetPlateEntry, getModuleEntry, getMoverEntry, getPointCloud, getSharedAssetLoader, heightSpanOf, hepcoGfxBaseplateBridgeSpans, hepcoGfxBracketBores, hepcoGfxBracketEndBlockSpans, hepcoGfxBracketRuns, hepcoGfxBracketWallSpans, hepcoGfxPlateBores, hepcoPrt2ApexPointsMm, hepcoRailVariantFor, hexToArgbInt, interpolateHeatmapValue, isChainClosed, isCustomAssetSelected, isKnownMagnetPlateType, isKnownModuleType, isKnownMoverType, isModuleSelected, isMoverSelected, isTrackSelected, labelAnchorFor, moduleAnchorWorld, moduleEndDelta, moduleHeightSpan, moduleSidecarFilename, moverAnchorWorld, moverSidecarFilename, moverWorldAt, nearestTrackPoint, normaliseToHeatmapRange, normalizeXtsConfig, pathLengthsMm, pickGlbForRail, poseToMatrix4, railSidecarFilename, registerPointCloud, resolveAttachedPlateType, resolveEntityFromObject, resolveGuidingRailGlbUrl, resolveGuidingRailType, resolveHepcoGfxProfile, resolveHepcoPrt2Profile, resolveMeasurementStyle, resolveModuleGlbUrl, resolveMoverGlbUrl, resolveOriginCorrection, resolvePlateGlbUrl, resolveStopPositionMm, resolveToolGlbUrl, sampleChainPoint, sampleChainRange, sampleModulePath, snapToGrid, sortHeatmapSamples, splitIntoFeedSegments, toModuleCollisionInputs, toolSidecarFilename, trackAnchorWorld, trackDistanceMm, trackLengthOf, trackPolylineWorld, unregisterPointCloud, useSidecarSource, userToChainPositionMm, worldPointOnPart };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { GLTF } from 'three-stdlib';
|
|
|
12
12
|
* Run `npm run sync-version` (or any script that depends on it) to refresh
|
|
13
13
|
* after bumping the package version.
|
|
14
14
|
*/
|
|
15
|
-
declare const VERSION: "6.
|
|
15
|
+
declare const VERSION: "6.4.0";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Default CDN URL for the GLB asset bundle (`beckhoff-xts-viewer-3d-assets`).
|
|
@@ -260,6 +260,8 @@ interface DisplayOptions {
|
|
|
260
260
|
moduleCornerMarkerOptions?: CalibrationMarkerOptions;
|
|
261
261
|
/** Size and colour of the mover anchor marker. */
|
|
262
262
|
moverAnchorMarkerOptions?: CalibrationMarkerOptions;
|
|
263
|
+
/** Default look of the `moduleJointMarkers` on `<XtsViewer3D>`. */
|
|
264
|
+
moduleJointMarkerOptions?: ModuleJointMarkerOptions;
|
|
263
265
|
/** Lighting, environment map and tone mapping. */
|
|
264
266
|
lighting?: LightingOptions;
|
|
265
267
|
/** Screen-space effects (SSAO, bloom). */
|
|
@@ -278,6 +280,14 @@ interface CalibrationMarkerOptions {
|
|
|
278
280
|
/** CSS colour. Default: `'#FF2030'` (red). */
|
|
279
281
|
color?: string;
|
|
280
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Defaults for the markers drawn on module joints (`moduleJointMarkers`).
|
|
285
|
+
* A marker's own `color` wins over these.
|
|
286
|
+
*/
|
|
287
|
+
interface ModuleJointMarkerOptions {
|
|
288
|
+
/** CSS colour. Default: `'#E6007E'` (magenta, apart from every status tint). */
|
|
289
|
+
color?: string;
|
|
290
|
+
}
|
|
281
291
|
/**
|
|
282
292
|
* Lighting and the renderer's colour pipeline.
|
|
283
293
|
*
|
|
@@ -675,6 +685,21 @@ interface InfoBarMarkerConfig {
|
|
|
675
685
|
sizeMm: number;
|
|
676
686
|
color?: string;
|
|
677
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* A live station status. Deliberately a union so it can grow; `'blocked'` is
|
|
690
|
+
* the only value today.
|
|
691
|
+
*/
|
|
692
|
+
type StationStatus = 'blocked';
|
|
693
|
+
/**
|
|
694
|
+
* One station's live status, pushed through
|
|
695
|
+
* `XtsViewer3DRef.setStationStatuses(entries)`. The entries passed are the
|
|
696
|
+
* whole set: a station not listed has no status.
|
|
697
|
+
*/
|
|
698
|
+
interface StationStatusEntry {
|
|
699
|
+
/** = `StationConfig.stationId`. Unknown ids are ignored. */
|
|
700
|
+
stationId: number;
|
|
701
|
+
status: StationStatus;
|
|
702
|
+
}
|
|
678
703
|
|
|
679
704
|
/**
|
|
680
705
|
* The configuration tree — what a host hands `<XtsViewer3D config={...}>`.
|
|
@@ -1703,7 +1728,8 @@ declare function checkAllModuleCollisions(config: NormalizedXtsConfig, orientati
|
|
|
1703
1728
|
*
|
|
1704
1729
|
* The types a host exchanges with the viewer at runtime rather than at
|
|
1705
1730
|
* configuration time: what is addressed (`ModuleRef`, `MoverRef`), what is
|
|
1706
|
-
* picked out (`SelectionState`, `ModuleHighlight`, `FeedSegmentHighlight
|
|
1731
|
+
* picked out (`SelectionState`, `ModuleHighlight`, `FeedSegmentHighlight`,
|
|
1732
|
+
* `ModuleJointMarker`),
|
|
1707
1733
|
* and where the camera looks (`CameraState`, `FocusTarget`).
|
|
1708
1734
|
*/
|
|
1709
1735
|
|
|
@@ -1819,6 +1845,32 @@ interface FeedSegmentHighlight {
|
|
|
1819
1845
|
/** Highlight color (CSS color string, e.g. `'#00AAFF'`). */
|
|
1820
1846
|
color: string;
|
|
1821
1847
|
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Declarative marker on the joint between two modules of a part — where a
|
|
1850
|
+
* track is split for transport or assembly, for instance.
|
|
1851
|
+
*
|
|
1852
|
+
* Drawn as a flat plate across the track on the joint face at the END of the
|
|
1853
|
+
* addressed module, a little wider and taller than the module profile. On a
|
|
1854
|
+
* closed chain (`isChainClosed`) a marker after the last module sits on the
|
|
1855
|
+
* seam to the first; on an open chain it has no joint to sit on and is
|
|
1856
|
+
* ignored, as is a `globalNumber` that matches no module.
|
|
1857
|
+
*
|
|
1858
|
+
* Display only: the marker takes no part in picking, selection,
|
|
1859
|
+
* measurements, collision checks or the `fitScene` bounds.
|
|
1860
|
+
*
|
|
1861
|
+
* Toggle on/off by setting `moduleJointMarkers` on `<XtsViewer3D>` to an
|
|
1862
|
+
* array (enabled) or `undefined` / `[]` (disabled).
|
|
1863
|
+
*/
|
|
1864
|
+
interface ModuleJointMarker {
|
|
1865
|
+
/** `ModuleEntry.globalNumber` of the module the joint FOLLOWS, in chain order. */
|
|
1866
|
+
afterModuleGlobalNumber: number;
|
|
1867
|
+
/**
|
|
1868
|
+
* CSS color; defaults to `DisplayOptions.moduleJointMarkerOptions.color`.
|
|
1869
|
+
*/
|
|
1870
|
+
color?: string;
|
|
1871
|
+
/** Optional short label drawn beside the marker (uses the label font). */
|
|
1872
|
+
label?: string;
|
|
1873
|
+
}
|
|
1822
1874
|
/**
|
|
1823
1875
|
* One feed segment (Einspeisestrang) as detected in the configuration: the
|
|
1824
1876
|
* contiguous run of modules starting at an infeed module (Einspeisemodul,
|
|
@@ -3032,6 +3084,41 @@ interface MeasurementApi {
|
|
|
3032
3084
|
fromJSON(document: MeasurementDocument): void;
|
|
3033
3085
|
}
|
|
3034
3086
|
|
|
3087
|
+
/**
|
|
3088
|
+
* StationStatusStore — out-of-React channel for live station status, the
|
|
3089
|
+
* station counterpart of `ModuleStatusStore`.
|
|
3090
|
+
*
|
|
3091
|
+
* The host pushes the full set of stations that carry a status through
|
|
3092
|
+
* `XtsViewer3DRef.setStationStatuses(entries)`; whatever the new set leaves
|
|
3093
|
+
* out is cleared. Each `<Station>` subscribes to its own `stationId` with
|
|
3094
|
+
* `useSyncExternalStore`, so a change re-renders only the stations it
|
|
3095
|
+
* touches and the config tree is never rebuilt.
|
|
3096
|
+
*
|
|
3097
|
+
* Keyed by `StationConfig.stationId`. The store does not know which stations
|
|
3098
|
+
* exist: an id no station has is stored and simply never read, which is what
|
|
3099
|
+
* lets a host push its list without filtering it first.
|
|
3100
|
+
*/
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* The tint of a blocked station's tube: chartreuse, hue 95°. Exported so a
|
|
3104
|
+
* host can draw its legend in exactly this colour.
|
|
3105
|
+
*
|
|
3106
|
+
* Chosen by hue distance, because a station tube already carries a colour of
|
|
3107
|
+
* the host's choosing and a status tint near that hue reads only as "brighter".
|
|
3108
|
+
* Checked against:
|
|
3109
|
+
* - the station presets of the XTS Project Builder, the main host: blue
|
|
3110
|
+
* 217°, red 0°, green 142°, yellow 45°, purple 271°, orange 25°, cyan
|
|
3111
|
+
* 189°, pink 330°. The widest gap between them is yellow to green; 95°
|
|
3112
|
+
* sits in its middle, at least 47° from every preset.
|
|
3113
|
+
* - the viewer's own tints, at least 50° away: drive warning amber 41°,
|
|
3114
|
+
* drive error red 0°, the default selection colours 43° and 197°, the
|
|
3115
|
+
* module joint marker magenta 327°. Feed-segment tints have no viewer
|
|
3116
|
+
* default; the host picks them. `stationStatus.test.tsx` holds this
|
|
3117
|
+
* part of the check.
|
|
3118
|
+
* The old amber (#FFB000) sat 4° from the yellow preset and 16° from orange.
|
|
3119
|
+
*/
|
|
3120
|
+
declare const STATION_BLOCKED_COLOR = "#6CFF00";
|
|
3121
|
+
|
|
3035
3122
|
/**
|
|
3036
3123
|
* Imperative ref API for <XtsViewer3D>.
|
|
3037
3124
|
*
|
|
@@ -3145,6 +3232,16 @@ interface XtsViewer3DRef {
|
|
|
3145
3232
|
setModuleStatuses(statuses: ReadonlyArray<ModuleStatusEntry | null | undefined>): void;
|
|
3146
3233
|
/** Clear all live module statuses (revert to config-time `ModuleEntry.status`). */
|
|
3147
3234
|
clearModuleStatuses(): void;
|
|
3235
|
+
/**
|
|
3236
|
+
* Push live station statuses, keyed by `StationConfig.stationId`. The
|
|
3237
|
+
* entries are the whole set: a station missing from it loses its status.
|
|
3238
|
+
* A `'blocked'` station's tube glows in `STATION_BLOCKED_COLOR`; only its
|
|
3239
|
+
* material changes. The same set again is a no-op, and an id no station
|
|
3240
|
+
* has is ignored.
|
|
3241
|
+
*/
|
|
3242
|
+
setStationStatuses(entries: ReadonlyArray<StationStatusEntry>): void;
|
|
3243
|
+
/** Clear every live station status. */
|
|
3244
|
+
clearStationStatuses(): void;
|
|
3148
3245
|
/**
|
|
3149
3246
|
* Push live mover-tool state, keyed by `MoverConfig.id` and then by
|
|
3150
3247
|
* `MoverToolConfig.id` — `update[mover.id][tool.id] = { visible }`.
|
|
@@ -3720,6 +3817,32 @@ interface XtsViewer3DProps {
|
|
|
3720
3817
|
* ```
|
|
3721
3818
|
*/
|
|
3722
3819
|
feedSegmentHighlights?: FeedSegmentHighlight[];
|
|
3820
|
+
/**
|
|
3821
|
+
* Mark joints between modules — where a track is split for transport or
|
|
3822
|
+
* assembly, for instance. Each marker is a flat plate across the track on
|
|
3823
|
+
* the joint face at the END of the module whose `globalNumber` it names,
|
|
3824
|
+
* a little wider and taller than the module profile, with an optional
|
|
3825
|
+
* label beside it.
|
|
3826
|
+
*
|
|
3827
|
+
* On a closed chain a marker after the last module sits on the seam to the
|
|
3828
|
+
* first; on an open chain it is ignored, as is a `globalNumber` that
|
|
3829
|
+
* matches no module. Display only: the plates are not pickable, not
|
|
3830
|
+
* measured, not collision-checked and not part of the `fitScene` bounds.
|
|
3831
|
+
*
|
|
3832
|
+
* Colour defaults to `display.moduleJointMarkerOptions.color`. Toggle off
|
|
3833
|
+
* with `undefined` / `[]`.
|
|
3834
|
+
*
|
|
3835
|
+
* @example
|
|
3836
|
+
* ```tsx
|
|
3837
|
+
* <XtsViewer3D
|
|
3838
|
+
* moduleJointMarkers={[
|
|
3839
|
+
* { afterModuleGlobalNumber: 4, label: 'T1' },
|
|
3840
|
+
* { afterModuleGlobalNumber: 9, label: 'T2', color: '#00C853' },
|
|
3841
|
+
* ]}
|
|
3842
|
+
* />
|
|
3843
|
+
* ```
|
|
3844
|
+
*/
|
|
3845
|
+
moduleJointMarkers?: ModuleJointMarker[];
|
|
3723
3846
|
/** Callbacks. */
|
|
3724
3847
|
onSelectionChange?: (s: SelectionState) => void;
|
|
3725
3848
|
onCameraChange?: (c: CameraState) => void;
|
|
@@ -3815,6 +3938,11 @@ interface XtsViewer3DProps {
|
|
|
3815
3938
|
showOriginAxes?: boolean;
|
|
3816
3939
|
showModuleLabels?: boolean;
|
|
3817
3940
|
overlayFps?: boolean;
|
|
3941
|
+
/**
|
|
3942
|
+
* Ground grid (default `true`). The grid is infinite and fades out at a
|
|
3943
|
+
* distance taken from the layout's size, so it reaches past the track
|
|
3944
|
+
* on any layout without showing an edge.
|
|
3945
|
+
*/
|
|
3818
3946
|
showGrid?: boolean;
|
|
3819
3947
|
};
|
|
3820
3948
|
className?: string;
|
|
@@ -4203,14 +4331,7 @@ interface ModuleHeightSpan {
|
|
|
4203
4331
|
* box, so a type the asset package does not describe behaves as it always did.
|
|
4204
4332
|
*/
|
|
4205
4333
|
declare function coarseHeightSpan(heightMm: number): ModuleHeightSpan;
|
|
4206
|
-
/**
|
|
4207
|
-
* Compose `approximateBoundsMm` through `originCorrection` and keep the Z range.
|
|
4208
|
-
*
|
|
4209
|
-
* All eight corners are transformed rather than only the two extremes: every
|
|
4210
|
-
* shipped correction happens to be a multiple of 90°, which would keep the box
|
|
4211
|
-
* axis-aligned, but nothing in the sidecar format promises that, and under a
|
|
4212
|
-
* 45° correction two corners would describe a box far too small.
|
|
4213
|
-
*/
|
|
4334
|
+
/** The Z range of `pathFrameBoundsOf`, or null when it is empty. */
|
|
4214
4335
|
declare function heightSpanOf(sidecar: ModuleSidecar): ModuleHeightSpan | null;
|
|
4215
4336
|
/**
|
|
4216
4337
|
* How tall `moduleType` is and where it sits, or the coarse fallback.
|
|
@@ -4624,6 +4745,13 @@ declare const GIZMO_AXIS_LABELS: readonly [string, string, string];
|
|
|
4624
4745
|
* `<DimensionLabel>` / `<MoverIdLabel>` additionally wrap their `<Text>`
|
|
4625
4746
|
* in a local Suspense boundary, so even a font that parses badly costs
|
|
4626
4747
|
* one label rather than the scene.
|
|
4748
|
+
*
|
|
4749
|
+
* The `blob:` URL can still be refused: a host whose Content-Security-
|
|
4750
|
+
* Policy leaves `blob:` out of `connect-src` blocks troika's request for
|
|
4751
|
+
* it, and every label then suspends for good while lines and geometry keep
|
|
4752
|
+
* drawing (issue #140). So the built-in font is checked once, the way
|
|
4753
|
+
* troika will load it. A blocked `blob:` URL is swapped for the `data:`
|
|
4754
|
+
* copy, and the host gets one warning that names the policy and the fix.
|
|
4627
4755
|
*/
|
|
4628
4756
|
/**
|
|
4629
4757
|
* Default 3D-text font: Roboto Condensed (Latin, regular weight).
|
|
@@ -5041,4 +5169,4 @@ declare function snapToGrid(positionMm: Vec3, gridMm: number): Vec3;
|
|
|
5041
5169
|
/** Convenience: `resolveSceneContext` + `toEntityRef`. */
|
|
5042
5170
|
declare function resolveEntityFromObject(object: Object3D | null, instanceId?: number): MeasuredEntityRef | null;
|
|
5043
5171
|
|
|
5044
|
-
export { type AngleMeasurement, type Annotation, type AnnotationAnchor, type AnnotationInput, type AreaConfig, type AreaOptions, AssetLoader, type AssetManifest, BUILTIN_MODULE_SIDECARS, BUILTIN_MOVER_SIDECARS, BUILTIN_RAIL_SIDECARS, BUILTIN_TOOL_SIDECARS, type BorePlacement, type BracketRun, type BuiltChain, type BuiltModule, CLOTHOID_HALF_PAIRS, type CalibrationMarkerOptions, type CameraProjection, type CameraState, type CaptureDimensions, type CaptureMode, type CaptureRequest, type CheckModuleCollisionsOptions, type CheckMoverCollisionsOptions, type ClickModifiers, type ClothoidHalfPair, type CollisionOptions, type CoordinateSystem, type CustomAssetBinding, type CustomAssetConfig, type CustomAssetRef, type CustomMoverLayout, DEFAULT_LABEL_FONT_URL, DEFAULT_MAGNET_PLATE_TYPE, DEFAULT_MEASUREMENT_STYLE, DEFAULT_MODULE_HALF_WIDTH_MM, DEFAULT_MODULE_HEIGHT_MM, DEFAULT_MODULE_MANIFEST, DEFAULT_MOVER_MANIFEST, DEFAULT_ORIGIN_CORRECTION, DEFAULT_RAIL_MANIFEST, DEFAULT_SNAP_KINDS, DEFAULT_SNAP_RADIUS_PX, DEFAULT_TOOL_MANIFEST, DEFAULT_TRACK_Z_MM, type DimensionOptions, type DisplayOptions, type DistanceMeasurement, EMPTY_SELECTION, type EndDelta, type FeedSegment, type FeedSegmentHighlight, type FeedSegmentSelector, type FeedSegmentSpan, type FocusOptions, type FocusTarget, type FrameCaptureOptions, type FrameCaptureSession, GIZMO_AXIS_COLORS, GIZMO_AXIS_LABELS, HEPCO_GFX_PROFILE, HEPCO_PRT2_PROFILE, HEPCO_RAIL_BY_MOVER, type HeatmapSample, type HepcoGfxRailProfileDims, type HepcoPrt2RailProfileDims, type HepcoRailVariant, IDENTITY_POSE, INFEED_MODULE_TYPES, type InfoBarConfig, type InfoBarMarkerConfig, type InfoBarOptions, type InteractionLocks, JSDELIVR_ASSETS_BASE_URL, type KeyboardNavigationOptions, type LightingOptions, MAGNET_PLATE_CATALOG, MODULE_CATALOG, MODULE_GUIDING_RAIL_MAP, MOVER_CATALOG, MOVER_INTEGRATED_PLATE, type MagnetPlateAssetEntry, type MagnetPlateCatalogEntry, type MagnetPlateType3D, type MarkerOptions, type MarkerShape, type MeasuredEntityRef, type Measurement, type MeasurementApi, type MeasurementAxis, type MeasurementDocument, type MeasurementDraft, type MeasurementFormatOptions, type MeasurementId, type MeasurementInput, type MeasurementKind, type MeasurementOptions, type MeasurementPatch, type MeasurementPoint, type MeasurementResult, type MeasurementSnapshot, type MeasurementStyle, type MeasurementTool, type ModuleAssetEntry, type ModuleCatalogEntry, type ModuleCollision, type ModuleCollisionOptions, type ModuleCollisionPartInput, type ModuleCollisionXpuInput, ModuleCornerMarkers, type ModuleEntry, type ModuleHeightSpan, type ModuleHighlight, type ModuleProbe, type ModuleRef, type ModuleSidecar, type ModuleStatusEntry, type ModuleType3D, type MoverAssetEntry, type MoverCatalogEntry, type MoverCollision, type MoverCollisionOptions, type MoverConfig, MoverIdLabel, type MoverIdLabelOptions, type MoverPositionEntry, type MoverProbe, type MoverRef, type MoverSidecar, type MoverToolAssetEntry, type MoverToolConfig, type MoverToolSidecar, type MoverToolStateEntry, type MoverToolType3D, type MoverType3D, type NormalizationWarning, type NormalizedXtsConfig, type Orientation, type OriginCorrection, type PartConfig, type PartPath, type PartTransformation, type PathMeasurement, type PathSample, type PathType, type PerformanceOptions, type PlanarPose, type PointCloud, type PointProjector, type PositionFrame, type PostProcessingOptions, type ProcessingUnitConfig, type ProfilePoint, type RailAssetEntry, type RailSidecar, type RailSystem, type RailType3D, type RenderQuality, type ResolvedMeasurementStyle, SIDECAR_KINDS, type ScreenshotFormat, type ScreenshotMode, type ScreenshotOptions, type ScreenshotResult, type SelectionColors, type SelectionMode, type SelectionScope, type SelectionState, type SidecarIdOf, type SidecarKind, type SidecarKindSpec, type SidecarKinds, SidecarLoader, type SidecarOf, type SidecarOverrides, type SidecarSourceConfig, SidecarSourceContext, type SnapCandidate, type SnapKind, type SnapOptions, type Span, type SplitFeedSegmentsOptions, type StationConfig, type StationOptions, type StatorHeatmap, type StopPositionMoverOptions, type TextOptions, type TrackAnchor, type TrackDistanceMeasurement, type TrackIndex, type TrackIndexEntry, type TrackMetrics, type TrackMetricsResolver, type TrackProjection, type TrackRef, type TrackTransform, type TransformGizmoChange, type TransformGizmoMode, type TransformGizmoOptions, type TransformGizmoPose, type TransformGizmoTarget, VERSION, type Vec2, type Vec3, type ViewCubeAlignment, type ViewCubeOptions, XtsModuleCurve3 as XtsArcCurve3, type XtsConfig, XtsConfigNormalizer, type XtsModelDocument, XtsModuleCurve3, XtsModuleCurve3 as XtsPointCloudCurve3, type XtsRuntimeState, XtsViewer3D, type XtsViewer3DProps, type XtsViewer3DRef, type XtsViewerError, type XtsViewerErrorCode, XtsViewerErrorException, angleDeg, applyBeckhoffXtsConvention, applyBeckhoffXtsConventionToOverrides, applyBeckhoffXtsConventionToTrackTransform, applyCustomAssetClick, applyEmptyClick, applyModuleClick, applyMoverClick, applyTrackClick, arcPoints, argbIntToHex, axisDistanceMm, buildChain, buildHepcoGfxBaseplateBridgeOutline, buildHepcoGfxBaseplateOutline, buildHepcoGfxBracketBaseOutline, buildHepcoGfxBracketEndBlockOutline, buildHepcoGfxBracketOutline, buildHepcoGfxBracketWallOutline, buildHepcoGfxRailOutline, buildHepcoPrt2RailOutline, buildModuleProbes, buildPartPath, buildTrackIndex, bundledLabelFontUrl, chainToUserPositionMm, checkAllModuleCollisions, checkAllMoverCollisions, checkModuleCollisions, checkSamePathCollisions, chooseSnapCandidate, coarseHeightSpan, collectFeedSegments, collectFeedSegmentsForXpu, collectTriangleSnapCandidates, composeAssetUrl, computeMeasurementResult, createHepcoGfxBaseplateBridgeShape, createHepcoGfxBaseplateShape, createHepcoGfxBracketBaseShape, createHepcoGfxBracketEndBlockShape, createHepcoGfxBracketShape, createHepcoGfxBracketWallShape, createHepcoGfxRailShape, createHepcoPrt2RailShape, deselectAll, distanceMm, findModuleAt, formatAngleDeg, formatLengthMm, getMagnetPlateEntry, getModuleEntry, getMoverEntry, getPointCloud, getSharedAssetLoader, heightSpanOf, hepcoGfxBaseplateBridgeSpans, hepcoGfxBracketBores, hepcoGfxBracketEndBlockSpans, hepcoGfxBracketRuns, hepcoGfxBracketWallSpans, hepcoGfxPlateBores, hepcoPrt2ApexPointsMm, hepcoRailVariantFor, hexToArgbInt, interpolateHeatmapValue, isChainClosed, isCustomAssetSelected, isKnownMagnetPlateType, isKnownModuleType, isKnownMoverType, isModuleSelected, isMoverSelected, isTrackSelected, labelAnchorFor, moduleAnchorWorld, moduleEndDelta, moduleHeightSpan, moduleSidecarFilename, moverAnchorWorld, moverSidecarFilename, moverWorldAt, nearestTrackPoint, normaliseToHeatmapRange, normalizeXtsConfig, pathLengthsMm, pickGlbForRail, poseToMatrix4, railSidecarFilename, registerPointCloud, resolveAttachedPlateType, resolveEntityFromObject, resolveGuidingRailGlbUrl, resolveGuidingRailType, resolveHepcoGfxProfile, resolveHepcoPrt2Profile, resolveMeasurementStyle, resolveModuleGlbUrl, resolveMoverGlbUrl, resolveOriginCorrection, resolvePlateGlbUrl, resolveStopPositionMm, resolveToolGlbUrl, sampleChainPoint, sampleChainRange, sampleModulePath, snapToGrid, sortHeatmapSamples, splitIntoFeedSegments, toModuleCollisionInputs, toolSidecarFilename, trackAnchorWorld, trackDistanceMm, trackLengthOf, trackPolylineWorld, unregisterPointCloud, useSidecarSource, userToChainPositionMm, worldPointOnPart };
|
|
5172
|
+
export { type AngleMeasurement, type Annotation, type AnnotationAnchor, type AnnotationInput, type AreaConfig, type AreaOptions, AssetLoader, type AssetManifest, BUILTIN_MODULE_SIDECARS, BUILTIN_MOVER_SIDECARS, BUILTIN_RAIL_SIDECARS, BUILTIN_TOOL_SIDECARS, type BorePlacement, type BracketRun, type BuiltChain, type BuiltModule, CLOTHOID_HALF_PAIRS, type CalibrationMarkerOptions, type CameraProjection, type CameraState, type CaptureDimensions, type CaptureMode, type CaptureRequest, type CheckModuleCollisionsOptions, type CheckMoverCollisionsOptions, type ClickModifiers, type ClothoidHalfPair, type CollisionOptions, type CoordinateSystem, type CustomAssetBinding, type CustomAssetConfig, type CustomAssetRef, type CustomMoverLayout, DEFAULT_LABEL_FONT_URL, DEFAULT_MAGNET_PLATE_TYPE, DEFAULT_MEASUREMENT_STYLE, DEFAULT_MODULE_HALF_WIDTH_MM, DEFAULT_MODULE_HEIGHT_MM, DEFAULT_MODULE_MANIFEST, DEFAULT_MOVER_MANIFEST, DEFAULT_ORIGIN_CORRECTION, DEFAULT_RAIL_MANIFEST, DEFAULT_SNAP_KINDS, DEFAULT_SNAP_RADIUS_PX, DEFAULT_TOOL_MANIFEST, DEFAULT_TRACK_Z_MM, type DimensionOptions, type DisplayOptions, type DistanceMeasurement, EMPTY_SELECTION, type EndDelta, type FeedSegment, type FeedSegmentHighlight, type FeedSegmentSelector, type FeedSegmentSpan, type FocusOptions, type FocusTarget, type FrameCaptureOptions, type FrameCaptureSession, GIZMO_AXIS_COLORS, GIZMO_AXIS_LABELS, HEPCO_GFX_PROFILE, HEPCO_PRT2_PROFILE, HEPCO_RAIL_BY_MOVER, type HeatmapSample, type HepcoGfxRailProfileDims, type HepcoPrt2RailProfileDims, type HepcoRailVariant, IDENTITY_POSE, INFEED_MODULE_TYPES, type InfoBarConfig, type InfoBarMarkerConfig, type InfoBarOptions, type InteractionLocks, JSDELIVR_ASSETS_BASE_URL, type KeyboardNavigationOptions, type LightingOptions, MAGNET_PLATE_CATALOG, MODULE_CATALOG, MODULE_GUIDING_RAIL_MAP, MOVER_CATALOG, MOVER_INTEGRATED_PLATE, type MagnetPlateAssetEntry, type MagnetPlateCatalogEntry, type MagnetPlateType3D, type MarkerOptions, type MarkerShape, type MeasuredEntityRef, type Measurement, type MeasurementApi, type MeasurementAxis, type MeasurementDocument, type MeasurementDraft, type MeasurementFormatOptions, type MeasurementId, type MeasurementInput, type MeasurementKind, type MeasurementOptions, type MeasurementPatch, type MeasurementPoint, type MeasurementResult, type MeasurementSnapshot, type MeasurementStyle, type MeasurementTool, type ModuleAssetEntry, type ModuleCatalogEntry, type ModuleCollision, type ModuleCollisionOptions, type ModuleCollisionPartInput, type ModuleCollisionXpuInput, ModuleCornerMarkers, type ModuleEntry, type ModuleHeightSpan, type ModuleHighlight, type ModuleJointMarker, type ModuleJointMarkerOptions, type ModuleProbe, type ModuleRef, type ModuleSidecar, type ModuleStatusEntry, type ModuleType3D, type MoverAssetEntry, type MoverCatalogEntry, type MoverCollision, type MoverCollisionOptions, type MoverConfig, MoverIdLabel, type MoverIdLabelOptions, type MoverPositionEntry, type MoverProbe, type MoverRef, type MoverSidecar, type MoverToolAssetEntry, type MoverToolConfig, type MoverToolSidecar, type MoverToolStateEntry, type MoverToolType3D, type MoverType3D, type NormalizationWarning, type NormalizedXtsConfig, type Orientation, type OriginCorrection, type PartConfig, type PartPath, type PartTransformation, type PathMeasurement, type PathSample, type PathType, type PerformanceOptions, type PlanarPose, type PointCloud, type PointProjector, type PositionFrame, type PostProcessingOptions, type ProcessingUnitConfig, type ProfilePoint, type RailAssetEntry, type RailSidecar, type RailSystem, type RailType3D, type RenderQuality, type ResolvedMeasurementStyle, SIDECAR_KINDS, STATION_BLOCKED_COLOR, type ScreenshotFormat, type ScreenshotMode, type ScreenshotOptions, type ScreenshotResult, type SelectionColors, type SelectionMode, type SelectionScope, type SelectionState, type SidecarIdOf, type SidecarKind, type SidecarKindSpec, type SidecarKinds, SidecarLoader, type SidecarOf, type SidecarOverrides, type SidecarSourceConfig, SidecarSourceContext, type SnapCandidate, type SnapKind, type SnapOptions, type Span, type SplitFeedSegmentsOptions, type StationConfig, type StationOptions, type StationStatus, type StationStatusEntry, type StatorHeatmap, type StopPositionMoverOptions, type TextOptions, type TrackAnchor, type TrackDistanceMeasurement, type TrackIndex, type TrackIndexEntry, type TrackMetrics, type TrackMetricsResolver, type TrackProjection, type TrackRef, type TrackTransform, type TransformGizmoChange, type TransformGizmoMode, type TransformGizmoOptions, type TransformGizmoPose, type TransformGizmoTarget, VERSION, type Vec2, type Vec3, type ViewCubeAlignment, type ViewCubeOptions, XtsModuleCurve3 as XtsArcCurve3, type XtsConfig, XtsConfigNormalizer, type XtsModelDocument, XtsModuleCurve3, XtsModuleCurve3 as XtsPointCloudCurve3, type XtsRuntimeState, XtsViewer3D, type XtsViewer3DProps, type XtsViewer3DRef, type XtsViewerError, type XtsViewerErrorCode, XtsViewerErrorException, angleDeg, applyBeckhoffXtsConvention, applyBeckhoffXtsConventionToOverrides, applyBeckhoffXtsConventionToTrackTransform, applyCustomAssetClick, applyEmptyClick, applyModuleClick, applyMoverClick, applyTrackClick, arcPoints, argbIntToHex, axisDistanceMm, buildChain, buildHepcoGfxBaseplateBridgeOutline, buildHepcoGfxBaseplateOutline, buildHepcoGfxBracketBaseOutline, buildHepcoGfxBracketEndBlockOutline, buildHepcoGfxBracketOutline, buildHepcoGfxBracketWallOutline, buildHepcoGfxRailOutline, buildHepcoPrt2RailOutline, buildModuleProbes, buildPartPath, buildTrackIndex, bundledLabelFontUrl, chainToUserPositionMm, checkAllModuleCollisions, checkAllMoverCollisions, checkModuleCollisions, checkSamePathCollisions, chooseSnapCandidate, coarseHeightSpan, collectFeedSegments, collectFeedSegmentsForXpu, collectTriangleSnapCandidates, composeAssetUrl, computeMeasurementResult, createHepcoGfxBaseplateBridgeShape, createHepcoGfxBaseplateShape, createHepcoGfxBracketBaseShape, createHepcoGfxBracketEndBlockShape, createHepcoGfxBracketShape, createHepcoGfxBracketWallShape, createHepcoGfxRailShape, createHepcoPrt2RailShape, deselectAll, distanceMm, findModuleAt, formatAngleDeg, formatLengthMm, getMagnetPlateEntry, getModuleEntry, getMoverEntry, getPointCloud, getSharedAssetLoader, heightSpanOf, hepcoGfxBaseplateBridgeSpans, hepcoGfxBracketBores, hepcoGfxBracketEndBlockSpans, hepcoGfxBracketRuns, hepcoGfxBracketWallSpans, hepcoGfxPlateBores, hepcoPrt2ApexPointsMm, hepcoRailVariantFor, hexToArgbInt, interpolateHeatmapValue, isChainClosed, isCustomAssetSelected, isKnownMagnetPlateType, isKnownModuleType, isKnownMoverType, isModuleSelected, isMoverSelected, isTrackSelected, labelAnchorFor, moduleAnchorWorld, moduleEndDelta, moduleHeightSpan, moduleSidecarFilename, moverAnchorWorld, moverSidecarFilename, moverWorldAt, nearestTrackPoint, normaliseToHeatmapRange, normalizeXtsConfig, pathLengthsMm, pickGlbForRail, poseToMatrix4, railSidecarFilename, registerPointCloud, resolveAttachedPlateType, resolveEntityFromObject, resolveGuidingRailGlbUrl, resolveGuidingRailType, resolveHepcoGfxProfile, resolveHepcoPrt2Profile, resolveMeasurementStyle, resolveModuleGlbUrl, resolveMoverGlbUrl, resolveOriginCorrection, resolvePlateGlbUrl, resolveStopPositionMm, resolveToolGlbUrl, sampleChainPoint, sampleChainRange, sampleModulePath, snapToGrid, sortHeatmapSamples, splitIntoFeedSegments, toModuleCollisionInputs, toolSidecarFilename, trackAnchorWorld, trackDistanceMm, trackLengthOf, trackPolylineWorld, unregisterPointCloud, useSidecarSource, userToChainPositionMm, worldPointOnPart };
|