@vertexvis/viewer 1.0.0-testing.3 → 1.0.0-testing.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{config-CBFIZ5gy.js → config-C1xbl3Qa.js} +3 -3
- package/dist/cjs/{config-CBFIZ5gy.js.map → config-C1xbl3Qa.js.map} +1 -1
- package/dist/cjs/{entities-CAphDi6v.js → entities-D6AUMclh.js} +4 -4
- package/dist/cjs/{entities-CAphDi6v.js.map → entities-D6AUMclh.js.map} +1 -1
- package/dist/cjs/{geometry_pb-DW53co_-.js → geometry_pb-Ctp-Gcjm.js} +3 -3
- package/dist/cjs/{geometry_pb-DW53co_-.js.map → geometry_pb-Ctp-Gcjm.js.map} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{queries-uJfbbPWV.js → queries-CZmukyhu.js} +4 -4
- package/dist/cjs/{queries-uJfbbPWV.js.map → queries-CZmukyhu.js.map} +1 -1
- package/dist/cjs/{regl-component-CF41rUUv.js → regl-component-DOa8eHGy.js} +3 -3
- package/dist/cjs/{regl-component-CF41rUUv.js.map → regl-component-DOa8eHGy.js.map} +1 -1
- package/dist/cjs/{representation_pb-u7t5FI12.js → representation_pb-BrMsFavQ.js} +3 -3
- package/dist/cjs/{representation_pb-u7t5FI12.js.map → representation_pb-BrMsFavQ.js.map} +1 -1
- package/dist/cjs/{streamAttributes-BX291dI6.js → streamAttributes-DQm8yx7F.js} +6 -4
- package/dist/cjs/streamAttributes-DQm8yx7F.js.map +1 -0
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +27 -7
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/collection/lib/meters.js +15 -1
- package/dist/collection/lib/meters.js.map +1 -1
- package/dist/collection/lib/storage.js +8 -2
- package/dist/collection/lib/storage.js.map +1 -1
- package/dist/collection/workers/png-decoder-pool.js +4 -2
- package/dist/collection/workers/png-decoder-pool.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BhgrvpJL.js → p-BLSuslo8.js} +2 -2
- package/dist/components/{p-D7rQku5u.js → p-Bmj32MLp.js} +2 -2
- package/dist/components/{p-MYlndA6B.js → p-Bo49wgwt.js} +2 -2
- package/dist/components/{p-BjcO9U8D.js → p-BvOB1WAv.js} +2 -2
- package/dist/components/{p-DSeOWYJ_.js → p-BygjJ1WP.js} +2 -2
- package/dist/components/{p-CJuOe1O1.js → p-CGpWfqFr.js} +2 -2
- package/dist/components/{p-uwvTj3Cw.js → p-CHQ7ZKZd.js} +2 -2
- package/dist/components/{p-Lx4iaHhY.js → p-CYhNWr6k.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js → p-DLV-gg65.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js.map → p-DLV-gg65.js.map} +1 -1
- package/dist/components/{p-DyPaZtSF.js → p-gFMW2KYT.js} +2 -2
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-viewer-dom-renderer.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-measurement-details.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js.map +1 -1
- package/dist/components/vertex-viewer-pin-group.js +1 -1
- package/dist/components/vertex-viewer-pin-tool.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/{config-_vT0BdS-.js → config-BrYuY-7v.js} +3 -3
- package/dist/esm/{config-_vT0BdS-.js.map → config-BrYuY-7v.js.map} +1 -1
- package/dist/esm/{entities-8QCEsVRy.js → entities-DxpPFj9w.js} +4 -4
- package/dist/esm/{entities-8QCEsVRy.js.map → entities-DxpPFj9w.js.map} +1 -1
- package/dist/esm/{geometry_pb-Dj0yGTFi.js → geometry_pb-BLGp5Nq8.js} +3 -3
- package/dist/esm/{geometry_pb-Dj0yGTFi.js.map → geometry_pb-BLGp5Nq8.js.map} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/{queries-W4aeN1vv.js → queries-Coo1RH5H.js} +4 -4
- package/dist/esm/{queries-W4aeN1vv.js.map → queries-Coo1RH5H.js.map} +1 -1
- package/dist/esm/{regl-component-Rio5LpoO.js → regl-component-B30675op.js} +3 -3
- package/dist/esm/{regl-component-Rio5LpoO.js.map → regl-component-B30675op.js.map} +1 -1
- package/dist/esm/{representation_pb-CCDsiQtg.js → representation_pb-DYkJtHQo.js} +3 -3
- package/dist/esm/{representation_pb-CCDsiQtg.js.map → representation_pb-DYkJtHQo.js.map} +1 -1
- package/dist/esm/{streamAttributes-DhQVsxJf.js → streamAttributes-Cfp9UX5m.js} +6 -4
- package/dist/esm/streamAttributes-Cfp9UX5m.js.map +1 -0
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +2 -2
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-details.entry.js +1 -1
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +4 -4
- package/dist/esm/vertex-viewer-pin-group.entry.js +3 -3
- package/dist/esm/vertex-viewer-transform-widget.entry.js +2 -2
- package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
- package/dist/esm/vertex-viewer.entry.js +27 -7
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-baec8489.entry.js → p-0287e1ba.entry.js} +2 -2
- package/dist/viewer/{p-2bd6cd13.entry.js → p-380e0112.entry.js} +2 -2
- package/dist/viewer/{p-101825c2.entry.js → p-40d90c6e.entry.js} +2 -2
- package/dist/viewer/{p-317da1b6.entry.js → p-6a546084.entry.js} +2 -2
- package/dist/viewer/p-7189eb18.entry.js +5 -0
- package/dist/viewer/p-7189eb18.entry.js.map +1 -0
- package/dist/viewer/{p-807aa9d0.entry.js → p-72fa9fba.entry.js} +2 -2
- package/dist/viewer/{p-0bf39fff.entry.js → p-81391d86.entry.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js → p-B7mOY-Vi.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js.map → p-B7mOY-Vi.js.map} +1 -1
- package/dist/viewer/{p-B9AGwrOP.js → p-CVRW2Plt.js} +2 -2
- package/dist/viewer/{p-B9AGwrOP.js.map → p-CVRW2Plt.js.map} +1 -1
- package/dist/viewer/{p-C0bm56qJ.js → p-CrcoZmKt.js} +2 -2
- package/dist/viewer/p-CrcoZmKt.js.map +1 -0
- package/dist/viewer/{p-BNiP3SE7.js → p-DKKHW33X.js} +2 -2
- package/dist/viewer/{p-BNiP3SE7.js.map → p-DKKHW33X.js.map} +1 -1
- package/dist/viewer/p-F9YPK1I7.js +5 -0
- package/dist/viewer/{p-DOMCeSTr.js.map → p-F9YPK1I7.js.map} +1 -1
- package/dist/viewer/p-Nk8SgPHE.js +5 -0
- package/dist/viewer/{p-CrwKMz5f.js.map → p-Nk8SgPHE.js.map} +1 -1
- package/dist/viewer/{p-BoFi-Uyu.js → p-_19YlCN5.js} +2 -2
- package/dist/viewer/{p-BoFi-Uyu.js.map → p-_19YlCN5.js.map} +1 -1
- package/dist/viewer/{p-dd2f92e3.entry.js → p-c7eb05ec.entry.js} +2 -2
- package/dist/viewer/{p-fade0dba.entry.js → p-c9d71f1e.entry.js} +2 -2
- package/dist/viewer/{p-49b9bba2.entry.js → p-d50b2449.entry.js} +2 -2
- package/dist/viewer/{p-0fa89933.entry.js → p-e80260d3.entry.js} +2 -2
- package/dist/viewer/{p-71c08a04.entry.js → p-fc082185.entry.js} +2 -2
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +8 -7
- package/dist/cjs/streamAttributes-BX291dI6.js.map +0 -1
- package/dist/esm/streamAttributes-DhQVsxJf.js.map +0 -1
- package/dist/viewer/p-C0bm56qJ.js.map +0 -1
- package/dist/viewer/p-CrwKMz5f.js +0 -5
- package/dist/viewer/p-DOMCeSTr.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js.map +0 -1
- /package/dist/components/{p-BhgrvpJL.js.map → p-BLSuslo8.js.map} +0 -0
- /package/dist/components/{p-D7rQku5u.js.map → p-Bmj32MLp.js.map} +0 -0
- /package/dist/components/{p-MYlndA6B.js.map → p-Bo49wgwt.js.map} +0 -0
- /package/dist/components/{p-BjcO9U8D.js.map → p-BvOB1WAv.js.map} +0 -0
- /package/dist/components/{p-DSeOWYJ_.js.map → p-BygjJ1WP.js.map} +0 -0
- /package/dist/components/{p-CJuOe1O1.js.map → p-CGpWfqFr.js.map} +0 -0
- /package/dist/components/{p-uwvTj3Cw.js.map → p-CHQ7ZKZd.js.map} +0 -0
- /package/dist/components/{p-Lx4iaHhY.js.map → p-CYhNWr6k.js.map} +0 -0
- /package/dist/components/{p-DyPaZtSF.js.map → p-gFMW2KYT.js.map} +0 -0
- /package/dist/viewer/{p-baec8489.entry.js.map → p-0287e1ba.entry.js.map} +0 -0
- /package/dist/viewer/{p-2bd6cd13.entry.js.map → p-380e0112.entry.js.map} +0 -0
- /package/dist/viewer/{p-101825c2.entry.js.map → p-40d90c6e.entry.js.map} +0 -0
- /package/dist/viewer/{p-317da1b6.entry.js.map → p-6a546084.entry.js.map} +0 -0
- /package/dist/viewer/{p-807aa9d0.entry.js.map → p-72fa9fba.entry.js.map} +0 -0
- /package/dist/viewer/{p-0bf39fff.entry.js.map → p-81391d86.entry.js.map} +0 -0
- /package/dist/viewer/{p-dd2f92e3.entry.js.map → p-c7eb05ec.entry.js.map} +0 -0
- /package/dist/viewer/{p-fade0dba.entry.js.map → p-c9d71f1e.entry.js.map} +0 -0
- /package/dist/viewer/{p-49b9bba2.entry.js.map → p-d50b2449.entry.js.map} +0 -0
- /package/dist/viewer/{p-0fa89933.entry.js.map → p-e80260d3.entry.js.map} +0 -0
- /package/dist/viewer/{p-71c08a04.entry.js.map → p-fc082185.entry.js.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { o as objects } from './browser.esm-DdA40ya2.js';
|
|
5
5
|
import { d as defaultEventConfig } from './events-CPk-nchx.js';
|
|
6
|
-
import './streamAttributes-
|
|
6
|
+
import './streamAttributes-Cfp9UX5m.js';
|
|
7
7
|
import './entities-BAhfr1Nx.js';
|
|
8
8
|
|
|
9
9
|
const DEFAULT_ANIMATION_DURATION = 500;
|
|
@@ -119,6 +119,6 @@ function validateUrlScheme(networkConfig, field, expectedScheme) {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export { parseAndValidateConfig as p };
|
|
122
|
-
//# sourceMappingURL=config-
|
|
122
|
+
//# sourceMappingURL=config-BrYuY-7v.js.map
|
|
123
123
|
|
|
124
|
-
//# sourceMappingURL=config-
|
|
124
|
+
//# sourceMappingURL=config-BrYuY-7v.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-_vT0BdS-.js","sources":["src/lib/types/animation.ts","src/lib/types/flags.ts","src/lib/types/interactions.ts","src/lib/config.ts"],"sourcesContent":["const DEFAULT_ANIMATION_DURATION = 500;\n\nexport interface Animation {\n milliseconds: number;\n}\n\nexport function create(data: Partial<Animation> = {}): Animation {\n return {\n milliseconds: data.milliseconds || DEFAULT_ANIMATION_DURATION,\n };\n}\n\nexport interface AnimationConfig {\n durationMs: number;\n}\n\nexport const defaultAnimationConfig: AnimationConfig = {\n durationMs: DEFAULT_ANIMATION_DURATION,\n};\n","import { Objects } from '@vertexvis/utils';\n\ntype Flag =\n /**\n * Enables or disables a throttling of image delivery based on detected\n * network conditions.\n */\n | 'throttleFrameDelivery'\n\n /**\n * Enables or disables automatic quality adjustments of rendered frames to\n * improve the performance of delivering frames to the client.\n */\n | 'adaptiveRendering'\n\n /**\n * Enables or disables logging of WS message payloads.\n */\n | 'logWsMessages'\n\n /**\n * Toggles the logging of frame rates.\n */\n | 'logFrameRate'\n\n /**\n * Enables or disables the letterboxing of frames when the host dimensions\n * are larger than the supported maximum image size (1080p). By default\n * this option is disabled, and images will be scaled up to match the host.\n */\n | 'letterboxFrames'\n\n /**\n * Enables or disables the use of the `grpc.WebsocketTransport` for streaming\n * RPCs. By default this transport will be used, and streaming messages will\n * be sent over WebSocket.\n */\n | 'grpcUseStreamingWebSocketTransport';\n\n/**\n * A set of experimental features that can be enabled through the viewer's\n * config.\n */\nexport type Flags = { [K in Flag]: boolean };\n\nexport const defaultFlags: Flags = {\n throttleFrameDelivery: true,\n adaptiveRendering: true,\n logWsMessages: false,\n logFrameRate: false,\n letterboxFrames: false,\n grpcUseStreamingWebSocketTransport: true,\n};\n\nexport function createFlags(\n features: Partial<Flags>,\n fallbacks: Partial<Flags> = defaultFlags\n): Flags {\n return Objects.defaults(features, fallbacks, defaultFlags);\n}\n","export interface InteractionConfig {\n /**\n * The amount of movement required with a fine (mouse, trackpad, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n finePointerThreshold: number;\n\n /**\n * The amount of movement required with a coarse (touch, stylus, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n coarsePointerThreshold: number;\n\n /**\n * The amount of time before a movement is considered an interaction and will\n * update the camera.\n */\n interactionDelay: number;\n\n /**\n * Whether the `zoomCameraToPoint` interaction through the `InteractionApiPerspective`\n * will enforce a minimum distance when moving the camera. When set, the camera will be\n * able to move through geometry under the cursor, rather than being restricted by the\n * point under the cursor. Defaults to `true`.\n */\n useMinimumPerspectiveZoomDistance: boolean;\n\n /**\n * The amount of time before a wheel interaction is ended.\n *\n * This delay is used to support successive sets of mouse events, and not cause\n * abrupt and unexpected ending of mouse interactions during natural pauses in mouse\n * wheel usage.\n */\n mouseWheelInteractionEndDebounce: number;\n\n /**\n * Reverses which direction the mouse wheel considers positive or negative\n * for zoom interactions.\n */\n reverseMouseWheelDirection: boolean;\n}\n\nexport const defaultInteractionConfig: InteractionConfig = {\n finePointerThreshold: 1,\n coarsePointerThreshold: 3,\n interactionDelay: 75,\n useMinimumPerspectiveZoomDistance: true,\n mouseWheelInteractionEndDebounce: 400,\n reverseMouseWheelDirection: false,\n};\n","import { FrameDeliverySettings } from '@vertexvis/stream-api';\nimport {\n AdaptiveRenderingSettings,\n QualityOfServiceSettings,\n} from '@vertexvis/stream-api';\nimport { DeepPartial, Objects } from '@vertexvis/utils';\n\nimport { Environment } from './environment';\nimport { Animation, Events, Flags, Interactions } from './types';\n\ninterface NetworkConfig {\n apiHost: string;\n renderingHost: string;\n sceneTreeHost: string;\n sceneViewHost: string;\n}\n\nexport interface Config {\n network: NetworkConfig;\n flags: Flags.Flags;\n events: Events.EventConfig;\n animation: Animation.AnimationConfig;\n interactions: Interactions.InteractionConfig;\n EXPERIMENTAL_frameDelivery: Omit<\n FrameDeliverySettings,\n 'rateLimitingEnabled'\n >;\n EXPERIMENTAL_adaptiveRendering: Omit<AdaptiveRenderingSettings, 'enabled'>;\n EXPERIMENTAL_qualityOfService: QualityOfServiceSettings;\n EXPERIMENTAL_annotationPollingIntervalInMs: number | undefined;\n}\n\nexport type PartialConfig = DeepPartial<Config>;\n\nexport type ConfigProvider = () => Config;\n\nexport type InteractionConfigProvider = () => Interactions.InteractionConfig;\n\nconst config: Config = {\n network: {\n apiHost: 'https://platform.platprod.vertexvis.io',\n renderingHost: 'wss://stream.platprod.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platprod.vertexvis.io',\n sceneViewHost: 'https://scenes.platprod.vertexvis.io',\n },\n flags: Flags.defaultFlags,\n events: Events.defaultEventConfig,\n animation: Animation.defaultAnimationConfig,\n interactions: Interactions.defaultInteractionConfig,\n EXPERIMENTAL_frameDelivery: {},\n EXPERIMENTAL_adaptiveRendering: {},\n EXPERIMENTAL_qualityOfService: {},\n EXPERIMENTAL_annotationPollingIntervalInMs: undefined,\n};\n\nconst platdevConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platdev.vertexvis.io',\n renderingHost: 'wss://stream.platdev.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platdev.vertexvis.io',\n sceneViewHost: 'https://scenes.platdev.vertexvis.io',\n },\n};\n\nconst platstagingConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platstaging.vertexvis.io',\n renderingHost: 'wss://stream.platstaging.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platstaging.vertexvis.io',\n sceneViewHost: 'https://scenes.platstaging.vertexvis.io',\n },\n};\n\nfunction getEnvironmentConfig(environment: Environment): Config {\n switch (environment) {\n case 'platdev':\n return platdevConfig;\n case 'platstaging':\n return platstagingConfig;\n default:\n return config;\n }\n}\n\nexport function parseAndValidateConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig\n): Config {\n const parsed = parseConfig(environment, config);\n\n return validateConfig(sanitizeConfig(parsed));\n}\n\nexport function parseConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig\n): Config {\n if (typeof config === 'string') {\n config = JSON.parse(config) as PartialConfig;\n }\n\n const envConfig = getEnvironmentConfig(environment);\n\n if (config == null) {\n return envConfig;\n } else {\n return Objects.defaults({ ...config }, envConfig);\n }\n}\n\nexport function sanitizeConfig(config: Config): Config {\n const sanitizedApiHost = config.network.apiHost.trim();\n const sanitizedRenderingHost = config.network.renderingHost.trim();\n const sanitizedSceneTreeHost = config.network.sceneTreeHost.trim();\n const sanitizedSceneViewHost = config.network.sceneViewHost.trim();\n\n return {\n ...config,\n network: {\n ...config.network,\n apiHost: sanitizedApiHost,\n renderingHost: sanitizedRenderingHost,\n sceneTreeHost: sanitizedSceneTreeHost,\n sceneViewHost: sanitizedSceneViewHost,\n },\n };\n}\n\nexport function validateConfig(config: Config): Config {\n validateUrlScheme(config.network, 'apiHost', 'https://');\n validateUrlScheme(config.network, 'renderingHost', 'wss://');\n validateUrlScheme(config.network, 'sceneTreeHost', 'https://');\n validateUrlScheme(config.network, 'sceneViewHost', 'https://');\n\n return config;\n}\n\nfunction validateUrlScheme(\n networkConfig: NetworkConfig,\n field: keyof NetworkConfig,\n expectedScheme: string\n): void {\n if (!networkConfig[field].startsWith(expectedScheme)) {\n throw new Error(\n `Invalid ${field} \"${networkConfig[field]}\" specified. The URL must start with the ${expectedScheme} scheme.`\n );\n }\n}\n"],"names":["Flags.defaultFlags","Events.defaultEventConfig","Animation.defaultAnimationConfig","Interactions.defaultInteractionConfig","Objects"],"mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,GAAG;AAgB/B,MAAM,sBAAsB,GAAoB;AACrD,IAAA,UAAU,EA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,OAAO;AACL,QAAA,GAAG,MAAM;AACT,QAAA,OAAO,EAAE;YACP,GAAG,MAAM,CAAC,OAAO;AACjB,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,aAAa,EAAE,sBAAsB;AACrC,YAAA,aAAa,EAAE,sBAAsB;AACrC,YAAA,aAAa,EAAE,sBAAsB;AACtC,SAAA;KACF;AACH;AAEM,SAAU,cAAc,CAAC,MAAc,EAAA;IAC3C,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IACxD,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC;IAC5D,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC;IAC9D,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC;AAE9D,IAAA,OAAO,MAAM;AACf;AAEA,SAAS,iBAAiB,CACxB,aAA4B,EAC5B,KAA0B,EAC1B,cAAsB,EAAA;IAEtB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;AACpD,QAAA,MAAM,IAAI,KAAK,CACb,CAAA,QAAA,EAAW,KAAK,CAAA,EAAA,EAAK,aAAa,CAAC,KAAK,CAAC,CAAA,yCAAA,EAA4C,cAAc,CAAA,QAAA,CAAU,CAC9G;;AAEL;;;;"}
|
|
1
|
+
{"version":3,"file":"config-BrYuY-7v.js","sources":["src/lib/types/animation.ts","src/lib/types/flags.ts","src/lib/types/interactions.ts","src/lib/config.ts"],"sourcesContent":["const DEFAULT_ANIMATION_DURATION = 500;\n\nexport interface Animation {\n milliseconds: number;\n}\n\nexport function create(data: Partial<Animation> = {}): Animation {\n return {\n milliseconds: data.milliseconds || DEFAULT_ANIMATION_DURATION,\n };\n}\n\nexport interface AnimationConfig {\n durationMs: number;\n}\n\nexport const defaultAnimationConfig: AnimationConfig = {\n durationMs: DEFAULT_ANIMATION_DURATION,\n};\n","import { Objects } from '@vertexvis/utils';\n\ntype Flag =\n /**\n * Enables or disables a throttling of image delivery based on detected\n * network conditions.\n */\n | 'throttleFrameDelivery'\n\n /**\n * Enables or disables automatic quality adjustments of rendered frames to\n * improve the performance of delivering frames to the client.\n */\n | 'adaptiveRendering'\n\n /**\n * Enables or disables logging of WS message payloads.\n */\n | 'logWsMessages'\n\n /**\n * Toggles the logging of frame rates.\n */\n | 'logFrameRate'\n\n /**\n * Enables or disables the letterboxing of frames when the host dimensions\n * are larger than the supported maximum image size (1080p). By default\n * this option is disabled, and images will be scaled up to match the host.\n */\n | 'letterboxFrames'\n\n /**\n * Enables or disables the use of the `grpc.WebsocketTransport` for streaming\n * RPCs. By default this transport will be used, and streaming messages will\n * be sent over WebSocket.\n */\n | 'grpcUseStreamingWebSocketTransport';\n\n/**\n * A set of experimental features that can be enabled through the viewer's\n * config.\n */\nexport type Flags = { [K in Flag]: boolean };\n\nexport const defaultFlags: Flags = {\n throttleFrameDelivery: true,\n adaptiveRendering: true,\n logWsMessages: false,\n logFrameRate: false,\n letterboxFrames: false,\n grpcUseStreamingWebSocketTransport: true,\n};\n\nexport function createFlags(\n features: Partial<Flags>,\n fallbacks: Partial<Flags> = defaultFlags\n): Flags {\n return Objects.defaults(features, fallbacks, defaultFlags);\n}\n","export interface InteractionConfig {\n /**\n * The amount of movement required with a fine (mouse, trackpad, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n finePointerThreshold: number;\n\n /**\n * The amount of movement required with a coarse (touch, stylus, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n coarsePointerThreshold: number;\n\n /**\n * The amount of time before a movement is considered an interaction and will\n * update the camera.\n */\n interactionDelay: number;\n\n /**\n * Whether the `zoomCameraToPoint` interaction through the `InteractionApiPerspective`\n * will enforce a minimum distance when moving the camera. When set, the camera will be\n * able to move through geometry under the cursor, rather than being restricted by the\n * point under the cursor. Defaults to `true`.\n */\n useMinimumPerspectiveZoomDistance: boolean;\n\n /**\n * The amount of time before a wheel interaction is ended.\n *\n * This delay is used to support successive sets of mouse events, and not cause\n * abrupt and unexpected ending of mouse interactions during natural pauses in mouse\n * wheel usage.\n */\n mouseWheelInteractionEndDebounce: number;\n\n /**\n * Reverses which direction the mouse wheel considers positive or negative\n * for zoom interactions.\n */\n reverseMouseWheelDirection: boolean;\n}\n\nexport const defaultInteractionConfig: InteractionConfig = {\n finePointerThreshold: 1,\n coarsePointerThreshold: 3,\n interactionDelay: 75,\n useMinimumPerspectiveZoomDistance: true,\n mouseWheelInteractionEndDebounce: 400,\n reverseMouseWheelDirection: false,\n};\n","import { FrameDeliverySettings } from '@vertexvis/stream-api';\nimport {\n AdaptiveRenderingSettings,\n QualityOfServiceSettings,\n} from '@vertexvis/stream-api';\nimport { DeepPartial, Objects } from '@vertexvis/utils';\n\nimport { Environment } from './environment';\nimport { Animation, Events, Flags, Interactions } from './types';\n\ninterface NetworkConfig {\n apiHost: string;\n renderingHost: string;\n sceneTreeHost: string;\n sceneViewHost: string;\n}\n\nexport interface Config {\n network: NetworkConfig;\n flags: Flags.Flags;\n events: Events.EventConfig;\n animation: Animation.AnimationConfig;\n interactions: Interactions.InteractionConfig;\n EXPERIMENTAL_frameDelivery: Omit<\n FrameDeliverySettings,\n 'rateLimitingEnabled'\n >;\n EXPERIMENTAL_adaptiveRendering: Omit<AdaptiveRenderingSettings, 'enabled'>;\n EXPERIMENTAL_qualityOfService: QualityOfServiceSettings;\n EXPERIMENTAL_annotationPollingIntervalInMs: number | undefined;\n}\n\nexport type PartialConfig = DeepPartial<Config>;\n\nexport type ConfigProvider = () => Config;\n\nexport type InteractionConfigProvider = () => Interactions.InteractionConfig;\n\nconst config: Config = {\n network: {\n apiHost: 'https://platform.platprod.vertexvis.io',\n renderingHost: 'wss://stream.platprod.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platprod.vertexvis.io',\n sceneViewHost: 'https://scenes.platprod.vertexvis.io',\n },\n flags: Flags.defaultFlags,\n events: Events.defaultEventConfig,\n animation: Animation.defaultAnimationConfig,\n interactions: Interactions.defaultInteractionConfig,\n EXPERIMENTAL_frameDelivery: {},\n EXPERIMENTAL_adaptiveRendering: {},\n EXPERIMENTAL_qualityOfService: {},\n EXPERIMENTAL_annotationPollingIntervalInMs: undefined,\n};\n\nconst platdevConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platdev.vertexvis.io',\n renderingHost: 'wss://stream.platdev.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platdev.vertexvis.io',\n sceneViewHost: 'https://scenes.platdev.vertexvis.io',\n },\n};\n\nconst platstagingConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platstaging.vertexvis.io',\n renderingHost: 'wss://stream.platstaging.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platstaging.vertexvis.io',\n sceneViewHost: 'https://scenes.platstaging.vertexvis.io',\n },\n};\n\nfunction getEnvironmentConfig(environment: Environment): Config {\n switch (environment) {\n case 'platdev':\n return platdevConfig;\n case 'platstaging':\n return platstagingConfig;\n default:\n return config;\n }\n}\n\nexport function parseAndValidateConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig\n): Config {\n const parsed = parseConfig(environment, config);\n\n return validateConfig(sanitizeConfig(parsed));\n}\n\nexport function parseConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig\n): Config {\n if (typeof config === 'string') {\n config = JSON.parse(config) as PartialConfig;\n }\n\n const envConfig = getEnvironmentConfig(environment);\n\n if (config == null) {\n return envConfig;\n } else {\n return Objects.defaults({ ...config }, envConfig);\n }\n}\n\nexport function sanitizeConfig(config: Config): Config {\n const sanitizedApiHost = config.network.apiHost.trim();\n const sanitizedRenderingHost = config.network.renderingHost.trim();\n const sanitizedSceneTreeHost = config.network.sceneTreeHost.trim();\n const sanitizedSceneViewHost = config.network.sceneViewHost.trim();\n\n return {\n ...config,\n network: {\n ...config.network,\n apiHost: sanitizedApiHost,\n renderingHost: sanitizedRenderingHost,\n sceneTreeHost: sanitizedSceneTreeHost,\n sceneViewHost: sanitizedSceneViewHost,\n },\n };\n}\n\nexport function validateConfig(config: Config): Config {\n validateUrlScheme(config.network, 'apiHost', 'https://');\n validateUrlScheme(config.network, 'renderingHost', 'wss://');\n validateUrlScheme(config.network, 'sceneTreeHost', 'https://');\n validateUrlScheme(config.network, 'sceneViewHost', 'https://');\n\n return config;\n}\n\nfunction validateUrlScheme(\n networkConfig: NetworkConfig,\n field: keyof NetworkConfig,\n expectedScheme: string\n): void {\n if (!networkConfig[field].startsWith(expectedScheme)) {\n throw new Error(\n `Invalid ${field} \"${networkConfig[field]}\" specified. The URL must start with the ${expectedScheme} scheme.`\n );\n }\n}\n"],"names":["Flags.defaultFlags","Events.defaultEventConfig","Animation.defaultAnimationConfig","Interactions.defaultInteractionConfig","Objects"],"mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,GAAG;AAgB/B,MAAM,sBAAsB,GAAoB;AACrD,IAAA,UAAU,EAAE,0BAA0B;CACvC;;AC2BM,MAAM,YAAY,GAAU;AACjC,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,kCAAkC,EAAE,IAAI;CACzC;;ACPM,MAAM,wBAAwB,GAAsB;AACzD,IAAA,oBAAoB,EAAE,CAAC;AACvB,IAAA,sBAAsB,EAAE,CAAC;AACzB,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,iCAAiC,EAAE,IAAI;AACvC,IAAA,gCAAgC,EAAE,GAAG;AACrC,IAAA,0BAA0B,EAAE,KAAK;CAClC;;ACdD,MAAM,MAAM,GAAW;AACrB,IAAA,OAAO,EAAE;AACP,QAAA,OAAO,EAAE,wCAAwC;AACjD,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IAAA,OAAO,MAAM;AACf;AAEA,SAAS,iBAAiB,CACxB,aAA4B,EAC5B,KAA0B,EAC1B,cAAsB,EAAA;IAEtB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;AACpD,QAAA,MAAM,IAAI,KAAK,CACb,CAAA,QAAA,EAAW,KAAK,CAAA,EAAA,EAAK,aAAa,CAAC,KAAK,CAAC,CAAA,yCAAA,EAA4C,cAAc,CAAA,QAAA,CAAU,CAC9G;;AAEL;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { m as mapMeasureResponseOrThrow, a as model_entity_pbExports, g as geometry_pbExports } from './geometry_pb-
|
|
4
|
+
import { m as mapMeasureResponseOrThrow, a as model_entity_pbExports, g as geometry_pbExports } from './geometry_pb-BLGp5Nq8.js';
|
|
5
5
|
import { s as scene_view_api_pbExports, w as wrappers_pbExports } from './wrappers_pb-BcBcw9l_.js';
|
|
6
6
|
import { r as requestUnary, c as createMetadata } from './grpc-CZAYqbTu.js';
|
|
7
7
|
import { v as vertexvis } from './bundle.esm-C61F--HV.js';
|
|
8
8
|
import { m as mapper } from './browser.esm-DdA40ya2.js';
|
|
9
|
-
import { n as fromPbVector3f } from './streamAttributes-
|
|
9
|
+
import { n as fromPbVector3f } from './streamAttributes-Cfp9UX5m.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* The `MeasurementController` is responsible for performing measurements of
|
|
@@ -151,6 +151,6 @@ class MeasurementEntity {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export { MeasurementController as M, MeasurementEntity as a };
|
|
154
|
-
//# sourceMappingURL=entities-
|
|
154
|
+
//# sourceMappingURL=entities-DxpPFj9w.js.map
|
|
155
155
|
|
|
156
|
-
//# sourceMappingURL=entities-
|
|
156
|
+
//# sourceMappingURL=entities-DxpPFj9w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities-8QCEsVRy.js","sources":["src/lib/measurement/controller.ts","src/lib/measurement/entities.ts"],"sourcesContent":["import { ModelEntity } from '@vertexvis/scene-view-protos/core/protos/model_entity_pb';\nimport {\n MeasureRequest,\n MeasureResponse,\n ModelEntityUpdate,\n UpdateModelEntitiesRequest,\n} from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { SceneViewAPIClient } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb_service';\nimport { BoolValue } from 'google-protobuf/google/protobuf/wrappers_pb';\n\nimport { createMetadata, JwtProvider, requestUnary } from '../grpc';\nimport { MeasurementEntity } from './entities';\nimport { mapMeasureResponseOrThrow } from './mapper';\nimport { MeasurementModel } from './model';\nimport { MeasurementOutcome } from './outcomes';\n\n/**\n * The `MeasurementController` is responsible for performing measurements of\n * registered entities, and updating the model with their measurement results.\n */\nexport class MeasurementController {\n private outcome = Promise.resolve<MeasurementOutcome | undefined>(undefined);\n\n public constructor(\n private model: MeasurementModel,\n private client: SceneViewAPIClient,\n private jwtProvider: JwtProvider,\n private deviceId: string | undefined\n ) {}\n\n /**\n * Registers an entity to measure and performs a measurement if this entity\n * has not been previously registered.\n *\n * @param entity The entity to measure.\n * @returns A promise that resolves with the results after registering this\n * entity.\n */\n public addEntity(\n entity: MeasurementEntity\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.addEntity(entity));\n }\n\n /**\n * Clears all entities and returns a promise that resolves with an empty list\n * of measurement results.\n */\n public clearEntities(): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => {\n this.model.clearEntities();\n this.model.clearOutcome();\n return true;\n });\n }\n\n /**\n * Deregisters an entity and performs a measurement if this entity was\n * removed.\n *\n * @param entity The entity to remove.\n * @returns A promise that resolves with the results after removing this\n * entity.\n */\n public removeEntity(\n entity: MeasurementEntity\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.removeEntity(entity));\n }\n\n /**\n * Registers a set of entities and performs a measurement\n *\n * @param entities The entities to measure.\n * @returns A promise that resolves with the results after registering these\n * entities.\n */\n public setEntities(\n entities: Set<MeasurementEntity>\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.setEntities(entities));\n }\n\n private performMeasurement(\n effect: () => boolean\n ): Promise<MeasurementOutcome | undefined> {\n const previous = this.model.getEntities();\n const changed = effect();\n const entities = this.model.getEntities();\n if (changed) {\n this.measureAndUpdateModel(entities);\n this.highlightEntities(previous, entities);\n }\n return this.outcome;\n }\n\n private measureAndUpdateModel(entities: MeasurementEntity[]): void {\n if (entities.length > 0) {\n this.outcome = this.measureEntities(entities).then((outcome) => {\n this.model.setOutcome(outcome);\n return this.model.getOutcome();\n });\n } else {\n this.outcome = Promise.resolve(undefined);\n }\n }\n\n private async measureEntities(\n entities: MeasurementEntity[]\n ): Promise<MeasurementOutcome | undefined> {\n if (entities.length > 0) {\n const res = await requestUnary<MeasureResponse>(async (handler) => {\n const meta = await createMetadata(this.jwtProvider, this.deviceId);\n const req = new MeasureRequest();\n req.setEntitiesList(entities.map((e) => e.toProto()));\n\n this.client.measure(req, meta, handler);\n });\n\n return mapMeasureResponseOrThrow(res.toObject());\n } else {\n return undefined;\n }\n }\n\n private async highlightEntities(\n previous: MeasurementEntity[],\n entities: MeasurementEntity[]\n ): Promise<void> {\n await requestUnary(async (handler) => {\n const meta = await createMetadata(this.jwtProvider, this.deviceId);\n\n const entitySet = new Set(entities);\n const newPrevious = previous.filter((e) => !entitySet.has(e));\n\n const clearEntities = newPrevious.map((e) => {\n const update = new ModelEntityUpdate();\n update.setModelEntity(ModelEntity.deserializeBinary(e.modelEntity));\n update.setHighlight(new BoolValue().setValue(false));\n return update;\n });\n const highlightEntities = entities.map((e) => {\n const update = new ModelEntityUpdate();\n update.setModelEntity(ModelEntity.deserializeBinary(e.modelEntity));\n update.setHighlight(new BoolValue().setValue(true));\n return update;\n });\n\n const req = new UpdateModelEntitiesRequest();\n req.setUpdatesList([...clearEntities, ...highlightEntities]);\n this.client.updateModelEntities(req, meta, handler);\n });\n }\n}\n","import { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { Vector3 } from '@vertexvis/geometry';\nimport { Vector3f } from '@vertexvis/scene-view-protos/core/protos/geometry_pb';\nimport { ModelEntity } from '@vertexvis/scene-view-protos/core/protos/model_entity_pb';\nimport { MeasureEntity } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper } from '@vertexvis/utils';\n\nimport { fromPbVector3f } from '../mappers';\n\nexport class MeasurementEntity {\n public constructor(\n public readonly point: Vector3.Vector3,\n public readonly modelEntity: Uint8Array\n ) {}\n\n public static fromHit(\n hit: vertexvis.protobuf.stream.IHit\n ): MeasurementEntity {\n if (hit.hitPoint != null && hit.modelEntity != null) {\n const hitPoint = Mapper.ifInvalidThrow(fromPbVector3f)(hit.hitPoint);\n const modelEntity = vertexvis.protobuf.core.ModelEntity.encode(\n hit.modelEntity\n ).finish();\n return new MeasurementEntity(hitPoint, modelEntity);\n } else {\n throw new Error(\n 'Cannot create MeasurementEntity from Hit. Hit is missing hit point and model entity'\n );\n }\n }\n\n public toProto(): MeasureEntity {\n const entity = new MeasureEntity();\n\n const point = new Vector3f();\n point.setX(this.point.x);\n point.setY(this.point.y);\n point.setZ(this.point.z);\n entity.setPoint(point);\n\n const modelEntity = ModelEntity.deserializeBinary(this.modelEntity);\n entity.setModelEntity(modelEntity);\n\n return entity;\n }\n}\n"],"names":["MeasureRequest","ModelEntityUpdate","ModelEntity","BoolValue","UpdateModelEntitiesRequest","Mapper","MeasureEntity","Vector3f"],"mappings":";;;;;;;;;;AAgBA;;;AAGG;MACU,qBAAqB,CAAA;AAGhC,IAAA,WAAA,CACU,KAAuB,EACvB,MAA0B,EAC1B,WAAwB,EACxB,QAA4B,EAAA;AAH5B,QAAA,IAAA,CAAA,KAAK,GAAL,KAAK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["import { ModelEntity } from '@vertexvis/scene-view-protos/core/protos/model_entity_pb';\nimport {\n MeasureRequest,\n MeasureResponse,\n ModelEntityUpdate,\n UpdateModelEntitiesRequest,\n} from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { SceneViewAPIClient } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb_service';\nimport { BoolValue } from 'google-protobuf/google/protobuf/wrappers_pb';\n\nimport { createMetadata, JwtProvider, requestUnary } from '../grpc';\nimport { MeasurementEntity } from './entities';\nimport { mapMeasureResponseOrThrow } from './mapper';\nimport { MeasurementModel } from './model';\nimport { MeasurementOutcome } from './outcomes';\n\n/**\n * The `MeasurementController` is responsible for performing measurements of\n * registered entities, and updating the model with their measurement results.\n */\nexport class MeasurementController {\n private outcome = Promise.resolve<MeasurementOutcome | undefined>(undefined);\n\n public constructor(\n private model: MeasurementModel,\n private client: SceneViewAPIClient,\n private jwtProvider: JwtProvider,\n private deviceId: string | undefined\n ) {}\n\n /**\n * Registers an entity to measure and performs a measurement if this entity\n * has not been previously registered.\n *\n * @param entity The entity to measure.\n * @returns A promise that resolves with the results after registering this\n * entity.\n */\n public addEntity(\n entity: MeasurementEntity\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.addEntity(entity));\n }\n\n /**\n * Clears all entities and returns a promise that resolves with an empty list\n * of measurement results.\n */\n public clearEntities(): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => {\n this.model.clearEntities();\n this.model.clearOutcome();\n return true;\n });\n }\n\n /**\n * Deregisters an entity and performs a measurement if this entity was\n * removed.\n *\n * @param entity The entity to remove.\n * @returns A promise that resolves with the results after removing this\n * entity.\n */\n public removeEntity(\n entity: MeasurementEntity\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.removeEntity(entity));\n }\n\n /**\n * Registers a set of entities and performs a measurement\n *\n * @param entities The entities to measure.\n * @returns A promise that resolves with the results after registering these\n * entities.\n */\n public setEntities(\n entities: Set<MeasurementEntity>\n ): Promise<MeasurementOutcome | undefined> {\n return this.performMeasurement(() => this.model.setEntities(entities));\n }\n\n private performMeasurement(\n effect: () => boolean\n ): Promise<MeasurementOutcome | undefined> {\n const previous = this.model.getEntities();\n const changed = effect();\n const entities = this.model.getEntities();\n if (changed) {\n this.measureAndUpdateModel(entities);\n this.highlightEntities(previous, entities);\n }\n return this.outcome;\n }\n\n private measureAndUpdateModel(entities: MeasurementEntity[]): void {\n if (entities.length > 0) {\n this.outcome = this.measureEntities(entities).then((outcome) => {\n this.model.setOutcome(outcome);\n return this.model.getOutcome();\n });\n } else {\n this.outcome = Promise.resolve(undefined);\n }\n }\n\n private async measureEntities(\n entities: MeasurementEntity[]\n ): Promise<MeasurementOutcome | undefined> {\n if (entities.length > 0) {\n const res = await requestUnary<MeasureResponse>(async (handler) => {\n const meta = await createMetadata(this.jwtProvider, this.deviceId);\n const req = new MeasureRequest();\n req.setEntitiesList(entities.map((e) => e.toProto()));\n\n this.client.measure(req, meta, handler);\n });\n\n return mapMeasureResponseOrThrow(res.toObject());\n } else {\n return undefined;\n }\n }\n\n private async highlightEntities(\n previous: MeasurementEntity[],\n entities: MeasurementEntity[]\n ): Promise<void> {\n await requestUnary(async (handler) => {\n const meta = await createMetadata(this.jwtProvider, this.deviceId);\n\n const entitySet = new Set(entities);\n const newPrevious = previous.filter((e) => !entitySet.has(e));\n\n const clearEntities = newPrevious.map((e) => {\n const update = new ModelEntityUpdate();\n update.setModelEntity(ModelEntity.deserializeBinary(e.modelEntity));\n update.setHighlight(new BoolValue().setValue(false));\n return update;\n });\n const highlightEntities = entities.map((e) => {\n const update = new ModelEntityUpdate();\n update.setModelEntity(ModelEntity.deserializeBinary(e.modelEntity));\n update.setHighlight(new BoolValue().setValue(true));\n return update;\n });\n\n const req = new UpdateModelEntitiesRequest();\n req.setUpdatesList([...clearEntities, ...highlightEntities]);\n this.client.updateModelEntities(req, meta, handler);\n });\n }\n}\n","import { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { Vector3 } from '@vertexvis/geometry';\nimport { Vector3f } from '@vertexvis/scene-view-protos/core/protos/geometry_pb';\nimport { ModelEntity } from '@vertexvis/scene-view-protos/core/protos/model_entity_pb';\nimport { MeasureEntity } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper } from '@vertexvis/utils';\n\nimport { fromPbVector3f } from '../mappers';\n\nexport class MeasurementEntity {\n public constructor(\n public readonly point: Vector3.Vector3,\n public readonly modelEntity: Uint8Array\n ) {}\n\n public static fromHit(\n hit: vertexvis.protobuf.stream.IHit\n ): MeasurementEntity {\n if (hit.hitPoint != null && hit.modelEntity != null) {\n const hitPoint = Mapper.ifInvalidThrow(fromPbVector3f)(hit.hitPoint);\n const modelEntity = vertexvis.protobuf.core.ModelEntity.encode(\n hit.modelEntity\n ).finish();\n return new MeasurementEntity(hitPoint, modelEntity);\n } else {\n throw new Error(\n 'Cannot create MeasurementEntity from Hit. Hit is missing hit point and model entity'\n );\n }\n }\n\n public toProto(): MeasureEntity {\n const entity = new MeasureEntity();\n\n const point = new Vector3f();\n point.setX(this.point.x);\n point.setY(this.point.y);\n point.setZ(this.point.z);\n entity.setPoint(point);\n\n const modelEntity = ModelEntity.deserializeBinary(this.modelEntity);\n entity.setModelEntity(modelEntity);\n\n return entity;\n }\n}\n"],"names":["MeasureRequest","ModelEntityUpdate","ModelEntity","BoolValue","UpdateModelEntitiesRequest","Mapper","MeasureEntity","Vector3f"],"mappings":";;;;;;;;;;AAgBA;;;AAGG;MACU,qBAAqB,CAAA;AAGhC,IAAA,WAAA,CACU,KAAuB,EACvB,MAA0B,EAC1B,WAAwB,EACxB,QAA4B,EAAA;AAH5B,QAAA,IAAA,CAAA,KAAK,GAAL,KAAK;AACL,QAAA,IAAA,CAAA,MAAM,GAAN,MAAM;AACN,QAAA,IAAA,CAAA,WAAW,GAAX,WAAW;AACX,QAAA,IAAA,CAAA,QAAQ,GAAR,QAAQ;QANV,IAAA,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ACnB,GAAmC,EAAA;AAEnC,QAAA,IAAI,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,GAAG,CAAC,WAAW,IAAI,IAAI,EAAE;AACnD,YAAA,MAAM,QAAQ,GAAGC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;AACpE,YAAA,MAAM,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAC5D,GAAG,CAAC,WAAW,CAChB,CAAC,MAAM,EAAE;AACV,YAAA,OAAO,IAAI,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC;;aAC9C;AACL,YAAA,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF;;;IAIE,OAAO,GAAA;AACZ,QAAA,MAAM,MAAM,GAAG,IAAIC,sCAAa,EAAE;AAElC,QAAA,MAAM,KAAK,GAAG,IAAIC,2BAAQ,EAAE;QAC5B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACxB,QAAA,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAEtB,MAAM,WAAW,GAAGL,kCAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;AACnE,QAAA,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC;AAElC,QAAA,OAAO,MAAM;;AAEhB;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { e as requireModel_entity_pb, f as requireGeometry_pb } from './wrappers_pb-BcBcw9l_.js';
|
|
5
5
|
import { m as mapper } from './browser.esm-DdA40ya2.js';
|
|
6
|
-
import { V as fromPbPlane, n as fromPbVector3f } from './streamAttributes-
|
|
6
|
+
import { V as fromPbPlane, n as fromPbVector3f } from './streamAttributes-Cfp9UX5m.js';
|
|
7
7
|
|
|
8
8
|
var model_entity_pbExports = requireModel_entity_pb();
|
|
9
9
|
|
|
@@ -41,6 +41,6 @@ const mapMeasureResponseOrThrow = mapper.ifInvalidThrow(mapMeasureResponse);
|
|
|
41
41
|
var geometry_pbExports = requireGeometry_pb();
|
|
42
42
|
|
|
43
43
|
export { model_entity_pbExports as a, geometry_pbExports as g, mapMeasureResponseOrThrow as m };
|
|
44
|
-
//# sourceMappingURL=geometry_pb-
|
|
44
|
+
//# sourceMappingURL=geometry_pb-BLGp5Nq8.js.map
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=geometry_pb-
|
|
46
|
+
//# sourceMappingURL=geometry_pb-BLGp5Nq8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry_pb-
|
|
1
|
+
{"version":3,"file":"geometry_pb-BLGp5Nq8.js","sources":["src/lib/measurement/mapper.ts"],"sourcesContent":["import { Plane } from '@vertexvis/geometry';\nimport type {\n MeasurementResult as PbMeasurementResult,\n MinimumDistanceResult as PbMinimumDistanceResult,\n PlanarAngleResult as PbPlanarAngleResult,\n PlanarDistanceResult as PbPlanarDistanceResult,\n PlanePair as PbPlanePair,\n SurfaceAreaResult as PbSurfaceAreaResult,\n} from '@vertexvis/scene-view-protos/core/protos/measurement_pb';\nimport type { MeasureResponse as PbMeasureResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M } from '@vertexvis/utils';\n\nimport { fromPbPlane, fromPbVector3f } from '../mappers';\nimport { MeasurementOutcome } from './outcomes';\nimport {\n MeasurementResult,\n MinimumDistanceMeasurementResult,\n PlanarAngleMeasurementResult,\n PlanarDistanceMeasurementResult,\n SurfaceAreaMeasurementResult,\n} from './results';\n\nconst mapPlanePair: M.Func<\n PbPlanePair.AsObject,\n { start: Plane.Plane; end: Plane.Plane }\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp('start', fromPbPlane),\n M.mapRequiredProp('end', fromPbPlane)\n ),\n ([start, end]) => ({ start, end })\n);\n\nconst mapPlanarDistance: M.Func<\n PbPlanarDistanceResult.AsObject,\n PlanarDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start'))\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end')))\n ),\n ([distance, plane1, plane2]) => ({\n type: 'planar-distance',\n distance,\n plane1,\n plane2,\n })\n);\n\nconst mapPlanarAngle: M.Func<\n PbPlanarAngleResult.AsObject,\n PlanarAngleMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('angleInRadians'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start'))\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end')))\n ),\n ([angle, plane1, plane2]) => ({\n type: 'planar-angle',\n angle,\n plane1,\n plane2,\n })\n);\n\nconst mapMinimumDistance: M.Func<\n PbMinimumDistanceResult.AsObject,\n MinimumDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp('closestPoint1', fromPbVector3f),\n M.mapRequiredProp('closestPoint2', fromPbVector3f)\n ),\n ([distance, point1, point2]) => ({\n type: 'minimum-distance',\n distance,\n point1,\n point2,\n })\n);\n\nconst mapSurfaceArea: M.Func<\n PbSurfaceAreaResult.AsObject,\n SurfaceAreaMeasurementResult\n> = M.defineMapper(M.read(M.getProp('area')), ([area]) => ({\n type: 'surface-area',\n area,\n}));\n\nconst mapPlanarDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarDistanceMeasurementResult | undefined | null\n> = M.mapProp('planarDistance', M.ifDefined(mapPlanarDistance));\n\nconst mapPlanarAngleFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarAngleMeasurementResult | undefined | null\n> = M.mapProp('planarAngle', M.ifDefined(mapPlanarAngle));\n\nconst mapMinimumDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n MinimumDistanceMeasurementResult | undefined | null\n> = M.mapProp('minimumDistance', M.ifDefined(mapMinimumDistance));\n\nconst mapSurfaceAreaFromResult: M.Func<\n PbMeasurementResult.AsObject,\n SurfaceAreaMeasurementResult | undefined | null\n> = M.mapProp('totalSurfaceArea', M.ifDefined(mapSurfaceArea));\n\nconst mapMeasurementResult: M.Func<\n PbMeasurementResult.AsObject,\n MeasurementResult\n> = M.compose(\n M.pickFirst(\n mapPlanarDistanceFromResult,\n mapPlanarAngleFromResult,\n mapMinimumDistanceFromResult,\n mapSurfaceAreaFromResult\n ),\n M.required('Result field')\n);\n\nexport const mapMeasureResponse: M.Func<\n PbMeasureResponse.AsObject,\n MeasurementOutcome\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp(\n 'outcome',\n M.mapRequiredProp('resultsList', M.mapArray(mapMeasurementResult))\n ),\n M.mapRequiredProp('outcome', M.getProp('isApproximate'))\n ),\n ([results, isApproximate]) => ({ results, isApproximate })\n);\n\nexport const mapMeasureResponseOrThrow = M.ifInvalidThrow(mapMeasureResponse);\n"],"names":["M"],"mappings":";;;;;;;;;AAsBA,MAAM,YAAY,GAGdA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,EACvCA,MAAC,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,CACtC,EACD,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CACnC;AAED,MAAM,iBAAiB,GAGnBA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrBA,MAAC,CAAC,eAAe,CACf,QAAQ,EACRA,MAAC,CAAC,OAAO,CAAC,YAAY,EAAEA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E,CAAC,CAC3D;AAEM,MAAM,yBAAyB,GAAGA,MAAC,CAAC,cAAc,CAAC,kBAAkB;;;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-
|
|
4
|
+
export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-Coo1RH5H.js';
|
|
5
5
|
export { S as SceneTreeController } from './controller-BruzCYwb.js';
|
|
6
6
|
export { f as fromNodeProto, i as isLoadedRow } from './row-CiSHWNC4.js';
|
|
7
7
|
export { S as SCENE_ITEM_NAME_METADATA_KEY } from './types-BZwvQkyb.js';
|
|
8
8
|
export { C as CursorManager, b as boxQueryCursor, l as labelPinCursor, m as measurementCursor, a as measurementWithArrowCursor, p as pinCursor } from './cursors-B1Oei3qy.js';
|
|
9
|
-
export { M as MeasurementController, a as MeasurementEntity } from './entities-
|
|
9
|
+
export { M as MeasurementController, a as MeasurementEntity } from './entities-DxpPFj9w.js';
|
|
10
10
|
export { M as MeasurementModel } from './model-DZlVI9V_.js';
|
|
11
11
|
export { M as MeasurementOverlayManager } from './overlays-BJNNoXgZ.js';
|
|
12
12
|
export { m as makeMinimumDistanceResult } from './results-Bin2fB9X.js';
|
|
13
13
|
import { v as vector3, q as quaternion, m as matrix4 } from './bundle.esm-DfdVaPrt.js';
|
|
14
14
|
export { T as TransformController } from './controller-CegtBceu.js';
|
|
15
15
|
export { f as flattenPointArray, a as toDegreesTransform, e as toLocalTransform, b as toMatrix, t as toRadiansTransform, c as toTransform, d as toWorldTransform } from './util-vdT5IYV3.js';
|
|
16
|
-
export { A as AngleUnits, g as AreaUnits, c as CrossSectioning, D as DistanceUnits, F as FrameCameraBase, O as Orientation, a as ReceivedFrame, b as ReceivedFrameImage, d as ReceivedFrameScene, e as ReceivedOrthographicCamera, f as ReceivedPerspectiveCamera, S as StandardView } from './streamAttributes-
|
|
16
|
+
export { A as AngleUnits, g as AreaUnits, c as CrossSectioning, D as DistanceUnits, F as FrameCameraBase, O as Orientation, a as ReceivedFrame, b as ReceivedFrameImage, d as ReceivedFrameScene, e as ReceivedOrthographicCamera, f as ReceivedPerspectiveCamera, S as StandardView } from './streamAttributes-Cfp9UX5m.js';
|
|
17
17
|
export { E as EntityType } from './entities-BAhfr1Nx.js';
|
|
18
18
|
export { A as ArrowMarkup, C as CircleMarkup, F as FreeformMarkup } from './markup-BgzekF3-.js';
|
|
19
19
|
export { V as Viewport } from './viewport-CuUuAR7Y.js';
|
|
@@ -22,11 +22,11 @@ import './browser.esm-DdA40ya2.js';
|
|
|
22
22
|
import './_commonjsHelpers-CG9AChtV.js';
|
|
23
23
|
import './errors-Cs13_LRq.js';
|
|
24
24
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
25
|
-
import './representation_pb-
|
|
25
|
+
import './representation_pb-DYkJtHQo.js';
|
|
26
26
|
import './wrappers_pb-BcBcw9l_.js';
|
|
27
27
|
import './grpc-CZAYqbTu.js';
|
|
28
28
|
import './bundle.esm-C61F--HV.js';
|
|
29
|
-
import './geometry_pb-
|
|
29
|
+
import './geometry_pb-BLGp5Nq8.js';
|
|
30
30
|
|
|
31
31
|
const ALMOST_ONE = 0.9999;
|
|
32
32
|
/**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-
|
|
4
|
+
export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-Coo1RH5H.js';
|
|
5
5
|
export { S as SceneTreeController } from './controller-BruzCYwb.js';
|
|
6
6
|
export { f as fromNodeProto, i as isLoadedRow } from './row-CiSHWNC4.js';
|
|
7
7
|
export { S as SCENE_ITEM_NAME_METADATA_KEY } from './types-BZwvQkyb.js';
|
|
8
8
|
export { C as CursorManager, b as boxQueryCursor, l as labelPinCursor, m as measurementCursor, a as measurementWithArrowCursor, p as pinCursor } from './cursors-B1Oei3qy.js';
|
|
9
|
-
export { M as MeasurementController, a as MeasurementEntity } from './entities-
|
|
9
|
+
export { M as MeasurementController, a as MeasurementEntity } from './entities-DxpPFj9w.js';
|
|
10
10
|
export { M as MeasurementModel } from './model-DZlVI9V_.js';
|
|
11
11
|
export { M as MeasurementOverlayManager } from './overlays-BJNNoXgZ.js';
|
|
12
12
|
export { m as makeMinimumDistanceResult } from './results-Bin2fB9X.js';
|
|
13
13
|
import { v as vector3, q as quaternion, m as matrix4 } from './bundle.esm-DfdVaPrt.js';
|
|
14
14
|
export { T as TransformController } from './controller-CegtBceu.js';
|
|
15
15
|
export { f as flattenPointArray, a as toDegreesTransform, e as toLocalTransform, b as toMatrix, t as toRadiansTransform, c as toTransform, d as toWorldTransform } from './util-vdT5IYV3.js';
|
|
16
|
-
export { A as AngleUnits, g as AreaUnits, c as CrossSectioning, D as DistanceUnits, F as FrameCameraBase, O as Orientation, a as ReceivedFrame, b as ReceivedFrameImage, d as ReceivedFrameScene, e as ReceivedOrthographicCamera, f as ReceivedPerspectiveCamera, S as StandardView } from './streamAttributes-
|
|
16
|
+
export { A as AngleUnits, g as AreaUnits, c as CrossSectioning, D as DistanceUnits, F as FrameCameraBase, O as Orientation, a as ReceivedFrame, b as ReceivedFrameImage, d as ReceivedFrameScene, e as ReceivedOrthographicCamera, f as ReceivedPerspectiveCamera, S as StandardView } from './streamAttributes-Cfp9UX5m.js';
|
|
17
17
|
export { E as EntityType } from './entities-BAhfr1Nx.js';
|
|
18
18
|
export { A as ArrowMarkup, C as CircleMarkup, F as FreeformMarkup } from './markup-BgzekF3-.js';
|
|
19
19
|
export { V as Viewport } from './viewport-CuUuAR7Y.js';
|
|
@@ -22,11 +22,11 @@ import './browser.esm-DdA40ya2.js';
|
|
|
22
22
|
import './_commonjsHelpers-CG9AChtV.js';
|
|
23
23
|
import './errors-Cs13_LRq.js';
|
|
24
24
|
import './wrappers_pb-Xw_x1jYm.js';
|
|
25
|
-
import './representation_pb-
|
|
25
|
+
import './representation_pb-DYkJtHQo.js';
|
|
26
26
|
import './wrappers_pb-BcBcw9l_.js';
|
|
27
27
|
import './grpc-CZAYqbTu.js';
|
|
28
28
|
import './bundle.esm-C61F--HV.js';
|
|
29
|
-
import './geometry_pb-
|
|
29
|
+
import './geometry_pb-BLGp5Nq8.js';
|
|
30
30
|
|
|
31
31
|
const ALMOST_ONE = 0.9999;
|
|
32
32
|
/**
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { c as color, u as uri, b as uuid, a as async } from './browser.esm-DdA40ya2.js';
|
|
5
5
|
import { c as InvalidResourceUrnError, d as InvalidCameraError, e as InvalidArgumentError } from './errors-Cs13_LRq.js';
|
|
6
|
-
import { u as uuid_pbExports, m as mapListItemModelViewsResponseOrThrow, a as mapItemModelViewOrThrow, p as paging_pbExports, b as mapListPmiAnnotationsResponseOrThrow, r as representation_pbExports } from './representation_pb-
|
|
6
|
+
import { u as uuid_pbExports, m as mapListItemModelViewsResponseOrThrow, a as mapItemModelViewOrThrow, p as paging_pbExports, b as mapListPmiAnnotationsResponseOrThrow, r as representation_pbExports } from './representation_pb-DYkJtHQo.js';
|
|
7
7
|
import { s as scene_view_api_pbExports, w as wrappers_pbExports } from './wrappers_pb-BcBcw9l_.js';
|
|
8
8
|
import { r as requestUnary, c as createMetadata } from './grpc-CZAYqbTu.js';
|
|
9
9
|
import { c as boundingBox, v as vector3, m as matrix4, q as quaternion, r as ray, f as boundingSphere, p as point, e as dimensions } from './bundle.esm-DfdVaPrt.js';
|
|
10
|
-
import { N as isValidFrameCamera, t as toProtobuf, P as Long, Q as withPositionAndViewVector, R as fromBoundingBoxAndLookAtCamera, T as constrainViewVector, u as updateLookAtRelativeToBoundingBoxCenter, e as FrameOrthographicCamera, f as FramePerspectiveCamera } from './streamAttributes-
|
|
10
|
+
import { N as isValidFrameCamera, t as toProtobuf, P as Long, Q as withPositionAndViewVector, R as fromBoundingBoxAndLookAtCamera, T as constrainViewVector, u as updateLookAtRelativeToBoundingBoxCenter, e as FrameOrthographicCamera, f as FramePerspectiveCamera } from './streamAttributes-Cfp9UX5m.js';
|
|
11
11
|
import './entities-BAhfr1Nx.js';
|
|
12
12
|
import { t as toProtoDuration, v as vertexvis } from './bundle.esm-C61F--HV.js';
|
|
13
13
|
|
|
@@ -3005,6 +3005,6 @@ class SceneItemQueryExecutor {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
3007
|
export { Camera as C, ItemOperationBuilder as I, ModelViewController as M, PmiAnnotationOperationsBuilder as P, Raycaster as R, Scene as S, CrossSectioner as a, PmiAnnotationsQueryExecutor as b, colorMaterial as c, RootQuery as d, SceneElementQueryExecutor as e, SceneElementsOperationExecutor as f, SceneItemOperationsBuilder as g, SceneItemQueryExecutor as h, SceneItemsOperationExecutor as i, SynchronizedClock as j, PmiController as k, loadableResource as l, defaultColor as m, fromUrn as n, sceneViewStateIdentifier as s, toUuid2l as t };
|
|
3008
|
-
//# sourceMappingURL=queries-
|
|
3008
|
+
//# sourceMappingURL=queries-Coo1RH5H.js.map
|
|
3009
3009
|
|
|
3010
|
-
//# sourceMappingURL=queries-
|
|
3010
|
+
//# sourceMappingURL=queries-Coo1RH5H.js.map
|