@vertexvis/viewer 0.23.0-canary.9 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"scene.js","sourceRoot":"","sources":["../../../../../src/lib/scenes/scene.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAIrE,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,GAAG,CAAC;AACX,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,sCAAsC,EACtC,gCAAgC,GACjC,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,oBAAoB,EAEpB,6BAA6B,GAI9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAsC9D;;;;GAIG;AACH,MAAM,OAAO,0BAA0B;EAOrC,YACU,KAAsB,EAC9B,YAAmC;IAD3B,UAAK,GAAL,KAAK,CAAiB;IAG9B,IAAI,CAAC,OAAO,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI,oBAAoB,EAAE,CAAC;EAC5D,CAAC;EAEM,aAAa;IAClB,OAAO,IAAI,CAAC;EACd,CAAC;EAEM,mBAAmB;IACxB,OAAO,KAAK,CAAC;EACf,CAAC;EAED;;;;;;;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,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;EACxE,CAAC;EAED;;KAEG;EACI,SAAS;IACd,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;EAC7D,CAAC;EAED;;KAEG;EACI,QAAQ;IACb,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;EAC/B,CAAC;EAED;;KAEG;EACI,KAAK;IACV,OAAO,IAAI,CAAC,kBAAkB,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACzD,CAAC;CACF","sourcesContent":["import { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { BoundingBox, Dimensions, Point } from '@vertexvis/geometry';\nimport { StreamApi } from '@vertexvis/stream-api';\nimport { UUID } from '@vertexvis/utils';\n\nimport { InvalidArgumentError, InvalidCameraError } from '../errors';\nimport { FrameDecoder } from '../mappers';\nimport { SceneViewStateIdentifier } from '../types';\nimport { Frame } from '../types/frame';\nimport {\n Camera,\n CameraRenderOptions,\n OrthographicCamera,\n PerspectiveCamera,\n} from '.';\nimport { ColorMaterial, fromHex } from './colorMaterial';\nimport { CrossSectioner } from './crossSectioner';\nimport {\n buildSceneElementOperationOnAnnotation,\n buildSceneElementOperationOnItem,\n} from './mapper';\nimport {\n ItemOperation,\n ItemOperationBuilder,\n PmiAnnotationOperation,\n PmiAnnotationOperationBuilder,\n PmiAnnotationOperations,\n RepresentationId,\n SceneItemOperations,\n} from './operations';\nimport {\n QueryExpression,\n SceneElementQueryExecutor,\n SceneItemQueryExecutor,\n} from './queries';\nimport { Raycaster } from './raycaster';\nimport { SceneOperationExecuteResult } from './sceneOperationExecuteResult';\nimport { SceneViewStateLoader } from './sceneViewStateLoader';\n\nexport interface SceneExecutionOptions {\n suppliedCorrelationId?: string;\n}\n\nexport interface SceneElementsExecutionOptions extends SceneExecutionOptions {\n /**\n * Skips the wait for a frame correlated to this alteration before\n * completing the Promise returned by the `execute()` method.\n */\n skipAwaitCorrelatedFrame?: boolean;\n}\n\nexport interface SceneItemsExecutionOptions extends SceneExecutionOptions {\n /**\n * Waits for the frame correlated to this alteration before\n * completing the Promise returned by the `execute()` method.\n */\n awaitCorrelatedFrame?: boolean;\n}\n\nexport interface ApplySceneViewStateOptions\n extends SceneElementsExecutionOptions,\n CameraRenderOptions {\n waitForAnimation?: boolean;\n}\n\nexport interface ResetViewOptions {\n includeCamera?: boolean;\n suppliedCorrelationId?: string;\n}\n\nexport interface SceneElementOperationsBuilder {\n isItemBuilder(): this is SceneItemOperationsBuilder;\n isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder;\n}\n\n/**\n * A class that is responsible for building operations on scene items for a specific scene.\n * This executor requires a query, and expects `execute()` to be invoked in\n * order for the changes to take effect.\n */\nexport class SceneItemOperationsBuilder\n implements\n SceneItemOperations<SceneItemOperationsBuilder>,\n SceneElementOperationsBuilder\n{\n private builder: ItemOperationBuilder;\n\n public constructor(\n private query: QueryExpression,\n givenBuilder?: ItemOperationBuilder\n ) {\n this.builder = givenBuilder ?? new ItemOperationBuilder();\n }\n\n public isItemBuilder(): this is SceneItemOperationsBuilder {\n return true;\n }\n\n public isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder {\n return false;\n }\n\n /**\n * Specifies that the scene items matching the query should have their default\n * material overridden to match the specified material.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Override the material for the item with the `item-uuid` ID to\n * // be red with an opacity of 0.5.\n * await scene.elements((op) => [\n * op\n * .items.where((q) => q.withItemId('item-uuid'))\n * .materialOverride(ColorMaterial.create(255, 0, 0, 0.5)),\n * ]);\n *\n * // Override the material for the item with the `item-uuid` ID to\n * // be red with an opacity of 1.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).materialOverride('#ff0000'),\n * ]).execute();\n * ```\n */\n public materialOverride(\n color: ColorMaterial | string\n ): SceneItemOperationsBuilder {\n if (typeof color === 'string') {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.materialOverride(fromHex(color))\n );\n } else {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.materialOverride(color)\n );\n }\n }\n\n /**\n * Specifies that the scene items matching the query should be hidden.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Hide the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).hide(),\n * ]).execute();\n * ```\n */\n public hide(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.hide());\n }\n\n /**\n * Specifies that the scene items matching the query should be shown.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Show the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).show(),\n * ]).execute();\n * ```\n */\n public show(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.show());\n }\n\n /**\n * Specifies that the scene items matching the query should be selected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Select the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).select(),\n * ]).execute();\n * ```\n */\n public select(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.select());\n }\n\n /**\n * Specifies that the scene items matching the query should be deselected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).deselect(),\n * ]).execute();\n * ```\n */\n public deselect(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.deselect());\n }\n\n /**\n * Specifies that the scene items matching the query should have any overridden\n * material removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden material on the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearMaterialOverrides(),\n * ]);\n * ```\n */\n public clearMaterialOverrides(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearMaterialOverrides()\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their\n * transformation matrix overridden to match the specified transformation\n * matrix.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Override the transformation matrix for the item with the `item-uuid` ID to\n * // move the element along the x-axis\n * await scene.elements((op) => [\n * op\n * .items.where((q) => q.withItemId('item-uuid'))\n * .transform(Matrix4.makeTranslation(Vector3.create(100, 0, 0))),\n * ]);\n * ```\n */\n public transform(\n matrix: vertexvis.protobuf.core.IMatrix4x4f | number[]\n ): SceneItemOperationsBuilder {\n if (Array.isArray(matrix)) {\n if (matrix.length !== 16) {\n throw new InvalidArgumentError(\n 'Matrix provided must contain exactly 16 values (4x4).'\n );\n }\n\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.transform({\n r0: {\n x: matrix[0],\n y: matrix[1],\n z: matrix[2],\n w: matrix[3],\n },\n r1: {\n x: matrix[4],\n y: matrix[5],\n z: matrix[6],\n w: matrix[7],\n },\n r2: {\n x: matrix[8],\n y: matrix[9],\n z: matrix[10],\n w: matrix[11],\n },\n r3: {\n x: matrix[12],\n y: matrix[13],\n z: matrix[14],\n w: matrix[15],\n },\n })\n );\n } else {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.transform(matrix)\n );\n }\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * transformation matrix removed. The `cascade` flag determines whether\n * children of the scene items matching the query should also have their overridden\n * transformation matrix removed, and defaults to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden the transformation matrix for the item with the `item-uuid` ID\n * // and do not cascade to preserve transformations on children\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearTransforms(false),\n * ]);\n *\n * // Clear the overridden the transformation matrix for the item with the `item-uuid` ID\n * // and cascade to clear overridden transformations on children\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearTransforms(true),\n * ]);\n * ```\n */\n public clearTransforms(cascade = true): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearTransforms(cascade)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their phantom state\n * overridden to match the specified `phantomState` flag. If the\n * `phantomState` flag is not provided, it will default to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Mark the item with the `item-uuid` ID as phantom\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setPhantom(true),\n * ]);\n *\n * // Unmark the item with the `item-uuid` ID as phantom\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setPhantom(false),\n * ]);\n * ```\n */\n public setPhantom(phantomState?: boolean): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.setPhantom(phantomState)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * phantom state removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden phantom state of the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearPhantom(),\n * ]);\n * ```\n */\n public clearPhantom(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearPhantom()\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their end item\n * state overridden to match the specified `endItemState` flag. If the\n * `endItemState` flag is not provided, it will default to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Mark the item with the `item-uuid` ID as an end item\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setEndItem(true),\n * ]);\n *\n * // Unmark the item with the `item-uuid` ID as an end item\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setEndItem(false),\n * ]);\n * ```\n *\n * @remarks\n * End item states do not propagate to children similar to other states like\n * other operations. I.e. calling setEndItem(false) on an item will cause it\n * to be unmarked as an end item, but any children where setEndItem(true) was\n * called previously will remain as end items.\n */\n public setEndItem(endItemState?: boolean): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.setEndItem(endItemState)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * end item state removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden end item state of the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearEndItem(),\n * ]);\n * ```\n */\n public clearEndItem(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearEndItem()\n );\n }\n\n /**\n * Changes the rendition of a scene item matching the query. This operation only\n * applies to scene items that reference a revision that contains the given\n * rendition.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the matching item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRenditionById('rendition-uuid'),\n * ]);\n * ```\n */\n public viewRenditionById(id: UUID.UUID): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRenditionById(id)\n );\n }\n\n /**\n * Changes the rendition of any scene item matching the query that contains a\n * rendition with the given supplied ID. This operation only applies to scene items\n * that reference a revision that contain a rendition with a matching supplied\n * ID.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRenditionBySuppliedId('rendition-supplied-id'),\n * ]);\n * ```\n */\n public viewRenditionBySuppliedId(\n suppliedId: string\n ): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRenditionBySuppliedId(suppliedId)\n );\n }\n\n /**\n * Changes the rendition of scene items matching the query back to their revision's\n * default rendition. This operation only applies to scene items that reference a\n * revision.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewDefaultRendition(),\n * ]);\n * ```\n */\n public viewDefaultRendition(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewDefaultRendition()\n );\n }\n\n /**\n * Clears the rendition of scene items matching the query, which will revert the\n * scene item back to the rendition used when creating the item.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearRendition(),\n * ]);\n * ```\n */\n public clearRendition(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearRendition()\n );\n }\n\n /**\n * Changes the representation of scene items matching a query. This operation only\n * applies to scene items that reference a rendition with the given representation\n * ID.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRepresentation('rep-id'),\n * ]);\n * ```\n */\n public viewRepresentation(id: RepresentationId): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRepresentation(id)\n );\n }\n\n /**\n * Clears the representation for scene items matching the query.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearRepresentation(),\n * ]);\n * ```\n */\n public clearRepresentation(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearRepresentation()\n );\n }\n\n /**\n * @internal\n */\n public build(): QueryOperation {\n return {\n query: this.query,\n operations: this.builder.build(),\n };\n }\n}\n\n/**\n * A class that is responsible for building operations on pmi annotations for a specific scene.\n * This executor requires a query, and expects `execute()` to be invoked in\n * order for the changes to take effect.\n */\nexport class PmiAnnotationOperationsBuilder\n implements\n PmiAnnotationOperations<PmiAnnotationOperationsBuilder>,\n SceneElementOperationsBuilder\n{\n private builder: PmiAnnotationOperationBuilder;\n\n public constructor(\n private query: QueryExpression,\n givenBuilder?: PmiAnnotationOperationBuilder\n ) {\n this.builder = givenBuilder ?? new PmiAnnotationOperationBuilder();\n }\n\n public isItemBuilder(): this is SceneItemOperationsBuilder {\n return false;\n }\n\n public isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder {\n return true;\n }\n\n /**\n * Specifies that the PMI annotations matching the query should be hidden.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Hide the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).hide(),\n * ]).execute();\n * ```\n */\n public hide(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(this.query, this.builder.hide());\n }\n\n /**\n * Specifies that the PMI annotations matching the query should be shown.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Show the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).show(),\n * ]).execute();\n * ```\n */\n public show(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(this.query, this.builder.show());\n }\n\n /**\n * Specifies that the PMI annotations matching the query should be selected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Select the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).select(),\n * ]).execute();\n * ```\n */\n public select(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(\n this.query,\n this.builder.select()\n );\n }\n\n /**\n * Specifies that the PMI annotations matching the query should be deselected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).deselect(),\n * ]).execute();\n * ```\n */\n public deselect(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(\n this.query,\n this.builder.deselect()\n );\n }\n\n /**\n * @internal\n */\n public build(): QueryAnnotationOperation {\n return {\n query: this.query,\n operations: this.builder.build(),\n };\n }\n}\n\nexport interface QueryOperation {\n query: QueryExpression;\n operations: ItemOperation[];\n}\n\nexport interface QueryAnnotationOperation {\n query: QueryExpression;\n operations: PmiAnnotationOperation[];\n}\n\nexport class OperationExecutor<T extends SceneExecutionOptions> {\n public constructor(\n protected sceneViewId: UUID.UUID,\n protected stream: StreamApi,\n protected decodeFrame: FrameDecoder,\n protected dimensions: Dimensions.Dimensions,\n protected sceneItemQueryOperations: QueryOperation[],\n protected pmiAnnotationQueryOperations: QueryAnnotationOperation[]\n ) {}\n\n public async execute(executionOptions?: T): Promise<void> {\n const pbItemOperations = this.sceneItemQueryOperations.map((op) =>\n buildSceneElementOperationOnItem(op.query, op.operations, {\n dimensions: this.dimensions,\n })\n );\n const pbPmiAnnotationOperations = this.pmiAnnotationQueryOperations.map(\n (op) =>\n buildSceneElementOperationOnAnnotation(op.query, op.operations, {\n dimensions: this.dimensions,\n })\n );\n\n const requestCorrelationId =\n executionOptions?.suppliedCorrelationId ?? UUID.create();\n\n const request = {\n sceneViewId: {\n hex: this.sceneViewId,\n },\n elementOperations: [...pbItemOperations, ...pbPmiAnnotationOperations],\n suppliedCorrelationId: {\n value: requestCorrelationId,\n },\n };\n\n await this.stream.createSceneAlteration(request);\n }\n}\n\nexport class SceneItemsOperationExecutor extends OperationExecutor<SceneItemsExecutionOptions> {\n public async execute(\n executionOptions?: SceneItemsExecutionOptions\n ): Promise<void> {\n if (executionOptions?.awaitCorrelatedFrame) {\n const correlationId =\n executionOptions.suppliedCorrelationId ?? UUID.create();\n const executeResult = new SceneOperationExecuteResult(\n this.stream,\n this.decodeFrame,\n correlationId\n );\n\n await super.execute({\n ...executionOptions,\n suppliedCorrelationId: correlationId,\n });\n await executeResult.onFrameDrawn.once();\n } else {\n await super.execute(executionOptions);\n }\n }\n}\n\nexport class SceneElementsOperationExecutor extends OperationExecutor<SceneElementsExecutionOptions> {\n public async execute(\n executionOptions?: SceneElementsExecutionOptions\n ): Promise<void> {\n if (executionOptions?.skipAwaitCorrelatedFrame) {\n await super.execute(executionOptions);\n } else {\n const correlationId =\n executionOptions?.suppliedCorrelationId ?? UUID.create();\n const executeResult = new SceneOperationExecuteResult(\n this.stream,\n this.decodeFrame,\n correlationId\n );\n\n await super.execute({\n ...executionOptions,\n suppliedCorrelationId: correlationId,\n });\n await executeResult.onFrameDrawn.once();\n }\n }\n}\n\nexport type TerminalItemOperationBuilder =\n | PmiAnnotationOperationsBuilder\n | SceneItemOperationsBuilder\n | Array<SceneItemOperationsBuilder | PmiAnnotationOperationsBuilder>;\n\nexport type ImageScaleProvider = () => Point.Point | undefined;\n\n/**\n * The features of a scene view state that can be applied to the current scene\n */\nexport type SceneViewStateFeature =\n | 'camera'\n | 'cross_section'\n | 'material_overrides'\n | 'selection'\n | 'transforms'\n | 'visibility'\n | 'phantom'\n | 'shading';\n\n/**\n * A class that represents the `Scene` that has been loaded into the viewer. On\n * it, you can retrieve attributes of the scene, such as the camera. It also\n * contains methods for updating the scene and performing requests to rerender\n * the scene.\n */\nexport class Scene {\n private sceneViewStateLoader: SceneViewStateLoader;\n\n public constructor(\n private stream: StreamApi,\n private frame: Frame,\n private decodeFrame: FrameDecoder,\n private imageScaleProvider: ImageScaleProvider,\n private dimensions: Dimensions.Dimensions,\n public readonly sceneId: UUID.UUID,\n public readonly sceneViewId: UUID.UUID\n ) {\n this.sceneViewStateLoader = new SceneViewStateLoader(\n stream,\n decodeFrame,\n sceneId,\n sceneViewId\n );\n }\n\n /**\n * Applies the provided scene view state to the scene.\n */\n public async applySceneViewState(\n sceneViewStateId:\n | UUID.UUID\n | SceneViewStateIdentifier.SceneViewStateIdentifier,\n opts: ApplySceneViewStateOptions = {}\n ): Promise<vertexvis.protobuf.stream.ILoadSceneViewStateResult | undefined> {\n return await this.sceneViewStateLoader.applySceneViewState(\n sceneViewStateId,\n opts\n );\n }\n\n /**\n * Applies the specified features of the provided scene view state to the scene.\n */\n public async applyPartialSceneViewState(\n sceneViewStateId:\n | UUID.UUID\n | SceneViewStateIdentifier.SceneViewStateIdentifier,\n featuresToApply: SceneViewStateFeature[],\n opts: ApplySceneViewStateOptions = {}\n ): Promise<vertexvis.protobuf.stream.ILoadSceneViewStateResult | undefined> {\n return await this.sceneViewStateLoader.applyPartialSceneViewState(\n sceneViewStateId,\n featuresToApply,\n opts\n );\n }\n\n /**\n * Resets the view to its default state, with the ability to reset the camera to that of the base scene.\n */\n public async reset(\n opts: ResetViewOptions = {}\n ): Promise<vertexvis.protobuf.stream.IResetViewResult | undefined> {\n return await this.stream.resetSceneView(\n {\n includeCamera: opts.includeCamera,\n frameCorrelationId: opts.suppliedCorrelationId\n ? { value: opts.suppliedCorrelationId }\n : undefined,\n },\n true\n );\n }\n\n /**\n * Returns an executor that accepts a function as a parameter that contains one or more operations to apply\n * to the scene view. The operations will be applied transactionally.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect everything, then select a specific item by ID\n * await scene.items(op => [\n * op.items.where(q => q.all()).deselect(),\n * op.items.where(q => q.withItemId('item-id')).select(),\n * ]).execute();\n * ```\n *\n * @see {@link RootQuery} for more information on available queries.\n *\n * @see {@link SceneItemOperationsBuilder} for more information on available operations.\n *\n * @param operations\n */\n public items(\n operations: (q: SceneItemQueryExecutor) => TerminalItemOperationBuilder\n ): SceneItemsOperationExecutor {\n const sceneOperations = operations(new SceneItemQueryExecutor());\n\n const ops: Array<\n SceneItemOperationsBuilder | PmiAnnotationOperationsBuilder\n > = Array.isArray(sceneOperations) ? sceneOperations : [sceneOperations];\n const itemOps = ops.filter((op) =>\n op.isItemBuilder()\n ) as Array<SceneItemOperationsBuilder>;\n\n const operationList = itemOps.reduce(\n (acc, builder: SceneItemOperationsBuilder) => acc.concat(builder.build()),\n [] as QueryOperation[]\n );\n\n return new SceneItemsOperationExecutor(\n this.sceneViewId,\n this.stream,\n this.decodeFrame,\n this.dimensions,\n operationList,\n []\n );\n }\n\n /**\n * Returns an executor that accepts a function as a parameter that contains one or more operations to apply\n * to items or annotations in the scene view. The operations will be applied transactionally.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect everything, then select a specific scene item by ID\n * await scene.elements(op => [\n * op.items.where(q => q.all()).deselect(),\n * op.annotations.where(q => q.all()).deselect(),\n * op.items.where(q => q.withItemId('item-id')).select(),\n * ]).execute();\n * ```\n *\n * @see {@link RootQuery} for more information on available queries on scene items.\n *\n * @see {@link SceneItemOperationsBuilder} for more information on available operations to the scene items.\n *\n * @see {@link PmiAnnotationRootQuery} for more information on available queries on PMI annotations.\n *\n * @see {@link PmiAnnotationOperationsBuilder} for more information on available operations to the PMI annotations.\n *\n * @param operations\n */\n public elements(\n operations: (q: SceneElementQueryExecutor) => TerminalItemOperationBuilder\n ): SceneElementsOperationExecutor {\n const ops = operations(new SceneElementQueryExecutor());\n const opsAsArray = Array.isArray(ops) ? ops : [ops];\n\n // Operations on scene items\n const sceneItemOps = opsAsArray.filter((op) =>\n op.isItemBuilder()\n ) as Array<SceneItemOperationsBuilder>;\n const sceneItemsOperationList = sceneItemOps.reduce(\n (acc, builder: SceneItemOperationsBuilder) => acc.concat(builder.build()),\n [] as QueryOperation[]\n );\n\n // Operations on PMI annotations\n const pmiAnnotationOps = opsAsArray.filter((op) =>\n op.isAnnotationBuilder()\n ) as Array<PmiAnnotationOperationsBuilder>;\n const pmiAnnotationOperationList = pmiAnnotationOps.reduce(\n (acc, builder: PmiAnnotationOperationsBuilder) =>\n acc.concat(builder.build()),\n [] as QueryAnnotationOperation[]\n );\n\n return new SceneElementsOperationExecutor(\n this.sceneViewId,\n this.stream,\n this.decodeFrame,\n this.dimensions,\n sceneItemsOperationList,\n pmiAnnotationOperationList\n );\n }\n\n /**\n * An instance of the current camera of the scene. The camera provides a number of\n * methods that can be used in combination with the `render` method to make programmatic\n * updates to the scene's camera.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n * const camera = scene.camera();\n *\n * // Fit the camera to the visible bounding box of the scene with a 1 second animation\n * await camera.viewAll().render({ animation: { milliseconds: 1000 } });\n * ```\n *\n * @see {@link Camera} for more information on available camera operations.\n */\n public camera(): Camera {\n const { scene } = this.frame;\n\n if (scene.camera.isOrthographic()) {\n return new OrthographicCamera(\n this.stream,\n Dimensions.aspectRatio(this.viewport()),\n {\n viewVector: scene.camera.viewVector,\n lookAt: scene.camera.lookAt,\n up: scene.camera.up,\n fovHeight: scene.camera.fovHeight,\n rotationPoint: scene.camera.lookAt,\n },\n this.frame.scene.boundingBox,\n this.decodeFrame\n );\n } else if (scene.camera.isPerspective()) {\n return new PerspectiveCamera(\n this.stream,\n Dimensions.aspectRatio(this.viewport()),\n {\n position: scene.camera.position,\n lookAt: scene.camera.lookAt,\n up: scene.camera.up,\n fovY: scene.camera.fovY,\n },\n this.frame.scene.boundingBox,\n this.decodeFrame\n );\n } else {\n throw new InvalidCameraError(\n 'Cannot retrieve camera. Scene has an unknown or invalid camera type.'\n );\n }\n }\n\n public isOrthographic(): boolean {\n const { scene } = this.frame;\n\n return scene.camera.isOrthographic();\n }\n\n /**\n * Returns the current visible BoundingBox for the scene.\n */\n public boundingBox(): BoundingBox.BoundingBox {\n return this.frame.scene.boundingBox;\n }\n\n /**\n * CrossSectioner to update cross sectioning planes and get current configuration.\n */\n public crossSectioning(): CrossSectioner {\n return new CrossSectioner(this.stream, this.frame.scene.crossSection);\n }\n\n /**\n * Raycaster to request items that intersect a point.\n */\n public raycaster(): Raycaster {\n return new Raycaster(this.stream, this.imageScaleProvider);\n }\n\n /**\n * The current viewport of the scene, in pixels.\n */\n public viewport(): Dimensions.Dimensions {\n return this.frame.dimensions;\n }\n\n /**\n * The current x and y scale of the rendered image.\n */\n public scale(): Point.Point {\n return this.imageScaleProvider() || Point.create(1, 1);\n }\n}\n"]}
1
+ {"version":3,"file":"scene.js","sourceRoot":"","sources":["../../../../../src/lib/scenes/scene.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAIrE,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,GAAG,CAAC;AACX,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,sCAAsC,EACtC,gCAAgC,GACjC,MAAM,UAAU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AC,MAAM,CAAC,QAAQ;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;QAC3B,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;QACnB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;OACxB,EACD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAC5B,IAAI,CAAC,WAAW,CACjB,CAAC;KACH;SAAM;MACL,MAAM,IAAI,kBAAkB,CAC1B,sEAAsE,CACvE,CAAC;KACH;EACH,CAAC;EAEM,cAAc;IACnB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;IAE7B,OAAO,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;EACvC,CAAC;EAED;;KAEG;EACI,WAAW;IAChB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;EACtC,CAAC;EAED;;KAEG;EACI,eAAe;IACpB,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;EACxE,CAAC;EAED;;KAEG;EACI,SAAS;IACd,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;EAC7D,CAAC;EAED;;KAEG;EACI,QAAQ;IACb,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;EAC/B,CAAC;EAED;;KAEG;EACI,KAAK;IACV,OAAO,IAAI,CAAC,kBAAkB,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACzD,CAAC;CACF","sourcesContent":["import { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { BoundingBox, Dimensions, Point } from '@vertexvis/geometry';\nimport { StreamApi } from '@vertexvis/stream-api';\nimport { UUID } from '@vertexvis/utils';\n\nimport { InvalidArgumentError, InvalidCameraError } from '../errors';\nimport { FrameDecoder } from '../mappers';\nimport { SceneViewStateIdentifier } from '../types';\nimport { Frame } from '../types/frame';\nimport {\n Camera,\n CameraRenderOptions,\n OrthographicCamera,\n PerspectiveCamera,\n} from '.';\nimport { ColorMaterial, fromHex } from './colorMaterial';\nimport { CrossSectioner } from './crossSectioner';\nimport {\n buildSceneElementOperationOnAnnotation,\n buildSceneElementOperationOnItem,\n} from './mapper';\nimport {\n ItemOperation,\n ItemOperationBuilder,\n PmiAnnotationOperation,\n PmiAnnotationOperationBuilder,\n PmiAnnotationOperations,\n RepresentationId,\n SceneItemOperations,\n} from './operations';\nimport {\n QueryExpression,\n SceneElementQueryExecutor,\n SceneItemQueryExecutor,\n} from './queries';\nimport { Raycaster } from './raycaster';\nimport { SceneOperationExecuteResult } from './sceneOperationExecuteResult';\nimport { SceneViewStateLoader } from './sceneViewStateLoader';\n\nexport interface SceneExecutionOptions {\n suppliedCorrelationId?: string;\n}\n\nexport interface SceneElementsExecutionOptions extends SceneExecutionOptions {\n /**\n * Skips the wait for a frame correlated to this alteration before\n * completing the Promise returned by the `execute()` method.\n */\n skipAwaitCorrelatedFrame?: boolean;\n}\n\nexport interface SceneItemsExecutionOptions extends SceneExecutionOptions {\n /**\n * Waits for the frame correlated to this alteration before\n * completing the Promise returned by the `execute()` method.\n */\n awaitCorrelatedFrame?: boolean;\n}\n\nexport interface ApplySceneViewStateOptions\n extends SceneElementsExecutionOptions,\n CameraRenderOptions {\n waitForAnimation?: boolean;\n}\n\nexport interface ResetViewOptions {\n includeCamera?: boolean;\n suppliedCorrelationId?: string;\n}\n\nexport interface SceneElementOperationsBuilder {\n isItemBuilder(): this is SceneItemOperationsBuilder;\n isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder;\n}\n\n/**\n * A class that is responsible for building operations on scene items for a specific scene.\n * This executor requires a query, and expects `execute()` to be invoked in\n * order for the changes to take effect.\n */\nexport class SceneItemOperationsBuilder\n implements\n SceneItemOperations<SceneItemOperationsBuilder>,\n SceneElementOperationsBuilder\n{\n private builder: ItemOperationBuilder;\n\n public constructor(\n private query: QueryExpression,\n givenBuilder?: ItemOperationBuilder\n ) {\n this.builder = givenBuilder ?? new ItemOperationBuilder();\n }\n\n public isItemBuilder(): this is SceneItemOperationsBuilder {\n return true;\n }\n\n public isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder {\n return false;\n }\n\n /**\n * Specifies that the scene items matching the query should have their default\n * material overridden to match the specified material.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Override the material for the item with the `item-uuid` ID to\n * // be red with an opacity of 0.5.\n * await scene.elements((op) => [\n * op\n * .items.where((q) => q.withItemId('item-uuid'))\n * .materialOverride(ColorMaterial.create(255, 0, 0, 0.5)),\n * ]);\n *\n * // Override the material for the item with the `item-uuid` ID to\n * // be red with an opacity of 1.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).materialOverride('#ff0000'),\n * ]).execute();\n * ```\n */\n public materialOverride(\n color: ColorMaterial | string\n ): SceneItemOperationsBuilder {\n if (typeof color === 'string') {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.materialOverride(fromHex(color))\n );\n } else {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.materialOverride(color)\n );\n }\n }\n\n /**\n * Specifies that the scene items matching the query should be hidden.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Hide the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).hide(),\n * ]).execute();\n * ```\n */\n public hide(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.hide());\n }\n\n /**\n * Specifies that the scene items matching the query should be shown.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Show the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).show(),\n * ]).execute();\n * ```\n */\n public show(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.show());\n }\n\n /**\n * Specifies that the scene items matching the query should be selected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Select the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).select(),\n * ]).execute();\n * ```\n */\n public select(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.select());\n }\n\n /**\n * Specifies that the scene items matching the query should be deselected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).deselect(),\n * ]).execute();\n * ```\n */\n public deselect(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(this.query, this.builder.deselect());\n }\n\n /**\n * Specifies that the scene items matching the query should have any overridden\n * material removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden material on the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearMaterialOverrides(),\n * ]);\n * ```\n */\n public clearMaterialOverrides(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearMaterialOverrides()\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their\n * transformation matrix overridden to match the specified transformation\n * matrix.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Override the transformation matrix for the item with the `item-uuid` ID to\n * // move the element along the x-axis\n * await scene.elements((op) => [\n * op\n * .items.where((q) => q.withItemId('item-uuid'))\n * .transform(Matrix4.makeTranslation(Vector3.create(100, 0, 0))),\n * ]);\n * ```\n */\n public transform(\n matrix: vertexvis.protobuf.core.IMatrix4x4f | number[]\n ): SceneItemOperationsBuilder {\n if (Array.isArray(matrix)) {\n if (matrix.length !== 16) {\n throw new InvalidArgumentError(\n 'Matrix provided must contain exactly 16 values (4x4).'\n );\n }\n\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.transform({\n r0: {\n x: matrix[0],\n y: matrix[1],\n z: matrix[2],\n w: matrix[3],\n },\n r1: {\n x: matrix[4],\n y: matrix[5],\n z: matrix[6],\n w: matrix[7],\n },\n r2: {\n x: matrix[8],\n y: matrix[9],\n z: matrix[10],\n w: matrix[11],\n },\n r3: {\n x: matrix[12],\n y: matrix[13],\n z: matrix[14],\n w: matrix[15],\n },\n })\n );\n } else {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.transform(matrix)\n );\n }\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * transformation matrix removed. The `cascade` flag determines whether\n * children of the scene items matching the query should also have their overridden\n * transformation matrix removed, and defaults to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden the transformation matrix for the item with the `item-uuid` ID\n * // and do not cascade to preserve transformations on children\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearTransforms(false),\n * ]);\n *\n * // Clear the overridden the transformation matrix for the item with the `item-uuid` ID\n * // and cascade to clear overridden transformations on children\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearTransforms(true),\n * ]);\n * ```\n */\n public clearTransforms(cascade = true): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearTransforms(cascade)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their phantom state\n * overridden to match the specified `phantomState` flag. If the\n * `phantomState` flag is not provided, it will default to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Mark the item with the `item-uuid` ID as phantom\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setPhantom(true),\n * ]);\n *\n * // Unmark the item with the `item-uuid` ID as phantom\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setPhantom(false),\n * ]);\n * ```\n */\n public setPhantom(phantomState?: boolean): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.setPhantom(phantomState)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * phantom state removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden phantom state of the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearPhantom(),\n * ]);\n * ```\n */\n public clearPhantom(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearPhantom()\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their end item\n * state overridden to match the specified `endItemState` flag. If the\n * `endItemState` flag is not provided, it will default to `true`.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Mark the item with the `item-uuid` ID as an end item\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setEndItem(true),\n * ]);\n *\n * // Unmark the item with the `item-uuid` ID as an end item\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).setEndItem(false),\n * ]);\n * ```\n *\n * @remarks\n * End item states do not propagate to children similar to other states like\n * other operations. I.e. calling setEndItem(false) on an item will cause it\n * to be unmarked as an end item, but any children where setEndItem(true) was\n * called previously will remain as end items.\n */\n public setEndItem(endItemState?: boolean): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.setEndItem(endItemState)\n );\n }\n\n /**\n * Specifies that the scene items matching the query should have their overridden\n * end item state removed.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Clear the overridden end item state of the item with the `item-uuid` ID\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearEndItem(),\n * ]);\n * ```\n */\n public clearEndItem(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearEndItem()\n );\n }\n\n /**\n * Changes the rendition of a scene item matching the query. This operation only\n * applies to scene items that reference a revision that contains the given\n * rendition.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the matching item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRenditionById('rendition-uuid'),\n * ]);\n * ```\n */\n public viewRenditionById(id: UUID.UUID): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRenditionById(id)\n );\n }\n\n /**\n * Changes the rendition of any scene item matching the query that contains a\n * rendition with the given supplied ID. This operation only applies to scene items\n * that reference a revision that contain a rendition with a matching supplied\n * ID.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRenditionBySuppliedId('rendition-supplied-id'),\n * ]);\n * ```\n */\n public viewRenditionBySuppliedId(\n suppliedId: string\n ): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRenditionBySuppliedId(suppliedId)\n );\n }\n\n /**\n * Changes the rendition of scene items matching the query back to their revision's\n * default rendition. This operation only applies to scene items that reference a\n * revision.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewDefaultRendition(),\n * ]);\n * ```\n */\n public viewDefaultRendition(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewDefaultRendition()\n );\n }\n\n /**\n * Clears the rendition of scene items matching the query, which will revert the\n * scene item back to the rendition used when creating the item.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearRendition(),\n * ]);\n * ```\n */\n public clearRendition(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearRendition()\n );\n }\n\n /**\n * Changes the representation of scene items matching a query. This operation only\n * applies to scene items that reference a rendition with the given representation\n * ID.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).viewRepresentation('rep-id'),\n * ]);\n * ```\n */\n public viewRepresentation(id: RepresentationId): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.viewRepresentation(id)\n );\n }\n\n /**\n * Clears the representation for scene items matching the query.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Switch the rendition of the given item.\n * await scene.elements((op) => [\n * op.items.where((q) => q.withItemId('item-uuid')).clearRepresentation(),\n * ]);\n * ```\n */\n public clearRepresentation(): SceneItemOperationsBuilder {\n return new SceneItemOperationsBuilder(\n this.query,\n this.builder.clearRepresentation()\n );\n }\n\n /**\n * @internal\n */\n public build(): QueryOperation {\n return {\n query: this.query,\n operations: this.builder.build(),\n };\n }\n}\n\n/**\n * @ignore\n * @beta PMI Annotation operations are being actively developed. These APIs\n * should be considered unstable, and will potentially change with following\n * releases.\n *\n * A class that is responsible for building operations on pmi annotations for a specific scene.\n * This executor requires a query, and expects `execute()` to be invoked in\n * order for the changes to take effect.\n */\nexport class PmiAnnotationOperationsBuilder\n implements\n PmiAnnotationOperations<PmiAnnotationOperationsBuilder>,\n SceneElementOperationsBuilder\n{\n private builder: PmiAnnotationOperationBuilder;\n\n public constructor(\n private query: QueryExpression,\n givenBuilder?: PmiAnnotationOperationBuilder\n ) {\n this.builder = givenBuilder ?? new PmiAnnotationOperationBuilder();\n }\n\n public isItemBuilder(): this is SceneItemOperationsBuilder {\n return false;\n }\n\n public isAnnotationBuilder(): this is PmiAnnotationOperationsBuilder {\n return true;\n }\n\n /**\n * @ignore\n * @beta PMI Annotation operations are being actively developed. These APIs\n * should be considered unstable, and will potentially change with following\n * releases.\n *\n * Specifies that the PMI annotations matching the query should be hidden.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Hide the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).hide(),\n * ]).execute();\n * ```\n */\n public hide(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(this.query, this.builder.hide());\n }\n\n /**\n * @ignore\n * @beta PMI Annotation operations are being actively developed. These APIs\n * should be considered unstable, and will potentially change with following\n * releases.\n *\n * Specifies that the PMI annotations matching the query should be shown.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Show the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).show(),\n * ]).execute();\n * ```\n */\n public show(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(this.query, this.builder.show());\n }\n\n /**\n * @ignore\n * @beta PMI Annotation operations are being actively developed. These APIs\n * should be considered unstable, and will potentially change with following\n * releases.\n *\n * Specifies that the PMI annotations matching the query should be selected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Select the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).select(),\n * ]).execute();\n * ```\n */\n public select(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(\n this.query,\n this.builder.select()\n );\n }\n\n /**\n * @ignore\n * @beta PMI Annotation operations are being actively developed. These APIs\n * should be considered unstable, and will potentially change with following\n * releases.\n *\n * Specifies that the PMI annotations matching the query should be deselected.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect the annotation with the `annotation-uuid` ID\n * await scene.elements((op) => [\n * op.annotations.where((q) => q.withAnnotationId('annotation-uuid')).deselect(),\n * ]).execute();\n * ```\n */\n public deselect(): PmiAnnotationOperationsBuilder {\n return new PmiAnnotationOperationsBuilder(\n this.query,\n this.builder.deselect()\n );\n }\n\n /**\n * @internal\n */\n public build(): QueryAnnotationOperation {\n return {\n query: this.query,\n operations: this.builder.build(),\n };\n }\n}\n\nexport interface QueryOperation {\n query: QueryExpression;\n operations: ItemOperation[];\n}\n\nexport interface QueryAnnotationOperation {\n query: QueryExpression;\n operations: PmiAnnotationOperation[];\n}\n\nexport class OperationExecutor<T extends SceneExecutionOptions> {\n public constructor(\n protected sceneViewId: UUID.UUID,\n protected stream: StreamApi,\n protected decodeFrame: FrameDecoder,\n protected dimensions: Dimensions.Dimensions,\n protected sceneItemQueryOperations: QueryOperation[],\n protected pmiAnnotationQueryOperations: QueryAnnotationOperation[]\n ) {}\n\n public async execute(executionOptions?: T): Promise<void> {\n const pbItemOperations = this.sceneItemQueryOperations.map((op) =>\n buildSceneElementOperationOnItem(op.query, op.operations, {\n dimensions: this.dimensions,\n })\n );\n const pbPmiAnnotationOperations = this.pmiAnnotationQueryOperations.map(\n (op) =>\n buildSceneElementOperationOnAnnotation(op.query, op.operations, {\n dimensions: this.dimensions,\n })\n );\n\n const requestCorrelationId =\n executionOptions?.suppliedCorrelationId ?? UUID.create();\n\n const request = {\n sceneViewId: {\n hex: this.sceneViewId,\n },\n elementOperations: [...pbItemOperations, ...pbPmiAnnotationOperations],\n suppliedCorrelationId: {\n value: requestCorrelationId,\n },\n };\n\n await this.stream.createSceneAlteration(request);\n }\n}\n\nexport class SceneItemsOperationExecutor extends OperationExecutor<SceneItemsExecutionOptions> {\n public async execute(\n executionOptions?: SceneItemsExecutionOptions\n ): Promise<void> {\n if (executionOptions?.awaitCorrelatedFrame) {\n const correlationId =\n executionOptions.suppliedCorrelationId ?? UUID.create();\n const executeResult = new SceneOperationExecuteResult(\n this.stream,\n this.decodeFrame,\n correlationId\n );\n\n await super.execute({\n ...executionOptions,\n suppliedCorrelationId: correlationId,\n });\n await executeResult.onFrameDrawn.once();\n } else {\n await super.execute(executionOptions);\n }\n }\n}\n\nexport class SceneElementsOperationExecutor extends OperationExecutor<SceneElementsExecutionOptions> {\n public async execute(\n executionOptions?: SceneElementsExecutionOptions\n ): Promise<void> {\n if (executionOptions?.skipAwaitCorrelatedFrame) {\n await super.execute(executionOptions);\n } else {\n const correlationId =\n executionOptions?.suppliedCorrelationId ?? UUID.create();\n const executeResult = new SceneOperationExecuteResult(\n this.stream,\n this.decodeFrame,\n correlationId\n );\n\n await super.execute({\n ...executionOptions,\n suppliedCorrelationId: correlationId,\n });\n await executeResult.onFrameDrawn.once();\n }\n }\n}\n\nexport type TerminalItemOperationBuilder =\n | PmiAnnotationOperationsBuilder\n | SceneItemOperationsBuilder\n | Array<SceneItemOperationsBuilder | PmiAnnotationOperationsBuilder>;\n\nexport type ImageScaleProvider = () => Point.Point | undefined;\n\n/**\n * The features of a scene view state that can be applied to the current scene\n */\nexport type SceneViewStateFeature =\n | 'camera'\n | 'cross_section'\n | 'material_overrides'\n | 'selection'\n | 'transforms'\n | 'visibility'\n | 'phantom'\n | 'shading';\n\n/**\n * A class that represents the `Scene` that has been loaded into the viewer. On\n * it, you can retrieve attributes of the scene, such as the camera. It also\n * contains methods for updating the scene and performing requests to rerender\n * the scene.\n */\nexport class Scene {\n private sceneViewStateLoader: SceneViewStateLoader;\n\n public constructor(\n private stream: StreamApi,\n private frame: Frame,\n private decodeFrame: FrameDecoder,\n private imageScaleProvider: ImageScaleProvider,\n private dimensions: Dimensions.Dimensions,\n public readonly sceneId: UUID.UUID,\n public readonly sceneViewId: UUID.UUID\n ) {\n this.sceneViewStateLoader = new SceneViewStateLoader(\n stream,\n decodeFrame,\n sceneId,\n sceneViewId\n );\n }\n\n /**\n * Applies the provided scene view state to the scene.\n */\n public async applySceneViewState(\n sceneViewStateId:\n | UUID.UUID\n | SceneViewStateIdentifier.SceneViewStateIdentifier,\n opts: ApplySceneViewStateOptions = {}\n ): Promise<vertexvis.protobuf.stream.ILoadSceneViewStateResult | undefined> {\n return await this.sceneViewStateLoader.applySceneViewState(\n sceneViewStateId,\n opts\n );\n }\n\n /**\n * Applies the specified features of the provided scene view state to the scene.\n */\n public async applyPartialSceneViewState(\n sceneViewStateId:\n | UUID.UUID\n | SceneViewStateIdentifier.SceneViewStateIdentifier,\n featuresToApply: SceneViewStateFeature[],\n opts: ApplySceneViewStateOptions = {}\n ): Promise<vertexvis.protobuf.stream.ILoadSceneViewStateResult | undefined> {\n return await this.sceneViewStateLoader.applyPartialSceneViewState(\n sceneViewStateId,\n featuresToApply,\n opts\n );\n }\n\n /**\n * Resets the view to its default state, with the ability to reset the camera to that of the base scene.\n */\n public async reset(\n opts: ResetViewOptions = {}\n ): Promise<vertexvis.protobuf.stream.IResetViewResult | undefined> {\n return await this.stream.resetSceneView(\n {\n includeCamera: opts.includeCamera,\n frameCorrelationId: opts.suppliedCorrelationId\n ? { value: opts.suppliedCorrelationId }\n : undefined,\n },\n true\n );\n }\n\n /**\n * Returns an executor that accepts a function as a parameter that contains one or more operations to apply\n * to the scene view. The operations will be applied transactionally.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect everything, then select a specific item by ID\n * await scene.items(op => [\n * op.items.where(q => q.all()).deselect(),\n * op.items.where(q => q.withItemId('item-id')).select(),\n * ]).execute();\n * ```\n *\n * @see {@link RootQuery} for more information on available queries.\n *\n * @see {@link SceneItemOperationsBuilder} for more information on available operations.\n *\n * @param operations\n */\n public items(\n operations: (q: SceneItemQueryExecutor) => TerminalItemOperationBuilder\n ): SceneItemsOperationExecutor {\n const sceneOperations = operations(new SceneItemQueryExecutor());\n\n const ops: Array<\n SceneItemOperationsBuilder | PmiAnnotationOperationsBuilder\n > = Array.isArray(sceneOperations) ? sceneOperations : [sceneOperations];\n const itemOps = ops.filter((op) =>\n op.isItemBuilder()\n ) as Array<SceneItemOperationsBuilder>;\n\n const operationList = itemOps.reduce(\n (acc, builder: SceneItemOperationsBuilder) => acc.concat(builder.build()),\n [] as QueryOperation[]\n );\n\n return new SceneItemsOperationExecutor(\n this.sceneViewId,\n this.stream,\n this.decodeFrame,\n this.dimensions,\n operationList,\n []\n );\n }\n\n /**\n * Returns an executor that accepts a function as a parameter that contains one or more operations to apply\n * to items or annotations in the scene view. The operations will be applied transactionally.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n *\n * // Deselect everything, then select a specific scene item by ID\n * await scene.elements(op => [\n * op.items.where(q => q.all()).deselect(),\n * op.annotations.where(q => q.all()).deselect(),\n * op.items.where(q => q.withItemId('item-id')).select(),\n * ]).execute();\n * ```\n *\n * @see {@link RootQuery} for more information on available queries on scene items.\n *\n * @see {@link SceneItemOperationsBuilder} for more information on available operations to the scene items.\n *\n * @see {@link PmiAnnotationRootQuery} for more information on available queries on PMI annotations.\n *\n * @see {@link PmiAnnotationOperationsBuilder} for more information on available operations to the PMI annotations.\n *\n * @param operations\n */\n public elements(\n operations: (q: SceneElementQueryExecutor) => TerminalItemOperationBuilder\n ): SceneElementsOperationExecutor {\n const ops = operations(new SceneElementQueryExecutor());\n const opsAsArray = Array.isArray(ops) ? ops : [ops];\n\n // Operations on scene items\n const sceneItemOps = opsAsArray.filter((op) =>\n op.isItemBuilder()\n ) as Array<SceneItemOperationsBuilder>;\n const sceneItemsOperationList = sceneItemOps.reduce(\n (acc, builder: SceneItemOperationsBuilder) => acc.concat(builder.build()),\n [] as QueryOperation[]\n );\n\n // Operations on PMI annotations\n const pmiAnnotationOps = opsAsArray.filter((op) =>\n op.isAnnotationBuilder()\n ) as Array<PmiAnnotationOperationsBuilder>;\n const pmiAnnotationOperationList = pmiAnnotationOps.reduce(\n (acc, builder: PmiAnnotationOperationsBuilder) =>\n acc.concat(builder.build()),\n [] as QueryAnnotationOperation[]\n );\n\n return new SceneElementsOperationExecutor(\n this.sceneViewId,\n this.stream,\n this.decodeFrame,\n this.dimensions,\n sceneItemsOperationList,\n pmiAnnotationOperationList\n );\n }\n\n /**\n * An instance of the current camera of the scene. The camera provides a number of\n * methods that can be used in combination with the `render` method to make programmatic\n * updates to the scene's camera.\n *\n * @example\n * ```typescript\n * const viewer = document.querySelector('vertex-viewer');\n * const scene = await viewer.scene();\n * const camera = scene.camera();\n *\n * // Fit the camera to the visible bounding box of the scene with a 1 second animation\n * await camera.viewAll().render({ animation: { milliseconds: 1000 } });\n * ```\n *\n * @see {@link Camera} for more information on available camera operations.\n */\n public camera(): Camera {\n const { scene } = this.frame;\n\n if (scene.camera.isOrthographic()) {\n return new OrthographicCamera(\n this.stream,\n Dimensions.aspectRatio(this.viewport()),\n {\n viewVector: scene.camera.viewVector,\n lookAt: scene.camera.lookAt,\n up: scene.camera.up,\n fovHeight: scene.camera.fovHeight,\n rotationPoint: scene.camera.lookAt,\n },\n this.frame.scene.boundingBox,\n this.decodeFrame\n );\n } else if (scene.camera.isPerspective()) {\n return new PerspectiveCamera(\n this.stream,\n Dimensions.aspectRatio(this.viewport()),\n {\n position: scene.camera.position,\n lookAt: scene.camera.lookAt,\n up: scene.camera.up,\n fovY: scene.camera.fovY,\n },\n this.frame.scene.boundingBox,\n this.decodeFrame\n );\n } else {\n throw new InvalidCameraError(\n 'Cannot retrieve camera. Scene has an unknown or invalid camera type.'\n );\n }\n }\n\n public isOrthographic(): boolean {\n const { scene } = this.frame;\n\n return scene.camera.isOrthographic();\n }\n\n /**\n * Returns the current visible BoundingBox for the scene.\n */\n public boundingBox(): BoundingBox.BoundingBox {\n return this.frame.scene.boundingBox;\n }\n\n /**\n * CrossSectioner to update cross sectioning planes and get current configuration.\n */\n public crossSectioning(): CrossSectioner {\n return new CrossSectioner(this.stream, this.frame.scene.crossSection);\n }\n\n /**\n * Raycaster to request items that intersect a point.\n */\n public raycaster(): Raycaster {\n return new Raycaster(this.stream, this.imageScaleProvider);\n }\n\n /**\n * The current viewport of the scene, in pixels.\n */\n public viewport(): Dimensions.Dimensions {\n return this.frame.dimensions;\n }\n\n /**\n * The current x and y scale of the rendered image.\n */\n public scale(): Point.Point {\n return this.imageScaleProvider() || Point.create(1, 1);\n }\n}\n"]}
@@ -2007,6 +2007,11 @@ class SceneItemOperationsBuilder {
2007
2007
  }
2008
2008
  }
