@vertexvis/viewer 0.18.1 → 0.18.2-testing.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/_commonjsHelpers.js +41 -0
- package/dist/components/_commonjsHelpers.js.map +1 -0
- package/dist/components/browser.esm.js +3173 -0
- package/dist/components/browser.esm.js.map +1 -0
- package/dist/components/bundle.esm.js +2250 -0
- package/dist/components/bundle.esm.js.map +1 -0
- package/dist/components/bundle.esm2.js +39740 -0
- package/dist/components/bundle.esm2.js.map +1 -0
- package/dist/components/config.js +81 -0
- package/dist/components/config.js.map +1 -0
- package/dist/components/controller.js +7627 -0
- package/dist/components/controller.js.map +1 -0
- package/dist/components/controller2.js +124 -0
- package/dist/components/controller2.js.map +1 -0
- package/dist/components/controller3.js +111 -0
- package/dist/components/controller3.js.map +1 -0
- package/dist/components/cursors.js +110 -0
- package/dist/components/cursors.js.map +1 -0
- package/dist/components/dom.js +43 -0
- package/dist/components/dom.js.map +1 -0
- package/dist/components/dom2.js +10 -0
- package/dist/components/dom2.js.map +1 -0
- package/dist/components/elementRectObserver.js +25 -0
- package/dist/components/elementRectObserver.js.map +1 -0
- package/dist/components/entities.js +179 -0
- package/dist/components/entities.js.map +1 -0
- package/dist/components/errors.js +80 -0
- package/dist/components/errors.js.map +1 -0
- package/dist/components/events.js +11 -0
- package/dist/components/events.js.map +1 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +365 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +63 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/interactions.js +236 -0
- package/dist/components/interactions.js.map +1 -0
- package/dist/components/mapper.js +9811 -0
- package/dist/components/mapper.js.map +1 -0
- package/dist/components/markup.js +33 -0
- package/dist/components/markup.js.map +1 -0
- package/dist/components/model.js +134 -0
- package/dist/components/model.js.map +1 -0
- package/dist/components/model2.js +157 -0
- package/dist/components/model2.js.map +1 -0
- package/dist/components/overlays.js +76 -0
- package/dist/components/overlays.js.map +1 -0
- package/dist/components/png-decoder.js +2405 -0
- package/dist/components/png-decoder.js.map +1 -0
- package/dist/components/regl-component.js +12582 -0
- package/dist/components/regl-component.js.map +1 -0
- package/dist/components/results.js +24 -0
- package/dist/components/results.js.map +1 -0
- package/dist/components/row.js +32 -0
- package/dist/components/row.js.map +1 -0
- package/dist/components/scene-tree-search.js +146 -0
- package/dist/components/scene-tree-search.js.map +1 -0
- package/dist/components/scene-tree-table-layout.js +928 -0
- package/dist/components/scene-tree-table-layout.js.map +1 -0
- package/dist/components/scene-tree-toolbar.js +35 -0
- package/dist/components/scene-tree-toolbar.js.map +1 -0
- package/dist/components/scene.js +1508 -0
- package/dist/components/scene.js.map +1 -0
- package/dist/components/stencil.js +25 -0
- package/dist/components/stencil.js.map +1 -0
- package/dist/components/streamAttributes.js +40833 -0
- package/dist/components/streamAttributes.js.map +1 -0
- package/dist/components/templates.js +36 -0
- package/dist/components/templates.js.map +1 -0
- package/dist/components/tslib.es6.js +125 -0
- package/dist/components/tslib.es6.js.map +1 -0
- package/dist/components/vertex-scene-tree-search.d.ts +11 -0
- package/dist/components/vertex-scene-tree-search.js +11 -0
- package/dist/components/vertex-scene-tree-search.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-cell.d.ts +11 -0
- package/dist/components/vertex-scene-tree-table-cell.js +209 -0
- package/dist/components/vertex-scene-tree-table-cell.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-column.d.ts +11 -0
- package/dist/components/vertex-scene-tree-table-column.js +42 -0
- package/dist/components/vertex-scene-tree-table-column.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-header.d.ts +11 -0
- package/dist/components/vertex-scene-tree-table-header.js +38 -0
- package/dist/components/vertex-scene-tree-table-header.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-layout.d.ts +11 -0
- package/dist/components/vertex-scene-tree-table-layout.js +11 -0
- package/dist/components/vertex-scene-tree-table-layout.js.map +1 -0
- package/dist/components/vertex-scene-tree-table-resize-divider.d.ts +11 -0
- package/dist/components/vertex-scene-tree-table-resize-divider.js +57 -0
- package/dist/components/vertex-scene-tree-table-resize-divider.js.map +1 -0
- package/dist/components/vertex-scene-tree-toolbar-group.d.ts +11 -0
- package/dist/components/vertex-scene-tree-toolbar-group.js +38 -0
- package/dist/components/vertex-scene-tree-toolbar-group.js.map +1 -0
- package/dist/components/vertex-scene-tree-toolbar.d.ts +11 -0
- package/dist/components/vertex-scene-tree-toolbar.js +11 -0
- package/dist/components/vertex-scene-tree-toolbar.js.map +1 -0
- package/dist/components/vertex-scene-tree.d.ts +11 -0
- package/dist/components/vertex-scene-tree.js +803 -0
- package/dist/components/vertex-scene-tree.js.map +1 -0
- package/dist/components/vertex-viewer-box-query-tool.d.ts +11 -0
- package/dist/components/vertex-viewer-box-query-tool.js +352 -0
- package/dist/components/vertex-viewer-box-query-tool.js.map +1 -0
- package/dist/components/vertex-viewer-button.d.ts +11 -0
- package/dist/components/vertex-viewer-button.js +11 -0
- package/dist/components/vertex-viewer-button.js.map +1 -0
- package/dist/components/vertex-viewer-default-toolbar.d.ts +11 -0
- package/dist/components/vertex-viewer-default-toolbar.js +99 -0
- package/dist/components/vertex-viewer-default-toolbar.js.map +1 -0
- package/dist/components/vertex-viewer-dom-element.d.ts +11 -0
- package/dist/components/vertex-viewer-dom-element.js +11 -0
- package/dist/components/vertex-viewer-dom-element.js.map +1 -0
- package/dist/components/vertex-viewer-dom-group.d.ts +11 -0
- package/dist/components/vertex-viewer-dom-group.js +11 -0
- package/dist/components/vertex-viewer-dom-group.js.map +1 -0
- package/dist/components/vertex-viewer-dom-renderer.d.ts +11 -0
- package/dist/components/vertex-viewer-dom-renderer.js +11 -0
- package/dist/components/vertex-viewer-dom-renderer.js.map +1 -0
- package/dist/components/vertex-viewer-hit-result-indicator.d.ts +11 -0
- package/dist/components/vertex-viewer-hit-result-indicator.js +335 -0
- package/dist/components/vertex-viewer-hit-result-indicator.js.map +1 -0
- package/dist/components/vertex-viewer-icon.d.ts +11 -0
- package/dist/components/vertex-viewer-icon.js +11 -0
- package/dist/components/vertex-viewer-icon.js.map +1 -0
- package/dist/components/vertex-viewer-layer.d.ts +11 -0
- package/dist/components/vertex-viewer-layer.js +11 -0
- package/dist/components/vertex-viewer-layer.js.map +1 -0
- package/dist/components/vertex-viewer-markup-arrow.d.ts +11 -0
- package/dist/components/vertex-viewer-markup-arrow.js +11 -0
- package/dist/components/vertex-viewer-markup-arrow.js.map +1 -0
- package/dist/components/vertex-viewer-markup-circle.d.ts +11 -0
- package/dist/components/vertex-viewer-markup-circle.js +11 -0
- package/dist/components/vertex-viewer-markup-circle.js.map +1 -0
- package/dist/components/vertex-viewer-markup-freeform.d.ts +11 -0
- package/dist/components/vertex-viewer-markup-freeform.js +11 -0
- package/dist/components/vertex-viewer-markup-freeform.js.map +1 -0
- package/dist/components/vertex-viewer-markup-tool.d.ts +11 -0
- package/dist/components/vertex-viewer-markup-tool.js +257 -0
- package/dist/components/vertex-viewer-markup-tool.js.map +1 -0
- package/dist/components/vertex-viewer-markup.d.ts +11 -0
- package/dist/components/vertex-viewer-markup.js +362 -0
- package/dist/components/vertex-viewer-markup.js.map +1 -0
- package/dist/components/vertex-viewer-measurement-details.d.ts +11 -0
- package/dist/components/vertex-viewer-measurement-details.js +307 -0
- package/dist/components/vertex-viewer-measurement-details.js.map +1 -0
- package/dist/components/vertex-viewer-measurement-distance.d.ts +11 -0
- package/dist/components/vertex-viewer-measurement-distance.js +1067 -0
- package/dist/components/vertex-viewer-measurement-distance.js.map +1 -0
- package/dist/components/vertex-viewer-measurement-line.d.ts +11 -0
- package/dist/components/vertex-viewer-measurement-line.js +11 -0
- package/dist/components/vertex-viewer-measurement-line.js.map +1 -0
- package/dist/components/vertex-viewer-measurement-overlays.d.ts +11 -0
- package/dist/components/vertex-viewer-measurement-overlays.js +11 -0
- package/dist/components/vertex-viewer-measurement-overlays.js.map +1 -0
- package/dist/components/vertex-viewer-measurement-precise.d.ts +11 -0
- package/dist/components/vertex-viewer-measurement-precise.js +362 -0
- package/dist/components/vertex-viewer-measurement-precise.js.map +1 -0
- package/dist/components/vertex-viewer-pin-group.d.ts +11 -0
- package/dist/components/vertex-viewer-pin-group.js +11 -0
- package/dist/components/vertex-viewer-pin-group.js.map +1 -0
- package/dist/components/vertex-viewer-pin-label-line.d.ts +11 -0
- package/dist/components/vertex-viewer-pin-label-line.js +11 -0
- package/dist/components/vertex-viewer-pin-label-line.js.map +1 -0
- package/dist/components/vertex-viewer-pin-label.d.ts +11 -0
- package/dist/components/vertex-viewer-pin-label.js +11 -0
- package/dist/components/vertex-viewer-pin-label.js.map +1 -0
- package/dist/components/vertex-viewer-pin-tool.d.ts +11 -0
- package/dist/components/vertex-viewer-pin-tool.js +430 -0
- package/dist/components/vertex-viewer-pin-tool.js.map +1 -0
- package/dist/components/vertex-viewer-spinner.d.ts +11 -0
- package/dist/components/vertex-viewer-spinner.js +11 -0
- package/dist/components/vertex-viewer-spinner.js.map +1 -0
- package/dist/components/vertex-viewer-toolbar-group.d.ts +11 -0
- package/dist/components/vertex-viewer-toolbar-group.js +11 -0
- package/dist/components/vertex-viewer-toolbar-group.js.map +1 -0
- package/dist/components/vertex-viewer-toolbar.d.ts +11 -0
- package/dist/components/vertex-viewer-toolbar.js +11 -0
- package/dist/components/vertex-viewer-toolbar.js.map +1 -0
- package/dist/components/vertex-viewer-transform-widget.d.ts +11 -0
- package/dist/components/vertex-viewer-transform-widget.js +838 -0
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -0
- package/dist/components/vertex-viewer-view-cube.d.ts +11 -0
- package/dist/components/vertex-viewer-view-cube.js +270 -0
- package/dist/components/vertex-viewer-view-cube.js.map +1 -0
- package/dist/components/vertex-viewer.d.ts +11 -0
- package/dist/components/vertex-viewer.js +3543 -0
- package/dist/components/vertex-viewer.js.map +1 -0
- package/dist/components/viewer-button.js +35 -0
- package/dist/components/viewer-button.js.map +1 -0
- package/dist/components/viewer-dom-element.js +250 -0
- package/dist/components/viewer-dom-element.js.map +1 -0
- package/dist/components/viewer-dom-group.js +214 -0
- package/dist/components/viewer-dom-group.js.map +1 -0
- package/dist/components/viewer-dom-renderer.js +295 -0
- package/dist/components/viewer-dom-renderer.js.map +1 -0
- package/dist/components/viewer-icon.js +87 -0
- package/dist/components/viewer-icon.js.map +1 -0
- package/dist/components/viewer-layer.js +46 -0
- package/dist/components/viewer-layer.js.map +1 -0
- package/dist/components/viewer-markup-arrow.js +235 -0
- package/dist/components/viewer-markup-arrow.js.map +1 -0
- package/dist/components/viewer-markup-circle-components.js +42 -0
- package/dist/components/viewer-markup-circle-components.js.map +1 -0
- package/dist/components/viewer-markup-circle.js +201 -0
- package/dist/components/viewer-markup-circle.js.map +1 -0
- package/dist/components/viewer-markup-freeform.js +251 -0
- package/dist/components/viewer-markup-freeform.js.map +1 -0
- package/dist/components/viewer-measurement-line.js +77 -0
- package/dist/components/viewer-measurement-line.js.map +1 -0
- package/dist/components/viewer-measurement-overlays.js +184 -0
- package/dist/components/viewer-measurement-overlays.js.map +1 -0
- package/dist/components/viewer-pin-group.js +207 -0
- package/dist/components/viewer-pin-group.js.map +1 -0
- package/dist/components/viewer-pin-label-line.js +43 -0
- package/dist/components/viewer-pin-label-line.js.map +1 -0
- package/dist/components/viewer-pin-label.js +427 -0
- package/dist/components/viewer-pin-label.js.map +1 -0
- package/dist/components/viewer-spinner.js +53 -0
- package/dist/components/viewer-spinner.js.map +1 -0
- package/dist/components/viewer-toolbar-group.js +42 -0
- package/dist/components/viewer-toolbar-group.js.map +1 -0
- package/dist/components/viewer-toolbar.js +61 -0
- package/dist/components/viewer-toolbar.js.map +1 -0
- package/dist/components/viewport.js +188 -0
- package/dist/components/viewport.js.map +1 -0
- package/dist/components/wrappers_pb.js +1926 -0
- package/dist/components/wrappers_pb.js.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"vertex-viewer-transform-widget.js","mappings":";;;;;;;;;;;SAWgB,oBAA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,CAAC,UAAU,CACzB,CAAC;MAEF,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;MACjE,MAAA,IAAI,CAAC,UAAU,0CAAE,eAAe,CAC9BN,OAAO,CAAC,QAAQ,CACd,IAAI,CAAC,gBAAgB,EACrBA,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CACvC,CACF,CAAC;KACH;GACF;EAEO,yBAAyB;IAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;MACf,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QAC7B,SAAS,EAAE,IAAI,CAAC,iBAAiB;QACjC,SAAS,EAAE,IAAI,CAAC,iBAAiB;QACjC,SAAS,EAAE,IAAI,CAAC,iBAAiB;QACjC,YAAY,EAAE,IAAI,CAAC,oBAAoB;QACvC,YAAY,EAAE,IAAI,CAAC,oBAAoB;QACvC,YAAY,EAAE,IAAI,CAAC,oBAAoB;OACxC,CAAC,CAAC;KACJ;SAAM;MACL,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;KAChE;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["point","Point","Vector3","ray","Ray","Plane","Matrix4","Quaternion","Angle","BoundingBox","Rectangle","angle","classNames"],"sources":["./src/components/viewer-transform-widget/util.ts","./src/lib/transforms/axis-rotation.ts","./src/lib/transforms/hits.ts","./src/components/viewer-transform-widget/widget.ts","./src/components/viewer-transform-widget/viewer-transform-widget.css?tag=vertex-viewer-transform-widget&encapsulation=shadow","./src/components/viewer-transform-widget/viewer-transform-widget.tsx"],"sourcesContent":["import {\n Matrix4,\n Plane,\n Point,\n Quaternion,\n Ray,\n Vector3,\n} from '@vertexvis/geometry';\n\nimport { Frame, Viewport } from '../../lib/types';\n\nexport function convertPointToCanvas(\n point: Point.Point,\n bounds?: DOMRect\n): Point.Point | undefined {\n return bounds != null\n ? Point.create(point.x - bounds.left, point.y - bounds.top)\n : undefined;\n}\n\nexport function convertCanvasPointToWorld(\n point?: Point.Point,\n frame?: Frame,\n viewport?: Viewport,\n transform?: Matrix4.Matrix4\n): Vector3.Vector3 | undefined {\n const position =\n transform != null ? Vector3.fromMatrixPosition(transform) : undefined;\n\n if (point != null && frame != null && viewport != null && position != null) {\n if (frame.scene.camera.isOrthographic()) {\n const ray = viewport.transformPointToOrthographicRay(\n point,\n frame.image,\n frame.scene.camera\n );\n // Offset the point to past the bounding sphere of the model to\n // adjust the position plane location.\n const offsetPoint = Ray.at(\n Ray.create({\n origin: position,\n direction: frame.scene.camera.direction,\n }),\n Vector3.magnitude(frame.scene.camera.viewVector) * 2\n );\n\n return Ray.intersectPlane(\n ray,\n Plane.fromNormalAndCoplanarPoint(\n frame.scene.camera.direction,\n offsetPoint\n )\n );\n } else {\n const ray = viewport.transformPointToRay(\n point,\n frame.image,\n frame.scene.camera\n );\n\n return Ray.intersectPlane(\n ray,\n Plane.fromNormalAndCoplanarPoint(frame.scene.camera.direction, position)\n );\n }\n }\n return undefined;\n}\n\nexport function computeUpdatedTransform(\n current: Matrix4.Matrix4,\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n viewVector: Vector3.Vector3,\n angle: number,\n identifier: string\n): Matrix4.Matrix4 {\n switch (identifier) {\n case 'x-translate': {\n return Matrix4.multiply(\n current,\n Matrix4.makeTranslation(\n Vector3.create(\n computeTranslation(current, previous, next, Vector3.right()),\n 0,\n 0\n )\n )\n );\n }\n case 'y-translate':\n return Matrix4.multiply(\n current,\n Matrix4.makeTranslation(\n Vector3.create(\n 0,\n computeTranslation(current, previous, next, Vector3.up()),\n 0\n )\n )\n );\n case 'z-translate':\n return Matrix4.multiply(\n current,\n Matrix4.makeTranslation(\n Vector3.create(\n 0,\n 0,\n computeTranslation(current, previous, next, Vector3.back())\n )\n )\n );\n case 'x-rotate': {\n const rotation = Quaternion.fromMatrixRotation(current);\n const rotatedRight = Vector3.transformMatrix(\n Vector3.right(),\n Matrix4.makeRotation(rotation)\n );\n const rotatedLeft = Vector3.transformMatrix(\n Vector3.left(),\n Matrix4.makeRotation(rotation)\n );\n\n const rotationAxis =\n Vector3.dot(viewVector, rotatedRight) >\n Vector3.dot(viewVector, rotatedLeft)\n ? rotatedRight\n : rotatedLeft;\n\n return computeRotation(\n Quaternion.fromAxisAngle(rotationAxis, angle),\n current\n );\n }\n case 'y-rotate': {\n const rotation = Quaternion.fromMatrixRotation(current);\n const rotatedUp = Vector3.transformMatrix(\n Vector3.up(),\n Matrix4.makeRotation(rotation)\n );\n const rotatedDown = Vector3.transformMatrix(\n Vector3.down(),\n Matrix4.makeRotation(rotation)\n );\n\n const rotationAxis =\n Vector3.dot(viewVector, rotatedUp) >\n Vector3.dot(viewVector, rotatedDown)\n ? rotatedUp\n : rotatedDown;\n\n return computeRotation(\n Quaternion.fromAxisAngle(rotationAxis, angle),\n current\n );\n }\n case 'z-rotate': {\n const rotation = Quaternion.fromMatrixRotation(current);\n const rotatedForward = Vector3.transformMatrix(\n Vector3.forward(),\n Matrix4.makeRotation(rotation)\n );\n const rotatedBack = Vector3.transformMatrix(\n Vector3.back(),\n Matrix4.makeRotation(rotation)\n );\n\n const rotationAxis =\n Vector3.dot(viewVector, rotatedForward) >\n Vector3.dot(viewVector, rotatedBack)\n ? rotatedForward\n : rotatedBack;\n\n return computeRotation(\n Quaternion.fromAxisAngle(rotationAxis, angle),\n current\n );\n }\n default:\n return current;\n }\n}\n\nfunction computeTranslation(\n current: Matrix4.Matrix4,\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n direction: Vector3.Vector3\n): number {\n const rotatedTranslationAxis = Vector3.transformMatrix(\n direction,\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(current))\n );\n const rotatedDelta = Vector3.multiply(\n rotatedTranslationAxis,\n Vector3.subtract(next, previous)\n );\n\n return rotatedDelta.x + rotatedDelta.y + rotatedDelta.z;\n}\n\n/**\n * Computes a rotation Matrix4 by applying the rotation at the given position,\n * then translating it back to convert it to a world delta.\n * @param rotation\n * @param current\n * @returns\n */\nexport function computeRotation(\n rotation: Quaternion.Quaternion,\n current: Matrix4.Matrix4\n): Matrix4.Matrix4 {\n return Matrix4.multiply(\n Matrix4.multiply(\n Matrix4.multiply(\n Matrix4.makeTranslation(Vector3.fromMatrixPosition(current)),\n Matrix4.makeRotation(rotation)\n ),\n Matrix4.makeTranslation(\n Vector3.negate(Vector3.fromMatrixPosition(current))\n )\n ),\n current\n );\n}\n","import { Angle, Matrix4, Quaternion, Ray, Vector3 } from '@vertexvis/geometry';\n\nimport { FrameCameraBase } from '../types';\nimport { TriangleMeshPoints } from './mesh';\n\nexport function xAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.back(),\n Vector3.up(),\n triangleSize\n );\n}\n\nexport function yAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.right(),\n Vector3.back(),\n triangleSize\n );\n}\n\nexport function zAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.right(),\n Vector3.up(),\n triangleSize\n );\n}\n\nfunction computeRotationNdcValues(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n xDirection: Vector3.Vector3,\n yDirection: Vector3.Vector3,\n triangleSize: number\n): TriangleMeshPoints {\n const transformedDirection = Vector3.transformMatrix(\n Vector3.add(xDirection, yDirection),\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform))\n );\n const transformedX = Vector3.transformMatrix(\n xDirection,\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform))\n );\n const transformedY = Vector3.transformMatrix(\n yDirection,\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform))\n );\n const basePosition = Vector3.fromMatrixPosition(widgetTransform);\n const position = Vector3.add(\n basePosition,\n Vector3.scale(triangleSize * 10, transformedDirection)\n );\n\n const xRay = Ray.create({\n origin: position,\n direction: transformedX,\n });\n const yRay = Ray.create({\n origin: position,\n direction: transformedY,\n });\n const rotationAxis = Vector3.cross(transformedX, transformedY);\n\n const base = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(yRay, -triangleSize),\n rotationAxis,\n position\n );\n const right = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(xRay, triangleSize),\n rotationAxis,\n position\n );\n const up = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(yRay, triangleSize),\n rotationAxis,\n position\n );\n const left = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(xRay, -triangleSize),\n rotationAxis,\n position\n );\n\n return new TriangleMeshPoints(\n Vector3.dot(transformedX, camera.direction) !== -1 &&\n Vector3.dot(transformedY, camera.direction) !== -1,\n base,\n left,\n right,\n up,\n Vector3.transformMatrix(base, camera.projectionViewMatrix),\n Vector3.transformMatrix(left, camera.projectionViewMatrix),\n Vector3.transformMatrix(right, camera.projectionViewMatrix),\n Vector3.transformMatrix(up, camera.projectionViewMatrix)\n );\n}\n","import { BoundingBox, Point, Vector3 } from '@vertexvis/geometry';\n\nimport { Frame, Viewport } from '../../lib/types';\nimport { Drawable } from './drawable';\nimport { TriangleMesh } from './mesh';\n\nexport function testDrawable(\n drawable: Drawable,\n frame: Frame,\n viewport: Viewport,\n point: Point.Point\n): boolean {\n if (drawable instanceof TriangleMesh) {\n return testTriangleMesh(drawable, frame, viewport, point);\n }\n return false;\n}\n\nexport function testTriangleMesh(\n mesh: TriangleMesh,\n frame: Frame,\n viewport: Viewport,\n point: Point.Point\n): boolean {\n return (\n testTriangle(\n [mesh.points.worldLeft, mesh.points.worldRight, mesh.points.worldTip],\n frame,\n viewport,\n point\n ) ||\n testTriangle(\n [mesh.points.worldLeft, mesh.points.worldRight, mesh.points.worldBase],\n frame,\n viewport,\n point\n )\n );\n}\n\n/**\n * Adapted from https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm.\n */\nexport function testTriangle(\n points: Vector3.Vector3[],\n frame: Frame,\n viewport: Viewport,\n point: Point.Point\n): boolean {\n if (points.length === 3) {\n const ray = frame.scene.camera.isOrthographic()\n ? viewport.transformPointToOrthographicRay(\n point,\n frame.image,\n frame.scene.camera\n )\n : viewport.transformPointToRay(point, frame.image, frame.scene.camera);\n\n const edge1 = Vector3.subtract(points[1], points[0]);\n const edge2 = Vector3.subtract(points[2], points[0]);\n\n const epsilon = BoundingBox.epsilon(\n BoundingBox.fromVectors([ray.direction, ray.origin, edge1, edge2]) ??\n BoundingBox.create(edge1, edge2)\n );\n\n const p = Vector3.cross(ray.direction, edge2);\n const det = Vector3.dot(edge1, p);\n\n // This check causes a `det` of NaN or 0 to return false\n // without needing to perform the subsequent calculations.\n if (!(Math.abs(det) >= epsilon)) {\n return false;\n }\n\n const t = Vector3.subtract(ray.origin, points[0]);\n const u = Vector3.dot(t, p) / det;\n\n if (u < 0 || u > 1) {\n return false;\n }\n\n const q = Vector3.cross(t, edge1);\n const v = Vector3.dot(ray.direction, q) / det;\n\n if (v < 0 || u + v > 1) {\n return false;\n }\n\n const r = Vector3.dot(edge2, q) / det;\n\n // Ignore the case where the computed hit position is negative\n // if in orthographic to correctly return hit results when close\n // to the camera.\n // TODO: revisit with https://vertexvis.atlassian.net/browse/PLAT-1549\n return !isNaN(r) && (r > 0 || frame.scene.camera.isOrthographic());\n }\n return false;\n}\n","import { Matrix4 } from '@vertexvis/geometry';\nimport { Point, Rectangle, Vector3 } from '@vertexvis/geometry';\nimport { Color, Disposable, EventDispatcher, Listener } from '@vertexvis/utils';\nimport regl from 'regl';\nimport shapeBuilder from 'regl-shape';\n\nimport {\n axisPositions,\n rotationAxisPositions,\n} from '../../lib/transforms/axis-lines';\nimport {\n xAxisRotationPositions,\n yAxisRotationPositions,\n zAxisRotationPositions,\n} from '../../lib/transforms/axis-rotation';\nimport {\n xAxisArrowPositions,\n yAxisArrowPositions,\n zAxisArrowPositions,\n} from '../../lib/transforms/axis-translation';\nimport {\n computeDrawable2dBounds,\n Drawable,\n} from '../../lib/transforms/drawable';\nimport { testDrawable } from '../../lib/transforms/hits';\nimport { AxisLine, RotationLine } from '../../lib/transforms/line';\nimport { TriangleMesh } from '../../lib/transforms/mesh';\nimport { CreateShape } from '../../lib/transforms/shape';\nimport { Frame } from '../../lib/types';\nimport { ReglComponent } from '../../lib/webgl/regl-component';\n\nexport interface DrawableElementColors {\n xArrow?: Color.Color | string;\n yArrow?: Color.Color | string;\n zArrow?: Color.Color | string;\n hovered?: Color.Color | string;\n outline?: Color.Color | string;\n}\n\nexport interface DisabledAxis {\n xRotation: boolean;\n yRotation: boolean;\n zRotation: boolean;\n xTranslation: boolean;\n yTranslation: boolean;\n zTranslation: boolean;\n}\n\nexport class TransformWidget extends ReglComponent {\n private cursor?: Point.Point;\n\n private xAxis?: AxisLine;\n private yAxis?: AxisLine;\n private zAxis?: AxisLine;\n private xArrow?: TriangleMesh;\n private yArrow?: TriangleMesh;\n private zArrow?: TriangleMesh;\n private xRotation?: TriangleMesh;\n private xyRotationLine?: RotationLine;\n private xzRotationLine?: RotationLine;\n private yRotation?: TriangleMesh;\n private yxRotationLine?: RotationLine;\n private yzRotationLine?: RotationLine;\n private zRotation?: TriangleMesh;\n private zxRotationLine?: RotationLine;\n private zyRotationLine?: RotationLine;\n\n private disabledAxis: DisabledAxis = {\n xTranslation: false,\n yTranslation: false,\n zTranslation: false,\n xRotation: false,\n yRotation: false,\n zRotation: false,\n };\n\n private axisLines: AxisLine[] = [];\n private rotationLines: RotationLine[] = [];\n private translationMeshes: TriangleMesh[] = [];\n private rotationMeshes: TriangleMesh[] = [];\n private hoveredElement?: Drawable;\n\n private transform?: Matrix4.Matrix4;\n private bounds?: Rectangle.Rectangle;\n\n private hoveredChanged = new EventDispatcher<Drawable | undefined>();\n\n private xArrowFillColor?: Color.Color | string;\n private yArrowFillColor?: Color.Color | string;\n private zArrowFillColor?: Color.Color | string;\n\n private hoveredArrowFillColor?: Color.Color | string;\n private outlineColor?: Color.Color | string;\n\n public constructor(\n canvasElement: HTMLCanvasElement,\n colors: DrawableElementColors = {},\n initialDisabledAxes: Partial<DisabledAxis> = {}\n ) {\n super(canvasElement);\n\n this.xArrowFillColor = colors.xArrow;\n this.yArrowFillColor = colors.yArrow;\n this.zArrowFillColor = colors.zArrow;\n this.hoveredArrowFillColor = colors.hovered;\n this.outlineColor = colors.outline;\n\n this.disabledAxis.xTranslation = initialDisabledAxes.xTranslation ?? false;\n this.disabledAxis.yTranslation = initialDisabledAxes.yTranslation ?? false;\n this.disabledAxis.zTranslation = initialDisabledAxes.zTranslation ?? false;\n this.disabledAxis.xRotation = initialDisabledAxes.xRotation ?? false;\n this.disabledAxis.yRotation = initialDisabledAxes.yRotation ?? false;\n this.disabledAxis.zRotation = initialDisabledAxes.zRotation ?? false;\n }\n\n public dispose(): void {\n this.reglFrameDisposable?.cancel();\n }\n\n /**\n * @internal - visible for testing\n */\n public getDrawableElements(): Drawable[] {\n return this.drawableElements;\n }\n\n public boundsContainsPoint(point: Point.Point): boolean {\n return (\n this.bounds != null &&\n this.frame != null &&\n Rectangle.containsPoints(this.bounds, point)\n );\n }\n\n public updateDisabledAxis(axis: Partial<DisabledAxis>): void {\n this.disabledAxis = {\n ...this.disabledAxis,\n ...axis,\n };\n this.updateDisabledOnDrawables();\n }\n\n public updateCursor(cursor?: Point.Point): void {\n this.cursor = cursor;\n\n if (cursor != null && this.frame != null) {\n this.updateHovered();\n } else {\n this.clearHovered();\n }\n }\n\n public updateTransform(transform?: Matrix4.Matrix4): void {\n this.transform = transform;\n\n if (transform != null && this.frame != null) {\n this.updateAndDraw();\n } else {\n this.clear();\n this.reglFrameDisposable?.cancel();\n this.reglFrameDisposable = undefined;\n }\n }\n\n public updateColors(colors: DrawableElementColors = {}): void {\n this.xArrowFillColor = colors.xArrow ?? this.xArrowFillColor;\n this.yArrowFillColor = colors.yArrow ?? this.yArrowFillColor;\n this.zArrowFillColor = colors.zArrow ?? this.zArrowFillColor;\n this.hoveredArrowFillColor = colors.hovered ?? this.hoveredArrowFillColor;\n this.outlineColor = colors.outline ?? this.outlineColor;\n\n this.xArrow?.updateFillColor(this.getXTranslationColor());\n this.yArrow?.updateFillColor(this.getYTranslationColor());\n this.zArrow?.updateFillColor(this.getZTranslationColor());\n this.xRotation?.updateFillColor(this.getXRotationColor());\n this.yRotation?.updateFillColor(this.getYRotationColor());\n this.zRotation?.updateFillColor(this.getZRotationColor());\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n }\n\n public onHoveredChanged(\n listener: Listener<Drawable | undefined>\n ): Disposable {\n return this.hoveredChanged.on(listener);\n }\n\n private updateDisabledOnDrawables(): void {\n this.xRotation?.setDisabled(this.disabledAxis.xRotation);\n this.xyRotationLine?.setDisabled(this.disabledAxis.xRotation);\n this.xzRotationLine?.setDisabled(this.disabledAxis.xRotation);\n\n this.yRotation?.setDisabled(this.disabledAxis.yRotation);\n this.yzRotationLine?.setDisabled(this.disabledAxis.yRotation);\n this.yxRotationLine?.setDisabled(this.disabledAxis.yRotation);\n\n this.zRotation?.setDisabled(this.disabledAxis.zRotation);\n this.zxRotationLine?.setDisabled(this.disabledAxis.zRotation);\n this.zyRotationLine?.setDisabled(this.disabledAxis.zRotation);\n\n this.xArrow?.setDisabled(this.disabledAxis.xTranslation);\n this.yArrow?.setDisabled(this.disabledAxis.yTranslation);\n this.zArrow?.setDisabled(this.disabledAxis.zTranslation);\n\n this.updateColors();\n }\n\n private updateHovered(): void {\n const previousHovered = this.hoveredElement;\n const currentFrame = this.frame;\n\n if (currentFrame != null) {\n this.hoveredElement = [...this.translationMeshes, ...this.rotationMeshes]\n .filter((el) => el.points.valid && !el.isDisabled())\n .find((m) =>\n this.cursor != null\n ? testDrawable(m, currentFrame, this.viewport, this.cursor)\n : false\n );\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n previousHovered?.updateFillColor(previousHovered?.initialFillColor);\n }\n }\n }\n\n private clearHovered(): void {\n const previousHovered = this.hoveredElement;\n this.hoveredElement = undefined;\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n previousHovered.updateFillColor(previousHovered.initialFillColor);\n }\n }\n\n protected hasData(): boolean {\n return this.transform != null;\n }\n\n protected createOrUpdateElements(): void {\n if (this.transform != null && this.frame != null) {\n if (this.xArrow == null || this.yArrow == null || this.zArrow == null) {\n this.createElements(this.transform, this.frame);\n } else {\n this.updateElements(this.transform, this.frame);\n }\n\n this.bounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes\n );\n }\n }\n\n private createElements(transform: Matrix4.Matrix4, frame: Frame): void {\n this.reglCommand = regl({\n canvas: this.canvasElement,\n extensions: 'angle_instanced_arrays',\n });\n const { createShape } = shapeBuilder(this.reglCommand);\n\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n this.xArrow = new TriangleMesh(\n createShape,\n 'x-translate',\n xAxisArrowPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getXTranslationColor()\n );\n\n this.xRotation = new TriangleMesh(\n createShape,\n 'x-rotate',\n xAxisRotationPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getXRotationColor()\n );\n this.xAxis = new AxisLine(\n createShape,\n 'x-axis',\n axisPositions(transform, frame.scene.camera, this.xArrow),\n this.outlineColor,\n this.getXTranslationColor()\n );\n this.yArrow = new TriangleMesh(\n createShape,\n 'y-translate',\n yAxisArrowPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getYTranslationColor()\n );\n\n this.yRotation = new TriangleMesh(\n createShape,\n 'y-rotate',\n yAxisRotationPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getYRotationColor()\n );\n this.yAxis = new AxisLine(\n createShape,\n 'y-axis',\n axisPositions(transform, frame.scene.camera, this.yArrow),\n this.outlineColor,\n this.getYTranslationColor()\n );\n this.zArrow = new TriangleMesh(\n createShape,\n 'z-translate',\n zAxisArrowPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getZTranslationColor()\n );\n this.zAxis = new AxisLine(\n createShape,\n 'z-axis',\n axisPositions(transform, frame.scene.camera, this.zArrow),\n this.outlineColor,\n this.getZTranslationColor()\n );\n this.zRotation = new TriangleMesh(\n createShape,\n 'z-rotate',\n zAxisRotationPositions(transform, frame.scene.camera, triangleSize),\n this.outlineColor,\n this.getZRotationColor()\n );\n\n this.createRotationLines(createShape, transform, frame);\n\n this.axisLines = [this.xAxis, this.yAxis, this.zAxis];\n this.translationMeshes = [this.xArrow, this.yArrow, this.zArrow];\n this.rotationMeshes = [this.xRotation, this.yRotation, this.zRotation];\n this.updateDisabledOnDrawables();\n\n this.availableElements = [\n ...this.axisLines,\n ...this.rotationLines,\n ...this.translationMeshes,\n ...this.rotationMeshes,\n ];\n }\n\n private getXRotationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYRotationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZRotationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getXTranslationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYTranslationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZTranslationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private createRotationLines(\n createShape: CreateShape,\n transform: Matrix4.Matrix4,\n frame: Frame\n ): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n const xyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n );\n const xzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n );\n const yxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n );\n const yzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n );\n const zxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n );\n const zyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n );\n\n if (xyRotationLinePoints != null) {\n this.xyRotationLine = new RotationLine(\n createShape,\n 'xy-rotation-line',\n xyRotationLinePoints,\n this.outlineColor\n );\n }\n if (xzRotationLinePoints != null) {\n this.xzRotationLine = new RotationLine(\n createShape,\n 'xz-rotation-line',\n xzRotationLinePoints,\n this.outlineColor\n );\n }\n if (yxRotationLinePoints != null) {\n this.yxRotationLine = new RotationLine(\n createShape,\n 'yx-rotation-line',\n yxRotationLinePoints,\n this.outlineColor\n );\n }\n if (yzRotationLinePoints != null) {\n this.yzRotationLine = new RotationLine(\n createShape,\n 'yz-rotation-line',\n yzRotationLinePoints,\n this.outlineColor\n );\n }\n if (zxRotationLinePoints != null) {\n this.zxRotationLine = new RotationLine(\n createShape,\n 'zx-rotation-line',\n zxRotationLinePoints,\n this.outlineColor\n );\n }\n if (zyRotationLinePoints != null) {\n this.zyRotationLine = new RotationLine(\n createShape,\n 'zy-rotation-line',\n zyRotationLinePoints,\n this.outlineColor\n );\n }\n\n this.rotationLines = [\n this.xyRotationLine,\n this.xzRotationLine,\n this.yxRotationLine,\n this.yzRotationLine,\n this.zxRotationLine,\n this.zyRotationLine,\n ].filter((l) => l != null) as RotationLine[];\n }\n\n private updateElements(transform: Matrix4.Matrix4, frame: Frame): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame\n );\n\n if (this.xArrow != null) {\n this.xArrow.updatePoints(\n xAxisArrowPositions(transform, frame.scene.camera, triangleSize)\n );\n this.xAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.xArrow)\n );\n }\n this.xRotation?.updatePoints(\n xAxisRotationPositions(transform, frame.scene.camera, triangleSize)\n );\n\n if (this.yArrow != null) {\n this.yArrow.updatePoints(\n yAxisArrowPositions(transform, frame.scene.camera, triangleSize)\n );\n this.yAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.yArrow)\n );\n }\n this.yRotation?.updatePoints(\n yAxisRotationPositions(transform, frame.scene.camera, triangleSize)\n );\n\n if (this.zArrow != null) {\n this.zArrow.updatePoints(\n zAxisArrowPositions(transform, frame.scene.camera, triangleSize)\n );\n this.zAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.zArrow)\n );\n }\n this.zRotation?.updatePoints(\n zAxisRotationPositions(transform, frame.scene.camera, triangleSize)\n );\n\n this.xyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n )\n );\n this.xzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n )\n );\n this.yxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n )\n );\n this.yzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize\n )\n );\n this.zxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize\n )\n );\n this.zyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize\n )\n );\n }\n}\n",":host {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n /**\n * @prop --viewer-transform-widget-x-axis-arrow-color: A CSS color for the arrow\n * at the end of the X axis on this widget. Defaults to `#ea3324`.\n */\n --viewer-transform-widget-x-axis-arrow-color: var(--x-axis-color);\n\n /**\n * @prop --viewer-transform-widget-y-axis-arrow-color: A CSS color for the arrow\n * at the end of the Y axis on this widget. Defaults to `#4faf32`.\n */\n --viewer-transform-widget-y-axis-arrow-color: var(--y-axis-color);\n\n /**\n * @prop --viewer-transform-widget-z-axis-arrow-color: A CSS color for the arrow\n * at the end of the Z axis on this widget. Defaults to `#0000ff`.\n */\n --viewer-transform-widget-z-axis-arrow-color: var(--z-axis-color);\n\n\n /**\n * @prop --viewer-transform-widget-hovered-arrow-color: A CSS color for the arrow\n * when it is hovered. Defaults to `#ffff00`.\n */\n --viewer-transform-widget-hovered-arrow-color: #ffff00;\n}\n\n.widget {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.widget.hovered {\n pointer-events: auto;\n}","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n Watch,\n} from '@stencil/core';\nimport {\n Angle,\n Euler,\n Matrix4,\n Point,\n Quaternion,\n Vector3,\n} from '@vertexvis/geometry';\nimport { Color, Disposable } from '@vertexvis/utils';\nimport classNames from 'classnames';\n\nimport { readDOM, writeDOM } from '../../lib/stencil';\nimport { TransformController } from '../../lib/transforms/controller';\nimport { Drawable } from '../../lib/transforms/drawable';\nimport {\n computeUpdatedTransform,\n convertCanvasPointToWorld,\n convertPointToCanvas,\n} from './util';\nimport { TransformWidget } from './widget';\n\n@Component({\n tag: 'vertex-viewer-transform-widget',\n styleUrl: 'viewer-transform-widget.css',\n shadow: true,\n})\nexport class ViewerTransformWidget {\n /**\n * An event that is emitted when the position of the widget changes.\n */\n @Event({ bubbles: true })\n public positionChanged!: EventEmitter<Vector3.Vector3 | undefined>;\n\n /**\n * An event that is emitted when the rotation of the widget changes.\n */\n @Event({ bubbles: true })\n public rotationChanged!: EventEmitter<Euler.Euler | undefined>;\n\n /**\n * An event that is emitted when the interaction has ended\n */\n @Event({ bubbles: true })\n public interactionEnded!: EventEmitter<Matrix4.Matrix4 | undefined>;\n\n /**\n * An event that is emitted an interaction with the widget has started\n */\n @Event({ bubbles: true })\n public interactionStarted!: EventEmitter<void>;\n\n /**\n * The viewer to connect to transforms. If nested within a <vertex-viewer>,\n * this property will be populated automatically.\n */\n @Prop()\n public viewer?: HTMLVertexViewerElement;\n\n /**\n * The starting position of this transform widget. This position will be updated\n * as transforms occur. Setting this value to `undefined` will remove the widget.\n */\n @Prop({ mutable: true })\n public position?: Vector3.Vector3;\n\n /**\n * The starting angle for the transform widget. This rotation will be updated\n * as the rotations occur.\n */\n @Prop({ mutable: true })\n public rotation?: Euler.Euler;\n\n /**\n * The controller that is responsible for performing transforms.\n */\n @Prop({ mutable: true })\n public controller?: TransformController;\n\n /**\n * Determines whether or not the x-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xRotationDisabled = false;\n\n /**\n * Determines whether or not the y-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yRotationDisabled = false;\n\n /**\n * Determines whether or not the z-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zRotationDisabled = false;\n\n /**\n * Determines whether or not the x-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xTranslationDisabled = false;\n\n /**\n * Determines whether or not the y-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yTranslationDisabled = false;\n\n /**\n * Determines whether or not the z-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zTranslationDisabled = false;\n\n /**\n * @internal\n * @ignore\n *\n * Visible for testing.\n */\n @Prop({ mutable: true })\n public hovered?: Drawable;\n\n @Element()\n private hostEl!: HTMLElement;\n\n private startingTransform?: Matrix4.Matrix4;\n private currentTransform?: Matrix4.Matrix4;\n\n private xArrowColor: Color.Color | string = '#ea3324';\n private yArrowColor: Color.Color | string = '#4faf32';\n private zArrowColor: Color.Color | string = '#0000ff';\n private hoveredColor: Color.Color | string = '#ffff00';\n\n private widget?: TransformWidget;\n private dragging?: Drawable;\n private lastAngle = 0;\n private lastWorldPosition?: Vector3.Vector3;\n\n private canvasBounds?: DOMRect;\n private canvasResizeObserver?: ResizeObserver;\n private canvasRef?: HTMLCanvasElement;\n\n private hoveredChangeDisposable?: Disposable;\n\n protected componentDidLoad(): void {\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver = new ResizeObserver(this.handleResize);\n\n if (this.canvasRef != null) {\n this.canvasResizeObserver.observe(this.canvasRef);\n\n this.setupTransformWidget(this.canvasRef);\n }\n\n this.handleViewerChanged(this.viewer, undefined);\n\n readDOM(() => {\n const hostStyles = window.getComputedStyle(this.hostEl);\n\n this.xArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-x-axis-arrow-color')\n .trim();\n this.yArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-y-axis-arrow-color')\n .trim();\n this.zArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-z-axis-arrow-color')\n .trim();\n this.hoveredColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-hovered-arrow-color')\n .trim();\n });\n }\n\n protected disconnectedCallback(): void {\n window.removeEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver?.disconnect();\n\n this.hoveredChangeDisposable?.dispose();\n this.widget?.dispose();\n }\n\n /**\n * @ignore\n */\n @Watch('viewer')\n protected handleViewerChanged(\n newViewer?: HTMLVertexViewerElement,\n oldViewer?: HTMLVertexViewerElement\n ): void {\n oldViewer?.removeEventListener('frameDrawn', this.handleViewerFrameDrawn);\n oldViewer?.removeEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange\n );\n newViewer?.addEventListener('frameDrawn', this.handleViewerFrameDrawn);\n newViewer?.addEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange\n );\n\n if (newViewer?.stream != null) {\n this.controller?.dispose();\n this.controller = new TransformController(newViewer.stream);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('xTranslationDisabled')\n @Watch('yTranslationDisabled')\n @Watch('zTranslationDisabled')\n @Watch('xRotationDisabled')\n @Watch('yRotationDisabled')\n @Watch('zRotationDisabled')\n protected handleDisabledPropertyChanged(): void {\n this.widget?.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('rotation')\n protected handleRotationChanged(\n newRotation: Euler.Euler,\n oldRotation?: Euler.Euler\n ): void {\n this.currentTransform = this.getTransformForNewRotation(newRotation);\n this.startingTransform = this.currentTransform;\n this.widget?.updateTransform(this.currentTransform);\n console.debug(\n `Updating widget rotation [previous=${JSON.stringify(\n oldRotation\n )}, current=${JSON.stringify(newRotation)}]`\n );\n\n this.rotationChanged.emit(newRotation);\n }\n\n /**\n * @ignore\n */\n @Watch('position')\n protected handlePositionChanged(\n newPosition?: Vector3.Vector3,\n oldPosition?: Vector3.Vector3\n ): void {\n this.currentTransform = this.getTransformForNewPosition(newPosition);\n this.startingTransform = this.currentTransform;\n\n console.debug(\n `Updating widget position [previous=${JSON.stringify(\n oldPosition\n )}, current=${JSON.stringify(newPosition)}]`\n );\n this.widget?.updateTransform(this.currentTransform);\n\n if (newPosition == null) {\n this.controller?.clearTransform();\n }\n\n this.positionChanged.emit(newPosition);\n }\n\n public render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <canvas\n ref={(el) => {\n this.canvasRef = el;\n }}\n class={classNames('widget', {\n hovered: this.hovered != null,\n })}\n width={this.viewer?.viewport.width}\n height={this.viewer?.viewport.height}\n onPointerDown={this.handleBeginDrag}\n />\n </Host>\n );\n }\n\n private handleHoveredDrawableChanged = (drawable?: Drawable): void => {\n this.hovered = drawable;\n };\n\n private handleViewerFrameDrawn = (): void => {\n this.updatePropsFromViewer();\n };\n\n private handleViewerDimensionsChange = (): void => {\n writeDOM(() => {\n if (this.viewer != null && this.canvasRef != null) {\n this.canvasRef.width = this.viewer.viewport.width;\n this.canvasRef.height = this.viewer.viewport.height;\n\n this.updateCanvasBounds(this.canvasRef);\n }\n });\n };\n\n private handleResize = (): void => {\n if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n }\n };\n\n private handlePointerMove = (event: PointerEvent): void => {\n if (this.dragging == null) {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds()\n );\n const widget = this.getTransformWidget();\n\n if (canvasPoint != null && widget.boundsContainsPoint(canvasPoint)) {\n widget.updateCursor(canvasPoint);\n } else {\n widget.updateCursor(undefined);\n this.hovered = undefined;\n }\n }\n };\n\n private handleBeginDrag = async (event: PointerEvent): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.hovered != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.position != null &&\n this.viewer.frame != null\n ) {\n this.dragging = this.hovered;\n\n const currentCanvas = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n canvasBounds\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix\n );\n\n this.lastAngle =\n currentCanvas != null\n ? Angle.fromPoints(widgetCenter, currentCanvas)\n : 0;\n\n this.lastWorldPosition = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform\n );\n\n this.interactionStarted.emit();\n\n window.removeEventListener('pointermove', this.handlePointerMove);\n window.addEventListener('pointermove', this.handleDrag);\n window.addEventListener('pointerup', this.handleEndTransform);\n }\n };\n\n private handleDrag = async (event: PointerEvent): Promise<void> => {\n // Prevent selection of text and interaction with view cube while dragging the widget\n event.preventDefault();\n\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.dragging != null &&\n this.lastWorldPosition != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.viewer.frame != null &&\n this.position != null\n ) {\n // Begin the transform on the first `pointermove` event as opposed to the\n // `pointerdown` to prevent accidental no-op transforms (identity matrix).\n await this.controller?.beginTransform();\n\n const currentCanvas = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n canvasBounds\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix\n );\n\n const currentWorld = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform\n );\n\n if (\n currentWorld != null &&\n currentCanvas != null &&\n widgetCenter != null\n ) {\n const angle = Angle.fromPoints(widgetCenter, currentCanvas);\n\n this.transform(\n this.lastWorldPosition,\n currentWorld,\n angle - this.lastAngle\n );\n\n this.lastWorldPosition = currentWorld;\n this.lastAngle = angle;\n }\n }\n };\n\n private handleEndTransform = async (event: PointerEvent): Promise<void> => {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds()\n );\n const widget = this.getTransformWidget();\n\n this.dragging = undefined;\n this.lastWorldPosition = undefined;\n this.position =\n this.currentTransform != null\n ? Vector3.fromMatrixPosition(this.currentTransform)\n : this.position;\n this.lastAngle = 0;\n\n widget.updateCursor(canvasPoint);\n widget.updateTransform(this.currentTransform);\n\n widget.updateDisabledAxis({\n xRotation: true,\n yRotation: true,\n zRotation: true,\n xTranslation: true,\n yTranslation: true,\n zTranslation: true,\n });\n\n window.removeEventListener('pointermove', this.handleDrag);\n window.removeEventListener('pointerup', this.handleEndTransform);\n\n try {\n const delta = this.controller?.getCurrentDelta();\n\n await this.controller?.endTransform();\n\n this.interactionEnded.emit(delta);\n } catch (e) {\n console.error('Failed to end transform interaction', e);\n }\n\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.getTransformWidget().updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n });\n };\n\n private updatePropsFromViewer = (): void => {\n const { frame } = this.viewer || {};\n\n if (frame != null) {\n const widget = this.getTransformWidget();\n\n widget.updateFrame(frame, this.dragging == null);\n }\n };\n\n private transform(\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n angle: number\n ): void {\n if (\n this.position != null &&\n this.startingTransform != null &&\n this.currentTransform != null &&\n this.dragging != null &&\n this.viewer != null &&\n this.viewer.frame != null\n ) {\n this.currentTransform = computeUpdatedTransform(\n this.currentTransform,\n previous,\n next,\n this.viewer?.frame.scene.camera.viewVector,\n angle,\n this.dragging.identifier\n );\n\n this.getTransformWidget().updateTransform(this.currentTransform);\n this.controller?.updateTransform(\n Matrix4.multiply(\n this.currentTransform,\n Matrix4.invert(this.startingTransform)\n )\n );\n }\n }\n\n private handleSettingDisabledAxis(): void {\n if (this.widget) {\n this.widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n });\n } else {\n console.warn('Cannot set disabled values - no widget defined');\n }\n }\n\n private setupTransformWidget = (\n canvasRef: HTMLCanvasElement\n ): TransformWidget => {\n console.debug(\n `Initializing transform widget. [initial-position=${JSON.stringify(\n this.position\n )}, has-initial-frame=${this.viewer?.frame != null}]`\n );\n\n this.widget = new TransformWidget(canvasRef, {\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n hovered: this.hoveredColor,\n });\n\n if (this.rotation != null) {\n this.currentTransform = this.getTransformForNewRotation(this.rotation);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n\n if (this.position != null) {\n this.currentTransform = this.getTransformForNewPosition(this.position);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n if (this.viewer?.frame != null) {\n this.widget.updateFrame(this.viewer.frame, true);\n }\n\n this.handleSettingDisabledAxis();\n\n this.hoveredChangeDisposable = this.widget.onHoveredChanged(\n this.handleHoveredDrawableChanged\n );\n\n return this.widget;\n };\n\n private updateCanvasBounds = (canvasElement: HTMLCanvasElement): void => {\n readDOM(() => {\n this.canvasBounds = canvasElement.getBoundingClientRect();\n\n this.getTransformWidget().updateDimensions(canvasElement);\n });\n };\n\n private getTransformForNewPosition = (\n newPosition?: Vector3.Vector3\n ): Matrix4.Matrix4 | undefined => {\n if (newPosition != null) {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const currentRotation = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(c)\n );\n const position = Matrix4.makeTranslation(newPosition);\n\n return Matrix4.multiply(position, currentRotation);\n } else if (newPosition != null) {\n return Matrix4.makeTranslation(newPosition);\n }\n };\n\n private getTransformForNewRotation = (\n newRotationEuler: Euler.Euler\n ): Matrix4.Matrix4 | undefined => {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const oldRotation = Matrix4.invert(\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(c))\n );\n\n const newRotation = Matrix4.makeRotation(\n Quaternion.fromEuler(newRotationEuler)\n );\n const oldTranslation = Matrix4.multiply(c, oldRotation);\n\n return Matrix4.multiply(oldTranslation, newRotation);\n };\n\n private getCanvasBounds = (): DOMRect | undefined => {\n if (this.canvasBounds != null) {\n return this.canvasBounds;\n } else if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n return this.canvasBounds;\n }\n };\n\n private getTransformWidget = (): TransformWidget => {\n if (this.widget == null && this.canvasRef != null) {\n return this.setupTransformWidget(this.canvasRef);\n } else if (this.widget != null) {\n return this.widget;\n } else {\n throw new Error(\n 'Transform widget was not initialized. The canvas element may not have been initialized.'\n );\n }\n };\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/regl-shape";
|
|
2
|
+
|
|
3
|
+
interface VertexViewerViewCube extends Components.VertexViewerViewCube, HTMLElement {}
|
|
4
|
+
export const VertexViewerViewCube: {
|
|
5
|
+
prototype: VertexViewerViewCube;
|
|
6
|
+
new (): VertexViewerViewCube;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023 Vertex Software LLC. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { h, Fragment, proxyCustomElement, HTMLElement, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { v as vector3, q as quaternion, i as euler } from './bundle.esm.js';
|
|
6
|
+
import { r as readDOM } from './stencil.js';
|
|
7
|
+
import { O as Orientation, e as FramePerspectiveCamera, S as StandardView } from './streamAttributes.js';
|
|
8
|
+
import { c as classnames } from './index2.js';
|
|
9
|
+
import { d as defineCustomElement$4 } from './viewer-dom-element.js';
|
|
10
|
+
import { d as defineCustomElement$3 } from './viewer-dom-group.js';
|
|
11
|
+
import { d as defineCustomElement$2 } from './viewer-dom-renderer.js';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
const viewCubeSides = {
|
|
15
|
+
front: {
|
|
16
|
+
direction: vector3.back(),
|
|
17
|
+
quaternion: quaternion.create(),
|
|
18
|
+
},
|
|
19
|
+
back: {
|
|
20
|
+
direction: vector3.forward(),
|
|
21
|
+
quaternion: quaternion.fromAxisAngle(vector3.up(), Math.PI),
|
|
22
|
+
},
|
|
23
|
+
left: {
|
|
24
|
+
direction: vector3.left(),
|
|
25
|
+
quaternion: quaternion.fromAxisAngle(vector3.down(), Math.PI / 2),
|
|
26
|
+
},
|
|
27
|
+
right: {
|
|
28
|
+
direction: vector3.right(),
|
|
29
|
+
quaternion: quaternion.fromAxisAngle(vector3.up(), Math.PI / 2),
|
|
30
|
+
},
|
|
31
|
+
top: {
|
|
32
|
+
direction: vector3.up(),
|
|
33
|
+
quaternion: quaternion.fromAxisAngle(vector3.right(), -Math.PI / 2),
|
|
34
|
+
},
|
|
35
|
+
bottom: {
|
|
36
|
+
direction: vector3.down(),
|
|
37
|
+
quaternion: quaternion.fromAxisAngle(vector3.left(), -Math.PI / 2),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const TriadAxis = ({ label, length, rotationAxis, }) => {
|
|
41
|
+
const axisStyles = { width: `${length + 5}px` };
|
|
42
|
+
const quaternion$1 = quaternion.fromAxisAngle(rotationAxis, Math.PI / 2);
|
|
43
|
+
const labelPos = vector3.scale(length + 15, vector3.right());
|
|
44
|
+
return (h(Fragment, null,
|
|
45
|
+
h("vertex-viewer-dom-group", { quaternion: quaternion$1 },
|
|
46
|
+
h("vertex-viewer-dom-element", { style: axisStyles, billboardOff: true, interactionsOff: true },
|
|
47
|
+
h("div", { class: `triad-axis triad-axis-${label.toLowerCase()}` })),
|
|
48
|
+
h("vertex-viewer-dom-element", { rotation: euler.create({ x: Math.PI / 2, y: 0, z: 0 }), style: axisStyles, billboardOff: true, interactionsOff: true },
|
|
49
|
+
h("div", { class: `triad-axis triad-axis-${label.toLowerCase()}` })),
|
|
50
|
+
h("vertex-viewer-dom-element", { position: labelPos, interactionsOff: true },
|
|
51
|
+
h("div", { class: `triad-label triad-label-${label.toLowerCase()}` }, label)))));
|
|
52
|
+
};
|
|
53
|
+
const ViewCubeSide = ({ label, length, side, disabled, onPointerDown, }) => {
|
|
54
|
+
const { direction, quaternion } = viewCubeSides[side];
|
|
55
|
+
const position = vector3.scale(length / 2 - 0.1, direction);
|
|
56
|
+
return (h("vertex-viewer-dom-element", { class: classnames('cube-side', { disabled }), position: position, quaternion: quaternion, style: { width: `${length}px`, height: `${length}px` }, onPointerDown: onPointerDown, billboardOff: true },
|
|
57
|
+
h("div", { class: `cube-side-face cube-side-face-${label.toLowerCase()}` }, label)));
|
|
58
|
+
};
|
|
59
|
+
const ViewCubeCorner = ({ length, face1Side, face1Corner, face2Side, face2Corner, face3Side, face3Corner, disabled, onPointerDown, }) => {
|
|
60
|
+
const { direction: dir1, quaternion: rot1 } = viewCubeSides[face1Side];
|
|
61
|
+
const { direction: dir2, quaternion: rot2 } = viewCubeSides[face2Side];
|
|
62
|
+
const { direction: dir3, quaternion: rot3 } = viewCubeSides[face3Side];
|
|
63
|
+
const position1 = vector3.scale(length / 2, dir1);
|
|
64
|
+
const position2 = vector3.scale(length / 2, dir2);
|
|
65
|
+
const position3 = vector3.scale(length / 2, dir3);
|
|
66
|
+
const styles = { width: `${length}px`, height: `${length}px` };
|
|
67
|
+
return (h("vertex-viewer-dom-group", { class: classnames('cube-corner', { disabled }), onPointerDown: onPointerDown },
|
|
68
|
+
h("vertex-viewer-dom-element", { position: position1, quaternion: rot1, style: styles, billboardOff: true },
|
|
69
|
+
h("div", { class: `cube-corner-face ${face1Corner}` })),
|
|
70
|
+
h("vertex-viewer-dom-element", { position: position2, quaternion: rot2, style: styles, billboardOff: true },
|
|
71
|
+
h("div", { class: `cube-corner-face ${face2Corner}` })),
|
|
72
|
+
h("vertex-viewer-dom-element", { position: position3, quaternion: rot3, style: styles, billboardOff: true },
|
|
73
|
+
h("div", { class: `cube-corner-face ${face3Corner}` }))));
|
|
74
|
+
};
|
|
75
|
+
const ViewCubeEdge = ({ length, face1Side, face2Side, face1Edge, face2Edge, disabled, onPointerDown, }) => {
|
|
76
|
+
const { direction: dir1, quaternion: rot1 } = viewCubeSides[face1Side];
|
|
77
|
+
const { direction: dir2, quaternion: rot2 } = viewCubeSides[face2Side];
|
|
78
|
+
const position1 = vector3.scale(length / 2, dir1);
|
|
79
|
+
const position2 = vector3.scale(length / 2, dir2);
|
|
80
|
+
const styles = { width: `${length}px`, height: `${length}px` };
|
|
81
|
+
return (h("vertex-viewer-dom-group", { class: classnames('cube-edge', { disabled }), onPointerDown: onPointerDown },
|
|
82
|
+
h("vertex-viewer-dom-element", { position: position1, quaternion: rot1, style: styles, billboardOff: true },
|
|
83
|
+
h("div", { class: `cube-edge-face ${face1Edge}` })),
|
|
84
|
+
h("vertex-viewer-dom-element", { position: position2, quaternion: rot2, style: styles, billboardOff: true },
|
|
85
|
+
h("div", { class: `cube-edge-face ${face2Edge}` }))));
|
|
86
|
+
};
|
|
87
|
+
const ViewCubeShadow = ({ length, }) => {
|
|
88
|
+
const { direction, quaternion } = viewCubeSides.top;
|
|
89
|
+
const position = vector3.scale(-length / 2, direction);
|
|
90
|
+
return (h("vertex-viewer-dom-element", { class: "cube-shadow", position: position, quaternion: quaternion, style: { width: `${length}px`, height: `${length}px` }, billboardOff: true, interactionsOff: true },
|
|
91
|
+
h("div", { class: "cube-shadow-face" })));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const viewerViewCubeCss = ":host{--viewer-view-cube-side-background:var(--white);--viewer-view-cube-side-background-hover:var(--blue-500);--viewer-view-cube-side-background-hover-opacity:0.25;--viewer-view-cube-side-border:1.5px solid var(--neutral-500);--viewer-view-cube-edge-length:12px;--viewer-view-cube-opacity:0.8;--viewer-view-cube-triad-x-axis-color:var(--x-axis-color);--viewer-view-cube-triad-y-axis-color:var(--y-axis-color);--viewer-view-cube-triad-z-axis-color:var(--z-axis-color);color:var(--neutral-700);width:80px;height:80px;margin:20px;position:relative;display:flex;align-items:center;justify-content:center;user-select:none}.renderer{position:unset;width:100%;height:100%;overflow:visible}.reference-point{width:5px;height:5px;border-radius:50%;background-color:black}.triad{pointer-events:none}.triad-axis{width:100%;height:1.5px;outline:1px solid transparent;transform:translateX(50%)}.triad-axis-x{background-color:#ea3324}.triad-axis-y{background-color:#4faf32}.triad-axis-z{background-color:#0000ff}.triad-label{font-family:Arial, Helvetica, sans-serif;font-size:0.6875rem}.triad-label-x{color:var(--viewer-view-cube-triad-x-axis-color)}.triad-label-y{color:var(--viewer-view-cube-triad-y-axis-color)}.triad-label-z{color:var(--viewer-view-cube-triad-z-axis-color)}.cube{pointer-events:initial}.cube:hover .cube-side-face{opacity:1}.cube-side{backface-visibility:hidden;-webkit-backface-visibility:hidden}.cube-side-face{box-sizing:border-box;font-size:0.875rem;text-transform:uppercase;width:100%;height:100%;background-color:var(--viewer-view-cube-side-background);border:var(--viewer-view-cube-side-border);display:flex;align-items:center;justify-content:center;outline:1px solid transparent;opacity:var(--viewer-view-cube-opacity);transition:opacity 0.2s ease-in-out}.cube-side-face::before{content:'';position:absolute;left:calc(var(--viewer-view-cube-edge-length) - 4px);right:calc(var(--viewer-view-cube-edge-length) - 4px);top:calc(var(--viewer-view-cube-edge-length) - 4px);bottom:calc(var(--viewer-view-cube-edge-length) - 4px)}.cube-corner,.cube-edge{position:relative}.cube-corner-face,.cube-edge-face{position:absolute;backface-visibility:hidden;-webkit-backface-visibility:hidden}.cube-edge-face.top{top:0;left:var(--viewer-view-cube-edge-length);right:var(--viewer-view-cube-edge-length);height:var(--viewer-view-cube-edge-length)}.cube-edge-face.bottom{bottom:0;left:var(--viewer-view-cube-edge-length);right:var(--viewer-view-cube-edge-length);height:var(--viewer-view-cube-edge-length)}.cube-edge-face.left{left:0;top:var(--viewer-view-cube-edge-length);bottom:var(--viewer-view-cube-edge-length);width:var(--viewer-view-cube-edge-length)}.cube-edge-face.right{right:0;top:var(--viewer-view-cube-edge-length);bottom:var(--viewer-view-cube-edge-length);width:var(--viewer-view-cube-edge-length)}.cube-corner-face{width:var(--viewer-view-cube-edge-length);height:var(--viewer-view-cube-edge-length)}.cube-corner-face.top-left{top:0;left:0}.cube-corner-face.top-right{top:0;right:0}.cube-corner-face.bottom-right{bottom:0;right:0}.cube-corner-face.bottom-left{bottom:0;left:0}.cube-shadow{backface-visibility:hidden;-webkit-backface-visibility:hidden}.cube-shadow-face{position:absolute;left:4px;right:4px;top:4px;bottom:4px;background-color:black;opacity:0.12;filter:blur(4px)}.cube-corner .cube-corner-face,.cube-edge .cube-edge-face,.cube-side .cube-side-face::before{background:var(--viewer-view-cube-side-background-hover);opacity:0}.cube-corner:hover .cube-corner-face,.cube-edge:hover .cube-edge-face,.cube-side:hover .cube-side-face::before{opacity:var(--viewer-view-cube-side-background-hover-opacity)}.cube-corner.disabled,.cube-edge.disabled,.cube-side.disabled{pointer-events:none}";
|
|
95
|
+
|
|
96
|
+
const ViewerViewCube = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
97
|
+
constructor() {
|
|
98
|
+
super();
|
|
99
|
+
this.__registerHost();
|
|
100
|
+
this.__attachShadow();
|
|
101
|
+
this.boxLength = 80;
|
|
102
|
+
this.triadPosition = vector3.origin();
|
|
103
|
+
/**
|
|
104
|
+
* The label for the side of the cube on the positive x-axis.
|
|
105
|
+
*/
|
|
106
|
+
this.xPositiveLabel = 'Right';
|
|
107
|
+
/**
|
|
108
|
+
* The label for the side of the cube on the negative x-axis.
|
|
109
|
+
*/
|
|
110
|
+
this.xNegativeLabel = 'Left';
|
|
111
|
+
/**
|
|
112
|
+
* The label for the side of the cube on the positive y-axis.
|
|
113
|
+
*/
|
|
114
|
+
this.yPositiveLabel = 'Top';
|
|
115
|
+
/**
|
|
116
|
+
* The label for the side of the cube on the negative y-axis.
|
|
117
|
+
*/
|
|
118
|
+
this.yNegativeLabel = 'Bottom';
|
|
119
|
+
/**
|
|
120
|
+
* The label for the side of the cube on the positive z-axis.
|
|
121
|
+
*/
|
|
122
|
+
this.zPositiveLabel = 'Front';
|
|
123
|
+
/**
|
|
124
|
+
* The label for the side of the cube on the negative z-axis.
|
|
125
|
+
*/
|
|
126
|
+
this.zNegativeLabel = 'Back';
|
|
127
|
+
/**
|
|
128
|
+
* Disables interactions for standard views.
|
|
129
|
+
*/
|
|
130
|
+
this.standardViewsOff = false;
|
|
131
|
+
/**
|
|
132
|
+
* The duration of the animation, in milliseconds, when a user performs a
|
|
133
|
+
* standard view interaction. Set to 0 to disable animations.
|
|
134
|
+
*/
|
|
135
|
+
this.animationDuration = 500;
|
|
136
|
+
/**
|
|
137
|
+
* Disables the display of the triad.
|
|
138
|
+
*/
|
|
139
|
+
this.triadOff = false;
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
this.worldOrientation = Orientation.DEFAULT;
|
|
144
|
+
this.updateMatrices = () => {
|
|
145
|
+
var _a;
|
|
146
|
+
if (((_a = this.viewer) === null || _a === void 0 ? void 0 : _a.frame) != null) {
|
|
147
|
+
const { camera } = this.viewer.frame.scene;
|
|
148
|
+
const halfLength = this.boxLength / 2;
|
|
149
|
+
this.triadPosition = vector3.create(-halfLength - 5, -halfLength - 5, -halfLength - 5);
|
|
150
|
+
// Used to scale the camera position so the cube is the same size as the
|
|
151
|
+
// container. This isn't exact, but pretty close.
|
|
152
|
+
const lengthScalar = 3.125;
|
|
153
|
+
const scale = this.boxLength * lengthScalar;
|
|
154
|
+
const fovY = 21.5;
|
|
155
|
+
this.camera = new FramePerspectiveCamera(vector3.scale(scale, vector3.negate(camera.direction)), vector3.origin(), camera.up, 0.1, 100, 1, fovY);
|
|
156
|
+
this.worldOrientation = this.viewer.frame.scene.worldOrientation;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
handleViewerChanged(newViewer, oldViewer) {
|
|
161
|
+
oldViewer === null || oldViewer === void 0 ? void 0 : oldViewer.removeEventListener('frameDrawn', this.updateMatrices);
|
|
162
|
+
newViewer === null || newViewer === void 0 ? void 0 : newViewer.addEventListener('frameDrawn', this.updateMatrices);
|
|
163
|
+
this.updateMatrices();
|
|
164
|
+
}
|
|
165
|
+
handleStandardView(standardView) {
|
|
166
|
+
if (this.standardViewsOff) {
|
|
167
|
+
return async () => undefined;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return async () => {
|
|
171
|
+
if (this.viewer != null) {
|
|
172
|
+
const scene = await this.viewer.scene();
|
|
173
|
+
const animation = this.animationDuration > 0
|
|
174
|
+
? { animation: { milliseconds: this.animationDuration } }
|
|
175
|
+
: {};
|
|
176
|
+
const worldStandardView = standardView.transformMatrix(this.worldOrientation.matrix);
|
|
177
|
+
scene
|
|
178
|
+
.camera()
|
|
179
|
+
.standardView(worldStandardView)
|
|
180
|
+
.viewAll()
|
|
181
|
+
.render(animation);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* @ignore
|
|
188
|
+
*/
|
|
189
|
+
componentWillLoad() {
|
|
190
|
+
this.handleViewerChanged(this.viewer);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* @ignore
|
|
194
|
+
*/
|
|
195
|
+
componentDidLoad() {
|
|
196
|
+
if (this.rendererEl != null) {
|
|
197
|
+
const observer = new ResizeObserver(() => this.handleRendererResized());
|
|
198
|
+
observer.observe(this.rendererEl);
|
|
199
|
+
this.handleRendererResized();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
handleRendererResized() {
|
|
203
|
+
readDOM(() => {
|
|
204
|
+
if (this.rendererEl != null) {
|
|
205
|
+
const rect = this.rendererEl.getBoundingClientRect();
|
|
206
|
+
this.boxLength = Math.min(rect.width, rect.height);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @ignore
|
|
212
|
+
*/
|
|
213
|
+
render() {
|
|
214
|
+
return (h(Host, null, h("vertex-viewer-dom-renderer", { ref: (ref) => (this.rendererEl = ref), class: "renderer", camera: this.camera }, !this.triadOff && (h("vertex-viewer-dom-group", { class: "triad", position: this.triadPosition }, h(TriadAxis, { label: "X", length: this.boxLength, rotationAxis: vector3.origin() }), h(TriadAxis, { label: "Y", length: this.boxLength, rotationAxis: vector3.back() }), h(TriadAxis, { label: "Z", length: this.boxLength, rotationAxis: vector3.down() }))), h("vertex-viewer-dom-group", { class: "cube", matrix: this.worldOrientation.matrix }, h(ViewCubeShadow, { length: this.boxLength + 10 }), h(ViewCubeSide, { label: this.zPositiveLabel, length: this.boxLength, side: "front", onPointerDown: this.handleStandardView(StandardView.FRONT), disabled: this.standardViewsOff }), h(ViewCubeSide, { label: this.zNegativeLabel, length: this.boxLength, side: "back", onPointerDown: this.handleStandardView(StandardView.BACK), disabled: this.standardViewsOff }), h(ViewCubeSide, { label: this.xNegativeLabel, length: this.boxLength, side: "left", onPointerDown: this.handleStandardView(StandardView.RIGHT), disabled: this.standardViewsOff }), h(ViewCubeSide, { label: this.xPositiveLabel, length: this.boxLength, side: "right", onPointerDown: this.handleStandardView(StandardView.LEFT), disabled: this.standardViewsOff }), h(ViewCubeSide, { label: this.yPositiveLabel, length: this.boxLength, side: "top", onPointerDown: this.handleStandardView(StandardView.TOP), disabled: this.standardViewsOff }), h(ViewCubeSide, { label: this.yNegativeLabel, length: this.boxLength, side: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "top", face1Edge: "bottom", face2Side: "front", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "front", face1Edge: "right", face2Side: "right", face2Edge: "left", onPointerDown: this.handleStandardView(StandardView.FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "bottom", face1Edge: "top", face2Side: "front", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "front", face1Edge: "left", face2Side: "left", face2Edge: "right", onPointerDown: this.handleStandardView(StandardView.FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "top", face1Edge: "right", face2Side: "right", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "back", face1Edge: "left", face2Side: "right", face2Edge: "right", onPointerDown: this.handleStandardView(StandardView.BACK_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "bottom", face1Edge: "right", face2Side: "right", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_LEFT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "top", face1Edge: "top", face2Side: "back", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_BACK), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "back", face1Edge: "right", face2Side: "left", face2Edge: "left", onPointerDown: this.handleStandardView(StandardView.BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "bottom", face1Edge: "bottom", face2Side: "back", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "top", face1Edge: "left", face2Side: "left", face2Edge: "top", onPointerDown: this.handleStandardView(StandardView.TOP_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeEdge, { length: this.boxLength, face1Side: "bottom", face1Edge: "left", face2Side: "left", face2Edge: "bottom", onPointerDown: this.handleStandardView(StandardView.BOTTOM_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "top", face1Corner: "bottom-left", face2Side: "front", face2Corner: "top-left", face3Side: "left", face3Corner: "top-right", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "top", face1Corner: "bottom-right", face2Side: "front", face2Corner: "top-right", face3Side: "right", face3Corner: "top-left", onPointerDown: this.handleStandardView(StandardView.TOP_FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "bottom", face1Corner: "top-right", face2Side: "front", face2Corner: "bottom-right", face3Side: "right", face3Corner: "bottom-left", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "bottom", face1Corner: "top-left", face2Side: "front", face2Corner: "bottom-left", face3Side: "left", face3Corner: "bottom-right", onPointerDown: this.handleStandardView(StandardView.BOTTOM_FRONT_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "top", face1Corner: "top-right", face2Side: "back", face2Corner: "top-left", face3Side: "right", face3Corner: "top-right", onPointerDown: this.handleStandardView(StandardView.TOP_BACK_LEFT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "top", face1Corner: "top-left", face2Side: "back", face2Corner: "top-right", face3Side: "left", face3Corner: "top-left", onPointerDown: this.handleStandardView(StandardView.TOP_BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "bottom", face1Corner: "bottom-left", face2Side: "back", face2Corner: "bottom-right", face3Side: "left", face3Corner: "bottom-left", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK_RIGHT), disabled: this.standardViewsOff }), h(ViewCubeCorner, { length: this.boxLength, face1Side: "bottom", face1Corner: "bottom-right", face2Side: "back", face2Corner: "bottom-left", face3Side: "right", face3Corner: "bottom-right", onPointerDown: this.handleStandardView(StandardView.BOTTOM_BACK_LEFT), disabled: this.standardViewsOff })))));
|
|
215
|
+
}
|
|
216
|
+
static get watchers() { return {
|
|
217
|
+
"viewer": ["handleViewerChanged"]
|
|
218
|
+
}; }
|
|
219
|
+
static get style() { return viewerViewCubeCss; }
|
|
220
|
+
}, [1, "vertex-viewer-view-cube", {
|
|
221
|
+
"xPositiveLabel": [1, "x-positive-label"],
|
|
222
|
+
"xNegativeLabel": [1, "x-negative-label"],
|
|
223
|
+
"yPositiveLabel": [1, "y-positive-label"],
|
|
224
|
+
"yNegativeLabel": [1, "y-negative-label"],
|
|
225
|
+
"zPositiveLabel": [1, "z-positive-label"],
|
|
226
|
+
"zNegativeLabel": [1, "z-negative-label"],
|
|
227
|
+
"standardViewsOff": [4, "standard-views-off"],
|
|
228
|
+
"animationDuration": [2, "animation-duration"],
|
|
229
|
+
"triadOff": [4, "triad-off"],
|
|
230
|
+
"worldOrientation": [1040],
|
|
231
|
+
"camera": [1040],
|
|
232
|
+
"viewer": [16],
|
|
233
|
+
"boxLength": [32],
|
|
234
|
+
"triadPosition": [32]
|
|
235
|
+
}]);
|
|
236
|
+
function defineCustomElement$1() {
|
|
237
|
+
if (typeof customElements === "undefined") {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const components = ["vertex-viewer-view-cube", "vertex-viewer-dom-element", "vertex-viewer-dom-group", "vertex-viewer-dom-renderer"];
|
|
241
|
+
components.forEach(tagName => { switch (tagName) {
|
|
242
|
+
case "vertex-viewer-view-cube":
|
|
243
|
+
if (!customElements.get(tagName)) {
|
|
244
|
+
customElements.define(tagName, ViewerViewCube);
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case "vertex-viewer-dom-element":
|
|
248
|
+
if (!customElements.get(tagName)) {
|
|
249
|
+
defineCustomElement$4();
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
case "vertex-viewer-dom-group":
|
|
253
|
+
if (!customElements.get(tagName)) {
|
|
254
|
+
defineCustomElement$3();
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case "vertex-viewer-dom-renderer":
|
|
258
|
+
if (!customElements.get(tagName)) {
|
|
259
|
+
defineCustomElement$2();
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
} });
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const VertexViewerViewCube = ViewerViewCube;
|
|
266
|
+
const defineCustomElement = defineCustomElement$1;
|
|
267
|
+
|
|
268
|
+
export { VertexViewerViewCube, defineCustomElement };
|
|
269
|
+
|
|
270
|
+
//# sourceMappingURL=vertex-viewer-view-cube.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"vertex-viewer-view-cube.js","mappings":";;;;;;;;;;;;AAAA;AAgBA,MAAM,aAAa,GAA2C;EAC5D,KAAK,EAAE;IACL,SAAS,EAAEA,OAAO,CAAC,IAAI,EAAE;IACzB,UAAU,EAAEC,UAAU,CAAC,MAAM,EAAE;GAChC;EACD,IAAI,EAAE;IACJ,SAAS,EAAED,OAAO,CAAC,OAAO,EAAE;IAC5B,UAAU,EAAEC,UAAU,CAAC,aAAa,CAACD,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;GAC5D;EACD,IAAI,EAAE;IACJ,SAAS,EAAEA,OAAO,CAAC,IAAI,EAAE;IACzB,UAAU,EAAEC,UAAU,CAAC,aAAa,CAACD,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;GAClE;EACD,KAAK,EAAE;IACL,SAAS,EAAEA,OAAO,CAAC,KAAK,EAAE;IAC1B,UAAU,EAAEC,UAAU,CAAC,aAAa,CAACD,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;GAChE;EACD,GAAG,EAAE;IACH,SAAS,EAAEA,OAAO,CAAC,EAAE,EAAE;IACvB,UAAU,EAAEC,UAAU,CAAC,aAAa,CAACD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;GACpE;EACD,MAAM,EAAE;IACN,SAAS,EAAEA,OAAO,CAAC,IAAI,EAAE;IACzB,UAAU,EAAEC,UAAU,CAAC,aAAa,CAACD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC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AAC,cAAc,CAC5B,EACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB,GAC/B,EACF,EAAC,cAAc,IACb,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,SAAS,EAAC,QAAQ,EAClB,WAAW,EAAC,aAAa,EACzB,SAAS,EAAC,MAAM,EAChB,WAAW,EAAC,cAAc,EAC1B,SAAS,EAAC,MAAM,EAChB,WAAW,EAAC,aAAa,EACzB,aAAa,EAAE,IAAI,CAAC,kBAAkB,CACpC,YAAY,CAAC,iBAAiB,CAC/B,EACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB,GAC/B,EACF,EAAC,cAAc,IACb,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,SAAS,EAAC,QAAQ,EAClB,WAAW,EAAC,cAAc,EAC1B,SAAS,EAAC,MAAM,EAChB,WAAW,EAAC,aAAa,EACzB,SAAS,EAAC,OAAO,EACjB,WAAW,EAAC,cAAc,EAC1B,aAAa,EAAE,IAAI,CAAC,kBAAkB,CACpC,YAAY,CAAC,gBAAgB,CAC9B,EACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB,GAC/B,CACsB,CACC,CACxB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Vector3","Quaternion","quaternion","Euler","classNames"],"sources":["./src/components/viewer-view-cube/viewer-view-cube-components.tsx","./src/components/viewer-view-cube/viewer-view-cube.css?tag=vertex-viewer-view-cube&encapsulation=shadow","./src/components/viewer-view-cube/viewer-view-cube.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Fragment, FunctionalComponent, h } from '@stencil/core';\nimport { Euler, Quaternion, Vector3 } from '@vertexvis/geometry';\nimport classNames from 'classnames';\n\ntype FaceEdge = 'top' | 'bottom' | 'left' | 'right';\n\ntype Corner = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';\n\ntype ViewCubeSide = 'front' | 'back' | 'left' | 'right' | 'top' | 'bottom';\n\ninterface ViewCubeSideData {\n direction: Vector3.Vector3;\n quaternion: Quaternion.Quaternion;\n}\n\nconst viewCubeSides: Record<ViewCubeSide, ViewCubeSideData> = {\n front: {\n direction: Vector3.back(),\n quaternion: Quaternion.create(),\n },\n back: {\n direction: Vector3.forward(),\n quaternion: Quaternion.fromAxisAngle(Vector3.up(), Math.PI),\n },\n left: {\n direction: Vector3.left(),\n quaternion: Quaternion.fromAxisAngle(Vector3.down(), Math.PI / 2),\n },\n right: {\n direction: Vector3.right(),\n quaternion: Quaternion.fromAxisAngle(Vector3.up(), Math.PI / 2),\n },\n top: {\n direction: Vector3.up(),\n quaternion: Quaternion.fromAxisAngle(Vector3.right(), -Math.PI / 2),\n },\n bottom: {\n direction: Vector3.down(),\n quaternion: Quaternion.fromAxisAngle(Vector3.left(), -Math.PI / 2),\n },\n};\n\ninterface TriadAxisProps {\n label: string;\n length: number;\n rotationAxis: Vector3.Vector3;\n}\n\nexport const TriadAxis: FunctionalComponent<TriadAxisProps> = ({\n label,\n length,\n rotationAxis,\n}) => {\n const axisStyles = { width: `${length + 5}px` };\n const quaternion = Quaternion.fromAxisAngle(rotationAxis, Math.PI / 2);\n const labelPos = Vector3.scale(length + 15, Vector3.right());\n\n return (\n <Fragment>\n <vertex-viewer-dom-group quaternion={quaternion}>\n <vertex-viewer-dom-element\n style={axisStyles}\n billboardOff\n interactionsOff\n >\n <div class={`triad-axis triad-axis-${label.toLowerCase()}`} />\n </vertex-viewer-dom-element>\n <vertex-viewer-dom-element\n rotation={Euler.create({ x: Math.PI / 2, y: 0, z: 0 })}\n style={axisStyles}\n billboardOff\n interactionsOff\n >\n <div class={`triad-axis triad-axis-${label.toLowerCase()}`} />\n </vertex-viewer-dom-element>\n <vertex-viewer-dom-element position={labelPos} interactionsOff>\n <div class={`triad-label triad-label-${label.toLowerCase()}`}>\n {label}\n </div>\n </vertex-viewer-dom-element>\n </vertex-viewer-dom-group>\n </Fragment>\n );\n};\n\ninterface ViewCubeSideProps {\n label: string;\n length: number;\n side: ViewCubeSide;\n disabled: boolean;\n onPointerDown?: (event: MouseEvent) => void;\n}\n\nexport const ViewCubeSide: FunctionalComponent<ViewCubeSideProps> = ({\n label,\n length,\n side,\n disabled,\n onPointerDown,\n}) => {\n const { direction, quaternion } = viewCubeSides[side];\n const position = Vector3.scale(length / 2 - 0.1, direction);\n\n return (\n <vertex-viewer-dom-element\n class={classNames('cube-side', { disabled })}\n position={position}\n quaternion={quaternion}\n style={{ width: `${length}px`, height: `${length}px` }}\n onPointerDown={onPointerDown}\n billboardOff\n >\n <div class={`cube-side-face cube-side-face-${label.toLowerCase()}`}>\n {label}\n </div>\n </vertex-viewer-dom-element>\n );\n};\n\ninterface ViewCubeCornerProps {\n length: number;\n face1Side: ViewCubeSide;\n face1Corner: Corner;\n face2Side: ViewCubeSide;\n face2Corner: Corner;\n face3Side: ViewCubeSide;\n face3Corner: Corner;\n disabled: boolean;\n onPointerDown?: (event: MouseEvent) => void;\n}\n\nexport const ViewCubeCorner: FunctionalComponent<ViewCubeCornerProps> = ({\n length,\n face1Side,\n face1Corner,\n face2Side,\n face2Corner,\n face3Side,\n face3Corner,\n disabled,\n onPointerDown,\n}) => {\n const { direction: dir1, quaternion: rot1 } = viewCubeSides[face1Side];\n const { direction: dir2, quaternion: rot2 } = viewCubeSides[face2Side];\n const { direction: dir3, quaternion: rot3 } = viewCubeSides[face3Side];\n\n const position1 = Vector3.scale(length / 2, dir1);\n const position2 = Vector3.scale(length / 2, dir2);\n const position3 = Vector3.scale(length / 2, dir3);\n\n const styles = { width: `${length}px`, height: `${length}px` };\n\n return (\n <vertex-viewer-dom-group\n class={classNames('cube-corner', { disabled })}\n onPointerDown={onPointerDown}\n >\n <vertex-viewer-dom-element\n position={position1}\n quaternion={rot1}\n style={styles}\n billboardOff\n >\n <div class={`cube-corner-face ${face1Corner}`} />\n </vertex-viewer-dom-element>\n <vertex-viewer-dom-element\n position={position2}\n quaternion={rot2}\n style={styles}\n billboardOff\n >\n <div class={`cube-corner-face ${face2Corner}`} />\n </vertex-viewer-dom-element>\n <vertex-viewer-dom-element\n position={position3}\n quaternion={rot3}\n style={styles}\n billboardOff\n >\n <div class={`cube-corner-face ${face3Corner}`} />\n </vertex-viewer-dom-element>\n </vertex-viewer-dom-group>\n );\n};\n\ninterface ViewCubeEdgeProps {\n length: number;\n face1Side: ViewCubeSide;\n face2Side: ViewCubeSide;\n face1Edge: FaceEdge;\n face2Edge: FaceEdge;\n disabled: boolean;\n onPointerDown?: (event: MouseEvent) => void;\n}\n\nexport const ViewCubeEdge: FunctionalComponent<ViewCubeEdgeProps> = ({\n length,\n face1Side,\n face2Side,\n face1Edge,\n face2Edge,\n disabled,\n onPointerDown,\n}) => {\n const { direction: dir1, quaternion: rot1 } = viewCubeSides[face1Side];\n const { direction: dir2, quaternion: rot2 } = viewCubeSides[face2Side];\n const position1 = Vector3.scale(length / 2, dir1);\n const position2 = Vector3.scale(length / 2, dir2);\n const styles = { width: `${length}px`, height: `${length}px` };\n\n return (\n <vertex-viewer-dom-group\n class={classNames('cube-edge', { disabled })}\n onPointerDown={onPointerDown}\n >\n <vertex-viewer-dom-element\n position={position1}\n quaternion={rot1}\n style={styles}\n billboardOff\n >\n <div class={`cube-edge-face ${face1Edge}`} />\n </vertex-viewer-dom-element>\n <vertex-viewer-dom-element\n position={position2}\n quaternion={rot2}\n style={styles}\n billboardOff\n >\n <div class={`cube-edge-face ${face2Edge}`} />\n </vertex-viewer-dom-element>\n </vertex-viewer-dom-group>\n );\n};\n\ninterface ViewCubeShadowProps {\n length: number;\n}\n\nexport const ViewCubeShadow: FunctionalComponent<ViewCubeShadowProps> = ({\n length,\n}) => {\n const { direction, quaternion } = viewCubeSides.top;\n const position = Vector3.scale(-length / 2, direction);\n\n return (\n <vertex-viewer-dom-element\n class=\"cube-shadow\"\n position={position}\n quaternion={quaternion}\n style={{ width: `${length}px`, height: `${length}px` }}\n billboardOff\n interactionsOff\n >\n <div class=\"cube-shadow-face\" />\n </vertex-viewer-dom-element>\n );\n};\n",":host {\n /**\n * @prop --viewer-view-cube-side-background: A CSS background value that\n * defines the background of a side of the cube.\n */\n --viewer-view-cube-side-background: var(--white);\n\n /**\n * @prop --viewer-view-cube-side-background-hover: A CSS background value that\n * defines the background of the hovered side of the cube. Note, the hover\n * background is rendered on-top of the side's background.\n */\n --viewer-view-cube-side-background-hover: var(--blue-500);\n\n /**\n * @prop --viewer-view-cube-side-background-hover-opacity: A CSS number that\n * defines the opacity of the background for a hovered side of the cube.\n */\n --viewer-view-cube-side-background-hover-opacity: 0.25;\n\n /**\n * @prop --viewer-view-cube-side-border: A CSS border value that defines the\n * border of each side of the cube.\n */\n --viewer-view-cube-side-border: 1.5px solid var(--neutral-500);\n\n /**\n * @prop --viewer-view-cube-edge-length: A CSS length value that defines the\n * size of an edge when hovered.\n */\n --viewer-view-cube-edge-length: 12px;\n\n /**\n * @prop --viewer-view-cube-opacity: A CSS opacity for when the cube is not\n * hovered.\n */\n --viewer-view-cube-opacity: 0.8;\n\n /**\n * @prop --viewer-view-cube-triad-x-axis-color: A CSS color for the X axis of\n * the triad\n */\n --viewer-view-cube-triad-x-axis-color: var(--x-axis-color);\n\n /**\n * @prop --viewer-view-cube-triad-y-axis-color: A CSS color for the Y axis of\n * the triad\n */\n --viewer-view-cube-triad-y-axis-color: var(--y-axis-color);\n\n /**\n * @prop --viewer-view-cube-triad-z-axis-color: A CSS color for the Z axis of\n * the triad\n */\n --viewer-view-cube-triad-z-axis-color: var(--z-axis-color);\n\n color: var(--neutral-700);\n width: 80px;\n height: 80px;\n margin: 20px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n}\n\n.renderer {\n position: unset;\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n.reference-point {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background-color: black;\n}\n\n.triad {\n pointer-events: none;\n}\n\n.triad-axis {\n width: 100%;\n height: 1.5px;\n outline: 1px solid transparent;\n transform: translateX(50%);\n}\n.triad-axis-x {\n background-color: #ea3324;\n}\n.triad-axis-y {\n background-color: #4faf32;\n}\n.triad-axis-z {\n background-color: #0000ff;\n}\n\n.triad-label {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 0.6875rem;\n}\n.triad-label-x {\n color: var(--viewer-view-cube-triad-x-axis-color);\n}\n.triad-label-y {\n color: var(--viewer-view-cube-triad-y-axis-color);\n}\n.triad-label-z {\n color: var(--viewer-view-cube-triad-z-axis-color);\n}\n\n.cube {\n pointer-events: initial;\n}\n.cube:hover .cube-side-face {\n opacity: 1;\n}\n\n.cube-side {\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n}\n.cube-side-face {\n box-sizing: border-box;\n font-size: 0.875rem;\n text-transform: uppercase;\n width: 100%;\n height: 100%;\n background-color: var(--viewer-view-cube-side-background);\n border: var(--viewer-view-cube-side-border);\n display: flex;\n align-items: center;\n justify-content: center;\n outline: 1px solid transparent;\n opacity: var(--viewer-view-cube-opacity);\n transition: opacity 0.2s ease-in-out;\n}\n.cube-side-face::before {\n content: '';\n position: absolute;\n left: calc(var(--viewer-view-cube-edge-length) - 4px);\n right: calc(var(--viewer-view-cube-edge-length) - 4px);\n top: calc(var(--viewer-view-cube-edge-length) - 4px);\n bottom: calc(var(--viewer-view-cube-edge-length) - 4px);\n}\n\n.cube-corner,\n.cube-edge {\n position: relative;\n}\n\n.cube-corner-face,\n.cube-edge-face {\n position: absolute;\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n}\n.cube-edge-face.top {\n top: 0;\n left: var(--viewer-view-cube-edge-length);\n right: var(--viewer-view-cube-edge-length);\n height: var(--viewer-view-cube-edge-length);\n}\n.cube-edge-face.bottom {\n bottom: 0;\n left: var(--viewer-view-cube-edge-length);\n right: var(--viewer-view-cube-edge-length);\n height: var(--viewer-view-cube-edge-length);\n}\n.cube-edge-face.left {\n left: 0;\n top: var(--viewer-view-cube-edge-length);\n bottom: var(--viewer-view-cube-edge-length);\n width: var(--viewer-view-cube-edge-length);\n}\n.cube-edge-face.right {\n right: 0;\n top: var(--viewer-view-cube-edge-length);\n bottom: var(--viewer-view-cube-edge-length);\n width: var(--viewer-view-cube-edge-length);\n}\n\n.cube-corner-face {\n width: var(--viewer-view-cube-edge-length);\n height: var(--viewer-view-cube-edge-length);\n}\n.cube-corner-face.top-left {\n top: 0;\n left: 0;\n}\n.cube-corner-face.top-right {\n top: 0;\n right: 0;\n}\n.cube-corner-face.bottom-right {\n bottom: 0;\n right: 0;\n}\n.cube-corner-face.bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.cube-shadow {\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n}\n.cube-shadow-face {\n position: absolute;\n left: 4px;\n right: 4px;\n top: 4px;\n bottom: 4px;\n background-color: black;\n opacity: 0.12;\n filter: blur(4px);\n}\n\n.cube-corner .cube-corner-face,\n.cube-edge .cube-edge-face,\n.cube-side .cube-side-face::before {\n background: var(--viewer-view-cube-side-background-hover);\n opacity: 0;\n}\n\n.cube-corner:hover .cube-corner-face,\n.cube-edge:hover .cube-edge-face,\n.cube-side:hover .cube-side-face::before {\n opacity: var(--viewer-view-cube-side-background-hover-opacity);\n}\n\n.cube-corner.disabled,\n.cube-edge.disabled,\n.cube-side.disabled {\n pointer-events: none;\n}\n","/* eslint-disable @typescript-eslint/member-ordering */\n\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { Vector3 } from '@vertexvis/geometry';\n\nimport { readDOM } from '../../lib/stencil';\nimport {\n FramePerspectiveCamera,\n Orientation,\n StandardView,\n} from '../../lib/types';\nimport {\n TriadAxis,\n ViewCubeCorner,\n ViewCubeEdge,\n ViewCubeShadow,\n ViewCubeSide,\n} from './viewer-view-cube-components';\n\n@Component({\n tag: 'vertex-viewer-view-cube',\n styleUrl: 'viewer-view-cube.css',\n shadow: true,\n})\nexport class ViewerViewCube {\n private rendererEl?: HTMLVertexViewerDomRendererElement;\n\n @State()\n private boxLength = 80;\n\n @State()\n private triadPosition = Vector3.origin();\n\n /**\n * The label for the side of the cube on the positive x-axis.\n */\n @Prop()\n public xPositiveLabel = 'Right';\n\n /**\n * The label for the side of the cube on the negative x-axis.\n */\n @Prop()\n public xNegativeLabel = 'Left';\n\n /**\n * The label for the side of the cube on the positive y-axis.\n */\n @Prop()\n public yPositiveLabel = 'Top';\n\n /**\n * The label for the side of the cube on the negative y-axis.\n */\n @Prop()\n public yNegativeLabel = 'Bottom';\n\n /**\n * The label for the side of the cube on the positive z-axis.\n */\n @Prop()\n public zPositiveLabel = 'Front';\n\n /**\n * The label for the side of the cube on the negative z-axis.\n */\n @Prop()\n public zNegativeLabel = 'Back';\n\n /**\n * Disables interactions for standard views.\n */\n @Prop()\n public standardViewsOff = false;\n\n /**\n * The duration of the animation, in milliseconds, when a user performs a\n * standard view interaction. Set to 0 to disable animations.\n */\n @Prop()\n public animationDuration = 500;\n\n /**\n * Disables the display of the triad.\n */\n @Prop()\n public triadOff = false;\n\n /**\n * @internal\n */\n @Prop({ mutable: true })\n public worldOrientation: Orientation = Orientation.DEFAULT;\n\n /**\n * @internal\n */\n @Prop({ mutable: true })\n public camera?: FramePerspectiveCamera;\n\n /**\n * The viewer element that is connected to the view cube.\n */\n @Prop()\n public viewer?: HTMLVertexViewerElement;\n\n @Watch('viewer')\n protected handleViewerChanged(\n newViewer?: HTMLVertexViewerElement,\n oldViewer?: HTMLVertexViewerElement\n ): void {\n oldViewer?.removeEventListener('frameDrawn', this.updateMatrices);\n newViewer?.addEventListener('frameDrawn', this.updateMatrices);\n this.updateMatrices();\n }\n\n private updateMatrices = (): void => {\n if (this.viewer?.frame != null) {\n const { camera } = this.viewer.frame.scene;\n\n const halfLength = this.boxLength / 2;\n this.triadPosition = Vector3.create(\n -halfLength - 5,\n -halfLength - 5,\n -halfLength - 5\n );\n\n // Used to scale the camera position so the cube is the same size as the\n // container. This isn't exact, but pretty close.\n const lengthScalar = 3.125;\n const scale = this.boxLength * lengthScalar;\n const fovY = 21.5;\n\n this.camera = new FramePerspectiveCamera(\n Vector3.scale(scale, Vector3.negate(camera.direction)),\n Vector3.origin(),\n camera.up,\n 0.1,\n 100,\n 1,\n fovY\n );\n\n this.worldOrientation = this.viewer.frame.scene.worldOrientation;\n }\n };\n\n private handleStandardView(standardView: StandardView): () => Promise<void> {\n if (this.standardViewsOff) {\n return async () => undefined;\n } else {\n return async () => {\n if (this.viewer != null) {\n const scene = await this.viewer.scene();\n const animation =\n this.animationDuration > 0\n ? { animation: { milliseconds: this.animationDuration } }\n : {};\n const worldStandardView = standardView.transformMatrix(\n this.worldOrientation.matrix\n );\n\n scene\n .camera()\n .standardView(worldStandardView)\n .viewAll()\n .render(animation);\n }\n };\n }\n }\n\n /**\n * @ignore\n */\n protected componentWillLoad(): void {\n this.handleViewerChanged(this.viewer);\n }\n\n /**\n * @ignore\n */\n protected componentDidLoad(): void {\n if (this.rendererEl != null) {\n const observer = new ResizeObserver(() => this.handleRendererResized());\n observer.observe(this.rendererEl);\n this.handleRendererResized();\n }\n }\n\n private handleRendererResized(): void {\n readDOM(() => {\n if (this.rendererEl != null) {\n const rect = this.rendererEl.getBoundingClientRect();\n this.boxLength = Math.min(rect.width, rect.height);\n }\n });\n }\n\n /**\n * @ignore\n */\n protected render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <vertex-viewer-dom-renderer\n ref={(ref) => (this.rendererEl = ref)}\n class=\"renderer\"\n camera={this.camera}\n >\n {/* Triad */}\n {!this.triadOff && (\n <vertex-viewer-dom-group\n class=\"triad\"\n position={this.triadPosition}\n >\n <TriadAxis\n label=\"X\"\n length={this.boxLength}\n rotationAxis={Vector3.origin()}\n />\n <TriadAxis\n label=\"Y\"\n length={this.boxLength}\n rotationAxis={Vector3.back()}\n />\n <TriadAxis\n label=\"Z\"\n length={this.boxLength}\n rotationAxis={Vector3.down()}\n />\n </vertex-viewer-dom-group>\n )}\n\n {/* Cube */}\n <vertex-viewer-dom-group\n class=\"cube\"\n matrix={this.worldOrientation.matrix}\n >\n <ViewCubeShadow length={this.boxLength + 10} />\n\n {/* Sides */}\n <ViewCubeSide\n label={this.zPositiveLabel}\n length={this.boxLength}\n side=\"front\"\n onPointerDown={this.handleStandardView(StandardView.FRONT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeSide\n label={this.zNegativeLabel}\n length={this.boxLength}\n side=\"back\"\n onPointerDown={this.handleStandardView(StandardView.BACK)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeSide\n label={this.xNegativeLabel}\n length={this.boxLength}\n side=\"left\"\n onPointerDown={this.handleStandardView(StandardView.RIGHT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeSide\n label={this.xPositiveLabel}\n length={this.boxLength}\n side=\"right\"\n onPointerDown={this.handleStandardView(StandardView.LEFT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeSide\n label={this.yPositiveLabel}\n length={this.boxLength}\n side=\"top\"\n onPointerDown={this.handleStandardView(StandardView.TOP)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeSide\n label={this.yNegativeLabel}\n length={this.boxLength}\n side=\"bottom\"\n onPointerDown={this.handleStandardView(StandardView.BOTTOM)}\n disabled={this.standardViewsOff}\n />\n\n {/* Edges */}\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"top\"\n face1Edge=\"bottom\"\n face2Side=\"front\"\n face2Edge=\"top\"\n onPointerDown={this.handleStandardView(StandardView.TOP_FRONT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"front\"\n face1Edge=\"right\"\n face2Side=\"right\"\n face2Edge=\"left\"\n onPointerDown={this.handleStandardView(StandardView.FRONT_LEFT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Edge=\"top\"\n face2Side=\"front\"\n face2Edge=\"bottom\"\n onPointerDown={this.handleStandardView(StandardView.BOTTOM_FRONT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"front\"\n face1Edge=\"left\"\n face2Side=\"left\"\n face2Edge=\"right\"\n onPointerDown={this.handleStandardView(StandardView.FRONT_RIGHT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"top\"\n face1Edge=\"right\"\n face2Side=\"right\"\n face2Edge=\"top\"\n onPointerDown={this.handleStandardView(StandardView.TOP_LEFT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"back\"\n face1Edge=\"left\"\n face2Side=\"right\"\n face2Edge=\"right\"\n onPointerDown={this.handleStandardView(StandardView.BACK_LEFT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Edge=\"right\"\n face2Side=\"right\"\n face2Edge=\"bottom\"\n onPointerDown={this.handleStandardView(StandardView.BOTTOM_LEFT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"top\"\n face1Edge=\"top\"\n face2Side=\"back\"\n face2Edge=\"top\"\n onPointerDown={this.handleStandardView(StandardView.TOP_BACK)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"back\"\n face1Edge=\"right\"\n face2Side=\"left\"\n face2Edge=\"left\"\n onPointerDown={this.handleStandardView(StandardView.BACK_RIGHT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Edge=\"bottom\"\n face2Side=\"back\"\n face2Edge=\"bottom\"\n onPointerDown={this.handleStandardView(StandardView.BOTTOM_BACK)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"top\"\n face1Edge=\"left\"\n face2Side=\"left\"\n face2Edge=\"top\"\n onPointerDown={this.handleStandardView(StandardView.TOP_RIGHT)}\n disabled={this.standardViewsOff}\n />\n <ViewCubeEdge\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Edge=\"left\"\n face2Side=\"left\"\n face2Edge=\"bottom\"\n onPointerDown={this.handleStandardView(StandardView.BOTTOM_RIGHT)}\n disabled={this.standardViewsOff}\n />\n\n {/* Corners */}\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"top\"\n face1Corner=\"bottom-left\"\n face2Side=\"front\"\n face2Corner=\"top-left\"\n face3Side=\"left\"\n face3Corner=\"top-right\"\n onPointerDown={this.handleStandardView(\n StandardView.TOP_FRONT_RIGHT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"top\"\n face1Corner=\"bottom-right\"\n face2Side=\"front\"\n face2Corner=\"top-right\"\n face3Side=\"right\"\n face3Corner=\"top-left\"\n onPointerDown={this.handleStandardView(\n StandardView.TOP_FRONT_LEFT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Corner=\"top-right\"\n face2Side=\"front\"\n face2Corner=\"bottom-right\"\n face3Side=\"right\"\n face3Corner=\"bottom-left\"\n onPointerDown={this.handleStandardView(\n StandardView.BOTTOM_FRONT_LEFT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Corner=\"top-left\"\n face2Side=\"front\"\n face2Corner=\"bottom-left\"\n face3Side=\"left\"\n face3Corner=\"bottom-right\"\n onPointerDown={this.handleStandardView(\n StandardView.BOTTOM_FRONT_RIGHT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"top\"\n face1Corner=\"top-right\"\n face2Side=\"back\"\n face2Corner=\"top-left\"\n face3Side=\"right\"\n face3Corner=\"top-right\"\n onPointerDown={this.handleStandardView(\n StandardView.TOP_BACK_LEFT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"top\"\n face1Corner=\"top-left\"\n face2Side=\"back\"\n face2Corner=\"top-right\"\n face3Side=\"left\"\n face3Corner=\"top-left\"\n onPointerDown={this.handleStandardView(\n StandardView.TOP_BACK_RIGHT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Corner=\"bottom-left\"\n face2Side=\"back\"\n face2Corner=\"bottom-right\"\n face3Side=\"left\"\n face3Corner=\"bottom-left\"\n onPointerDown={this.handleStandardView(\n StandardView.BOTTOM_BACK_RIGHT\n )}\n disabled={this.standardViewsOff}\n />\n <ViewCubeCorner\n length={this.boxLength}\n face1Side=\"bottom\"\n face1Corner=\"bottom-right\"\n face2Side=\"back\"\n face2Corner=\"bottom-left\"\n face3Side=\"right\"\n face3Corner=\"bottom-right\"\n onPointerDown={this.handleStandardView(\n StandardView.BOTTOM_BACK_LEFT\n )}\n disabled={this.standardViewsOff}\n />\n </vertex-viewer-dom-group>\n </vertex-viewer-dom-renderer>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/regl-shape";
|
|
2
|
+
|
|
3
|
+
interface VertexViewer extends Components.VertexViewer, HTMLElement {}
|
|
4
|
+
export const VertexViewer: {
|
|
5
|
+
prototype: VertexViewer;
|
|
6
|
+
new (): VertexViewer;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|