@vertexvis/viewer 0.13.1 → 0.13.2-canary.2

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.
Files changed (167) hide show
  1. package/dist/cjs/{browser.esm-31b03292.js → browser.esm-c51162f8.js} +1 -1
  2. package/dist/cjs/{bundle.esm-dc0a8361.js → bundle.esm-1b8b1f36.js} +34 -0
  3. package/dist/cjs/{config-90ee43d5.js → config-91efd353.js} +2 -2
  4. package/dist/cjs/{cursors-ad2fd395.js → cursors-14827f58.js} +1 -1
  5. package/dist/cjs/{dom-dd265f48.js → dom-c697cf99.js} +1 -1
  6. package/dist/cjs/{entities-aa59890e.js → entities-0829b4a4.js} +3 -3
  7. package/dist/cjs/index.cjs.js +13 -12
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{mapper-f6e6cafe.js → mapper-67af470b.js} +2 -2
  10. package/dist/cjs/{markup-fb1553b1.js → markup-835f2e83.js} +2 -2
  11. package/dist/cjs/{measurement-aba1e0e8.js → measurement-8e0ce89a.js} +2 -2
  12. package/dist/cjs/{model-4ec0c36e.js → model-78241d4f.js} +1 -1
  13. package/dist/cjs/{overlays-40c6cbc7.js → overlays-06786e52.js} +2 -2
  14. package/dist/cjs/{png-decoder-27d25eed.js → png-decoder-01b76242.js} +1 -1
  15. package/dist/cjs/{results-bc325974.js → results-7a694238.js} +1 -1
  16. package/dist/cjs/{scene-d420fd26.js → scene-23535fc0.js} +176 -85
  17. package/dist/cjs/{streamAttributes-d6236448.js → streamAttributes-f13c1a96.js} +1431 -41
  18. package/dist/cjs/{utils-f80be307.js → utils-4a02e54b.js} +1 -1
  19. package/dist/cjs/{utils-545b1865.js → utils-5cc32a26.js} +1 -1
  20. package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +1 -1
  21. package/dist/cjs/vertex-scene-tree.cjs.entry.js +4 -4
  22. package/dist/cjs/vertex-viewer-dom-element_3.cjs.entry.js +4 -4
  23. package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +3 -3
  24. package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +4 -4
  25. package/dist/cjs/vertex-viewer-markup.cjs.entry.js +4 -4
  26. package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -3
  27. package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +11 -11
  28. package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +6 -6
  29. package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +10 -10
  30. package/dist/cjs/vertex-viewer-measurement-tool.cjs.entry.js +5 -5
  31. package/dist/cjs/vertex-viewer-measurements.cjs.entry.js +8 -8
  32. package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +3 -3
  33. package/dist/cjs/vertex-viewer.cjs.entry.js +198 -79
  34. package/dist/cjs/viewer.cjs.js +1 -1
  35. package/dist/cjs/{viewport-8c39089f.js → viewport-052809c7.js} +1 -1
  36. package/dist/collection/components/viewer/viewer.js +68 -4
  37. package/dist/collection/components/viewer-dom-renderer/renderer2d.js +1 -1
  38. package/dist/collection/components/viewer-dom-renderer/renderer3d.js +1 -1
  39. package/dist/collection/components/viewer-dom-renderer/viewer-dom-renderer.js +3 -3
  40. package/dist/collection/components/viewer-measurement-distance/viewer-measurement-distance.js +3 -3
  41. package/dist/collection/components/viewer-measurement-overlays/viewer-measurement-overlays.js +3 -3
  42. package/dist/collection/index.js +2 -2
  43. package/dist/collection/lib/errors.js +8 -1
  44. package/dist/collection/lib/interactions/index.js +3 -1
  45. package/dist/collection/lib/interactions/interactionApi.js +4 -25
  46. package/dist/collection/lib/interactions/interactionApiOrthographic.js +50 -0
  47. package/dist/collection/lib/interactions/interactionApiPerspective.js +50 -0
  48. package/dist/collection/lib/mappers/frameStreaming.js +27 -5
  49. package/dist/collection/lib/rendering/matrices.js +13 -4
  50. package/dist/collection/lib/scenes/__mocks__/mocks.js +2 -2
  51. package/dist/collection/lib/scenes/camera.js +149 -77
  52. package/dist/collection/lib/scenes/mapper.js +3 -2
  53. package/dist/collection/lib/scenes/scene.js +23 -9
  54. package/dist/collection/lib/types/clippingPlanes.js +54 -17
  55. package/dist/collection/lib/types/depthBuffer.js +1 -1
  56. package/dist/collection/lib/types/frame.js +88 -23
  57. package/dist/collection/lib/types/frameCamera.js +81 -6
  58. package/dist/collection/lib/types/viewport.js +1 -1
  59. package/dist/collection/testing/fixtures.js +23 -10
  60. package/dist/collection/testing/viewer.js +5 -3
  61. package/dist/custom-elements/index.js +1821 -194
  62. package/dist/esm/{browser.esm-59e914f6.js → browser.esm-48f051a3.js} +1 -1
  63. package/dist/esm/{bundle.esm-d899b2d5.js → bundle.esm-df3a8a42.js} +35 -1
  64. package/dist/esm/{config-604c644e.js → config-3a5d3ea3.js} +2 -2
  65. package/dist/esm/{cursors-a7ec4adb.js → cursors-45f23dfe.js} +1 -1
  66. package/dist/esm/{dom-780d25be.js → dom-18d9ac79.js} +1 -1
  67. package/dist/esm/{entities-759d97cd.js → entities-60dfd79d.js} +3 -3
  68. package/dist/esm/index.js +12 -12
  69. package/dist/esm/index.mjs +12 -12
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/loader.mjs +1 -1
  72. package/dist/esm/{mapper-4b815e31.js → mapper-adf23dc4.js} +2 -2
  73. package/dist/esm/{markup-1d177b4a.js → markup-accb6b5c.js} +2 -2
  74. package/dist/esm/{measurement-12cdbf5c.js → measurement-6cd457a6.js} +2 -2
  75. package/dist/esm/{model-e5a4f00f.js → model-4982c15d.js} +1 -1
  76. package/dist/esm/{overlays-1919b192.js → overlays-1783a61a.js} +2 -2
  77. package/dist/esm/{png-decoder-3f1fa486.js → png-decoder-f35def4c.js} +1 -1
  78. package/dist/esm/{results-994bdb50.js → results-93d45acc.js} +1 -1
  79. package/dist/esm/{scene-2c2460d5.js → scene-2d8bdccc.js} +176 -85
  80. package/dist/esm/{streamAttributes-d623bb60.js → streamAttributes-87a3605c.js} +1426 -43
  81. package/dist/esm/{utils-5e57bf24.js → utils-9f4b25ec.js} +1 -1
  82. package/dist/esm/{utils-83a19677.js → utils-ed2346c0.js} +1 -1
  83. package/dist/esm/vertex-scene-tree-search_3.entry.js +1 -1
  84. package/dist/esm/vertex-scene-tree.entry.js +4 -4
  85. package/dist/esm/vertex-viewer-dom-element_3.entry.js +4 -4
  86. package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +3 -3
  87. package/dist/esm/vertex-viewer-markup-tool.entry.js +4 -4
  88. package/dist/esm/vertex-viewer-markup.entry.js +4 -4
  89. package/dist/esm/vertex-viewer-measurement-details.entry.js +3 -3
  90. package/dist/esm/vertex-viewer-measurement-distance.entry.js +11 -11
  91. package/dist/esm/vertex-viewer-measurement-line_2.entry.js +6 -6
  92. package/dist/esm/vertex-viewer-measurement-precise.entry.js +10 -10
  93. package/dist/esm/vertex-viewer-measurement-tool.entry.js +5 -5
  94. package/dist/esm/vertex-viewer-measurements.entry.js +8 -8
  95. package/dist/esm/vertex-viewer-view-cube.entry.js +3 -3
  96. package/dist/esm/vertex-viewer.entry.js +198 -79
  97. package/dist/esm/viewer.js +1 -1
  98. package/dist/esm/{viewport-01c886ea.js → viewport-6d4c0af0.js} +1 -1
  99. package/dist/types/components/viewer/viewer.d.ts +8 -0
  100. package/dist/types/components/viewer-dom-renderer/renderer2d.d.ts +2 -2
  101. package/dist/types/components/viewer-dom-renderer/renderer3d.d.ts +3 -3
  102. package/dist/types/components/viewer-dom-renderer/viewer-dom-renderer.d.ts +2 -2
  103. package/dist/types/components/viewer-measurement-distance/utils.d.ts +2 -2
  104. package/dist/types/components/viewer-measurement-distance/viewer-measurement-distance.d.ts +2 -2
  105. package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays-components.d.ts +2 -2
  106. package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays.d.ts +2 -2
  107. package/dist/types/components.d.ts +15 -7
  108. package/dist/types/index.d.ts +1 -1
  109. package/dist/types/lib/errors.d.ts +3 -0
  110. package/dist/types/lib/interactions/index.d.ts +2 -0
  111. package/dist/types/lib/interactions/interactionApi.d.ts +20 -21
  112. package/dist/types/lib/interactions/interactionApiOrthographic.d.ts +21 -0
  113. package/dist/types/lib/interactions/interactionApiPerspective.d.ts +21 -0
  114. package/dist/types/lib/mappers/frameStreaming.d.ts +2 -0
  115. package/dist/types/lib/scenes/__mocks__/mocks.d.ts +2 -2
  116. package/dist/types/lib/scenes/camera.d.ts +100 -37
  117. package/dist/types/lib/scenes/scene.d.ts +1 -1
  118. package/dist/types/lib/types/clippingPlanes.d.ts +3 -1
  119. package/dist/types/lib/types/depthBuffer.d.ts +4 -4
  120. package/dist/types/lib/types/frame.d.ts +54 -11
  121. package/dist/types/lib/types/frameCamera.d.ts +21 -2
  122. package/dist/types/lib/types/viewport.d.ts +2 -3
  123. package/dist/types/testing/fixtures.d.ts +4 -2
  124. package/dist/viewer/index.esm.js +1 -1
  125. package/dist/viewer/{p-3f6ac74f.js → p-014561cd.js} +1 -1
  126. package/dist/viewer/p-121f2b40.js +18 -0
  127. package/dist/viewer/p-18ec4fed.js +4 -0
  128. package/dist/viewer/{p-e2297df2.entry.js → p-1acd0e56.entry.js} +1 -1
  129. package/dist/viewer/{p-da2f4a56.js → p-25dfee48.js} +1 -1
  130. package/dist/viewer/p-2e75198d.js +4 -0
  131. package/dist/viewer/p-38c06c25.js +4 -0
  132. package/dist/viewer/{p-67446e35.js → p-463151e0.js} +1 -1
  133. package/dist/viewer/{p-301660cf.js → p-546ae240.js} +1 -1
  134. package/dist/viewer/{p-d00e9203.js → p-6120a219.js} +1 -1
  135. package/dist/viewer/p-61db972b.js +4 -0
  136. package/dist/viewer/{p-a0df0e0c.js → p-6d9d3553.js} +1 -1
  137. package/dist/viewer/{p-f8d01b8a.entry.js → p-7c5bee8e.entry.js} +1 -1
  138. package/dist/viewer/{p-8decee06.entry.js → p-8de749a5.entry.js} +1 -1
  139. package/dist/viewer/{p-081e6873.js → p-8df35eee.js} +1 -1
  140. package/dist/viewer/{p-671c113c.entry.js → p-923b616f.entry.js} +1 -1
  141. package/dist/viewer/p-9b1ecc71.js +4 -0
  142. package/dist/viewer/{p-3810c24d.js → p-9fd5fc8e.js} +1 -1
  143. package/dist/viewer/p-b2d4c0cf.entry.js +4 -0
  144. package/dist/viewer/{p-364ce21c.js → p-b8bc15ec.js} +1 -1
  145. package/dist/viewer/{p-439220c6.js → p-b8f027eb.js} +1 -1
  146. package/dist/viewer/p-bc7f0ad6.entry.js +4 -0
  147. package/dist/viewer/{p-2cefb1b0.js → p-ce0fe8be.js} +1 -1
  148. package/dist/viewer/p-d939ecd3.entry.js +4 -0
  149. package/dist/viewer/{p-25eaab00.entry.js → p-de7eecce.entry.js} +1 -1
  150. package/dist/viewer/{p-4985fad5.js → p-e3fff448.js} +1 -1
  151. package/dist/viewer/{p-6e80f8b0.entry.js → p-e4934f47.entry.js} +1 -1
  152. package/dist/viewer/{p-df292b56.entry.js → p-e8f6cba6.entry.js} +1 -1
  153. package/dist/viewer/{p-353cfc7a.entry.js → p-ee86bed2.entry.js} +1 -1
  154. package/dist/viewer/{p-c62cb926.entry.js → p-f359a9ac.entry.js} +1 -1
  155. package/dist/viewer/{p-e07377fa.entry.js → p-fa7f2d0c.entry.js} +1 -1
  156. package/dist/viewer/{p-915d95ad.entry.js → p-ffde162f.entry.js} +1 -1
  157. package/dist/viewer/viewer.esm.js +1 -1
  158. package/package.json +8 -8
  159. package/dist/viewer/p-085e908a.js +0 -4
  160. package/dist/viewer/p-0aba71fd.js +0 -18
  161. package/dist/viewer/p-423410be.js +0 -4
  162. package/dist/viewer/p-432267bc.entry.js +0 -4
  163. package/dist/viewer/p-7cad9bf4.js +0 -4
  164. package/dist/viewer/p-d90f2f6d.entry.js +0 -4
  165. package/dist/viewer/p-f755af5a.entry.js +0 -4
  166. package/dist/viewer/p-f7cb7e59.js +0 -4
  167. package/dist/viewer/p-fe11d694.js +0 -4
@@ -15509,6 +15509,39 @@ function makePerspective(near, far, fovY, aspect) {
15509
15509
  var bottom = -ymax;
15510
15510
  return makeFrustum(left, right, top, bottom, near, far);
15511
15511
  }