2009
2009
  /**
2010
+ * @ignore
2011
+ * @beta PMI Annotation operations are being actively developed. These APIs
2012
+ * should be considered unstable, and will potentially change with following
2013
+ * releases.
2014
+ *
2010
2015
  * A class that is responsible for building operations on pmi annotations for a specific scene.
2011
2016
  * This executor requires a query, and expects `execute()` to be invoked in
2012
2017
  * order for the changes to take effect.
@@ -2023,6 +2028,11 @@ class PmiAnnotationOperationsBuilder {
2023
2028
  return true;
2024
2029
  }
2025
2030
  /**
2031
+ * @ignore
2032
+ * @beta PMI Annotation operations are being actively developed. These APIs
2033
+ * should be considered unstable, and will potentially change with following
2034
+ * releases.
2035
+ *
2026
2036
  * Specifies that the PMI annotations matching the query should be hidden.
2027
2037
  *
2028
2038
  * @example
@@ -2040,6 +2050,11 @@ class PmiAnnotationOperationsBuilder {
2040
2050
  return new PmiAnnotationOperationsBuilder(this.query, this.builder.hide());
2041
2051
  }
2042
2052
  /**
2053
+ * @ignore
2054
+ * @beta PMI Annotation operations are being actively developed. These APIs
2055
+ * should be considered unstable, and will potentially change with following
2056
+ * releases.
2057
+ *
2043
2058
  * Specifies that the PMI annotations matching the query should be shown.
2044
2059
  *
2045
2060
  * @example
@@ -2057,6 +2072,11 @@ class PmiAnnotationOperationsBuilder {
2057
2072
  return new PmiAnnotationOperationsBuilder(this.query, this.builder.show());
2058
2073
  }
2059
2074
  /**
2075
+ * @ignore
2076
+ * @beta PMI Annotation operations are being actively developed. These APIs
2077
+ * should be considered unstable, and will potentially change with following
2078
+ * releases.
2079
+ *
2060
2080
  * Specifies that the PMI annotations matching the query should be selected.
2061
2081
  *
2062
2082
  * @example
@@ -2074,6 +2094,11 @@ class PmiAnnotationOperationsBuilder {
2074
2094
  return new PmiAnnotationOperationsBuilder(this.query, this.builder.select());
2075
2095
  }
2076
2096
  /**
2097
+ * @ignore
2098
+ * @beta PMI Annotation operations are being actively developed. These APIs
2099
+ * should be considered unstable, and will potentially change with following
2100
+ * releases.
2101
+ *
2077
2102
  * Specifies that the PMI annotations matching the query should be deselected.
2078
2103
  *
2079
2104
  * @example