@itwin/core-common 3.0.0-extension.0 → 3.1.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/BackgroundMapSettings.d.ts +1 -1
- package/lib/cjs/BackgroundMapSettings.d.ts.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +28 -11
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +26 -12
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.d.ts +36 -16
- package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
- package/lib/cjs/ContextRealityModel.js +46 -7
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts +30 -24
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +43 -16
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +17 -5
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +55 -22
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.d.ts +3 -3
- package/lib/cjs/ECSqlTypes.js +3 -3
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +9 -0
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/Environment.d.ts +61 -0
- package/lib/cjs/Environment.d.ts.map +1 -0
- package/lib/cjs/Environment.js +74 -0
- package/lib/cjs/Environment.js.map +1 -0
- package/lib/cjs/FeatureSymbology.d.ts +97 -18
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +83 -27
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.d.ts +66 -1
- package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +39 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +10 -0
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GroundPlane.d.ts +26 -15
- package/lib/cjs/GroundPlane.d.ts.map +1 -1
- package/lib/cjs/GroundPlane.js +40 -39
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/IModel.d.ts +33 -4
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +27 -10
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/LightSettings.d.ts +59 -0
- package/lib/cjs/LightSettings.d.ts.map +1 -1
- package/lib/cjs/LightSettings.js +75 -6
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/Localization.d.ts +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts +2 -2
- package/lib/cjs/MapLayerSettings.js +2 -2
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/NativeAppProps.d.ts +2 -36
- package/lib/cjs/NativeAppProps.d.ts.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/PlanarClipMask.d.ts +73 -8
- package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMask.js +17 -24
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.d.ts +42 -0
- package/lib/cjs/RealityDataAccessProps.d.ts.map +1 -0
- package/lib/cjs/RealityDataAccessProps.js +20 -0
- package/lib/cjs/RealityDataAccessProps.js.map +1 -0
- package/lib/cjs/RenderMaterial.d.ts +7 -7
- package/lib/cjs/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/RenderMaterial.js +10 -5
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderSchedule.d.ts +4 -0
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +5 -1
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +8 -1
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/SkyBox.d.ts +142 -34
- package/lib/cjs/SkyBox.d.ts.map +1 -1
- package/lib/cjs/SkyBox.js +192 -6
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/TextureMapping.d.ts +3 -1
- package/lib/cjs/TextureMapping.d.ts.map +1 -1
- package/lib/cjs/TextureMapping.js +9 -6
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.d.ts +21 -2
- package/lib/cjs/TextureProps.d.ts.map +1 -1
- package/lib/cjs/TextureProps.js +19 -0
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.d.ts +6 -0
- package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
- package/lib/cjs/ThematicDisplay.js +26 -0
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/TileProps.d.ts +6 -0
- package/lib/cjs/TileProps.d.ts.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +8 -0
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +30 -10
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/core-common.d.ts +7 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +7 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.d.ts +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts +25 -10
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +9 -7
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts +12 -8
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.d.ts +1 -1
- package/lib/cjs/geometry/FrustumPlanes.d.ts.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +26 -13
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.d.ts +12 -5
- package/lib/cjs/ipc/IpcWebSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +32 -8
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.d.ts +15 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.d.ts.map +1 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.js +142 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -0
- package/lib/cjs/rpc/core/RpcInvocation.d.ts +4 -4
- package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +3 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.d.ts +5 -1
- package/lib/cjs/tile/ElementGraphics.d.ts.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.d.ts +16 -79
- package/lib/cjs/tile/GltfTileIO.d.ts.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js +72 -153
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +20 -8
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +50 -53
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +28 -11
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +26 -12
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.d.ts +36 -16
- package/lib/esm/ContextRealityModel.d.ts.map +1 -1
- package/lib/esm/ContextRealityModel.js +45 -6
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts +30 -24
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +43 -16
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +17 -5
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +56 -23
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.d.ts +3 -3
- package/lib/esm/ECSqlTypes.js +3 -3
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +9 -0
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/Environment.d.ts +61 -0
- package/lib/esm/Environment.d.ts.map +1 -0
- package/lib/esm/Environment.js +70 -0
- package/lib/esm/Environment.js.map +1 -0
- package/lib/esm/FeatureSymbology.d.ts +97 -18
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +84 -28
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.d.ts +66 -1
- package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/esm/GeoCoordinateServices.js +39 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +10 -0
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GroundPlane.d.ts +26 -15
- package/lib/esm/GroundPlane.d.ts.map +1 -1
- package/lib/esm/GroundPlane.js +40 -39
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/IModel.d.ts +33 -4
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +27 -10
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/LightSettings.d.ts +59 -0
- package/lib/esm/LightSettings.d.ts.map +1 -1
- package/lib/esm/LightSettings.js +74 -6
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/Localization.d.ts +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +2 -2
- package/lib/esm/MapLayerSettings.js +2 -2
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/NativeAppProps.d.ts +2 -36
- package/lib/esm/NativeAppProps.d.ts.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/PlanarClipMask.d.ts +73 -8
- package/lib/esm/PlanarClipMask.d.ts.map +1 -1
- package/lib/esm/PlanarClipMask.js +17 -24
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.d.ts +42 -0
- package/lib/esm/RealityDataAccessProps.d.ts.map +1 -0
- package/lib/esm/RealityDataAccessProps.js +17 -0
- package/lib/esm/RealityDataAccessProps.js.map +1 -0
- package/lib/esm/RenderMaterial.d.ts +7 -7
- package/lib/esm/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/RenderMaterial.js +10 -5
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderSchedule.d.ts +4 -0
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +5 -1
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +8 -1
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/SkyBox.d.ts +142 -34
- package/lib/esm/SkyBox.d.ts.map +1 -1
- package/lib/esm/SkyBox.js +187 -5
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/TextureMapping.d.ts +3 -1
- package/lib/esm/TextureMapping.d.ts.map +1 -1
- package/lib/esm/TextureMapping.js +9 -6
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.d.ts +21 -2
- package/lib/esm/TextureProps.d.ts.map +1 -1
- package/lib/esm/TextureProps.js +18 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.d.ts +6 -0
- package/lib/esm/ThematicDisplay.d.ts.map +1 -1
- package/lib/esm/ThematicDisplay.js +26 -0
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/TileProps.d.ts +6 -0
- package/lib/esm/TileProps.d.ts.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +8 -0
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +30 -10
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/core-common.d.ts +7 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +7 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.d.ts +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts +25 -10
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +9 -7
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts +12 -8
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.d.ts +1 -1
- package/lib/esm/geometry/FrustumPlanes.d.ts.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +26 -13
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.d.ts +12 -5
- package/lib/esm/ipc/IpcWebSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +31 -6
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.d.ts +15 -0
- package/lib/esm/ipc/IpcWebSocketTransport.d.ts.map +1 -0
- package/lib/esm/ipc/IpcWebSocketTransport.js +138 -0
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -0
- package/lib/esm/rpc/core/RpcInvocation.d.ts +4 -4
- package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +3 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.d.ts +5 -1
- package/lib/esm/tile/ElementGraphics.d.ts.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.d.ts +16 -79
- package/lib/esm/tile/GltfTileIO.d.ts.map +1 -1
- package/lib/esm/tile/GltfTileIO.js +70 -149
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +20 -8
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js +50 -53
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +10 -11
|
@@ -12,6 +12,7 @@ export interface TileTreeMetadata {
|
|
|
12
12
|
readonly modelId: Id64String;
|
|
13
13
|
readonly is2d: boolean;
|
|
14
14
|
readonly contentRange?: Range3d;
|
|
15
|
+
readonly tileScreenSize: number;
|
|
15
16
|
}
|
|
16
17
|
/** Describes the contents of an iModel tile.
|
|
17
18
|
* @internal
|
|
@@ -38,8 +39,10 @@ export interface TileOptions {
|
|
|
38
39
|
readonly enableExternalTextures: boolean;
|
|
39
40
|
readonly useProjectExtents: boolean;
|
|
40
41
|
readonly optimizeBRepProcessing: boolean;
|
|
42
|
+
readonly useLargerTiles: boolean;
|
|
41
43
|
readonly disableMagnification: boolean;
|
|
42
44
|
readonly alwaysSubdivideIncompleteTiles: boolean;
|
|
45
|
+
readonly enableIndexedEdges: boolean;
|
|
43
46
|
}
|
|
44
47
|
/** @internal */
|
|
45
48
|
export declare namespace TileOptions {
|
|
@@ -69,7 +72,19 @@ export declare enum TreeFlags {
|
|
|
69
72
|
None = 0,
|
|
70
73
|
UseProjectExtents = 1,
|
|
71
74
|
EnforceDisplayPriority = 2,
|
|
72
|
-
OptimizeBRepProcessing = 4
|
|
75
|
+
OptimizeBRepProcessing = 4,
|
|
76
|
+
UseLargerTiles = 8
|
|
77
|
+
}
|
|
78
|
+
/** Describes the type of edges to include in the graphics for a tile tree.
|
|
79
|
+
* @alpha
|
|
80
|
+
*/
|
|
81
|
+
export declare enum EdgeType {
|
|
82
|
+
/** Omit all edges. */
|
|
83
|
+
None = 0,
|
|
84
|
+
/** Include non-indexed edges, which consume more memory and are less efficient to draw than [[Indexed]] edges, but are compatible with WebGL 1. */
|
|
85
|
+
NonIndexed = 1,
|
|
86
|
+
/** Include indexed edges, which use less memory and draw more efficiently than [[NonIndexed]] edges, but require WebGL 2. */
|
|
87
|
+
Indexed = 2
|
|
73
88
|
}
|
|
74
89
|
/** Describes a tile tree used to draw the contents of a model, possibly with embedded animation.
|
|
75
90
|
* @internal
|
|
@@ -77,12 +92,10 @@ export declare enum TreeFlags {
|
|
|
77
92
|
export interface PrimaryTileTreeId {
|
|
78
93
|
/** Describes the type of tile tree. */
|
|
79
94
|
type: BatchType.Primary;
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
/** Id of the [DisplayStyle]($backend) holding the [[RenderSchedule]] script to be applied to the tiles. */
|
|
95
|
+
/** The type of edges to include in tile content. */
|
|
96
|
+
edges: EdgeType;
|
|
97
|
+
/** Id of the [DisplayStyle]($backend) or [RenderTimeline]($backend) element holding the [[RenderSchedule]] script to be applied to the tiles. */
|
|
83
98
|
animationId?: Id64String;
|
|
84
|
-
/** Id of the transform node within the [[RenderSchedule]] script to be applied to the tiles. */
|
|
85
|
-
animationTransformNodeId?: number;
|
|
86
99
|
/** If true, meshes within the tiles will be grouped into nodes based on the display priority associated with their subcategories,
|
|
87
100
|
* for ensuring the graphics display with correct priority.
|
|
88
101
|
*/
|
|
@@ -100,7 +113,6 @@ export interface ClassifierTileTreeId {
|
|
|
100
113
|
type: BatchType.VolumeClassifier | BatchType.PlanarClassifier;
|
|
101
114
|
expansion: number;
|
|
102
115
|
animationId?: Id64String;
|
|
103
|
-
animationTransformNodeId?: number;
|
|
104
116
|
}
|
|
105
117
|
/** Describes the Id of an iModel tile tree.
|
|
106
118
|
* @internal
|
|
@@ -194,7 +206,7 @@ export declare function readTileContentDescription(stream: ByteStream, sizeMulti
|
|
|
194
206
|
/** Compute the chord tolerance for the specified tile of the given range with the specified size multiplier.
|
|
195
207
|
* @internal
|
|
196
208
|
*/
|
|
197
|
-
export declare function computeTileChordTolerance(tile: TileMetadata, is3d: boolean): number;
|
|
209
|
+
export declare function computeTileChordTolerance(tile: TileMetadata, is3d: boolean, tileScreenSize: number): number;
|
|
198
210
|
/** Deserializes tile metadata.
|
|
199
211
|
* @internal
|
|
200
212
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileMetadata.d.ts","sourceRoot":"","sources":["../../../src/tile/TileMetadata.ts"],"names":[],"mappings":"AAIA;;GAEG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,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,GAAG,sBAAsB,CAqD3L;AAID;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAS3G;AAED;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAU;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAc;gBAEpB,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW;IAMvE;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,YAAY;CAWhE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Tile
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.TileMetadataReader = exports.computeTileChordTolerance = exports.readTileContentDescription = exports.computeChildTileProps = exports.computeChildTileRanges = exports.bisectTileRange2d = exports.bisectTileRange3d = exports.ContentIdProvider = exports.ContentFlags = exports.compareIModelTileTreeIds = exports.iModelTileTreeIdToString = exports.TreeFlags = exports.getMaximumMajorTileFormatVersion = exports.defaultTileOptions = exports.parseTileTreeIdAndContentId = exports.TileOptions = void 0;
|
|
10
|
+
exports.TileMetadataReader = exports.computeTileChordTolerance = exports.readTileContentDescription = exports.computeChildTileProps = exports.computeChildTileRanges = exports.bisectTileRange2d = exports.bisectTileRange3d = exports.ContentIdProvider = exports.ContentFlags = exports.compareIModelTileTreeIds = exports.iModelTileTreeIdToString = exports.EdgeType = exports.TreeFlags = exports.getMaximumMajorTileFormatVersion = exports.defaultTileOptions = exports.parseTileTreeIdAndContentId = exports.TileOptions = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const core_geometry_1 = require("@itwin/core-geometry");
|
|
13
13
|
const FeatureTable_1 = require("../FeatureTable");
|
|
@@ -17,10 +17,7 @@ const TileIO_1 = require("./TileIO");
|
|
|
17
17
|
// NB: These constants correspond to those defined in Tile.cpp.
|
|
18
18
|
var Constants;
|
|
19
19
|
(function (Constants) {
|
|
20
|
-
Constants.tileScreenSize = 512;
|
|
21
20
|
Constants.minToleranceRatioMultiplier = 2;
|
|
22
|
-
Constants.minToleranceRatio = Constants.tileScreenSize * Constants.minToleranceRatioMultiplier;
|
|
23
|
-
Constants.untransformedNodeValue = 0xffffffff;
|
|
24
21
|
})(Constants || (Constants = {}));
|
|
25
22
|
/** @internal */
|
|
26
23
|
var TileOptions;
|
|
@@ -42,8 +39,10 @@ var TileOptions;
|
|
|
42
39
|
enableExternalTextures: 0 !== (contentFlags & ContentFlags.ExternalTextures),
|
|
43
40
|
useProjectExtents: 0 !== (tree.flags & TreeFlags.UseProjectExtents),
|
|
44
41
|
optimizeBRepProcessing: 0 !== (tree.flags & TreeFlags.OptimizeBRepProcessing),
|
|
42
|
+
useLargerTiles: 0 !== (tree.flags & TreeFlags.UseLargerTiles),
|
|
45
43
|
disableMagnification: false,
|
|
46
44
|
alwaysSubdivideIncompleteTiles: false,
|
|
45
|
+
enableIndexedEdges: true,
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
TileOptions.fromTreeIdAndContentId = fromTreeIdAndContentId;
|
|
@@ -51,7 +50,7 @@ var TileOptions;
|
|
|
51
50
|
/** @internal */
|
|
52
51
|
function parseTileTreeIdAndContentId(treeId, contentId) {
|
|
53
52
|
let idx = 0;
|
|
54
|
-
let type, expansion, animationId,
|
|
53
|
+
let type, expansion, animationId, edges, sectionCut;
|
|
55
54
|
// Skip version and flags, they're handled by TileOptions.fromTreeIdAndContentId
|
|
56
55
|
while (idx < treeId.length && treeId[idx] !== "-")
|
|
57
56
|
idx++;
|
|
@@ -67,15 +66,15 @@ function parseTileTreeIdAndContentId(treeId, contentId) {
|
|
|
67
66
|
}
|
|
68
67
|
// Animation
|
|
69
68
|
// eslint-disable-next-line prefer-const
|
|
70
|
-
({ idx, animationId
|
|
69
|
+
({ idx, animationId } = parseAnimation(idx, treeId, animationId));
|
|
71
70
|
if (type === FeatureTable_1.BatchType.Primary) {
|
|
72
|
-
({ idx,
|
|
71
|
+
({ idx, edges, sectionCut } = parsePrimary(idx, treeId, edges, sectionCut));
|
|
73
72
|
}
|
|
74
73
|
const modelId = treeId.substr(idx);
|
|
75
74
|
if (!core_bentley_1.Id64.isId64(modelId))
|
|
76
75
|
throw new Error("Invalid tree Id");
|
|
77
76
|
const { flags: treeFlags } = treeFlagsAndFormatVersionFromId(treeId);
|
|
78
|
-
const parsedTreeId = getTreeId(type,
|
|
77
|
+
const parsedTreeId = getTreeId(type, edges, sectionCut, animationId, expansion, (treeFlags & TreeFlags.EnforceDisplayPriority) !== 0 ? true : undefined);
|
|
79
78
|
const options = TileOptions.fromTreeIdAndContentId(treeId, contentId);
|
|
80
79
|
let parsedContentId;
|
|
81
80
|
try {
|
|
@@ -94,14 +93,13 @@ function parseTileTreeIdAndContentId(treeId, contentId) {
|
|
|
94
93
|
};
|
|
95
94
|
}
|
|
96
95
|
exports.parseTileTreeIdAndContentId = parseTileTreeIdAndContentId;
|
|
97
|
-
function getTreeId(type,
|
|
96
|
+
function getTreeId(type, edges, sectionCut, animationId, expansion, enforceDisplayPriority) {
|
|
98
97
|
if (type === FeatureTable_1.BatchType.Primary)
|
|
99
98
|
return {
|
|
100
99
|
type,
|
|
101
|
-
|
|
100
|
+
edges,
|
|
102
101
|
sectionCut,
|
|
103
102
|
animationId,
|
|
104
|
-
animationTransformNodeId: nodeId,
|
|
105
103
|
enforceDisplayPriority,
|
|
106
104
|
};
|
|
107
105
|
else
|
|
@@ -109,18 +107,19 @@ function getTreeId(type, edgesRequired, sectionCut, animationId, nodeId, expansi
|
|
|
109
107
|
type,
|
|
110
108
|
expansion,
|
|
111
109
|
animationId,
|
|
112
|
-
animationTransformNodeId: nodeId,
|
|
113
110
|
};
|
|
114
111
|
}
|
|
115
|
-
function parsePrimary(idx, treeId,
|
|
112
|
+
function parsePrimary(idx, treeId, edges = EdgeType.None, sectionCut) {
|
|
116
113
|
// Edges
|
|
117
|
-
|
|
118
|
-
if (idx < treeId.length
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
edges = EdgeType.NonIndexed;
|
|
115
|
+
if (idx < treeId.length) {
|
|
116
|
+
const noEdgesStr = "E:0_";
|
|
117
|
+
if (treeId.startsWith(noEdgesStr, idx))
|
|
118
|
+
edges = EdgeType.None;
|
|
119
|
+
else if (treeId.startsWith("E:2_", idx))
|
|
120
|
+
edges = EdgeType.Indexed;
|
|
121
|
+
if (EdgeType.NonIndexed !== edges)
|
|
122
|
+
idx += noEdgesStr.length;
|
|
124
123
|
}
|
|
125
124
|
// Section cut
|
|
126
125
|
if (idx + 1 < treeId.length && treeId[idx] === "S") {
|
|
@@ -133,7 +132,7 @@ function parsePrimary(idx, treeId, edgesRequired, sectionCut) {
|
|
|
133
132
|
throw new Error("Invalid tree Id");
|
|
134
133
|
idx++; // s
|
|
135
134
|
}
|
|
136
|
-
return { idx,
|
|
135
|
+
return { idx, edges, sectionCut };
|
|
137
136
|
}
|
|
138
137
|
function parseClassifier(idx, treeId, expansion) {
|
|
139
138
|
let type;
|
|
@@ -160,7 +159,7 @@ function parseClassifier(idx, treeId, expansion) {
|
|
|
160
159
|
expansion = Number.parseFloat(expansionStr);
|
|
161
160
|
return { idx, type, expansion };
|
|
162
161
|
}
|
|
163
|
-
function parseAnimation(idx, treeId, animationId
|
|
162
|
+
function parseAnimation(idx, treeId, animationId) {
|
|
164
163
|
if (idx < treeId.length && treeId[idx] === "A") {
|
|
165
164
|
if (idx + 1 < treeId.length && treeId[idx + 1] !== ":")
|
|
166
165
|
throw new Error("Invalid tree Id");
|
|
@@ -173,22 +172,8 @@ function parseAnimation(idx, treeId, animationId, nodeId) {
|
|
|
173
172
|
if (!core_bentley_1.Id64.isId64(animationId) || idx === treeId.length)
|
|
174
173
|
throw new Error("Invalid tree Id");
|
|
175
174
|
idx++; // _
|
|
176
|
-
if (idx === treeId.length || treeId[idx] !== "#")
|
|
177
|
-
throw new Error("Invalid tree Id");
|
|
178
|
-
idx++; // #
|
|
179
|
-
// Parse animation node id
|
|
180
|
-
let nodeIdStr = "";
|
|
181
|
-
while (idx < treeId.length && treeId[idx] !== "_") {
|
|
182
|
-
nodeIdStr += treeId[idx++];
|
|
183
|
-
}
|
|
184
|
-
nodeId = Number.parseInt(nodeIdStr, 16);
|
|
185
|
-
if (idx === treeId.length || !Number.isFinite(nodeId) || nodeId.toString(16).toUpperCase() !== nodeIdStr.toUpperCase()) // if toString doesn't round-trip, that means there were invalid characters in the string
|
|
186
|
-
throw new Error("Invalid tree Id");
|
|
187
|
-
idx++; // _
|
|
188
|
-
if (nodeId === Constants.untransformedNodeValue)
|
|
189
|
-
nodeId = undefined;
|
|
190
175
|
}
|
|
191
|
-
return { idx, animationId
|
|
176
|
+
return { idx, animationId };
|
|
192
177
|
}
|
|
193
178
|
/** @internal */
|
|
194
179
|
exports.defaultTileOptions = Object.freeze({
|
|
@@ -199,8 +184,10 @@ exports.defaultTileOptions = Object.freeze({
|
|
|
199
184
|
enableExternalTextures: true,
|
|
200
185
|
useProjectExtents: true,
|
|
201
186
|
optimizeBRepProcessing: true,
|
|
187
|
+
useLargerTiles: true,
|
|
202
188
|
disableMagnification: false,
|
|
203
189
|
alwaysSubdivideIncompleteTiles: false,
|
|
190
|
+
enableIndexedEdges: true,
|
|
204
191
|
});
|
|
205
192
|
function contentFlagsFromId(id) {
|
|
206
193
|
if (0 === id.length || "-" !== id[0])
|
|
@@ -254,11 +241,22 @@ var TreeFlags;
|
|
|
254
241
|
TreeFlags[TreeFlags["UseProjectExtents"] = 1] = "UseProjectExtents";
|
|
255
242
|
TreeFlags[TreeFlags["EnforceDisplayPriority"] = 2] = "EnforceDisplayPriority";
|
|
256
243
|
TreeFlags[TreeFlags["OptimizeBRepProcessing"] = 4] = "OptimizeBRepProcessing";
|
|
244
|
+
TreeFlags[TreeFlags["UseLargerTiles"] = 8] = "UseLargerTiles";
|
|
257
245
|
})(TreeFlags = exports.TreeFlags || (exports.TreeFlags = {}));
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
246
|
+
/** Describes the type of edges to include in the graphics for a tile tree.
|
|
247
|
+
* @alpha
|
|
248
|
+
*/
|
|
249
|
+
var EdgeType;
|
|
250
|
+
(function (EdgeType) {
|
|
251
|
+
/** Omit all edges. */
|
|
252
|
+
EdgeType[EdgeType["None"] = 0] = "None";
|
|
253
|
+
/** Include non-indexed edges, which consume more memory and are less efficient to draw than [[Indexed]] edges, but are compatible with WebGL 1. */
|
|
254
|
+
EdgeType[EdgeType["NonIndexed"] = 1] = "NonIndexed";
|
|
255
|
+
/** Include indexed edges, which use less memory and draw more efficiently than [[NonIndexed]] edges, but require WebGL 2. */
|
|
256
|
+
EdgeType[EdgeType["Indexed"] = 2] = "Indexed";
|
|
257
|
+
})(EdgeType = exports.EdgeType || (exports.EdgeType = {}));
|
|
258
|
+
function animationIdToString(animationId) {
|
|
259
|
+
return `A:${animationId}_`;
|
|
262
260
|
}
|
|
263
261
|
/** Convert a tile tree Id to its string representation.
|
|
264
262
|
* @internal
|
|
@@ -268,12 +266,14 @@ function iModelTileTreeIdToString(modelId, treeId, options) {
|
|
|
268
266
|
let flags = options.useProjectExtents ? TreeFlags.UseProjectExtents : TreeFlags.None;
|
|
269
267
|
if (options.optimizeBRepProcessing)
|
|
270
268
|
flags |= TreeFlags.OptimizeBRepProcessing;
|
|
269
|
+
if (options.useLargerTiles)
|
|
270
|
+
flags |= TreeFlags.UseLargerTiles;
|
|
271
271
|
if (FeatureTable_1.BatchType.Primary === treeId.type) {
|
|
272
272
|
if (undefined !== treeId.animationId)
|
|
273
|
-
idStr = `${idStr}${animationIdToString(treeId.animationId
|
|
273
|
+
idStr = `${idStr}${animationIdToString(treeId.animationId)}`;
|
|
274
274
|
else if (treeId.enforceDisplayPriority) // animation and priority are currently mutually exclusive
|
|
275
275
|
flags |= TreeFlags.EnforceDisplayPriority;
|
|
276
|
-
const edges = treeId.
|
|
276
|
+
const edges = treeId.edges !== EdgeType.NonIndexed ? `E:${treeId.edges}_` : "";
|
|
277
277
|
const sectionCut = treeId.sectionCut ? `S${treeId.sectionCut}s` : "";
|
|
278
278
|
idStr = `${idStr}${edges}${sectionCut}`;
|
|
279
279
|
}
|
|
@@ -283,7 +283,7 @@ function iModelTileTreeIdToString(modelId, treeId, options) {
|
|
|
283
283
|
if (FeatureTable_1.BatchType.VolumeClassifier === treeId.type)
|
|
284
284
|
flags |= TreeFlags.UseProjectExtents;
|
|
285
285
|
if (undefined !== treeId.animationId)
|
|
286
|
-
idStr = `${idStr}${animationIdToString(treeId.animationId
|
|
286
|
+
idStr = `${idStr}${animationIdToString(treeId.animationId)}`;
|
|
287
287
|
}
|
|
288
288
|
const version = getMaximumMajorTileFormatVersion(options.maximumMajorTileFormatVersion);
|
|
289
289
|
if (version >= 4) {
|
|
@@ -298,17 +298,14 @@ exports.iModelTileTreeIdToString = iModelTileTreeIdToString;
|
|
|
298
298
|
*/
|
|
299
299
|
function compareIModelTileTreeIds(lhs, rhs) {
|
|
300
300
|
let cmp = (0, core_bentley_1.compareNumbers)(lhs.type, rhs.type);
|
|
301
|
-
if (0 === cmp)
|
|
301
|
+
if (0 === cmp)
|
|
302
302
|
cmp = (0, core_bentley_1.compareStringsOrUndefined)(lhs.animationId, rhs.animationId);
|
|
303
|
-
if (0 === cmp)
|
|
304
|
-
cmp = (0, core_bentley_1.compareNumbersOrUndefined)(lhs.animationTransformNodeId, rhs.animationTransformNodeId);
|
|
305
|
-
}
|
|
306
303
|
if (0 !== cmp)
|
|
307
304
|
return cmp;
|
|
308
305
|
// NB: The redundant checks on BatchType below are to satisfy compiler.
|
|
309
306
|
(0, core_bentley_1.assert)(lhs.type === rhs.type);
|
|
310
307
|
if (FeatureTable_1.BatchType.Primary === lhs.type && FeatureTable_1.BatchType.Primary === rhs.type) {
|
|
311
|
-
cmp = (0, core_bentley_1.
|
|
308
|
+
cmp = (0, core_bentley_1.compareNumbers)(lhs.edges, rhs.edges);
|
|
312
309
|
if (0 === cmp) {
|
|
313
310
|
cmp = (0, core_bentley_1.compareBooleansOrUndefined)(lhs.enforceDisplayPriority, rhs.enforceDisplayPriority);
|
|
314
311
|
if (0 === cmp)
|
|
@@ -504,7 +501,7 @@ function computeChildTileProps(parent, idProvider, root) {
|
|
|
504
501
|
contentRange: parent.contentRange,
|
|
505
502
|
sizeMultiplier,
|
|
506
503
|
isLeaf: false,
|
|
507
|
-
maximumSize:
|
|
504
|
+
maximumSize: root.tileScreenSize,
|
|
508
505
|
});
|
|
509
506
|
return { children, numEmpty };
|
|
510
507
|
}
|
|
@@ -547,7 +544,7 @@ function computeChildTileProps(parent, idProvider, root) {
|
|
|
547
544
|
childSpec.j = parentSpec.j * 2 + j;
|
|
548
545
|
childSpec.k = parentSpec.k * 2 + k;
|
|
549
546
|
const childId = idProvider.idFromSpec(childSpec);
|
|
550
|
-
children.push({ contentId: childId, range, maximumSize:
|
|
547
|
+
children.push({ contentId: childId, range, maximumSize: root.tileScreenSize });
|
|
551
548
|
}
|
|
552
549
|
}
|
|
553
550
|
}
|
|
@@ -612,14 +609,14 @@ const scratchRangeDiagonal = new core_geometry_1.Vector3d();
|
|
|
612
609
|
/** Compute the chord tolerance for the specified tile of the given range with the specified size multiplier.
|
|
613
610
|
* @internal
|
|
614
611
|
*/
|
|
615
|
-
function computeTileChordTolerance(tile, is3d) {
|
|
612
|
+
function computeTileChordTolerance(tile, is3d, tileScreenSize) {
|
|
616
613
|
var _a;
|
|
617
614
|
if (tile.range.isNull)
|
|
618
615
|
return 0;
|
|
619
616
|
const diagonal = tile.range.diagonal(scratchRangeDiagonal);
|
|
620
617
|
const diagDist = is3d ? diagonal.magnitude() : diagonal.magnitudeXY();
|
|
621
618
|
const mult = Math.max((_a = tile.sizeMultiplier) !== null && _a !== void 0 ? _a : 1, 1);
|
|
622
|
-
return diagDist / (Constants.
|
|
619
|
+
return diagDist / (tileScreenSize * Constants.minToleranceRatioMultiplier * Math.max(1, mult));
|
|
623
620
|
}
|
|
624
621
|
exports.computeTileChordTolerance = computeTileChordTolerance;
|
|
625
622
|
/** Deserializes tile metadata.
|