15512
+ /**
15513
+ * Creates an orthographic projection matrix.
15514
+ *
15515
+ * Related to: gluOrtho. The viewing volume is cube-shaped and defined by
15516
+ * the six parameters. The left and right values represent the coordinates of
15517
+ * the vertical clipping planes, top and bottom values represent the coordinates
15518
+ * of the horizontal clipping planes, and near and far values represent the
15519
+ * coordinates of the depth clipping planes.
15520
+ *
15521
+ * @param left The coordinate of the left horizontal clipping plane.
15522
+ * @param right The coordinate of the right horizontal clipping plane.
15523
+ * @param bottom The coordinate of the bottom vertical clipping plane.
15524
+ * @param top The coordinate of the top vertical clipping plane.
15525
+ * @param near The coordinate of the near depth clipping plane.
15526
+ * @param far The coordinate of the far depth clipping plane.
15527
+ * @returns A matrix.
15528
+ */
15529
+ function makeOrthographic(left, right, bottom, top, near, far) {
15530
+ var w = 1.0 / (right - left);
15531
+ var h = 1.0 / (top - bottom);
15532
+ var d = 1.0 / (far - near);
15533
+ var x = (right + left) * w;
15534
+ var y = (top + bottom) * h;
15535
+ var z = (far + near) / d;
15536
+ /* eslint-disable prettier/prettier */
15537
+ return [
15538
+ 2 * w, 0, 0, -x,
15539
+ 0, 2 * h, 0, -y,
15540
+ 0, 0, -2 * d, -z,
15541
+ 0, 0, 0, 1
15542
+ ];
15543
+ /* eslint-enable prettier/prettier */
15544
+ }
15512
15545
  /**
15513
15546
  * Matrix becomes a combination of an inverse translation and rotation.
15514
15547
  *
@@ -15769,6 +15802,7 @@ var matrix4 = /*#__PURE__*/Object.freeze({
15769
15802
  makeRotationAxis: makeRotationAxis,
15770
15803
  makeFrustum: makeFrustum,
15771
15804
  makePerspective: makePerspective,
15805
+ makeOrthographic: makeOrthographic,
15772
15806
  makeLookAtView: makeLookAtView,
15773
15807
  makeLookAt: makeLookAt,
15774
15808
  invert: invert,
@@ -19925,6 +19959,522 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
19925
19959
  */
19926
19960
  const stream = {};
19927
19961
 
19962
+ stream.PerspectiveCamera = (function() {
19963
+
19964
+ /**
19965
+ * Properties of a PerspectiveCamera.
19966
+ * @memberof vertexvis.protobuf.stream
19967
+ * @interface IPerspectiveCamera
19968
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
19969
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
19970
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
19971
+ */
19972
+
19973
+ /**
19974
+ * Constructs a new PerspectiveCamera.
19975
+ * @memberof vertexvis.protobuf.stream
19976
+ * @classdesc Represents a PerspectiveCamera.
19977
+ * @implements IPerspectiveCamera
19978
+ * @constructor
19979
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
19980
+ */
19981
+ function PerspectiveCamera(properties) {
19982
+ if (properties)
19983
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19984
+ if (properties[keys[i]] != null)
19985
+ this[keys[i]] = properties[keys[i]];
19986
+ }
19987
+
19988
+ /**
19989
+ * PerspectiveCamera position.
19990
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
19991
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
19992
+ * @instance
19993
+ */
19994
+ PerspectiveCamera.prototype.position = null;
19995
+
19996
+ /**
19997
+ * PerspectiveCamera lookAt.
19998
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
19999
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20000
+ * @instance
20001
+ */
20002
+ PerspectiveCamera.prototype.lookAt = null;
20003
+
20004
+ /**
20005
+ * PerspectiveCamera up.
20006
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
20007
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20008
+ * @instance
20009
+ */
20010
+ PerspectiveCamera.prototype.up = null;
20011
+
20012
+ /**
20013
+ * Creates a new PerspectiveCamera instance using the specified properties.
20014
+ * @function create
20015
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20016
+ * @static
20017
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
20018
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
20019
+ */
20020
+ PerspectiveCamera.create = function create(properties) {
20021
+ return new PerspectiveCamera(properties);
20022
+ };
20023
+
20024
+ /**
20025
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
20026
+ * @function encode
20027
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20028
+ * @static
20029
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
20030
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20031
+ * @returns {$protobuf.Writer} Writer
20032
+ */
20033
+ PerspectiveCamera.encode = function encode(message, writer) {
20034
+ if (!writer)
20035
+ writer = $Writer$1.create();
20036
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
20037
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
20038
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
20039
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20040
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
20041
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
20042
+ return writer;
20043
+ };
20044
+
20045
+ /**
20046
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
20047
+ * @function encodeDelimited
20048
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20049
+ * @static
20050
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
20051
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20052
+ * @returns {$protobuf.Writer} Writer
20053
+ */
20054
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
20055
+ return this.encode(message, writer).ldelim();
20056
+ };
20057
+
20058
+ /**
20059
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
20060
+ * @function decode
20061
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20062
+ * @static
20063
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20064
+ * @param {number} [length] Message length if known beforehand
20065
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
20066
+ * @throws {Error} If the payload is not a reader or valid buffer
20067
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20068
+ */
20069
+ PerspectiveCamera.decode = function decode(reader, length) {
20070
+ if (!(reader instanceof $Reader$1))
20071
+ reader = $Reader$1.create(reader);
20072
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
20073
+ while (reader.pos < end) {
20074
+ let tag = reader.uint32();
20075
+ switch (tag >>> 3) {
20076
+ case 1:
20077
+ message.position = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20078
+ break;
20079
+ case 2:
20080
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20081
+ break;
20082
+ case 3:
20083
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20084
+ break;
20085
+ default:
20086
+ reader.skipType(tag & 7);
20087
+ break;
20088
+ }
20089
+ }
20090
+ return message;
20091
+ };
20092
+
20093
+ /**
20094
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
20095
+ * @function decodeDelimited
20096
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20097
+ * @static
20098
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20099
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
20100
+ * @throws {Error} If the payload is not a reader or valid buffer
20101
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20102
+ */
20103
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
20104
+ if (!(reader instanceof $Reader$1))
20105
+ reader = new $Reader$1(reader);
20106
+ return this.decode(reader, reader.uint32());
20107
+ };
20108
+
20109
+ /**
20110
+ * Verifies a PerspectiveCamera message.
20111
+ * @function verify
20112
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20113
+ * @static
20114
+ * @param {Object.<string,*>} message Plain object to verify
20115
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
20116
+ */
20117
+ PerspectiveCamera.verify = function verify(message) {
20118
+ if (typeof message !== "object" || message === null)
20119
+ return "object expected";
20120
+ if (message.position != null && message.hasOwnProperty("position")) {
20121
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
20122
+ if (error)
20123
+ return "position." + error;
20124
+ }
20125
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
20126
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
20127
+ if (error)
20128
+ return "lookAt." + error;
20129
+ }
20130
+ if (message.up != null && message.hasOwnProperty("up")) {
20131
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
20132
+ if (error)
20133
+ return "up." + error;
20134
+ }
20135
+ return null;
20136
+ };
20137
+
20138
+ /**
20139
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
20140
+ * @function fromObject
20141
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20142
+ * @static
20143
+ * @param {Object.<string,*>} object Plain object
20144
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
20145
+ */
20146
+ PerspectiveCamera.fromObject = function fromObject(object) {
20147
+ if (object instanceof $root$1.vertexvis.protobuf.stream.PerspectiveCamera)
20148
+ return object;
20149
+ let message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
20150
+ if (object.position != null) {
20151
+ if (typeof object.position !== "object")
20152
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
20153
+ message.position = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
20154
+ }
20155
+ if (object.lookAt != null) {
20156
+ if (typeof object.lookAt !== "object")
20157
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
20158
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
20159
+ }
20160
+ if (object.up != null) {
20161
+ if (typeof object.up !== "object")
20162
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
20163
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
20164
+ }
20165
+ return message;
20166
+ };
20167
+
20168
+ /**
20169
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
20170
+ * @function toObject
20171
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20172
+ * @static
20173
+ * @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
20174
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
20175
+ * @returns {Object.<string,*>} Plain object
20176
+ */
20177
+ PerspectiveCamera.toObject = function toObject(message, options) {
20178
+ if (!options)
20179
+ options = {};
20180
+ let object = {};
20181
+ if (options.defaults) {
20182
+ object.position = null;
20183
+ object.lookAt = null;
20184
+ object.up = null;
20185
+ }
20186
+ if (message.position != null && message.hasOwnProperty("position"))
20187
+ object.position = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
20188
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
20189
+ object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
20190
+ if (message.up != null && message.hasOwnProperty("up"))
20191
+ object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
20192
+ return object;
20193
+ };
20194
+
20195
+ /**
20196
+ * Converts this PerspectiveCamera to JSON.
20197
+ * @function toJSON
20198
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
20199
+ * @instance
20200
+ * @returns {Object.<string,*>} JSON object
20201
+ */
20202
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
20203
+ return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
20204
+ };
20205
+
20206
+ return PerspectiveCamera;
20207
+ })();
20208
+
20209
+ stream.OrthographicCamera = (function() {
20210
+
20211
+ /**
20212
+ * Properties of an OrthographicCamera.
20213
+ * @memberof vertexvis.protobuf.stream
20214
+ * @interface IOrthographicCamera
20215
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
20216
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
20217
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
20218
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
20219
+ */
20220
+
20221
+ /**
20222
+ * Constructs a new OrthographicCamera.
20223
+ * @memberof vertexvis.protobuf.stream
20224
+ * @classdesc Represents an OrthographicCamera.
20225
+ * @implements IOrthographicCamera
20226
+ * @constructor
20227
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
20228
+ */
20229
+ function OrthographicCamera(properties) {
20230
+ if (properties)
20231
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20232
+ if (properties[keys[i]] != null)
20233
+ this[keys[i]] = properties[keys[i]];
20234
+ }
20235
+
20236
+ /**
20237
+ * OrthographicCamera viewVector.
20238
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
20239
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20240
+ * @instance
20241
+ */
20242
+ OrthographicCamera.prototype.viewVector = null;
20243
+
20244
+ /**
20245
+ * OrthographicCamera lookAt.
20246
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
20247
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20248
+ * @instance
20249
+ */
20250
+ OrthographicCamera.prototype.lookAt = null;
20251
+
20252
+ /**
20253
+ * OrthographicCamera up.
20254
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
20255
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20256
+ * @instance
20257
+ */
20258
+ OrthographicCamera.prototype.up = null;
20259
+
20260
+ /**
20261
+ * OrthographicCamera fovHeight.
20262
+ * @member {number} fovHeight
20263
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20264
+ * @instance
20265
+ */
20266
+ OrthographicCamera.prototype.fovHeight = 0;
20267
+
20268
+ /**
20269
+ * Creates a new OrthographicCamera instance using the specified properties.
20270
+ * @function create
20271
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20272
+ * @static
20273
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
20274
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
20275
+ */
20276
+ OrthographicCamera.create = function create(properties) {
20277
+ return new OrthographicCamera(properties);
20278
+ };
20279
+
20280
+ /**
20281
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
20282
+ * @function encode
20283
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20284
+ * @static
20285
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
20286
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20287
+ * @returns {$protobuf.Writer} Writer
20288
+ */
20289
+ OrthographicCamera.encode = function encode(message, writer) {
20290
+ if (!writer)
20291
+ writer = $Writer$1.create();
20292
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
20293
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
20294
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
20295
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20296
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
20297
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
20298
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
20299
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
20300
+ return writer;
20301
+ };
20302
+
20303
+ /**
20304
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
20305
+ * @function encodeDelimited
20306
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20307
+ * @static
20308
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
20309
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20310
+ * @returns {$protobuf.Writer} Writer
20311
+ */
20312
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
20313
+ return this.encode(message, writer).ldelim();
20314
+ };
20315
+
20316
+ /**
20317
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
20318
+ * @function decode
20319
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20320
+ * @static
20321
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20322
+ * @param {number} [length] Message length if known beforehand
20323
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
20324
+ * @throws {Error} If the payload is not a reader or valid buffer
20325
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20326
+ */
20327
+ OrthographicCamera.decode = function decode(reader, length) {
20328
+ if (!(reader instanceof $Reader$1))
20329
+ reader = $Reader$1.create(reader);
20330
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
20331
+ while (reader.pos < end) {
20332
+ let tag = reader.uint32();
20333
+ switch (tag >>> 3) {
20334
+ case 1:
20335
+ message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20336
+ break;
20337
+ case 2:
20338
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20339
+ break;
20340
+ case 3:
20341
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20342
+ break;
20343
+ case 4:
20344
+ message.fovHeight = reader.float();
20345
+ break;
20346
+ default:
20347
+ reader.skipType(tag & 7);
20348
+ break;
20349
+ }
20350
+ }
20351
+ return message;
20352
+ };
20353
+
20354
+ /**
20355
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
20356
+ * @function decodeDelimited
20357
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20358
+ * @static
20359
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20360
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
20361
+ * @throws {Error} If the payload is not a reader or valid buffer
20362
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20363
+ */
20364
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
20365
+ if (!(reader instanceof $Reader$1))
20366
+ reader = new $Reader$1(reader);
20367
+ return this.decode(reader, reader.uint32());
20368
+ };
20369
+
20370
+ /**
20371
+ * Verifies an OrthographicCamera message.
20372
+ * @function verify
20373
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20374
+ * @static
20375
+ * @param {Object.<string,*>} message Plain object to verify
20376
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
20377
+ */
20378
+ OrthographicCamera.verify = function verify(message) {
20379
+ if (typeof message !== "object" || message === null)
20380
+ return "object expected";
20381
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
20382
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
20383
+ if (error)
20384
+ return "viewVector." + error;
20385
+ }
20386
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
20387
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
20388
+ if (error)
20389
+ return "lookAt." + error;
20390
+ }
20391
+ if (message.up != null && message.hasOwnProperty("up")) {
20392
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
20393
+ if (error)
20394
+ return "up." + error;
20395
+ }
20396
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
20397
+ if (typeof message.fovHeight !== "number")
20398
+ return "fovHeight: number expected";
20399
+ return null;
20400
+ };
20401
+
20402
+ /**
20403
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
20404
+ * @function fromObject
20405
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20406
+ * @static
20407
+ * @param {Object.<string,*>} object Plain object
20408
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
20409
+ */
20410
+ OrthographicCamera.fromObject = function fromObject(object) {
20411
+ if (object instanceof $root$1.vertexvis.protobuf.stream.OrthographicCamera)
20412
+ return object;
20413
+ let message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
20414
+ if (object.viewVector != null) {
20415
+ if (typeof object.viewVector !== "object")
20416
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
20417
+ message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
20418
+ }
20419
+ if (object.lookAt != null) {
20420
+ if (typeof object.lookAt !== "object")
20421
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
20422
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
20423
+ }
20424
+ if (object.up != null) {
20425
+ if (typeof object.up !== "object")
20426
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
20427
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
20428
+ }
20429
+ if (object.fovHeight != null)
20430
+ message.fovHeight = Number(object.fovHeight);
20431
+ return message;
20432
+ };
20433
+
20434
+ /**
20435
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
20436
+ * @function toObject
20437
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20438
+ * @static
20439
+ * @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
20440
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
20441
+ * @returns {Object.<string,*>} Plain object
20442
+ */
20443
+ OrthographicCamera.toObject = function toObject(message, options) {
20444
+ if (!options)
20445
+ options = {};
20446
+ let object = {};
20447
+ if (options.defaults) {
20448
+ object.viewVector = null;
20449
+ object.lookAt = null;
20450
+ object.up = null;
20451
+ object.fovHeight = 0;
20452
+ }
20453
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
20454
+ object.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
20455
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
20456
+ object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
20457
+ if (message.up != null && message.hasOwnProperty("up"))
20458
+ object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
20459
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
20460
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
20461
+ return object;
20462
+ };
20463
+
20464
+ /**
20465
+ * Converts this OrthographicCamera to JSON.
20466
+ * @function toJSON
20467
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
20468
+ * @instance
20469
+ * @returns {Object.<string,*>} JSON object
20470
+ */
20471
+ OrthographicCamera.prototype.toJSON = function toJSON() {
20472
+ return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
20473
+ };
20474
+
20475
+ return OrthographicCamera;
20476
+ })();
20477
+
19928
20478
  stream.Camera = (function() {
19929
20479
 
19930
20480
  /**
@@ -19934,6 +20484,8 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
19934
20484
  * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
19935
20485
  * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
19936
20486
  * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
20487
+ * @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
20488
+ * @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
19937
20489
  */
19938
20490
 
19939
20491
  /**
@@ -19975,6 +20527,36 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
19975
20527
  */
19976
20528
  Camera.prototype.up = null;
19977
20529
 
20530
+ /**
20531
+ * Camera perspective.
20532
+ * @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
20533
+ * @memberof vertexvis.protobuf.stream.Camera
20534
+ * @instance
20535
+ */
20536
+ Camera.prototype.perspective = null;
20537
+
20538
+ /**
20539
+ * Camera orthographic.
20540
+ * @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
20541
+ * @memberof vertexvis.protobuf.stream.Camera
20542
+ * @instance
20543
+ */
20544
+ Camera.prototype.orthographic = null;
20545
+
20546
+ // OneOf field names bound to virtual getters and setters
20547
+ let $oneOfFields;
20548
+
20549
+ /**
20550
+ * Camera type.
20551
+ * @member {"perspective"|"orthographic"|undefined} type
20552
+ * @memberof vertexvis.protobuf.stream.Camera
20553
+ * @instance
20554
+ */
20555
+ Object.defineProperty(Camera.prototype, "type", {
20556
+ get: $util$1.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
20557
+ set: $util$1.oneOfSetter($oneOfFields)
20558
+ });
20559
+
19978
20560
  /**
19979
20561
  * Creates a new Camera instance using the specified properties.
19980
20562
  * @function create
@@ -20005,6 +20587,10 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20005
20587
  $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20006
20588
  if (message.up != null && Object.hasOwnProperty.call(message, "up"))
20007
20589
  $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
20590
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
20591
+ $root$1.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
20592
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
20593
+ $root$1.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
20008
20594
  return writer;
20009
20595
  };
20010
20596
 
@@ -20048,6 +20634,12 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20048
20634
  case 3:
20049
20635
  message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
20050
20636
  break;
20637
+ case 4:
20638
+ message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
20639
+ break;
20640
+ case 5:
20641
+ message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
20642
+ break;
20051
20643
  default:
20052
20644
  reader.skipType(tag & 7);
20053
20645
  break;
@@ -20083,6 +20675,7 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20083
20675
  Camera.verify = function verify(message) {
20084
20676
  if (typeof message !== "object" || message === null)
20085
20677
  return "object expected";
20678
+ let properties = {};
20086
20679
  if (message.position != null && message.hasOwnProperty("position")) {
20087
20680
  let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
20088
20681
  if (error)
@@ -20098,6 +20691,24 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20098
20691
  if (error)
20099
20692
  return "up." + error;
20100
20693
  }
20694
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
20695
+ properties.type = 1;
20696
+ {
20697
+ let error = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
20698
+ if (error)
20699
+ return "perspective." + error;
20700
+ }
20701
+ }
20702
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
20703
+ if (properties.type === 1)
20704
+ return "type: multiple values";
20705
+ properties.type = 1;
20706
+ {
20707
+ let error = $root$1.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
20708
+ if (error)
20709
+ return "orthographic." + error;
20710
+ }
20711
+ }
20101
20712
  return null;
20102
20713
  };
20103
20714
 
@@ -20128,6 +20739,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20128
20739
  throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
20129
20740
  message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
20130
20741
  }
20742
+ if (object.perspective != null) {
20743
+ if (typeof object.perspective !== "object")
20744
+ throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
20745
+ message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
20746
+ }
20747
+ if (object.orthographic != null) {
20748
+ if (typeof object.orthographic !== "object")
20749
+ throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
20750
+ message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
20751
+ }
20131
20752
  return message;
20132
20753
  };
20133
20754
 
@@ -20155,6 +20776,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
20155
20776
  object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
20156
20777
  if (message.up != null && message.hasOwnProperty("up"))
20157
20778
  object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
20779
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
20780
+ object.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
20781
+ if (options.oneofs)
20782
+ object.type = "perspective";
20783
+ }
20784
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
20785
+ object.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
20786
+ if (options.oneofs)
20787
+ object.type = "orthographic";
20788
+ }
20158
20789
  return object;
20159
20790
  };
20160
20791
 
@@ -53062,25 +53693,128 @@ const defaultAnimationConfig = {
53062
53693
  durationMs: DEFAULT_ANIMATION_DURATION,
53063
53694
  };
53064
53695
 
53065
- function fromBoundingBoxAndLookAtCamera(boundingBox$1, camera) {
53696
+ function isPerspectiveFrameCamera(camera) {
53697
+ return camera.position != null;
53698
+ }
53699
+ function isOrthographicFrameCamera(camera) {
53700
+ const asOrtho = camera;
53701
+ return asOrtho.viewVector != null && asOrtho.fovHeight != null;
53702
+ }
53703
+ function withPositionAndViewVector(camera) {
53704
+ if (isOrthographicFrameCamera(camera)) {
53705
+ return Object.assign(Object.assign({}, camera), { position: vector3.add(camera.lookAt, vector3.negate(camera.viewVector)) });
53706
+ }
53707
+ else {
53708
+ return Object.assign(Object.assign({}, camera), { viewVector: vector3.subtract(camera.lookAt, camera.position) });
53709
+ }
53710
+ }
53711
+ function toOrthographic(data) {
53712
+ const viewVector = vector3.subtract(data.lookAt, data.position);
53713
+ return {
53714
+ viewVector,
53715
+ up: data.up,
53716
+ lookAt: data.lookAt,
53717
+ fovHeight: 2 *
53718
+ vector3.magnitude(viewVector) *
53719
+ Math.tan(angle.toRadians(data.fovY / 2.0)),
53720
+ };
53721
+ }
53722
+ function toPerspective(data, fovY = 45) {
53723
+ const expectedMagnitude = data.fovHeight / (2 * Math.tan(angle.toRadians(fovY / 2)));
53724
+ const receivedMagnitude = vector3.magnitude(data.viewVector);
53725
+ const magnitudeScale = expectedMagnitude / receivedMagnitude;
53726
+ return {
53727
+ position: vector3.add(data.lookAt, vector3.negate(vector3.scale(magnitudeScale, data.viewVector))),
53728
+ up: data.up,
53729
+ lookAt: data.lookAt,
53730
+ fovY,
53731
+ };
53732
+ }
53733
+ function toProtobuf(camera) {
53734
+ if (isOrthographicFrameCamera(camera)) {
53735
+ return {
53736
+ orthographic: {
53737
+ viewVector: Object.assign({}, camera.viewVector),
53738
+ lookAt: Object.assign({}, camera.lookAt),
53739
+ up: Object.assign({}, camera.up),
53740
+ fovHeight: camera.fovHeight,
53741
+ },
53742
+ };
53743
+ }
53744
+ else if (isPerspectiveFrameCamera(camera)) {
53745
+ return {
53746
+ perspective: {
53747
+ position: Object.assign({}, camera.position),
53748
+ lookAt: Object.assign({}, camera.lookAt),
53749
+ up: Object.assign({}, camera.up),
53750
+ },
53751
+ position: Object.assign({}, camera.position),
53752
+ lookAt: Object.assign({}, camera.lookAt),
53753
+ up: Object.assign({}, camera.up),
53754
+ };
53755
+ }
53756
+ else {
53757
+ return Object.assign({}, camera);
53758
+ }
53759
+ }
53760
+
53761
+ function fromBoundingBoxAndLookAtCamera(boundingBox, camera) {
53762
+ return isOrthographicFrameCamera(camera)
53763
+ ? fromBoundingBoxAndOrthographicCamera(boundingBox, camera)
53764
+ : fromBoundingBoxAndPerspectiveCamera(boundingBox, camera);
53765
+ }
53766
+ // Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/PerspectiveCamera.java#L65
53767
+ // and needs to remain in sync with that computation.
53768
+ // TODO: revisit computation of these values in a single location
53769
+ function fromBoundingBoxAndPerspectiveCamera(boundingBox$1, camera) {
53066
53770
  const boundingBoxCenter = boundingBox.center(boundingBox$1);
53067
- const cameraToCenter = vector3.subtract(camera.position, boundingBoxCenter);
53068
53771
  const centerToBoundingPlane = vector3.subtract(boundingBox$1.max, boundingBoxCenter);
53069
- const distanceToCenterAlongViewVec = Math.abs(vector3.dot(vector3.subtract(camera.lookAt, camera.position), cameraToCenter)) / vector3.magnitude(vector3.subtract(camera.lookAt, camera.position));
53070
- const radius = 1.1 * vector3.magnitude(centerToBoundingPlane);
53071
- let far = distanceToCenterAlongViewVec + radius;
53072
- let near = far * 0.01;
53073
- if (near > distanceToCenterAlongViewVec - radius) {
53074
- if (near > 1000) {
53075
- const difference = near - 1000;
53076
- near = 1000;
53077
- far -= difference;
53772
+ const radius = vector3.magnitude(centerToBoundingPlane);
53773
+ const length = Math.max(radius, vector3.magnitude(boundingBoxCenter));
53774
+ const epsilon = length === 0 ? 1.0 : length * 1e-6;
53775
+ const minRange = epsilon * 1e2;
53776
+ const signedDistToEye = vector3.dot(vector3.subtract(boundingBoxCenter, camera.position), vector3.normalize(vector3.subtract(camera.lookAt, camera.position)));
53777
+ const bRadius = Math.max(radius, minRange);
53778
+ let newFar = bRadius + signedDistToEye < minRange
53779
+ ? bRadius * 3.0
53780
+ : bRadius + signedDistToEye;
53781
+ let newNear = newFar - bRadius * 2.0 < minRange
53782
+ ? Math.min(minRange, newFar)
53783
+ : newFar - bRadius * 2.0;
53784
+ if (newFar - newNear < minRange) {
53785
+ newNear = Math.max(newNear, minRange);
53786
+ newFar += newNear + minRange;
53787
+ }
53788
+ else if (newNear / newFar < 0.0001) {
53789
+ newNear = newFar * 0.0001;
53790
+ }
53791
+ if (newNear > newFar - bRadius * 2.0) {
53792
+ if (newNear > 1000 + minRange) {
53793
+ newFar -= newNear - 1000;
53794
+ newNear = 1000;
53078
53795
  }
53079
53796
  }
53080
- else {
53081
- near = distanceToCenterAlongViewVec - radius;
53082
- }
53083
- return { far, near };
53797
+ return {
53798
+ near: newNear,
53799
+ far: newFar,
53800
+ };
53801
+ }
53802
+ // Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/OrthographicCamera.java#L35
53803
+ // and needs to remain in sync with that computation.
53804
+ // TODO: revisit computation of these values in a single location
53805
+ function fromBoundingBoxAndOrthographicCamera(boundingBox$1, camera) {
53806
+ const boundingBoxCenter = boundingBox.center(boundingBox$1);
53807
+ const centerToBoundingPlane = vector3.subtract(boundingBox$1.max, boundingBoxCenter);
53808
+ const radius = vector3.magnitude(centerToBoundingPlane);
53809
+ const length = Math.max(radius, vector3.magnitude(boundingBoxCenter));
53810
+ const epsilon = length === 0 ? 1.0 : length * 1e-6;
53811
+ const minRange = epsilon * 1e2;
53812
+ const projCenter = vector3.dot(vector3.subtract(boundingBoxCenter, camera.lookAt), camera.viewVector);
53813
+ const bRadius = Math.max(radius, minRange);
53814
+ return {
53815
+ near: projCenter - bRadius,
53816
+ far: projCenter + bRadius,
53817
+ };
53084
53818
  }
53085
53819
 
53086
53820
  function create$2(data = {}) {
@@ -53182,6 +53916,13 @@ class InvalidArgumentError extends CustomError {
53182
53916
  Object.setPrototypeOf(this, InvalidArgumentError.prototype);
53183
53917
  }
53184
53918
  }
53919
+ class InvalidCameraError extends CustomError {
53920
+ constructor(message, e) {
53921
+ super(message, e);
53922
+ // Allows for `instanceof` checks.
53923
+ Object.setPrototypeOf(this, InvalidCameraError.prototype);
53924
+ }
53925
+ }
53185
53926
 
53186
53927
  function fromUrn(urn) {
53187
53928
  const uri$1 = uri.parse(urn);
@@ -53581,19 +54322,14 @@ class FrameScene {
53581
54322
  this.hasChanged = hasChanged;
53582
54323
  }
53583
54324
  }
53584
- class FramePerspectiveCamera {
53585
- constructor(position, lookAt, up, near, far, aspectRatio, fovY) {
54325
+ class FrameCameraBase {
54326
+ constructor(position, lookAt, up, near, far, aspectRatio) {
53586
54327
  this.position = position;
53587
54328
  this.lookAt = lookAt;
53588
54329
  this.up = up;
53589
54330
  this.near = near;
53590
54331
  this.far = far;
53591
54332
  this.aspectRatio = aspectRatio;
53592
- this.fovY = fovY;
53593
- }
53594
- static fromBoundingBox(camera, boundingBox, aspectRatio) {
53595
- const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
53596
- return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
53597
54333
  }
53598
54334
  get direction() {
53599
54335
  return vector3.normalize(this.viewVector);
@@ -53616,22 +54352,14 @@ class FramePerspectiveCamera {
53616
54352
  get projectionViewMatrix() {
53617
54353
  return this.computeCameraMatrices().projectionViewMatrix;
53618
54354
  }
53619
- computeCameraMatrices() {
53620
- if (this.cameraMatrices == null) {
53621
- const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
53622
- const worldMatrix = matrix4.invert(viewMatrix);
53623
- const projectionMatrix = matrix4.makePerspective(this.near, this.far, this.fovY, this.aspectRatio);
53624
- const projectionMatrixInverse = matrix4.invert(projectionMatrix);
53625
- const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
53626
- this.cameraMatrices = {
53627
- viewMatrix,
53628
- worldMatrix,
53629
- projectionMatrix,
53630
- projectionMatrixInverse,
53631
- projectionViewMatrix,
53632
- };
54355
+ static fromBoundingBox(camera, boundingBox, aspectRatio) {
54356
+ const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
54357
+ if (isOrthographicFrameCamera(camera)) {
54358
+ return new FrameOrthographicCamera(camera.viewVector, camera.lookAt, camera.up, near, far, aspectRatio, camera.fovHeight);
54359
+ }
54360
+ else {
54361
+ return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
53633
54362
  }
53634
- return this.cameraMatrices;
53635
54363
  }
53636
54364
  /**
53637
54365
  * Checks if the given point, in world space, is behind the near plane
@@ -53662,6 +54390,83 @@ class FramePerspectiveCamera {
53662
54390
  const pt = plane.intersectLine(nearP, vl);
53663
54391
  return pt != null ? vector3.add(pt, position) : undefined;
53664
54392
  }
54393
+ computeCameraMatrices() {
54394
+ if (this.cameraMatrices == null) {
54395
+ return {
54396
+ viewMatrix: matrix4.makeIdentity(),
54397
+ worldMatrix: matrix4.makeIdentity(),
54398
+ projectionMatrix: matrix4.makeIdentity(),
54399
+ projectionMatrixInverse: matrix4.makeIdentity(),
54400
+ projectionViewMatrix: matrix4.makeIdentity(),
54401
+ };
54402
+ }
54403
+ return this.cameraMatrices;
54404
+ }
54405
+ updateCameraMatrices(cameraMatrices) {
54406
+ this.cameraMatrices = cameraMatrices;
54407
+ return this.cameraMatrices;
54408
+ }
54409
+ }
54410
+ class FramePerspectiveCamera extends FrameCameraBase {
54411
+ constructor(position, lookAt, up, near, far, aspectRatio, fovY) {
54412
+ super(position, lookAt, up, near, far, aspectRatio);
54413
+ this.position = position;
54414
+ this.lookAt = lookAt;
54415
+ this.up = up;
54416
+ this.near = near;
54417
+ this.far = far;
54418
+ this.aspectRatio = aspectRatio;
54419
+ this.fovY = fovY;
54420
+ }
54421
+ computeCameraMatrices() {
54422
+ if (this.cameraMatrices == null) {
54423
+ const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
54424
+ const worldMatrix = matrix4.invert(viewMatrix);
54425
+ const projectionMatrix = matrix4.makePerspective(this.near, this.far, this.fovY, this.aspectRatio);
54426
+ const projectionMatrixInverse = matrix4.invert(projectionMatrix);
54427
+ const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
54428
+ return super.updateCameraMatrices({
54429
+ viewMatrix,
54430
+ worldMatrix,
54431
+ projectionMatrix,
54432
+ projectionMatrixInverse,
54433
+ projectionViewMatrix,
54434
+ });
54435
+ }
54436
+ return this.cameraMatrices;
54437
+ }
54438
+ }
54439
+ class FrameOrthographicCamera extends FrameCameraBase {
54440
+ constructor(viewVector, lookAt, up, near, far, aspectRatio, fovHeight) {
54441
+ super(vector3.add(lookAt, vector3.negate(viewVector)), lookAt, up, near, far, aspectRatio);
54442
+ this.lookAt = lookAt;
54443
+ this.up = up;
54444
+ this.near = near;
54445
+ this.far = far;
54446
+ this.aspectRatio = aspectRatio;
54447
+ this.fovHeight = fovHeight;
54448
+ this.top = fovHeight * 0.5;
54449
+ this.bottom = -this.top;
54450
+ this.right = this.top * aspectRatio;
54451
+ this.left = -this.right;
54452
+ }
54453
+ computeCameraMatrices() {
54454
+ if (this.cameraMatrices == null) {
54455
+ const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
54456
+ const worldMatrix = matrix4.invert(viewMatrix);
54457
+ const projectionMatrix = matrix4.makeOrthographic(this.left, this.right, this.bottom, this.top, this.near, this.far);
54458
+ const projectionMatrixInverse = matrix4.invert(projectionMatrix);
54459
+ const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
54460
+ return super.updateCameraMatrices({
54461
+ viewMatrix,
54462
+ worldMatrix,
54463
+ projectionMatrix,
54464
+ projectionMatrixInverse,
54465
+ projectionViewMatrix,
54466
+ });
54467
+ }
54468
+ return this.cameraMatrices;
54469
+ }
53665
54470
  }
53666
54471
 
53667
54472
  class ArrowMarkup {
@@ -54600,7 +55405,29 @@ function fromPbScalarWrapper() {
54600
55405
  return mapper.defineMapper((value) => (value === null || value === void 0 ? void 0 : value.value) || undefined, (value) => value);
54601
55406
  }
54602
55407
 
54603
- const fromPbCamera = mapper.defineMapper(mapper.read(mapper.mapProp('position', mapper.compose(mapper.required('position'), fromPbVector3f)), mapper.mapProp('lookAt', mapper.compose(mapper.required('lookAt'), fromPbVector3f)), mapper.mapProp('up', mapper.compose(mapper.required('up'), fromPbVector3f))), ([position, lookAt, up]) => ({ position, lookAt, up }));
55408
+ const fromPbPerspectiveCamera = mapper.defineMapper(mapper.read(mapper.mapProp('position', mapper.compose(mapper.required('position'), fromPbVector3f)), mapper.mapProp('lookAt', mapper.compose(mapper.required('lookAt'), fromPbVector3f)), mapper.mapProp('up', mapper.compose(mapper.required('up'), fromPbVector3f))), ([position, lookAt, up]) => ({
55409
+ position,
55410
+ lookAt,
55411
+ up,
55412
+ // TODO: map fovY property when available
55413
+ fovY: 45,
55414
+ }));
55415
+ const fromPbOrthographicCamera = mapper.defineMapper(mapper.read(mapper.mapProp('viewVector', mapper.compose(mapper.required('viewVector'), fromPbVector3f)), mapper.mapProp('lookAt', mapper.compose(mapper.required('lookAt'), fromPbVector3f)), mapper.mapProp('up', mapper.compose(mapper.required('up'), fromPbVector3f)), mapper.mapProp('fovHeight', mapper.required('fovHeight'))), ([viewVector, lookAt, up, fovHeight]) => ({
55416
+ viewVector,
55417
+ lookAt,
55418
+ up,
55419
+ fovHeight,
55420
+ }));
55421
+ const fromPbCamera = mapper.defineMapper(mapper.read(mapper.mapProp('position', mapper.ifDefined(fromPbVector3f)), mapper.mapProp('lookAt', mapper.ifDefined(fromPbVector3f)), mapper.mapProp('up', mapper.ifDefined(fromPbVector3f)), mapper.mapProp('perspective', mapper.ifDefined(fromPbPerspectiveCamera)), mapper.mapProp('orthographic', mapper.ifDefined(fromPbOrthographicCamera))), ([position, lookAt, up, perspective, orthographic]) => {
55422
+ var _a;
55423
+ return (_a = perspective !== null && perspective !== void 0 ? perspective : orthographic) !== null && _a !== void 0 ? _a : {
55424
+ position: position !== null && position !== void 0 ? position : vector3.back(),
55425
+ lookAt: lookAt !== null && lookAt !== void 0 ? lookAt : vector3.origin(),
55426
+ up: up !== null && up !== void 0 ? up : vector3.up(),
55427
+ // TODO: map fovY property when available
55428
+ fovY: 45,
55429
+ };
55430
+ });
54604
55431
  const fromPbSectionPlane = mapper.defineMapper(mapper.read(mapper.mapProp('normal', mapper.compose(mapper.required('normal'), fromPbVector3f)), mapper.requiredProp('offset')), ([normal, offset]) => ({ normal, offset }));
54605
55432
  const fromPbImageAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('frameDimensions', mapper.compose(mapper.required('frameDimensions'), fromPbDim)), mapper.mapProp('imageRect', mapper.compose(mapper.required('imageRect'), fromPbRect)), mapper.mapProp('scaleFactor', mapper.required('scaleFactor'))), ([frameDimensions, imageRect, imageScale]) => ({
54606
55433
  frameDimensions,
@@ -54620,7 +55447,7 @@ const fromPbSceneAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('ca
54620
55447
  hasChanged,
54621
55448
  }));
54622
55449
  const fromPbFrameSceneAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('sceneAttributes', mapper.compose(mapper.required('sceneAttributes'), fromPbSceneAttributes))), ([sceneAttr]) => sceneAttr);
54623
- const fromPbFrameCamera = mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) => FramePerspectiveCamera.fromBoundingBox(sceneAttr.camera, sceneAttr.boundingBox, dimensions.aspectRatio(imageAttr.frameDimensions)));
55450
+ const fromPbFrameCamera = mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) => FrameCameraBase.fromBoundingBox(sceneAttr.camera, sceneAttr.boundingBox, dimensions.aspectRatio(imageAttr.frameDimensions)));
54624
55451
  function fromPbFrameScene(worldOrientation) {
54625
55452
  return mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameCamera), ([sceneAttr, camera]) => new FrameScene(camera, sceneAttr.boundingBox, sceneAttr.crossSectioning, worldOrientation, sceneAttr.hasChanged));
54626
55453
  }
@@ -57325,6 +58152,522 @@ const vertexvis = $root.vertexvis = (() => {
57325
58152
  */
57326
58153
  const stream = {};
57327
58154
 
58155
+ stream.PerspectiveCamera = (function() {
58156
+
58157
+ /**
58158
+ * Properties of a PerspectiveCamera.
58159
+ * @memberof vertexvis.protobuf.stream
58160
+ * @interface IPerspectiveCamera
58161
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
58162
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
58163
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
58164
+ */
58165
+
58166
+ /**
58167
+ * Constructs a new PerspectiveCamera.
58168
+ * @memberof vertexvis.protobuf.stream
58169
+ * @classdesc Represents a PerspectiveCamera.
58170
+ * @implements IPerspectiveCamera
58171
+ * @constructor
58172
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
58173
+ */
58174
+ function PerspectiveCamera(properties) {
58175
+ if (properties)
58176
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
58177
+ if (properties[keys[i]] != null)
58178
+ this[keys[i]] = properties[keys[i]];
58179
+ }
58180
+
58181
+ /**
58182
+ * PerspectiveCamera position.
58183
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
58184
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58185
+ * @instance
58186
+ */
58187
+ PerspectiveCamera.prototype.position = null;
58188
+
58189
+ /**
58190
+ * PerspectiveCamera lookAt.
58191
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
58192
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58193
+ * @instance
58194
+ */
58195
+ PerspectiveCamera.prototype.lookAt = null;
58196
+
58197
+ /**
58198
+ * PerspectiveCamera up.
58199
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
58200
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58201
+ * @instance
58202
+ */
58203
+ PerspectiveCamera.prototype.up = null;
58204
+
58205
+ /**
58206
+ * Creates a new PerspectiveCamera instance using the specified properties.
58207
+ * @function create
58208
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58209
+ * @static
58210
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
58211
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
58212
+ */
58213
+ PerspectiveCamera.create = function create(properties) {
58214
+ return new PerspectiveCamera(properties);
58215
+ };
58216
+
58217
+ /**
58218
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
58219
+ * @function encode
58220
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58221
+ * @static
58222
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
58223
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58224
+ * @returns {$protobuf.Writer} Writer
58225
+ */
58226
+ PerspectiveCamera.encode = function encode(message, writer) {
58227
+ if (!writer)
58228
+ writer = $Writer.create();
58229
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
58230
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
58231
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
58232
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
58233
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
58234
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
58235
+ return writer;
58236
+ };
58237
+
58238
+ /**
58239
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
58240
+ * @function encodeDelimited
58241
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58242
+ * @static
58243
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
58244
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58245
+ * @returns {$protobuf.Writer} Writer
58246
+ */
58247
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
58248
+ return this.encode(message, writer).ldelim();
58249
+ };
58250
+
58251
+ /**
58252
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
58253
+ * @function decode
58254
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58255
+ * @static
58256
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58257
+ * @param {number} [length] Message length if known beforehand
58258
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
58259
+ * @throws {Error} If the payload is not a reader or valid buffer
58260
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58261
+ */
58262
+ PerspectiveCamera.decode = function decode(reader, length) {
58263
+ if (!(reader instanceof $Reader))
58264
+ reader = $Reader.create(reader);
58265
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
58266
+ while (reader.pos < end) {
58267
+ let tag = reader.uint32();
58268
+ switch (tag >>> 3) {
58269
+ case 1:
58270
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58271
+ break;
58272
+ case 2:
58273
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58274
+ break;
58275
+ case 3:
58276
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58277
+ break;
58278
+ default:
58279
+ reader.skipType(tag & 7);
58280
+ break;
58281
+ }
58282
+ }
58283
+ return message;
58284
+ };
58285
+
58286
+ /**
58287
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
58288
+ * @function decodeDelimited
58289
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58290
+ * @static
58291
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58292
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
58293
+ * @throws {Error} If the payload is not a reader or valid buffer
58294
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58295
+ */
58296
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
58297
+ if (!(reader instanceof $Reader))
58298
+ reader = new $Reader(reader);
58299
+ return this.decode(reader, reader.uint32());
58300
+ };
58301
+
58302
+ /**
58303
+ * Verifies a PerspectiveCamera message.
58304
+ * @function verify
58305
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58306
+ * @static
58307
+ * @param {Object.<string,*>} message Plain object to verify
58308
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
58309
+ */
58310
+ PerspectiveCamera.verify = function verify(message) {
58311
+ if (typeof message !== "object" || message === null)
58312
+ return "object expected";
58313
+ if (message.position != null && message.hasOwnProperty("position")) {
58314
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
58315
+ if (error)
58316
+ return "position." + error;
58317
+ }
58318
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
58319
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
58320
+ if (error)
58321
+ return "lookAt." + error;
58322
+ }
58323
+ if (message.up != null && message.hasOwnProperty("up")) {
58324
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
58325
+ if (error)
58326
+ return "up." + error;
58327
+ }
58328
+ return null;
58329
+ };
58330
+
58331
+ /**
58332
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
58333
+ * @function fromObject
58334
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58335
+ * @static
58336
+ * @param {Object.<string,*>} object Plain object
58337
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
58338
+ */
58339
+ PerspectiveCamera.fromObject = function fromObject(object) {
58340
+ if (object instanceof $root.vertexvis.protobuf.stream.PerspectiveCamera)
58341
+ return object;
58342
+ let message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
58343
+ if (object.position != null) {
58344
+ if (typeof object.position !== "object")
58345
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
58346
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
58347
+ }
58348
+ if (object.lookAt != null) {
58349
+ if (typeof object.lookAt !== "object")
58350
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
58351
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
58352
+ }
58353
+ if (object.up != null) {
58354
+ if (typeof object.up !== "object")
58355
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
58356
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
58357
+ }
58358
+ return message;
58359
+ };
58360
+
58361
+ /**
58362
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
58363
+ * @function toObject
58364
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58365
+ * @static
58366
+ * @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
58367
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
58368
+ * @returns {Object.<string,*>} Plain object
58369
+ */
58370
+ PerspectiveCamera.toObject = function toObject(message, options) {
58371
+ if (!options)
58372
+ options = {};
58373
+ let object = {};
58374
+ if (options.defaults) {
58375
+ object.position = null;
58376
+ object.lookAt = null;
58377
+ object.up = null;
58378
+ }
58379
+ if (message.position != null && message.hasOwnProperty("position"))
58380
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
58381
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
58382
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
58383
+ if (message.up != null && message.hasOwnProperty("up"))
58384
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
58385
+ return object;
58386
+ };
58387
+
58388
+ /**
58389
+ * Converts this PerspectiveCamera to JSON.
58390
+ * @function toJSON
58391
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
58392
+ * @instance
58393
+ * @returns {Object.<string,*>} JSON object
58394
+ */
58395
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
58396
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
58397
+ };
58398
+
58399
+ return PerspectiveCamera;
58400
+ })();
58401
+
58402
+ stream.OrthographicCamera = (function() {
58403
+
58404
+ /**
58405
+ * Properties of an OrthographicCamera.
58406
+ * @memberof vertexvis.protobuf.stream
58407
+ * @interface IOrthographicCamera
58408
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
58409
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
58410
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
58411
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
58412
+ */
58413
+
58414
+ /**
58415
+ * Constructs a new OrthographicCamera.
58416
+ * @memberof vertexvis.protobuf.stream
58417
+ * @classdesc Represents an OrthographicCamera.
58418
+ * @implements IOrthographicCamera
58419
+ * @constructor
58420
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
58421
+ */
58422
+ function OrthographicCamera(properties) {
58423
+ if (properties)
58424
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
58425
+ if (properties[keys[i]] != null)
58426
+ this[keys[i]] = properties[keys[i]];
58427
+ }
58428
+
58429
+ /**
58430
+ * OrthographicCamera viewVector.
58431
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
58432
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58433
+ * @instance
58434
+ */
58435
+ OrthographicCamera.prototype.viewVector = null;
58436
+
58437
+ /**
58438
+ * OrthographicCamera lookAt.
58439
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
58440
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58441
+ * @instance
58442
+ */
58443
+ OrthographicCamera.prototype.lookAt = null;
58444
+
58445
+ /**
58446
+ * OrthographicCamera up.
58447
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
58448
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58449
+ * @instance
58450
+ */
58451
+ OrthographicCamera.prototype.up = null;
58452
+
58453
+ /**
58454
+ * OrthographicCamera fovHeight.
58455
+ * @member {number} fovHeight
58456
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58457
+ * @instance
58458
+ */
58459
+ OrthographicCamera.prototype.fovHeight = 0;
58460
+
58461
+ /**
58462
+ * Creates a new OrthographicCamera instance using the specified properties.
58463
+ * @function create
58464
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58465
+ * @static
58466
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
58467
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
58468
+ */
58469
+ OrthographicCamera.create = function create(properties) {
58470
+ return new OrthographicCamera(properties);
58471
+ };
58472
+
58473
+ /**
58474
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
58475
+ * @function encode
58476
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58477
+ * @static
58478
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
58479
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58480
+ * @returns {$protobuf.Writer} Writer
58481
+ */
58482
+ OrthographicCamera.encode = function encode(message, writer) {
58483
+ if (!writer)
58484
+ writer = $Writer.create();
58485
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
58486
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
58487
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
58488
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
58489
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
58490
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
58491
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
58492
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
58493
+ return writer;
58494
+ };
58495
+
58496
+ /**
58497
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
58498
+ * @function encodeDelimited
58499
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58500
+ * @static
58501
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
58502
+ * @param {$protobuf.Writer} [writer] Writer to encode to
58503
+ * @returns {$protobuf.Writer} Writer
58504
+ */
58505
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
58506
+ return this.encode(message, writer).ldelim();
58507
+ };
58508
+
58509
+ /**
58510
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
58511
+ * @function decode
58512
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58513
+ * @static
58514
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58515
+ * @param {number} [length] Message length if known beforehand
58516
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
58517
+ * @throws {Error} If the payload is not a reader or valid buffer
58518
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58519
+ */
58520
+ OrthographicCamera.decode = function decode(reader, length) {
58521
+ if (!(reader instanceof $Reader))
58522
+ reader = $Reader.create(reader);
58523
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
58524
+ while (reader.pos < end) {
58525
+ let tag = reader.uint32();
58526
+ switch (tag >>> 3) {
58527
+ case 1:
58528
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58529
+ break;
58530
+ case 2:
58531
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58532
+ break;
58533
+ case 3:
58534
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
58535
+ break;
58536
+ case 4:
58537
+ message.fovHeight = reader.float();
58538
+ break;
58539
+ default:
58540
+ reader.skipType(tag & 7);
58541
+ break;
58542
+ }
58543
+ }
58544
+ return message;
58545
+ };
58546
+
58547
+ /**
58548
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
58549
+ * @function decodeDelimited
58550
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58551
+ * @static
58552
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
58553
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
58554
+ * @throws {Error} If the payload is not a reader or valid buffer
58555
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
58556
+ */
58557
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
58558
+ if (!(reader instanceof $Reader))
58559
+ reader = new $Reader(reader);
58560
+ return this.decode(reader, reader.uint32());
58561
+ };
58562
+
58563
+ /**
58564
+ * Verifies an OrthographicCamera message.
58565
+ * @function verify
58566
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58567
+ * @static
58568
+ * @param {Object.<string,*>} message Plain object to verify
58569
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
58570
+ */
58571
+ OrthographicCamera.verify = function verify(message) {
58572
+ if (typeof message !== "object" || message === null)
58573
+ return "object expected";
58574
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
58575
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
58576
+ if (error)
58577
+ return "viewVector." + error;
58578
+ }
58579
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
58580
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
58581
+ if (error)
58582
+ return "lookAt." + error;
58583
+ }
58584
+ if (message.up != null && message.hasOwnProperty("up")) {
58585
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
58586
+ if (error)
58587
+ return "up." + error;
58588
+ }
58589
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
58590
+ if (typeof message.fovHeight !== "number")
58591
+ return "fovHeight: number expected";
58592
+ return null;
58593
+ };
58594
+
58595
+ /**
58596
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
58597
+ * @function fromObject
58598
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58599
+ * @static
58600
+ * @param {Object.<string,*>} object Plain object
58601
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
58602
+ */
58603
+ OrthographicCamera.fromObject = function fromObject(object) {
58604
+ if (object instanceof $root.vertexvis.protobuf.stream.OrthographicCamera)
58605
+ return object;
58606
+ let message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
58607
+ if (object.viewVector != null) {
58608
+ if (typeof object.viewVector !== "object")
58609
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
58610
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
58611
+ }
58612
+ if (object.lookAt != null) {
58613
+ if (typeof object.lookAt !== "object")
58614
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
58615
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
58616
+ }
58617
+ if (object.up != null) {
58618
+ if (typeof object.up !== "object")
58619
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
58620
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
58621
+ }
58622
+ if (object.fovHeight != null)
58623
+ message.fovHeight = Number(object.fovHeight);
58624
+ return message;
58625
+ };
58626
+
58627
+ /**
58628
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
58629
+ * @function toObject
58630
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58631
+ * @static
58632
+ * @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
58633
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
58634
+ * @returns {Object.<string,*>} Plain object
58635
+ */
58636
+ OrthographicCamera.toObject = function toObject(message, options) {
58637
+ if (!options)
58638
+ options = {};
58639
+ let object = {};
58640
+ if (options.defaults) {
58641
+ object.viewVector = null;
58642
+ object.lookAt = null;
58643
+ object.up = null;
58644
+ object.fovHeight = 0;
58645
+ }
58646
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
58647
+ object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
58648
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
58649
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
58650
+ if (message.up != null && message.hasOwnProperty("up"))
58651
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
58652
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
58653
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
58654
+ return object;
58655
+ };
58656
+
58657
+ /**
58658
+ * Converts this OrthographicCamera to JSON.
58659
+ * @function toJSON
58660
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
58661
+ * @instance
58662
+ * @returns {Object.<string,*>} JSON object
58663
+ */
58664
+ OrthographicCamera.prototype.toJSON = function toJSON() {
58665
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
58666
+ };
58667
+
58668
+ return OrthographicCamera;
58669
+ })();
58670
+
57328
58671
  stream.Camera = (function() {
57329
58672
 
57330
58673
  /**
@@ -57334,6 +58677,8 @@ const vertexvis = $root.vertexvis = (() => {
57334
58677
  * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
57335
58678
  * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
57336
58679
  * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
58680
+ * @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
58681
+ * @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
57337
58682
  */
57338
58683
 
57339
58684
  /**
@@ -57375,6 +58720,36 @@ const vertexvis = $root.vertexvis = (() => {
57375
58720
  */
57376
58721
  Camera.prototype.up = null;
57377
58722
 
58723
+ /**
58724
+ * Camera perspective.
58725
+ * @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
58726
+ * @memberof vertexvis.protobuf.stream.Camera
58727
+ * @instance
58728
+ */
58729
+ Camera.prototype.perspective = null;
58730
+
58731
+ /**
58732
+ * Camera orthographic.
58733
+ * @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
58734
+ * @memberof vertexvis.protobuf.stream.Camera
58735
+ * @instance
58736
+ */
58737
+ Camera.prototype.orthographic = null;
58738
+
58739
+ // OneOf field names bound to virtual getters and setters
58740
+ let $oneOfFields;
58741
+
58742
+ /**
58743
+ * Camera type.
58744
+ * @member {"perspective"|"orthographic"|undefined} type
58745
+ * @memberof vertexvis.protobuf.stream.Camera
58746
+ * @instance
58747
+ */
58748
+ Object.defineProperty(Camera.prototype, "type", {
58749
+ get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
58750
+ set: $util.oneOfSetter($oneOfFields)
58751
+ });
58752
+
57378
58753
  /**
57379
58754
  * Creates a new Camera instance using the specified properties.
57380
58755
  * @function create
@@ -57405,6 +58780,10 @@ const vertexvis = $root.vertexvis = (() => {
57405
58780
  $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
57406
58781
  if (message.up != null && Object.hasOwnProperty.call(message, "up"))
57407
58782
  $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
58783
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
58784
+ $root.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
58785
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
58786
+ $root.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
57408
58787
  return writer;
57409
58788
  };
57410
58789
 
@@ -57448,6 +58827,12 @@ const vertexvis = $root.vertexvis = (() => {
57448
58827
  case 3:
57449
58828
  message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
57450
58829
  break;
58830
+ case 4:
58831
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
58832
+ break;
58833
+ case 5:
58834
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
58835
+ break;
57451
58836
  default:
57452
58837
  reader.skipType(tag & 7);
57453
58838
  break;
@@ -57483,6 +58868,7 @@ const vertexvis = $root.vertexvis = (() => {
57483
58868
  Camera.verify = function verify(message) {
57484
58869
  if (typeof message !== "object" || message === null)
57485
58870
  return "object expected";
58871
+ let properties = {};
57486
58872
  if (message.position != null && message.hasOwnProperty("position")) {
57487
58873
  let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
57488
58874
  if (error)
@@ -57498,6 +58884,24 @@ const vertexvis = $root.vertexvis = (() => {
57498
58884
  if (error)
57499
58885
  return "up." + error;
57500
58886
  }
58887
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
58888
+ properties.type = 1;
58889
+ {
58890
+ let error = $root.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
58891
+ if (error)
58892
+ return "perspective." + error;
58893
+ }
58894
+ }
58895
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
58896
+ if (properties.type === 1)
58897
+ return "type: multiple values";
58898
+ properties.type = 1;
58899
+ {
58900
+ let error = $root.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
58901
+ if (error)
58902
+ return "orthographic." + error;
58903
+ }
58904
+ }
57501
58905
  return null;
57502
58906
  };
57503
58907
 
@@ -57528,6 +58932,16 @@ const vertexvis = $root.vertexvis = (() => {
57528
58932
  throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
57529
58933
  message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
57530
58934
  }
58935
+ if (object.perspective != null) {
58936
+ if (typeof object.perspective !== "object")
58937
+ throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
58938
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
58939
+ }
58940
+ if (object.orthographic != null) {
58941
+ if (typeof object.orthographic !== "object")
58942
+ throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
58943
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
58944
+ }
57531
58945
  return message;
57532
58946
  };
57533
58947
 
@@ -57555,6 +58969,16 @@ const vertexvis = $root.vertexvis = (() => {
57555
58969
  object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
57556
58970
  if (message.up != null && message.hasOwnProperty("up"))
57557
58971
  object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
58972
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
58973
+ object.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
58974
+ if (options.oneofs)
58975
+ object.type = "perspective";
58976
+ }
58977
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
58978
+ object.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
58979
+ if (options.oneofs)
58980
+ object.type = "orthographic";
58981
+ }
57558
58982
  return object;
57559
58983
  };
57560
58984
 
@@ -88637,7 +90061,7 @@ function buildFlyToOperation(frameCorrelationId, options, animation) {
88637
90061
  }) });
88638
90062
  }
88639
90063
  case 'camera': {
88640
- return Object.assign(Object.assign({}, payload), { camera: options.flyTo.data });
90064
+ return Object.assign(Object.assign({}, payload), { camera: toProtobuf(options.flyTo.data) });
88641
90065
  }
88642
90066
  case 'bounding-box': {
88643
90067
  return Object.assign(Object.assign({}, payload), { boundingBox: {
@@ -88771,32 +90195,27 @@ class FlyToExecutor {
88771
90195
  * a new instance of the class with the updated properties.
88772
90196
  */
88773
90197
  class Camera {
88774
- constructor(stream, aspect, data, boundingBox, decodeFrame) {
90198
+ constructor(stream, aspect, data, boundingBox, decodeFrame, flyToOptions) {
88775
90199
  this.stream = stream;
88776
90200
  this.aspect = aspect;
88777
90201
  this.data = data;
88778
90202
  this.boundingBox = boundingBox;
88779
90203
  this.decodeFrame = decodeFrame;
90204
+ this.flyToOptions = flyToOptions;
88780
90205
  }
88781
- /**
88782
- * Updates the position of the camera such that the given bounding box will
88783
- * be contained within the camera's view.
88784
- *
88785
- * @param boundingBox The bounding box to position to.
88786
- */
88787
- fitToBoundingBox(boundingBox$1) {
90206
+ fitCameraToBoundingBox(boundingBox$1, fovVertical, viewVector) {
88788
90207
  const radius = 1.1 *
88789
90208
  vector3.magnitude(vector3.subtract(boundingBox$1.max, boundingBox.center(boundingBox$1)));
88790
90209
  // ratio of the height of the frustum to the distance along the view vector
88791
- let hOverD = Math.tan(this.fovY * PI_OVER_360);
88792
- if (this.aspectRatio < 1.0) {
88793
- hOverD *= this.aspectRatio;
90210
+ let hOverD = Math.tan(fovVertical * PI_OVER_360);
90211
+ if (this.aspect < 1.0) {
90212
+ hOverD *= this.aspect;
88794
90213
  }
88795
90214
  const distance = Math.abs(radius / hOverD);
88796
- const vvec = vector3.scale(distance, vector3.normalize(this.viewVector()));
90215
+ const vvec = vector3.scale(distance, vector3.normalize(viewVector));
88797
90216
  const lookAt = boundingBox.center(boundingBox$1);
88798
90217
  const position = vector3.subtract(lookAt, vvec);
88799
- return this.update({ lookAt, position });
90218
+ return this.update({ lookAt, position, viewVector: vvec });
88800
90219
  }
88801
90220
  /**
88802
90221
  * Returns the distance from the camera's position to the center
@@ -88804,12 +90223,11 @@ class Camera {
88804
90223
  *
88805
90224
  * @param boundingBox - The bounding box to determine distance from.
88806
90225
  */
88807
- distanceToBoundingBoxCenter(boundingBox$1) {
88808
- const box = boundingBox$1 || this.boundingBox;
88809
- const boundingBoxCenter = boundingBox.center(box);
88810
- const cameraToCenter = vector3.subtract(this.position, boundingBoxCenter);
88811
- const distanceToCenterAlongViewVec = Math.abs(vector3.dot(vector3.subtract(this.lookAt, this.position), cameraToCenter)) / vector3.magnitude(vector3.subtract(this.lookAt, this.position));
88812
- return distanceToCenterAlongViewVec;
90226
+ signedDistanceToBoundingBoxCenter(boundingBox$1) {
90227
+ const { position, viewVector } = withPositionAndViewVector(this.data);
90228
+ const boundingBoxCenter = boundingBox.center(boundingBox$1 !== null && boundingBox$1 !== void 0 ? boundingBox$1 : this.boundingBox);
90229
+ const cameraToCenter = vector3.subtract(boundingBoxCenter, position);
90230
+ return (vector3.dot(viewVector, cameraToCenter) / vector3.magnitude(viewVector));
88813
90231
  }
88814
90232
  /**
88815
90233
  * Specifies that the next render of the camera will be repositioned to one of
@@ -88820,26 +90238,14 @@ class Camera {
88820
90238
  */
88821
90239
  flyTo(paramsOrQuery) {
88822
90240
  if (typeof paramsOrQuery !== 'function') {
88823
- this.flyToOptions = { flyTo: this.buildFlyToType(paramsOrQuery) };
88824
- return this;
90241
+ return this.updateFlyToOptions({
90242
+ flyTo: this.buildFlyToType(paramsOrQuery),
90243
+ });
88825
90244
  }
88826
90245
  else {
88827
- this.flyToOptions = paramsOrQuery(new FlyToExecutor()).build();
88828
- return this;
90246
+ return this.updateFlyToOptions(paramsOrQuery(new FlyToExecutor()).build());
88829
90247
  }
88830
90248
  }
88831
- /**
88832
- * Shifts the position of the camera by the given delta.
88833
- *
88834
- * @param delta The number of units to shift the camera on the X, Y, and Z
88835
- * axis.
88836
- */
88837
- moveBy(delta) {
88838
- return this.update({
88839
- position: vector3.add(this.position, delta),
88840
- lookAt: vector3.add(this.lookAt, delta),
88841
- });
88842
- }
88843
90249
  viewAll() {
88844
90250
  return this.fitToBoundingBox(this.boundingBox);
88845
90251
  }
@@ -88871,7 +90277,7 @@ class Camera {
88871
90277
  }
88872
90278
  else {
88873
90279
  this.stream.replaceCamera({
88874
- camera: this.data,
90280
+ camera: toProtobuf(this.data),
88875
90281
  frameCorrelationId: { value: corrId },
88876
90282
  });
88877
90283
  return new CameraRenderResult(this.stream, this.decodeFrame, {
@@ -88891,22 +90297,7 @@ class Camera {
88891
90297
  * @param axis A normalized vector to rotate around.
88892
90298
  */
88893
90299
  rotateAroundAxis(angleInRadians, axis) {
88894
- return this.rotateAroundAxisAtPoint(angleInRadians, this.lookAt, axis);
88895
- }
88896
- /**
88897
- * Repositions the camera by rotating its current position around an axis
88898
- * defined at a specific world point.
88899
- *
88900
- * @param angleInRadians The angle, in radians, to rotate.
88901
- * @param point The point in world space to place the axis at.
88902
- * @param axis A normalized vector to rotate around.
88903
- */
88904
- rotateAroundAxisAtPoint(angleInRadians, point, axis) {
88905
- return this.update({
88906
- position: vector3.rotateAboutAxis(angleInRadians, this.position, axis, point),
88907
- lookAt: vector3.rotateAboutAxis(angleInRadians, this.lookAt, axis, point),
88908
- up: vector3.rotateAboutAxis(angleInRadians, this.up, axis, vector3.origin()),
88909
- });
90300
+ return this.rotateAroundAxisAtPoint(angleInRadians, this.data.lookAt, axis);
88910
90301
  }
88911
90302
  /**
88912
90303
  * Updates the `position` and `up` vectors of the camera to the given standard
@@ -88922,20 +90313,6 @@ class Camera {
88922
90313
  up: standardView.up,
88923
90314
  });
88924
90315
  }
88925
- /**
88926
- * Updates the `position`, `lookAt` and/or `up` vectors of the camera.
88927
- *
88928
- * @param camera The values to update the camera to.
88929
- */
88930
- update(camera) {
88931
- return new Camera(this.stream, this.aspectRatio, Object.assign(Object.assign({}, this.data), camera), this.boundingBox, this.decodeFrame);
88932
- }
88933
- /**
88934
- * Returns a `FramePerspectiveCamera` representation.
88935
- */
88936
- toFrameCamera() {
88937
- return new FramePerspectiveCamera(this.position, this.lookAt, this.up, this.near, this.far, this.aspectRatio, this.fovY);
88938
- }
88939
90316
  buildFlyToType(options) {
88940
90317
  if (options.boundingBox != null) {
88941
90318
  return { type: 'bounding-box', data: options.boundingBox };
@@ -88956,36 +90333,66 @@ class Camera {
88956
90333
  computeClippingPlanes(camera) {
88957
90334
  return fromBoundingBoxAndLookAtCamera(this.boundingBox, camera);
88958
90335
  }
90336
+ }
90337
+ class PerspectiveCamera extends Camera {
90338
+ constructor(stream, aspect, perspectiveData, boundingBox, decodeFrame, flyToOptions) {
90339
+ super(stream, aspect, perspectiveData, boundingBox, decodeFrame, flyToOptions);
90340
+ this.perspectiveData = perspectiveData;
90341
+ }
88959
90342
  /**
88960
- * Returns the view vector for the camera, which is the direction between the
88961
- * `position` and `lookAt` vectors.
90343
+ * Shifts the position of the camera by the given delta.
90344
+ *
90345
+ * @param delta The number of units to shift the camera on the X, Y, and Z
90346
+ * axis.
88962
90347
  */
88963
- viewVector() {
90348
+ moveBy(delta) {
90349
+ return this.update({
90350
+ position: vector3.add(this.position, delta),
90351
+ lookAt: vector3.add(this.lookAt, delta),
90352
+ });
90353
+ }
90354
+ rotateAroundAxisAtPoint(angleInRadians, point, axis) {
90355
+ return this.update({
90356
+ position: vector3.rotateAboutAxis(angleInRadians, this.position, axis, point),
90357
+ lookAt: vector3.rotateAboutAxis(angleInRadians, this.lookAt, axis, point),
90358
+ up: vector3.rotateAboutAxis(angleInRadians, this.up, axis, vector3.origin()),
90359
+ });
90360
+ }
90361
+ fitToBoundingBox(boundingBox) {
90362
+ return super.fitCameraToBoundingBox(boundingBox, this.fovY, this.viewVector);
90363
+ }
90364
+ update(camera) {
90365
+ return new PerspectiveCamera(this.stream, this.aspect, Object.assign(Object.assign({}, this.perspectiveData), camera), this.boundingBox, this.decodeFrame, this.flyToOptions);
90366
+ }
90367
+ toFrameCamera() {
90368
+ return new FramePerspectiveCamera(this.position, this.lookAt, this.up, this.near, this.far, this.aspectRatio, this.fovY);
90369
+ }
90370
+ get viewVector() {
88964
90371
  return vector3.subtract(this.lookAt, this.position);
88965
90372
  }
88966
90373
  /**
88967
90374
  * The position vector for the camera, in world space coordinates.
88968
90375
  */
88969
90376
  get position() {
88970
- return Object.assign({}, this.data.position);
90377
+ return Object.assign({}, this.perspectiveData.position);
88971
90378
  }
88972
90379
  /**
88973
90380
  * A normalized vector representing the up direction.
88974
90381
  */
88975
90382
  get up() {
88976
- return Object.assign({}, this.data.up);
90383
+ return Object.assign({}, this.perspectiveData.up);
88977
90384
  }
88978
90385
  /**
88979
90386
  * A vector, in world space coordinates, of where the camera is pointed at.
88980
90387
  */
88981
90388
  get lookAt() {
88982
- return Object.assign({}, this.data.lookAt);
90389
+ return Object.assign({}, this.perspectiveData.lookAt);
88983
90390
  }
88984
90391
  /**
88985
90392
  * The camera's field of view.
88986
90393
  */
88987
90394
  get fovY() {
88988
- return 45;
90395
+ return this.perspectiveData.fovY;
88989
90396
  }
88990
90397
  /**
88991
90398
  * The aspect ratio of the camera.
@@ -88997,16 +90404,104 @@ class Camera {
88997
90404
  * The camera's near clipping plane.
88998
90405
  */
88999
90406
  get near() {
89000
- const { near } = this.computeClippingPlanes(this.data);
90407
+ const { near } = this.computeClippingPlanes(this.perspectiveData);
89001
90408
  return near;
89002
90409
  }
89003
90410
  /**
89004
90411
  * The camera's far clipping plane.
89005
90412
  */
89006
90413
  get far() {
89007
- const { far } = this.computeClippingPlanes(this.data);
90414
+ const { far } = this.computeClippingPlanes(this.perspectiveData);
89008
90415
  return far;
89009
90416
  }
90417
+ updateFlyToOptions(flyToOptions) {
90418
+ return new PerspectiveCamera(this.stream, this.aspect, this.perspectiveData, this.boundingBox, this.decodeFrame, flyToOptions);
90419
+ }
90420
+ }
90421
+ class OrthographicCamera extends Camera {
90422
+ constructor(stream, aspect, orthographicData, boundingBox, decodeFrame, flyToOptions) {
90423
+ super(stream, aspect, orthographicData, boundingBox, decodeFrame, flyToOptions);
90424
+ this.orthographicData = orthographicData;
90425
+ }
90426
+ /**
90427
+ * Shifts the position of the camera by the given delta.
90428
+ *
90429
+ * @param delta The number of units to shift the camera on the X, Y, and Z
90430
+ * axis.
90431
+ */
90432
+ moveBy(delta) {
90433
+ const updatedLookAt = vector3.add(this.lookAt, delta);
90434
+ return this.update({
90435
+ viewVector: vector3.subtract(updatedLookAt, vector3.add(this.position, delta)),
90436
+ lookAt: updatedLookAt,
90437
+ });
90438
+ }
90439
+ rotateAroundAxisAtPoint(angleInRadians, point, axis) {
90440
+ const newLookAt = vector3.rotateAboutAxis(angleInRadians, this.lookAt, axis, point);
90441
+ const newUp = vector3.rotateAboutAxis(angleInRadians, this.up, axis, vector3.origin());
90442
+ const newViewVector = vector3.subtract(vector3.rotateAboutAxis(angleInRadians, this.position, axis, point), newLookAt);
90443
+ return this.update({
90444
+ viewVector: newViewVector,
90445
+ lookAt: newLookAt,
90446
+ up: newUp,
90447
+ });
90448
+ }
90449
+ fitToBoundingBox(boundingBox) {
90450
+ return super.fitCameraToBoundingBox(boundingBox, this.fovHeight, this.viewVector);
90451
+ }
90452
+ update(camera) {
90453
+ return new OrthographicCamera(this.stream, this.aspect, Object.assign(Object.assign({}, this.orthographicData), camera), this.boundingBox, this.decodeFrame, this.flyToOptions);
90454
+ }
90455
+ toFrameCamera() {
90456
+ return new FrameOrthographicCamera(this.viewVector, this.lookAt, this.up, this.near, this.far, this.aspectRatio, this.fovHeight);
90457
+ }
90458
+ get viewVector() {
90459
+ return Object.assign({}, this.orthographicData.viewVector);
90460
+ }
90461
+ get position() {
90462
+ return vector3.add(this.lookAt, vector3.negate(this.viewVector));
90463
+ }
90464
+ /**
90465
+ * A normalized vector representing the up direction.
90466
+ */
90467
+ get up() {
90468
+ return Object.assign({}, this.orthographicData.up);
90469
+ }
90470
+ /**
90471
+ * A vector, in world space coordinates, of where the camera is pointed at.
90472
+ */
90473
+ get lookAt() {
90474
+ return Object.assign({}, this.orthographicData.lookAt);
90475
+ }
90476
+ /**
90477
+ * The camera's field of view.
90478
+ */
90479
+ get fovHeight() {
90480
+ return this.orthographicData.fovHeight;
90481
+ }
90482
+ /**
90483
+ * The aspect ratio of the camera.
90484
+ */
90485
+ get aspectRatio() {
90486
+ return this.aspect;
90487
+ }
90488
+ /**
90489
+ * The camera's near clipping plane.
90490
+ */
90491
+ get near() {
90492
+ const { near } = this.computeClippingPlanes(this.orthographicData);
90493
+ return near;
90494
+ }
90495
+ /**
90496
+ * The camera's far clipping plane.
90497
+ */
90498
+ get far() {
90499
+ const { far } = this.computeClippingPlanes(this.orthographicData);
90500
+ return far;
90501
+ }
90502
+ updateFlyToOptions(flyToOptions) {
90503
+ return new OrthographicCamera(this.stream, this.aspect, this.orthographicData, this.boundingBox, this.decodeFrame, flyToOptions);
90504
+ }
89010
90505
  }
89011
90506
 
89012
90507
  /**
@@ -89413,12 +90908,25 @@ class Scene {
89413
90908
  */
89414
90909
  camera() {
89415
90910
  const { scene } = this.frame;
89416
- const data = {
89417
- position: scene.camera.position,
89418
- lookAt: scene.camera.lookAt,
89419
- up: scene.camera.up,
89420
- };
89421
- return new Camera(this.stream, dimensions.aspectRatio(this.viewport()), data, this.frame.scene.boundingBox, this.decodeFrame);
90911
+ if (scene.camera instanceof FrameOrthographicCamera) {
90912
+ return new OrthographicCamera(this.stream, dimensions.aspectRatio(this.viewport()), {
90913
+ viewVector: scene.camera.viewVector,
90914
+ lookAt: scene.camera.lookAt,
90915
+ up: scene.camera.up,
90916
+ fovHeight: scene.camera.fovHeight,
90917
+ }, this.frame.scene.boundingBox, this.decodeFrame);
90918
+ }
90919
+ else if (scene.camera instanceof FramePerspectiveCamera) {
90920
+ return new PerspectiveCamera(this.stream, dimensions.aspectRatio(this.viewport()), {
90921
+ position: scene.camera.position,
90922
+ lookAt: scene.camera.lookAt,
90923
+ up: scene.camera.up,
90924
+ fovY: scene.camera.fovY,
90925
+ }, this.frame.scene.boundingBox, this.decodeFrame);
90926
+ }
90927
+ else {
90928
+ throw new InvalidCameraError('Cannot retrieve camera. Scene has an unknown or invalid camera type.');
90929
+ }
89422
90930
  }
89423
90931
  boundingBox() {
89424
90932
  return this.frame.scene.boundingBox;
@@ -98745,52 +100253,6 @@ class FlyToPartKeyInteraction {
98745
100253
  }
98746
100254
  }
98747
100255
 
98748
- class FlyToPositionKeyInteraction {
98749
- constructor(stream, configProvider, imageScaleProvider, sceneProvider) {
98750
- this.stream = stream;
98751
- this.configProvider = configProvider;
98752
- this.imageScaleProvider = imageScaleProvider;
98753
- this.sceneProvider = sceneProvider;
98754
- }
98755
- predicate(e) {
98756
- return e.altKey && e.shiftKey;
98757
- }
98758
- async fn(e) {
98759
- var _a, _b;
98760
- const scale = this.imageScaleProvider();
98761
- const hitResult = await this.stream.hitItems({
98762
- point: point.scale(e.position, (scale === null || scale === void 0 ? void 0 : scale.x) || 1, (scale === null || scale === void 0 ? void 0 : scale.y) || 1),
98763
- }, true);
98764
- if (((_a = hitResult.hitItems) === null || _a === void 0 ? void 0 : _a.hits) != null &&
98765
- hitResult.hitItems.hits.length > 0 &&
98766
- hitResult.hitItems.hits[0].hitPoint != null) {
98767
- const camera = this.sceneProvider().camera();
98768
- const hit = hitResult.hitItems.hits[0];
98769
- if (hit.hitPoint != null &&
98770
- hit.hitPoint.x != null &&
98771
- hit.hitPoint.y != null &&
98772
- hit.hitPoint.z != null) {
98773
- await this.stream.flyTo({
98774
- camera: camera
98775
- .update({
98776
- lookAt: vector3.create(hit.hitPoint.x, hit.hitPoint.y, hit.hitPoint.z),
98777
- })
98778
- .toFrameCamera(),
98779
- animation: {
98780
- duration: toProtoDuration(this.configProvider().animation.durationMs),
98781
- },
98782
- });
98783
- }
98784
- else {
98785
- console.debug(`No hit position found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}, hit-id={${(_b = hit.itemId) === null || _b === void 0 ? void 0 : _b.hex}}]`);
98786
- }
98787
- }
98788
- else {
98789
- console.debug(`No hit results found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}]`);
98790
- }
98791
- }
98792
- }
98793
-
98794
100256
  /**
98795
100257
  * The `InteractionApi` provides methods that API developers can use to modify
98796
100258
  * the internal state of an interaction.
@@ -98998,27 +100460,6 @@ class InteractionApi {
98998
100460
  return camera;
98999
100461
  });
99000
100462
  }
99001
- /**
99002
- * Performs a pan operation of the scene's camera, and requests a new image
99003
- * for the updated scene.
99004
- *
99005
- * @param delta A position delta `{x, y}` in the 2D coordinate space of the
99006
- * viewer.
99007
- */
99008
- async panCameraByDelta(delta) {
99009
- return this.transformCamera(({ camera, viewport }) => {
99010
- const vv = camera.viewVector();
99011
- const u = vector3.normalize(camera.up);
99012
- const v = vector3.normalize(vv);
99013
- const d = vector3.magnitude(vv) * Math.tan(camera.fovY);
99014
- const epsilonX = (delta.x * d) / viewport.width;
99015
- const epsilonY = (delta.y / viewport.width) * d;
99016
- const xvec = vector3.cross(u, v);
99017
- const yvec = vector3.cross(v, xvec);
99018
- const offset = vector3.add(vector3.scale(epsilonX, xvec), vector3.scale(epsilonY, yvec));
99019
- return camera.moveBy(offset);
99020
- });
99021
- }
99022
100463
  /**
99023
100464
  * Performs a view all operation for the scene's bounding box, and requests a
99024
100465
  * new image for the updated scene.
@@ -99077,8 +100518,8 @@ class InteractionApi {
99077
100518
  return updated.update({
99078
100519
  // Scale the lookAt point to the same length as the distance to the
99079
100520
  // center of the bounding box to maintain zoom and pan behavior.
99080
- lookAt: vector3.add(vector3.scale(camera.distanceToBoundingBoxCenter() /
99081
- vector3.magnitude(updated.viewVector()), updated.viewVector()), updated.position),
100521
+ lookAt: vector3.add(vector3.scale(Math.abs(camera.signedDistanceToBoundingBoxCenter()) /
100522
+ vector3.magnitude(updated.viewVector), updated.viewVector), updated.position),
99082
100523
  });
99083
100524
  });
99084
100525
  }
@@ -99091,7 +100532,7 @@ class InteractionApi {
99091
100532
  */
99092
100533
  async zoomCamera(delta) {
99093
100534
  return this.transformCamera(({ camera, viewport }) => {
99094
- const vv = camera.viewVector();
100535
+ const vv = camera.viewVector;
99095
100536
  const v = vector3.normalize(vv);
99096
100537
  const distance = vector3.magnitude(vv);
99097
100538
  const epsilon = (3 * distance * delta) / viewport.height;
@@ -99212,6 +100653,148 @@ class InteractionApi {
99212
100653
  }
99213
100654
  }
99214
100655
 
100656
+ class InteractionApiOrthographic extends InteractionApi {
100657
+ constructor(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter) {
100658
+ super(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter);
100659
+ }
100660
+ /**
100661
+ * Performs a pan operation of the scene's camera, and requests a new image
100662
+ * for the updated scene.
100663
+ *
100664
+ * @param delta A position delta `{x, y}` in the 2D coordinate space of the
100665
+ * viewer.
100666
+ */
100667
+ async panCameraByDelta(delta) {
100668
+ return this.transformCamera(({ camera, viewport }) => {
100669
+ const viewVector = camera.viewVector;
100670
+ const normalizedUpVector = vector3.normalize(camera.up);
100671
+ const normalizedViewVector = vector3.normalize(viewVector);
100672
+ const d = vector3.magnitude(viewVector) * Math.tan(camera.fovHeight);
100673
+ const epsilonX = (delta.x * d) / viewport.width;
100674
+ const epsilonY = (delta.y / viewport.width) * d;
100675
+ const xvec = vector3.cross(normalizedUpVector, normalizedViewVector);
100676
+ const yvec = vector3.cross(normalizedViewVector, xvec);
100677
+ const offset = vector3.add(vector3.scale(epsilonX, xvec), vector3.scale(epsilonY, yvec));
100678
+ return camera.moveBy(offset);
100679
+ });
100680
+ }
100681
+ async transformCamera(t) {
100682
+ var _a;
100683
+ if (this.isInteracting()) {
100684
+ const scene = this.getScene();
100685
+ const viewport = this.getViewport();
100686
+ const frame = this.getFrame();
100687
+ const depthBuffer = await (frame === null || frame === void 0 ? void 0 : frame.depthBuffer());
100688
+ this.currentCamera =
100689
+ this.currentCamera != null && viewport != null && frame != null
100690
+ ? t({
100691
+ camera: this.currentCamera,
100692
+ viewport,
100693
+ scale: scene.scale(),
100694
+ boundingBox: scene.boundingBox(),
100695
+ frame,
100696
+ depthBuffer,
100697
+ })
100698
+ : undefined;
100699
+ await ((_a = this.currentCamera) === null || _a === void 0 ? void 0 : _a.render());
100700
+ }
100701
+ }
100702
+ }
100703
+
100704
+ class InteractionApiPerspective extends InteractionApi {
100705
+ constructor(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter) {
100706
+ super(stream, cursors, getConfig, getScene, getFrame, getViewport, tapEmitter, doubleTapEmitter, longPressEmitter, interactionStartedEmitter, interactionFinishedEmitter);
100707
+ }
100708
+ /**
100709
+ * Performs a pan operation of the scene's camera, and requests a new image
100710
+ * for the updated scene.
100711
+ *
100712
+ * @param delta A position delta `{x, y}` in the 2D coordinate space of the
100713
+ * viewer.
100714
+ */
100715
+ async panCameraByDelta(delta) {
100716
+ return this.transformCamera(({ camera, viewport }) => {
100717
+ const vv = camera.viewVector;
100718
+ const u = vector3.normalize(camera.up);
100719
+ const v = vector3.normalize(vv);
100720
+ const d = vector3.magnitude(vv) * Math.tan(camera.fovY);
100721
+ const epsilonX = (delta.x * d) / viewport.width;
100722
+ const epsilonY = (delta.y / viewport.width) * d;
100723
+ const xvec = vector3.cross(u, v);
100724
+ const yvec = vector3.cross(v, xvec);
100725
+ const offset = vector3.add(vector3.scale(epsilonX, xvec), vector3.scale(epsilonY, yvec));
100726
+ return camera.moveBy(offset);
100727
+ });
100728
+ }
100729
+ async transformCamera(t) {
100730
+ var _a;
100731
+ if (this.isInteracting()) {
100732
+ const scene = this.getScene();
100733
+ const viewport = this.getViewport();
100734
+ const frame = this.getFrame();
100735
+ const depthBuffer = await (frame === null || frame === void 0 ? void 0 : frame.depthBuffer());
100736
+ this.currentCamera =
100737
+ this.currentCamera != null && viewport != null && frame != null
100738
+ ? t({
100739
+ camera: this.currentCamera,
100740
+ viewport,
100741
+ scale: scene.scale(),
100742
+ boundingBox: scene.boundingBox(),
100743
+ frame,
100744
+ depthBuffer,
100745
+ })
100746
+ : undefined;
100747
+ await ((_a = this.currentCamera) === null || _a === void 0 ? void 0 : _a.render());
100748
+ }
100749
+ }
100750
+ }
100751
+
100752
+ class FlyToPositionKeyInteraction {
100753
+ constructor(stream, configProvider, imageScaleProvider, sceneProvider) {
100754
+ this.stream = stream;
100755
+ this.configProvider = configProvider;
100756
+ this.imageScaleProvider = imageScaleProvider;
100757
+ this.sceneProvider = sceneProvider;
100758
+ }
100759
+ predicate(e) {
100760
+ return e.altKey && e.shiftKey;
100761
+ }
100762
+ async fn(e) {
100763
+ var _a, _b;
100764
+ const scale = this.imageScaleProvider();
100765
+ const hitResult = await this.stream.hitItems({
100766
+ point: point.scale(e.position, (scale === null || scale === void 0 ? void 0 : scale.x) || 1, (scale === null || scale === void 0 ? void 0 : scale.y) || 1),
100767
+ }, true);
100768
+ if (((_a = hitResult.hitItems) === null || _a === void 0 ? void 0 : _a.hits) != null &&
100769
+ hitResult.hitItems.hits.length > 0 &&
100770
+ hitResult.hitItems.hits[0].hitPoint != null) {
100771
+ const camera = this.sceneProvider().camera();
100772
+ const hit = hitResult.hitItems.hits[0];
100773
+ if (hit.hitPoint != null &&
100774
+ hit.hitPoint.x != null &&
100775
+ hit.hitPoint.y != null &&
100776
+ hit.hitPoint.z != null) {
100777
+ await this.stream.flyTo({
100778
+ camera: camera
100779
+ .update({
100780
+ lookAt: vector3.create(hit.hitPoint.x, hit.hitPoint.y, hit.hitPoint.z),
100781
+ })
100782
+ .toFrameCamera(),
100783
+ animation: {
100784
+ duration: toProtoDuration(this.configProvider().animation.durationMs),
100785
+ },
100786
+ });
100787
+ }
100788
+ else {
100789
+ console.debug(`No hit position found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}, hit-id={${(_b = hit.itemId) === null || _b === void 0 ? void 0 : _b.hex}}]`);
100790
+ }
100791
+ }
100792
+ else {
100793
+ console.debug(`No hit results found for fly to position [position={x: ${e.position.x}, y: ${e.position.y}}]`);
100794
+ }
100795
+ }
100796
+ }
100797
+
99215
100798
  const SCROLL_WHEEL_DELTA_PERCENTAGES = [0.2, 0.15, 0.25, 0.25, 0.15];
99216
100799
  const DEFAULT_FONT_SIZE = 16;
99217
100800
  const DEFAULT_LINE_HEIGHT = 1.2;
@@ -100746,6 +102329,11 @@ let Viewer = class extends HTMLElement$1 {
100746
102329
  * the viewer. Enabled by default.
100747
102330
  */
100748
102331
  this.cameraControls = true;
102332
+ /**
102333
+ * The type of camera model to represent the scene with. Can be either
102334
+ * `perspective` or `orthographic`, and defaults to `perspective`.
102335
+ */
102336
+ this.cameraType = 'perspective';
100749
102337
  /**
100750
102338
  * Enables or disables the default keyboard shortcut interactions provided by
100751
102339
  * the viewer. Enabled by default, requires `cameraControls` being enabled.
@@ -101035,6 +102623,11 @@ let Viewer = class extends HTMLElement$1 {
101035
102623
  (_b = this.baseInteractionHandler) === null || _b === void 0 ? void 0 : _b.setPrimaryInteractionType('rotate');
101036
102624
  }
101037
102625
  }
102626
+ handleCameraTypeChanged(updatedCameraType, previousCameraType) {
102627
+ if (updatedCameraType !== previousCameraType) {
102628
+ this.updateCameraType();
102629
+ }
102630
+ }
101038
102631
  /**
101039
102632
  * @ignore
101040
102633
  */
@@ -101281,7 +102874,9 @@ let Viewer = class extends HTMLElement$1 {
101281
102874
  this.frame !== frame) {
101282
102875
  const canvas = this.canvasElement.getContext('2d');
101283
102876
  if (canvas != null) {
102877
+ const previousFrame = this.frame;
101284
102878
  this.frame = frame;
102879
+ this.updateInteractionApi(previousFrame);
101285
102880
  const data = {
101286
102881
  canvas,
101287
102882
  canvasDimensions,
@@ -101317,7 +102912,10 @@ let Viewer = class extends HTMLElement$1 {
101317
102912
  if (this.stream == null) {
101318
102913
  throw new ComponentInitializationError('Cannot create interaction API. Component has not been initialized.');
101319
102914
  }
101320
- return new InteractionApi(this.stream, this.stateMap.cursorManager, () => this.getResolvedConfig().interactions, () => this.createScene(), () => this.frame, () => this.viewport, this.tap, this.doubletap, this.longpress, this.interactionStarted, this.interactionFinished);
102915
+ return this.frame == null ||
102916
+ isPerspectiveFrameCamera(this.frame.scene.camera)
102917
+ ? new InteractionApiPerspective(this.stream, this.stateMap.cursorManager, () => this.getResolvedConfig().interactions, () => this.createScene(), () => this.frame, () => this.viewport, this.tap, this.doubletap, this.longpress, this.interactionStarted, this.interactionFinished)
102918
+ : new InteractionApiOrthographic(this.stream, this.stateMap.cursorManager, () => this.getResolvedConfig().interactions, () => this.createScene(), () => this.frame, () => this.viewport, this.tap, this.doubletap, this.longpress, this.interactionStarted, this.interactionFinished);
101321
102919
  }
101322
102920
  handleCursorChanged() {
101323
102921
  window.requestAnimationFrame(() => {
@@ -101377,6 +102975,34 @@ let Viewer = class extends HTMLElement$1 {
101377
102975
  var _a;
101378
102976
  (_a = this.stream) === null || _a === void 0 ? void 0 : _a.update({ streamAttributes: this.getStreamAttributes() });
101379
102977
  }
102978
+ updateInteractionApi(previousFrame) {
102979
+ if (previousFrame != null && this.frame != null) {
102980
+ const hasChangedFromPerspective = isPerspectiveFrameCamera(previousFrame.scene.camera) &&
102981
+ isPerspectiveFrameCamera(this.frame.scene.camera);
102982
+ const hasChangedFromOrthographic = isOrthographicFrameCamera(previousFrame.scene.camera) &&
102983
+ isOrthographicFrameCamera(this.frame.scene.camera);
102984
+ if (hasChangedFromPerspective || hasChangedFromOrthographic) {
102985
+ this.interactionApi = this.createInteractionApi();
102986
+ }
102987
+ }
102988
+ }
102989
+ updateCameraType() {
102990
+ var _a, _b;
102991
+ if (this.frame != null) {
102992
+ if (this.cameraType === 'orthographic' &&
102993
+ isPerspectiveFrameCamera(this.frame.scene.camera)) {
102994
+ (_a = this.stream) === null || _a === void 0 ? void 0 : _a.replaceCamera({
102995
+ camera: toProtobuf(toOrthographic(this.frame.scene.camera)),
102996
+ });
102997
+ }
102998
+ else if (this.cameraType === 'perspective' &&
102999
+ isOrthographicFrameCamera(this.frame.scene.camera)) {
103000
+ (_b = this.stream) === null || _b === void 0 ? void 0 : _b.replaceCamera({
103001
+ camera: toProtobuf(toPerspective(this.frame.scene.camera)),
103002
+ });
103003
+ }
103004
+ }
103005
+ }
101380
103006
  getDepthBufferStreamAttributesValue() {
101381
103007
  var _a;
101382
103008
  const depthBuffer = (_a = this.depthBuffers) !== null && _a !== void 0 ? _a : (this.rotateAroundTapPoint ? 'final' : undefined);
@@ -101417,6 +103043,7 @@ let Viewer = class extends HTMLElement$1 {
101417
103043
  static get watchers() { return {
101418
103044
  "src": ["handleSrcChanged"],
101419
103045
  "rotateAroundTapPoint": ["handleRotateAboutTapPointChanged"],
103046
+ "cameraType": ["handleCameraTypeChanged"],
101420
103047
  "depthBuffers": ["handleDepthBuffersChanged"],
101421
103048
  "experimentalGhostingOpacity": ["handleExperimentalGhostingOpacityChanged"],
101422
103049
  "featureLines": ["handleFeatureLinesChanged"],
@@ -106070,7 +107697,7 @@ const VertexSceneTreeTableLayout = /*@__PURE__*/proxyCustomElement(SceneTreeTabl
106070
107697
  const VertexSceneTreeTableResizeDivider = /*@__PURE__*/proxyCustomElement(SceneTreeTableResizeDivider, [1,"vertex-scene-tree-table-resize-divider",{"dragging":[32]}]);
106071
107698
  const VertexSceneTreeToolbar = /*@__PURE__*/proxyCustomElement(SceneTreeToolbar, [1,"vertex-scene-tree-toolbar"]);
106072
107699
  const VertexSceneTreeToolbarGroup = /*@__PURE__*/proxyCustomElement(SceneTreeToolbarGroup, [1,"vertex-scene-tree-toolbar-group"]);
106073
- const VertexViewer = /*@__PURE__*/proxyCustomElement(Viewer, [1,"vertex-viewer",{"src":[1],"clientId":[1,"client-id"],"deviceId":[1,"device-id"],"config":[1],"configEnv":[1,"config-env"],"resolvedConfig":[1040],"cameraControls":[4,"camera-controls"],"keyboardControls":[4,"keyboard-controls"],"rotateAroundTapPoint":[4,"rotate-around-tap-point"],"token":[1025],"depthBuffers":[1,"depth-buffers"],"experimentalGhostingOpacity":[2,"experimental-ghosting-opacity"],"featureLines":[16],"featureHighlighting":[16],"featureMaps":[1,"feature-maps"],"selectionMaterial":[1,"selection-material"],"resizeDebounce":[2,"resize-debounce"],"frame":[1040],"stream":[1040],"stencilBuffer":[1040],"viewport":[1040],"dimensions":[32],"hostDimensions":[32],"errorMessage":[32],"cursor":[32],"stateMap":[32]},[[0,"tap","handleTapEvent"]]]);
107700
+ const VertexViewer = /*@__PURE__*/proxyCustomElement(Viewer, [1,"vertex-viewer",{"src":[1],"clientId":[1,"client-id"],"deviceId":[1,"device-id"],"config":[1],"configEnv":[1,"config-env"],"resolvedConfig":[1040],"cameraControls":[4,"camera-controls"],"cameraType":[1,"camera-type"],"keyboardControls":[4,"keyboard-controls"],"rotateAroundTapPoint":[4,"rotate-around-tap-point"],"token":[1025],"depthBuffers":[1,"depth-buffers"],"experimentalGhostingOpacity":[2,"experimental-ghosting-opacity"],"featureLines":[16],"featureHighlighting":[16],"featureMaps":[1,"feature-maps"],"selectionMaterial":[1,"selection-material"],"resizeDebounce":[2,"resize-debounce"],"frame":[1040],"stream":[1040],"stencilBuffer":[1040],"viewport":[1040],"dimensions":[32],"hostDimensions":[32],"errorMessage":[32],"cursor":[32],"stateMap":[32]},[[0,"tap","handleTapEvent"]]]);
106074
107701
  const VertexViewerButton = /*@__PURE__*/proxyCustomElement(ViewerButton, [1,"vertex-viewer-button"]);
106075
107702
  const VertexViewerDefaultToolbar = /*@__PURE__*/proxyCustomElement(ViewerDefaultToolbar, [1,"vertex-viewer-default-toolbar",{"viewer":[16],"placement":[1],"direction":[1],"animationsDisabled":[4,"animations-disabled"],"animationMs":[2,"animation-ms"]}]);
106076
107703
  const VertexViewerDomElement = /*@__PURE__*/proxyCustomElement(ViewerDomElement, [1,"vertex-viewer-dom-element",{"position":[1040],"positionJson":[1,"position"],"rotation":[1040],"rotationJson":[1,"rotation"],"quaternion":[1040],"quaternionJson":[1,"quaternion"],"scale":[1040],"scaleJson":[1,"scale"],"matrix":[1040],"occlusionOff":[4,"occlusion-off"],"occluded":[516],"billboardOff":[4,"billboard-off"],"interactionsOff":[516,"interactions-off"]}]);
@@ -106136,4 +107763,4 @@ const defineCustomElements = (opts) => {
106136
107763
  }
106137
107764
  };
106138
107765
 
106139
- export { AngleUnits, AreaUnits, ArrowMarkup, CircleMarkup, colorMaterial as ColorMaterial, CursorManager, DistanceUnits, EntityType, FreeformMarkup, loadableResource as LoadableResource, MeasurementController, MeasurementEntity, MeasurementModel, MeasurementOverlayManager, Frame as ReceivedFrame, FrameImage as ReceivedFrameImage, FrameScene as ReceivedFrameScene, FramePerspectiveCamera as ReceivedPerspectiveCamera, Scene, SynchronizedClock, VertexSceneTree, VertexSceneTreeSearch, VertexSceneTreeTableCell, VertexSceneTreeTableColumn, VertexSceneTreeTableHeader, VertexSceneTreeTableLayout, VertexSceneTreeTableResizeDivider, VertexSceneTreeToolbar, VertexSceneTreeToolbarGroup, VertexViewer, VertexViewerButton, VertexViewerDefaultToolbar, VertexViewerDomElement, VertexViewerDomGroup, VertexViewerDomRenderer, VertexViewerIcon, VertexViewerLayer, VertexViewerMarkup, VertexViewerMarkupArrow, VertexViewerMarkupCircle, VertexViewerMarkupFreeform, VertexViewerMarkupTool, VertexViewerMeasurementDetails, VertexViewerMeasurementDistance, VertexViewerMeasurementLine, VertexViewerMeasurementOverlays, VertexViewerMeasurementPrecise, VertexViewerMeasurementTool, VertexViewerMeasurements, VertexViewerToolbar, VertexViewerToolbarGroup, VertexViewerViewCube, Viewport, __awaiter as _, __generator as a, __spreadArray as b, createCommonjsModule as c, defineCustomElements, makeMinimumDistanceResult, measurementCursor, measurementWithArrowCursor };
107766
+ export { AngleUnits, AreaUnits, ArrowMarkup, CircleMarkup, colorMaterial as ColorMaterial, CursorManager, DistanceUnits, EntityType, FreeformMarkup, loadableResource as LoadableResource, MeasurementController, MeasurementEntity, MeasurementModel, MeasurementOverlayManager, Frame as ReceivedFrame, FrameImage as ReceivedFrameImage, FrameScene as ReceivedFrameScene, FrameOrthographicCamera as ReceivedOrthographicCamera, FramePerspectiveCamera as ReceivedPerspectiveCamera, Scene, SynchronizedClock, VertexSceneTree, VertexSceneTreeSearch, VertexSceneTreeTableCell, VertexSceneTreeTableColumn, VertexSceneTreeTableHeader, VertexSceneTreeTableLayout, VertexSceneTreeTableResizeDivider, VertexSceneTreeToolbar, VertexSceneTreeToolbarGroup, VertexViewer, VertexViewerButton, VertexViewerDefaultToolbar, VertexViewerDomElement, VertexViewerDomGroup, VertexViewerDomRenderer, VertexViewerIcon, VertexViewerLayer, VertexViewerMarkup, VertexViewerMarkupArrow, VertexViewerMarkupCircle, VertexViewerMarkupFreeform, VertexViewerMarkupTool, VertexViewerMeasurementDetails, VertexViewerMeasurementDistance, VertexViewerMeasurementLine, VertexViewerMeasurementOverlays, VertexViewerMeasurementPrecise, VertexViewerMeasurementTool, VertexViewerMeasurements, VertexViewerToolbar, VertexViewerToolbarGroup, VertexViewerViewCube, Viewport, __awaiter as _, __generator as a, __spreadArray as b, createCommonjsModule as c, defineCustomElements, makeMinimumDistanceResult, measurementCursor, measurementWithArrowCursor };