@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
@@ -1,8 +1,8 @@
1
1
  /**!
2
2
  * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import { _ as __extends, a as __awaiter, c as __generator, e as __assign, f as __spreadArray, b as boundingBox, v as vector3, p as point, r as ray, g as rectangle, m as matrix4, l as line3, h as plane, i as angle, d as dimensions, j as clamp } from './bundle.esm-d899b2d5.js';
5
- import { m as mapper, E as EventDispatcher, b as uuid, u as uri, o as objects, c as color } from './browser.esm-59e914f6.js';
4
+ import { _ as __extends, a as __awaiter, c as __generator, e as __assign, f as __spreadArray, v as vector3, g as angle, b as boundingBox, p as point, r as ray, h as rectangle, m as matrix4, l as line3, i as plane, d as dimensions, j as clamp } from './bundle.esm-df3a8a42.js';
5
+ import { m as mapper, E as EventDispatcher, b as uuid, u as uri, o as objects, c as color } from './browser.esm-48f051a3.js';
6
6
  import { c as createCommonjsModule, a as commonjsGlobal$1 } from './_commonjsHelpers-9943807e.js';
7
7
 
8
8
  const fromPbUuid = mapper.defineMapper(mapper.read(mapper.requiredProp('hex')), ([uuid]) => uuid);
@@ -2686,6 +2686,522 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2686
2686
  */
2687
2687
  const stream = {};
2688
2688
 
2689
+ stream.PerspectiveCamera = (function() {
2690
+
2691
+ /**
2692
+ * Properties of a PerspectiveCamera.
2693
+ * @memberof vertexvis.protobuf.stream
2694
+ * @interface IPerspectiveCamera
2695
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
2696
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
2697
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
2698
+ */
2699
+
2700
+ /**
2701
+ * Constructs a new PerspectiveCamera.
2702
+ * @memberof vertexvis.protobuf.stream
2703
+ * @classdesc Represents a PerspectiveCamera.
2704
+ * @implements IPerspectiveCamera
2705
+ * @constructor
2706
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
2707
+ */
2708
+ function PerspectiveCamera(properties) {
2709
+ if (properties)
2710
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2711
+ if (properties[keys[i]] != null)
2712
+ this[keys[i]] = properties[keys[i]];
2713
+ }
2714
+
2715
+ /**
2716
+ * PerspectiveCamera position.
2717
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
2718
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2719
+ * @instance
2720
+ */
2721
+ PerspectiveCamera.prototype.position = null;
2722
+
2723
+ /**
2724
+ * PerspectiveCamera lookAt.
2725
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
2726
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2727
+ * @instance
2728
+ */
2729
+ PerspectiveCamera.prototype.lookAt = null;
2730
+
2731
+ /**
2732
+ * PerspectiveCamera up.
2733
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
2734
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2735
+ * @instance
2736
+ */
2737
+ PerspectiveCamera.prototype.up = null;
2738
+
2739
+ /**
2740
+ * Creates a new PerspectiveCamera instance using the specified properties.
2741
+ * @function create
2742
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2743
+ * @static
2744
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
2745
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
2746
+ */
2747
+ PerspectiveCamera.create = function create(properties) {
2748
+ return new PerspectiveCamera(properties);
2749
+ };
2750
+
2751
+ /**
2752
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
2753
+ * @function encode
2754
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2755
+ * @static
2756
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
2757
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2758
+ * @returns {$protobuf.Writer} Writer
2759
+ */
2760
+ PerspectiveCamera.encode = function encode(message, writer) {
2761
+ if (!writer)
2762
+ writer = $Writer$1.create();
2763
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
2764
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
2765
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
2766
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2767
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
2768
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2769
+ return writer;
2770
+ };
2771
+
2772
+ /**
2773
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
2774
+ * @function encodeDelimited
2775
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2776
+ * @static
2777
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
2778
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2779
+ * @returns {$protobuf.Writer} Writer
2780
+ */
2781
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
2782
+ return this.encode(message, writer).ldelim();
2783
+ };
2784
+
2785
+ /**
2786
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
2787
+ * @function decode
2788
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2789
+ * @static
2790
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2791
+ * @param {number} [length] Message length if known beforehand
2792
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2793
+ * @throws {Error} If the payload is not a reader or valid buffer
2794
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2795
+ */
2796
+ PerspectiveCamera.decode = function decode(reader, length) {
2797
+ if (!(reader instanceof $Reader$1))
2798
+ reader = $Reader$1.create(reader);
2799
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
2800
+ while (reader.pos < end) {
2801
+ let tag = reader.uint32();
2802
+ switch (tag >>> 3) {
2803
+ case 1:
2804
+ message.position = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2805
+ break;
2806
+ case 2:
2807
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2808
+ break;
2809
+ case 3:
2810
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2811
+ break;
2812
+ default:
2813
+ reader.skipType(tag & 7);
2814
+ break;
2815
+ }
2816
+ }
2817
+ return message;
2818
+ };
2819
+
2820
+ /**
2821
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
2822
+ * @function decodeDelimited
2823
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2824
+ * @static
2825
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2826
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2827
+ * @throws {Error} If the payload is not a reader or valid buffer
2828
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2829
+ */
2830
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
2831
+ if (!(reader instanceof $Reader$1))
2832
+ reader = new $Reader$1(reader);
2833
+ return this.decode(reader, reader.uint32());
2834
+ };
2835
+
2836
+ /**
2837
+ * Verifies a PerspectiveCamera message.
2838
+ * @function verify
2839
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2840
+ * @static
2841
+ * @param {Object.<string,*>} message Plain object to verify
2842
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2843
+ */
2844
+ PerspectiveCamera.verify = function verify(message) {
2845
+ if (typeof message !== "object" || message === null)
2846
+ return "object expected";
2847
+ if (message.position != null && message.hasOwnProperty("position")) {
2848
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
2849
+ if (error)
2850
+ return "position." + error;
2851
+ }
2852
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
2853
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
2854
+ if (error)
2855
+ return "lookAt." + error;
2856
+ }
2857
+ if (message.up != null && message.hasOwnProperty("up")) {
2858
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
2859
+ if (error)
2860
+ return "up." + error;
2861
+ }
2862
+ return null;
2863
+ };
2864
+
2865
+ /**
2866
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
2867
+ * @function fromObject
2868
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2869
+ * @static
2870
+ * @param {Object.<string,*>} object Plain object
2871
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2872
+ */
2873
+ PerspectiveCamera.fromObject = function fromObject(object) {
2874
+ if (object instanceof $root$1.vertexvis.protobuf.stream.PerspectiveCamera)
2875
+ return object;
2876
+ let message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
2877
+ if (object.position != null) {
2878
+ if (typeof object.position !== "object")
2879
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
2880
+ message.position = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
2881
+ }
2882
+ if (object.lookAt != null) {
2883
+ if (typeof object.lookAt !== "object")
2884
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
2885
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
2886
+ }
2887
+ if (object.up != null) {
2888
+ if (typeof object.up !== "object")
2889
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
2890
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
2891
+ }
2892
+ return message;
2893
+ };
2894
+
2895
+ /**
2896
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
2897
+ * @function toObject
2898
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2899
+ * @static
2900
+ * @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
2901
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2902
+ * @returns {Object.<string,*>} Plain object
2903
+ */
2904
+ PerspectiveCamera.toObject = function toObject(message, options) {
2905
+ if (!options)
2906
+ options = {};
2907
+ let object = {};
2908
+ if (options.defaults) {
2909
+ object.position = null;
2910
+ object.lookAt = null;
2911
+ object.up = null;
2912
+ }
2913
+ if (message.position != null && message.hasOwnProperty("position"))
2914
+ object.position = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
2915
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
2916
+ object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
2917
+ if (message.up != null && message.hasOwnProperty("up"))
2918
+ object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
2919
+ return object;
2920
+ };
2921
+
2922
+ /**
2923
+ * Converts this PerspectiveCamera to JSON.
2924
+ * @function toJSON
2925
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2926
+ * @instance
2927
+ * @returns {Object.<string,*>} JSON object
2928
+ */
2929
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
2930
+ return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
2931
+ };
2932
+
2933
+ return PerspectiveCamera;
2934
+ })();
2935
+
2936
+ stream.OrthographicCamera = (function() {
2937
+
2938
+ /**
2939
+ * Properties of an OrthographicCamera.
2940
+ * @memberof vertexvis.protobuf.stream
2941
+ * @interface IOrthographicCamera
2942
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
2943
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
2944
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
2945
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
2946
+ */
2947
+
2948
+ /**
2949
+ * Constructs a new OrthographicCamera.
2950
+ * @memberof vertexvis.protobuf.stream
2951
+ * @classdesc Represents an OrthographicCamera.
2952
+ * @implements IOrthographicCamera
2953
+ * @constructor
2954
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
2955
+ */
2956
+ function OrthographicCamera(properties) {
2957
+ if (properties)
2958
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2959
+ if (properties[keys[i]] != null)
2960
+ this[keys[i]] = properties[keys[i]];
2961
+ }
2962
+
2963
+ /**
2964
+ * OrthographicCamera viewVector.
2965
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
2966
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2967
+ * @instance
2968
+ */
2969
+ OrthographicCamera.prototype.viewVector = null;
2970
+
2971
+ /**
2972
+ * OrthographicCamera lookAt.
2973
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
2974
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2975
+ * @instance
2976
+ */
2977
+ OrthographicCamera.prototype.lookAt = null;
2978
+
2979
+ /**
2980
+ * OrthographicCamera up.
2981
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
2982
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2983
+ * @instance
2984
+ */
2985
+ OrthographicCamera.prototype.up = null;
2986
+
2987
+ /**
2988
+ * OrthographicCamera fovHeight.
2989
+ * @member {number} fovHeight
2990
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2991
+ * @instance
2992
+ */
2993
+ OrthographicCamera.prototype.fovHeight = 0;
2994
+
2995
+ /**
2996
+ * Creates a new OrthographicCamera instance using the specified properties.
2997
+ * @function create
2998
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2999
+ * @static
3000
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
3001
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
3002
+ */
3003
+ OrthographicCamera.create = function create(properties) {
3004
+ return new OrthographicCamera(properties);
3005
+ };
3006
+
3007
+ /**
3008
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
3009
+ * @function encode
3010
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3011
+ * @static
3012
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
3013
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3014
+ * @returns {$protobuf.Writer} Writer
3015
+ */
3016
+ OrthographicCamera.encode = function encode(message, writer) {
3017
+ if (!writer)
3018
+ writer = $Writer$1.create();
3019
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
3020
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3021
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
3022
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3023
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
3024
+ $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3025
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
3026
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
3027
+ return writer;
3028
+ };
3029
+
3030
+ /**
3031
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
3032
+ * @function encodeDelimited
3033
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3034
+ * @static
3035
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
3036
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3037
+ * @returns {$protobuf.Writer} Writer
3038
+ */
3039
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
3040
+ return this.encode(message, writer).ldelim();
3041
+ };
3042
+
3043
+ /**
3044
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
3045
+ * @function decode
3046
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3047
+ * @static
3048
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3049
+ * @param {number} [length] Message length if known beforehand
3050
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3051
+ * @throws {Error} If the payload is not a reader or valid buffer
3052
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3053
+ */
3054
+ OrthographicCamera.decode = function decode(reader, length) {
3055
+ if (!(reader instanceof $Reader$1))
3056
+ reader = $Reader$1.create(reader);
3057
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
3058
+ while (reader.pos < end) {
3059
+ let tag = reader.uint32();
3060
+ switch (tag >>> 3) {
3061
+ case 1:
3062
+ message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3063
+ break;
3064
+ case 2:
3065
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3066
+ break;
3067
+ case 3:
3068
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3069
+ break;
3070
+ case 4:
3071
+ message.fovHeight = reader.float();
3072
+ break;
3073
+ default:
3074
+ reader.skipType(tag & 7);
3075
+ break;
3076
+ }
3077
+ }
3078
+ return message;
3079
+ };
3080
+
3081
+ /**
3082
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
3083
+ * @function decodeDelimited
3084
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3085
+ * @static
3086
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3087
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3088
+ * @throws {Error} If the payload is not a reader or valid buffer
3089
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3090
+ */
3091
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
3092
+ if (!(reader instanceof $Reader$1))
3093
+ reader = new $Reader$1(reader);
3094
+ return this.decode(reader, reader.uint32());
3095
+ };
3096
+
3097
+ /**
3098
+ * Verifies an OrthographicCamera message.
3099
+ * @function verify
3100
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3101
+ * @static
3102
+ * @param {Object.<string,*>} message Plain object to verify
3103
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3104
+ */
3105
+ OrthographicCamera.verify = function verify(message) {
3106
+ if (typeof message !== "object" || message === null)
3107
+ return "object expected";
3108
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
3109
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
3110
+ if (error)
3111
+ return "viewVector." + error;
3112
+ }
3113
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
3114
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
3115
+ if (error)
3116
+ return "lookAt." + error;
3117
+ }
3118
+ if (message.up != null && message.hasOwnProperty("up")) {
3119
+ let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
3120
+ if (error)
3121
+ return "up." + error;
3122
+ }
3123
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
3124
+ if (typeof message.fovHeight !== "number")
3125
+ return "fovHeight: number expected";
3126
+ return null;
3127
+ };
3128
+
3129
+ /**
3130
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
3131
+ * @function fromObject
3132
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3133
+ * @static
3134
+ * @param {Object.<string,*>} object Plain object
3135
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3136
+ */
3137
+ OrthographicCamera.fromObject = function fromObject(object) {
3138
+ if (object instanceof $root$1.vertexvis.protobuf.stream.OrthographicCamera)
3139
+ return object;
3140
+ let message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
3141
+ if (object.viewVector != null) {
3142
+ if (typeof object.viewVector !== "object")
3143
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
3144
+ message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
3145
+ }
3146
+ if (object.lookAt != null) {
3147
+ if (typeof object.lookAt !== "object")
3148
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
3149
+ message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
3150
+ }
3151
+ if (object.up != null) {
3152
+ if (typeof object.up !== "object")
3153
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
3154
+ message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
3155
+ }
3156
+ if (object.fovHeight != null)
3157
+ message.fovHeight = Number(object.fovHeight);
3158
+ return message;
3159
+ };
3160
+
3161
+ /**
3162
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
3163
+ * @function toObject
3164
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3165
+ * @static
3166
+ * @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
3167
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3168
+ * @returns {Object.<string,*>} Plain object
3169
+ */
3170
+ OrthographicCamera.toObject = function toObject(message, options) {
3171
+ if (!options)
3172
+ options = {};
3173
+ let object = {};
3174
+ if (options.defaults) {
3175
+ object.viewVector = null;
3176
+ object.lookAt = null;
3177
+ object.up = null;
3178
+ object.fovHeight = 0;
3179
+ }
3180
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
3181
+ object.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
3182
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
3183
+ object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
3184
+ if (message.up != null && message.hasOwnProperty("up"))
3185
+ object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
3186
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
3187
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
3188
+ return object;
3189
+ };
3190
+
3191
+ /**
3192
+ * Converts this OrthographicCamera to JSON.
3193
+ * @function toJSON
3194
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3195
+ * @instance
3196
+ * @returns {Object.<string,*>} JSON object
3197
+ */
3198
+ OrthographicCamera.prototype.toJSON = function toJSON() {
3199
+ return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
3200
+ };
3201
+
3202
+ return OrthographicCamera;
3203
+ })();
3204
+
2689
3205
  stream.Camera = (function() {
2690
3206
 
2691
3207
  /**
@@ -2695,6 +3211,8 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2695
3211
  * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
2696
3212
  * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
2697
3213
  * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
3214
+ * @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
3215
+ * @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
2698
3216
  */
2699
3217
 
2700
3218
  /**
@@ -2736,6 +3254,36 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2736
3254
  */
2737
3255
  Camera.prototype.up = null;
2738
3256
 
3257
+ /**
3258
+ * Camera perspective.
3259
+ * @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
3260
+ * @memberof vertexvis.protobuf.stream.Camera
3261
+ * @instance
3262
+ */
3263
+ Camera.prototype.perspective = null;
3264
+
3265
+ /**
3266
+ * Camera orthographic.
3267
+ * @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
3268
+ * @memberof vertexvis.protobuf.stream.Camera
3269
+ * @instance
3270
+ */
3271
+ Camera.prototype.orthographic = null;
3272
+
3273
+ // OneOf field names bound to virtual getters and setters
3274
+ let $oneOfFields;
3275
+
3276
+ /**
3277
+ * Camera type.
3278
+ * @member {"perspective"|"orthographic"|undefined} type
3279
+ * @memberof vertexvis.protobuf.stream.Camera
3280
+ * @instance
3281
+ */
3282
+ Object.defineProperty(Camera.prototype, "type", {
3283
+ get: $util$1.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
3284
+ set: $util$1.oneOfSetter($oneOfFields)
3285
+ });
3286
+
2739
3287
  /**
2740
3288
  * Creates a new Camera instance using the specified properties.
2741
3289
  * @function create
@@ -2766,6 +3314,10 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2766
3314
  $root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2767
3315
  if (message.up != null && Object.hasOwnProperty.call(message, "up"))
2768
3316
  $root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3317
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
3318
+ $root$1.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
3319
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
3320
+ $root$1.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
2769
3321
  return writer;
2770
3322
  };
2771
3323
 
@@ -2809,6 +3361,12 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2809
3361
  case 3:
2810
3362
  message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2811
3363
  break;
3364
+ case 4:
3365
+ message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
3366
+ break;
3367
+ case 5:
3368
+ message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
3369
+ break;
2812
3370
  default:
2813
3371
  reader.skipType(tag & 7);
2814
3372
  break;
@@ -2844,6 +3402,7 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2844
3402
  Camera.verify = function verify(message) {
2845
3403
  if (typeof message !== "object" || message === null)
2846
3404
  return "object expected";
3405
+ let properties = {};
2847
3406
  if (message.position != null && message.hasOwnProperty("position")) {
2848
3407
  let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
2849
3408
  if (error)
@@ -2859,6 +3418,24 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2859
3418
  if (error)
2860
3419
  return "up." + error;
2861
3420
  }
3421
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
3422
+ properties.type = 1;
3423
+ {
3424
+ let error = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
3425
+ if (error)
3426
+ return "perspective." + error;
3427
+ }
3428
+ }
3429
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
3430
+ if (properties.type === 1)
3431
+ return "type: multiple values";
3432
+ properties.type = 1;
3433
+ {
3434
+ let error = $root$1.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
3435
+ if (error)
3436
+ return "orthographic." + error;
3437
+ }
3438
+ }
2862
3439
  return null;
2863
3440
  };
2864
3441
 
@@ -2889,6 +3466,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2889
3466
  throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
2890
3467
  message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
2891
3468
  }
3469
+ if (object.perspective != null) {
3470
+ if (typeof object.perspective !== "object")
3471
+ throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
3472
+ message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
3473
+ }
3474
+ if (object.orthographic != null) {
3475
+ if (typeof object.orthographic !== "object")
3476
+ throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
3477
+ message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
3478
+ }
2892
3479
  return message;
2893
3480
  };
2894
3481
 
@@ -2916,6 +3503,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
2916
3503
  object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
2917
3504
  if (message.up != null && message.hasOwnProperty("up"))
2918
3505
  object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
3506
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
3507
+ object.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
3508
+ if (options.oneofs)
3509
+ object.type = "perspective";
3510
+ }
3511
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
3512
+ object.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
3513
+ if (options.oneofs)
3514
+ object.type = "orthographic";
3515
+ }
2919
3516
  return object;
2920
3517
  };
2921
3518
 
@@ -35818,25 +36415,128 @@ class Token {
35818
36415
  }
35819
36416
  }
35820
36417
 
35821
- function fromBoundingBoxAndLookAtCamera(boundingBox$1, camera) {
36418
+ function isPerspectiveFrameCamera(camera) {
36419
+ return camera.position != null;
36420
+ }
36421
+ function isOrthographicFrameCamera(camera) {
36422
+ const asOrtho = camera;
36423
+ return asOrtho.viewVector != null && asOrtho.fovHeight != null;
36424
+ }
36425
+ function withPositionAndViewVector(camera) {
36426
+ if (isOrthographicFrameCamera(camera)) {
36427
+ return Object.assign(Object.assign({}, camera), { position: vector3.add(camera.lookAt, vector3.negate(camera.viewVector)) });
36428
+ }
36429
+ else {
36430
+ return Object.assign(Object.assign({}, camera), { viewVector: vector3.subtract(camera.lookAt, camera.position) });
36431
+ }
36432
+ }
36433
+ function toOrthographic(data) {
36434
+ const viewVector = vector3.subtract(data.lookAt, data.position);
36435
+ return {
36436
+ viewVector,
36437
+ up: data.up,
36438
+ lookAt: data.lookAt,
36439
+ fovHeight: 2 *
36440
+ vector3.magnitude(viewVector) *
36441
+ Math.tan(angle.toRadians(data.fovY / 2.0)),
36442
+ };
36443
+ }
36444
+ function toPerspective(data, fovY = 45) {
36445
+ const expectedMagnitude = data.fovHeight / (2 * Math.tan(angle.toRadians(fovY / 2)));
36446
+ const receivedMagnitude = vector3.magnitude(data.viewVector);
36447
+ const magnitudeScale = expectedMagnitude / receivedMagnitude;
36448
+ return {
36449
+ position: vector3.add(data.lookAt, vector3.negate(vector3.scale(magnitudeScale, data.viewVector))),
36450
+ up: data.up,
36451
+ lookAt: data.lookAt,
36452
+ fovY,
36453
+ };
36454
+ }
36455
+ function toProtobuf(camera) {
36456
+ if (isOrthographicFrameCamera(camera)) {
36457
+ return {
36458
+ orthographic: {
36459
+ viewVector: Object.assign({}, camera.viewVector),
36460
+ lookAt: Object.assign({}, camera.lookAt),
36461
+ up: Object.assign({}, camera.up),
36462
+ fovHeight: camera.fovHeight,
36463
+ },
36464
+ };
36465
+ }
36466
+ else if (isPerspectiveFrameCamera(camera)) {
36467
+ return {
36468
+ perspective: {
36469
+ position: Object.assign({}, camera.position),
36470
+ lookAt: Object.assign({}, camera.lookAt),
36471
+ up: Object.assign({}, camera.up),
36472
+ },
36473
+ position: Object.assign({}, camera.position),
36474
+ lookAt: Object.assign({}, camera.lookAt),
36475
+ up: Object.assign({}, camera.up),
36476
+ };
36477
+ }
36478
+ else {
36479
+ return Object.assign({}, camera);
36480
+ }
36481
+ }
36482
+
36483
+ function fromBoundingBoxAndLookAtCamera(boundingBox, camera) {
36484
+ return isOrthographicFrameCamera(camera)
36485
+ ? fromBoundingBoxAndOrthographicCamera(boundingBox, camera)
36486
+ : fromBoundingBoxAndPerspectiveCamera(boundingBox, camera);
36487
+ }
36488
+ // Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/PerspectiveCamera.java#L65
36489
+ // and needs to remain in sync with that computation.
36490
+ // TODO: revisit computation of these values in a single location
36491
+ function fromBoundingBoxAndPerspectiveCamera(boundingBox$1, camera) {
35822
36492
  const boundingBoxCenter = boundingBox.center(boundingBox$1);
35823
- const cameraToCenter = vector3.subtract(camera.position, boundingBoxCenter);
35824
36493
  const centerToBoundingPlane = vector3.subtract(boundingBox$1.max, boundingBoxCenter);
35825
- const distanceToCenterAlongViewVec = Math.abs(vector3.dot(vector3.subtract(camera.lookAt, camera.position), cameraToCenter)) / vector3.magnitude(vector3.subtract(camera.lookAt, camera.position));
35826
- const radius = 1.1 * vector3.magnitude(centerToBoundingPlane);
35827
- let far = distanceToCenterAlongViewVec + radius;
35828
- let near = far * 0.01;
35829
- if (near > distanceToCenterAlongViewVec - radius) {
35830
- if (near > 1000) {
35831
- const difference = near - 1000;
35832
- near = 1000;
35833
- far -= difference;
35834
- }
36494
+ const radius = vector3.magnitude(centerToBoundingPlane);
36495
+ const length = Math.max(radius, vector3.magnitude(boundingBoxCenter));
36496
+ const epsilon = length === 0 ? 1.0 : length * 1e-6;
36497
+ const minRange = epsilon * 1e2;
36498
+ const signedDistToEye = vector3.dot(vector3.subtract(boundingBoxCenter, camera.position), vector3.normalize(vector3.subtract(camera.lookAt, camera.position)));
36499
+ const bRadius = Math.max(radius, minRange);
36500
+ let newFar = bRadius + signedDistToEye < minRange
36501
+ ? bRadius * 3.0
36502
+ : bRadius + signedDistToEye;
36503
+ let newNear = newFar - bRadius * 2.0 < minRange
36504
+ ? Math.min(minRange, newFar)
36505
+ : newFar - bRadius * 2.0;
36506
+ if (newFar - newNear < minRange) {
36507
+ newNear = Math.max(newNear, minRange);
36508
+ newFar += newNear + minRange;
35835
36509
  }
35836
- else {
35837
- near = distanceToCenterAlongViewVec - radius;
36510
+ else if (newNear / newFar < 0.0001) {
36511
+ newNear = newFar * 0.0001;
36512
+ }
36513
+ if (newNear > newFar - bRadius * 2.0) {
36514
+ if (newNear > 1000 + minRange) {
36515
+ newFar -= newNear - 1000;
36516
+ newNear = 1000;
36517
+ }
35838
36518
  }
35839
- return { far, near };
36519
+ return {
36520
+ near: newNear,
36521
+ far: newFar,
36522
+ };
36523
+ }
36524
+ // Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/OrthographicCamera.java#L35
36525
+ // and needs to remain in sync with that computation.
36526
+ // TODO: revisit computation of these values in a single location
36527
+ function fromBoundingBoxAndOrthographicCamera(boundingBox$1, camera) {
36528
+ const boundingBoxCenter = boundingBox.center(boundingBox$1);
36529
+ const centerToBoundingPlane = vector3.subtract(boundingBox$1.max, boundingBoxCenter);
36530
+ const radius = vector3.magnitude(centerToBoundingPlane);
36531
+ const length = Math.max(radius, vector3.magnitude(boundingBoxCenter));
36532
+ const epsilon = length === 0 ? 1.0 : length * 1e-6;
36533
+ const minRange = epsilon * 1e2;
36534
+ const projCenter = vector3.dot(vector3.subtract(boundingBoxCenter, camera.lookAt), camera.viewVector);
36535
+ const bRadius = Math.max(radius, minRange);
36536
+ return {
36537
+ near: projCenter - bRadius,
36538
+ far: projCenter + bRadius,
36539
+ };
35840
36540
  }
35841
36541
 
35842
36542
  function create$2(data = {}) {
@@ -36111,7 +36811,7 @@ class FeatureMap {
36111
36811
  }
36112
36812
 
36113
36813
  async function loadWorker() {
36114
- return import('./png-decoder-3f1fa486.js');
36814
+ return import('./png-decoder-f35def4c.js');
36115
36815
  }
36116
36816
 
36117
36817
  let workerLoader;
@@ -36203,19 +36903,14 @@ class FrameScene {
36203
36903
  this.hasChanged = hasChanged;
36204
36904
  }
36205
36905
  }
36206
- class FramePerspectiveCamera {
36207
- constructor(position, lookAt, up, near, far, aspectRatio, fovY) {
36906
+ class FrameCameraBase {
36907
+ constructor(position, lookAt, up, near, far, aspectRatio) {
36208
36908
  this.position = position;
36209
36909
  this.lookAt = lookAt;
36210
36910
  this.up = up;
36211
36911
  this.near = near;
36212
36912
  this.far = far;
36213
36913
  this.aspectRatio = aspectRatio;
36214
- this.fovY = fovY;
36215
- }
36216
- static fromBoundingBox(camera, boundingBox, aspectRatio) {
36217
- const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
36218
- return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
36219
36914
  }
36220
36915
  get direction() {
36221
36916
  return vector3.normalize(this.viewVector);
@@ -36238,22 +36933,14 @@ class FramePerspectiveCamera {
36238
36933
  get projectionViewMatrix() {
36239
36934
  return this.computeCameraMatrices().projectionViewMatrix;
36240
36935
  }
36241
- computeCameraMatrices() {
36242
- if (this.cameraMatrices == null) {
36243
- const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
36244
- const worldMatrix = matrix4.invert(viewMatrix);
36245
- const projectionMatrix = matrix4.makePerspective(this.near, this.far, this.fovY, this.aspectRatio);
36246
- const projectionMatrixInverse = matrix4.invert(projectionMatrix);
36247
- const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
36248
- this.cameraMatrices = {
36249
- viewMatrix,
36250
- worldMatrix,
36251
- projectionMatrix,
36252
- projectionMatrixInverse,
36253
- projectionViewMatrix,
36254
- };
36936
+ static fromBoundingBox(camera, boundingBox, aspectRatio) {
36937
+ const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
36938
+ if (isOrthographicFrameCamera(camera)) {
36939
+ return new FrameOrthographicCamera(camera.viewVector, camera.lookAt, camera.up, near, far, aspectRatio, camera.fovHeight);
36940
+ }
36941
+ else {
36942
+ return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
36255
36943
  }
36256
- return this.cameraMatrices;
36257
36944
  }
36258
36945
  /**
36259
36946
  * Checks if the given point, in world space, is behind the near plane
@@ -36284,6 +36971,83 @@ class FramePerspectiveCamera {
36284
36971
  const pt = plane.intersectLine(nearP, vl);
36285
36972
  return pt != null ? vector3.add(pt, position) : undefined;
36286
36973
  }
36974
+ computeCameraMatrices() {
36975
+ if (this.cameraMatrices == null) {
36976
+ return {
36977
+ viewMatrix: matrix4.makeIdentity(),
36978
+ worldMatrix: matrix4.makeIdentity(),
36979
+ projectionMatrix: matrix4.makeIdentity(),
36980
+ projectionMatrixInverse: matrix4.makeIdentity(),
36981
+ projectionViewMatrix: matrix4.makeIdentity(),
36982
+ };
36983
+ }
36984
+ return this.cameraMatrices;
36985
+ }
36986
+ updateCameraMatrices(cameraMatrices) {
36987
+ this.cameraMatrices = cameraMatrices;
36988
+ return this.cameraMatrices;
36989
+ }
36990
+ }
36991
+ class FramePerspectiveCamera extends FrameCameraBase {
36992
+ constructor(position, lookAt, up, near, far, aspectRatio, fovY) {
36993
+ super(position, lookAt, up, near, far, aspectRatio);
36994
+ this.position = position;
36995
+ this.lookAt = lookAt;
36996
+ this.up = up;
36997
+ this.near = near;
36998
+ this.far = far;
36999
+ this.aspectRatio = aspectRatio;
37000
+ this.fovY = fovY;
37001
+ }
37002
+ computeCameraMatrices() {
37003
+ if (this.cameraMatrices == null) {
37004
+ const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
37005
+ const worldMatrix = matrix4.invert(viewMatrix);
37006
+ const projectionMatrix = matrix4.makePerspective(this.near, this.far, this.fovY, this.aspectRatio);
37007
+ const projectionMatrixInverse = matrix4.invert(projectionMatrix);
37008
+ const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
37009
+ return super.updateCameraMatrices({
37010
+ viewMatrix,
37011
+ worldMatrix,
37012
+ projectionMatrix,
37013
+ projectionMatrixInverse,
37014
+ projectionViewMatrix,
37015
+ });
37016
+ }
37017
+ return this.cameraMatrices;
37018
+ }
37019
+ }
37020
+ class FrameOrthographicCamera extends FrameCameraBase {
37021
+ constructor(viewVector, lookAt, up, near, far, aspectRatio, fovHeight) {
37022
+ super(vector3.add(lookAt, vector3.negate(viewVector)), lookAt, up, near, far, aspectRatio);
37023
+ this.lookAt = lookAt;
37024
+ this.up = up;
37025
+ this.near = near;
37026
+ this.far = far;
37027
+ this.aspectRatio = aspectRatio;
37028
+ this.fovHeight = fovHeight;
37029
+ this.top = fovHeight * 0.5;
37030
+ this.bottom = -this.top;
37031
+ this.right = this.top * aspectRatio;
37032
+ this.left = -this.right;
37033
+ }
37034
+ computeCameraMatrices() {
37035
+ if (this.cameraMatrices == null) {
37036
+ const viewMatrix = matrix4.makeLookAtView(this.position, this.lookAt, this.up);
37037
+ const worldMatrix = matrix4.invert(viewMatrix);
37038
+ const projectionMatrix = matrix4.makeOrthographic(this.left, this.right, this.bottom, this.top, this.near, this.far);
37039
+ const projectionMatrixInverse = matrix4.invert(projectionMatrix);
37040
+ const projectionViewMatrix = matrix4.multiply(projectionMatrix, viewMatrix);
37041
+ return super.updateCameraMatrices({
37042
+ viewMatrix,
37043
+ worldMatrix,
37044
+ projectionMatrix,
37045
+ projectionMatrixInverse,
37046
+ projectionViewMatrix,
37047
+ });
37048
+ }
37049
+ return this.cameraMatrices;
37050
+ }
36287
37051
  }
36288
37052
 
36289
37053
  class ScaledUnitConverter {
@@ -36737,7 +37501,29 @@ function fromPbScalarWrapper() {
36737
37501
  return mapper.defineMapper((value) => (value === null || value === void 0 ? void 0 : value.value) || undefined, (value) => value);
36738
37502
  }
36739
37503
 
36740
- 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 }));
37504
+ 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]) => ({
37505
+ position,
37506
+ lookAt,
37507
+ up,
37508
+ // TODO: map fovY property when available
37509
+ fovY: 45,
37510
+ }));
37511
+ 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]) => ({
37512
+ viewVector,
37513
+ lookAt,
37514
+ up,
37515
+ fovHeight,
37516
+ }));
37517
+ 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]) => {
37518
+ var _a;
37519
+ return (_a = perspective !== null && perspective !== void 0 ? perspective : orthographic) !== null && _a !== void 0 ? _a : {
37520
+ position: position !== null && position !== void 0 ? position : vector3.back(),
37521
+ lookAt: lookAt !== null && lookAt !== void 0 ? lookAt : vector3.origin(),
37522
+ up: up !== null && up !== void 0 ? up : vector3.up(),
37523
+ // TODO: map fovY property when available
37524
+ fovY: 45,
37525
+ };
37526
+ });
36741
37527
  const fromPbSectionPlane = mapper.defineMapper(mapper.read(mapper.mapProp('normal', mapper.compose(mapper.required('normal'), fromPbVector3f)), mapper.requiredProp('offset')), ([normal, offset]) => ({ normal, offset }));
36742
37528
  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]) => ({
36743
37529
  frameDimensions,
@@ -36757,7 +37543,7 @@ const fromPbSceneAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('ca
36757
37543
  hasChanged,
36758
37544
  }));
36759
37545
  const fromPbFrameSceneAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('sceneAttributes', mapper.compose(mapper.required('sceneAttributes'), fromPbSceneAttributes))), ([sceneAttr]) => sceneAttr);
36760
- const fromPbFrameCamera = mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) => FramePerspectiveCamera.fromBoundingBox(sceneAttr.camera, sceneAttr.boundingBox, dimensions.aspectRatio(imageAttr.frameDimensions)));
37546
+ const fromPbFrameCamera = mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) => FrameCameraBase.fromBoundingBox(sceneAttr.camera, sceneAttr.boundingBox, dimensions.aspectRatio(imageAttr.frameDimensions)));
36761
37547
  function fromPbFrameScene(worldOrientation) {
36762
37548
  return mapper.defineMapper(mapper.read(fromPbFrameSceneAttributes, fromPbFrameCamera), ([sceneAttr, camera]) => new FrameScene(camera, sceneAttr.boundingBox, sceneAttr.crossSectioning, worldOrientation, sceneAttr.hasChanged));
36763
37549
  }
@@ -39462,6 +40248,522 @@ const vertexvis = $root.vertexvis = (() => {
39462
40248
  */
39463
40249
  const stream = {};
39464
40250
 
40251
+ stream.PerspectiveCamera = (function() {
40252
+
40253
+ /**
40254
+ * Properties of a PerspectiveCamera.
40255
+ * @memberof vertexvis.protobuf.stream
40256
+ * @interface IPerspectiveCamera
40257
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
40258
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
40259
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
40260
+ */
40261
+
40262
+ /**
40263
+ * Constructs a new PerspectiveCamera.
40264
+ * @memberof vertexvis.protobuf.stream
40265
+ * @classdesc Represents a PerspectiveCamera.
40266
+ * @implements IPerspectiveCamera
40267
+ * @constructor
40268
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
40269
+ */
40270
+ function PerspectiveCamera(properties) {
40271
+ if (properties)
40272
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40273
+ if (properties[keys[i]] != null)
40274
+ this[keys[i]] = properties[keys[i]];
40275
+ }
40276
+
40277
+ /**
40278
+ * PerspectiveCamera position.
40279
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
40280
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40281
+ * @instance
40282
+ */
40283
+ PerspectiveCamera.prototype.position = null;
40284
+
40285
+ /**
40286
+ * PerspectiveCamera lookAt.
40287
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
40288
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40289
+ * @instance
40290
+ */
40291
+ PerspectiveCamera.prototype.lookAt = null;
40292
+
40293
+ /**
40294
+ * PerspectiveCamera up.
40295
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
40296
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40297
+ * @instance
40298
+ */
40299
+ PerspectiveCamera.prototype.up = null;
40300
+
40301
+ /**
40302
+ * Creates a new PerspectiveCamera instance using the specified properties.
40303
+ * @function create
40304
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40305
+ * @static
40306
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
40307
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
40308
+ */
40309
+ PerspectiveCamera.create = function create(properties) {
40310
+ return new PerspectiveCamera(properties);
40311
+ };
40312
+
40313
+ /**
40314
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
40315
+ * @function encode
40316
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40317
+ * @static
40318
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
40319
+ * @param {$protobuf.Writer} [writer] Writer to encode to
40320
+ * @returns {$protobuf.Writer} Writer
40321
+ */
40322
+ PerspectiveCamera.encode = function encode(message, writer) {
40323
+ if (!writer)
40324
+ writer = $Writer.create();
40325
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
40326
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
40327
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
40328
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
40329
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
40330
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
40331
+ return writer;
40332
+ };
40333
+
40334
+ /**
40335
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
40336
+ * @function encodeDelimited
40337
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40338
+ * @static
40339
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
40340
+ * @param {$protobuf.Writer} [writer] Writer to encode to
40341
+ * @returns {$protobuf.Writer} Writer
40342
+ */
40343
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
40344
+ return this.encode(message, writer).ldelim();
40345
+ };
40346
+
40347
+ /**
40348
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
40349
+ * @function decode
40350
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40351
+ * @static
40352
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40353
+ * @param {number} [length] Message length if known beforehand
40354
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
40355
+ * @throws {Error} If the payload is not a reader or valid buffer
40356
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
40357
+ */
40358
+ PerspectiveCamera.decode = function decode(reader, length) {
40359
+ if (!(reader instanceof $Reader))
40360
+ reader = $Reader.create(reader);
40361
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
40362
+ while (reader.pos < end) {
40363
+ let tag = reader.uint32();
40364
+ switch (tag >>> 3) {
40365
+ case 1:
40366
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40367
+ break;
40368
+ case 2:
40369
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40370
+ break;
40371
+ case 3:
40372
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40373
+ break;
40374
+ default:
40375
+ reader.skipType(tag & 7);
40376
+ break;
40377
+ }
40378
+ }
40379
+ return message;
40380
+ };
40381
+
40382
+ /**
40383
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
40384
+ * @function decodeDelimited
40385
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40386
+ * @static
40387
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40388
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
40389
+ * @throws {Error} If the payload is not a reader or valid buffer
40390
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
40391
+ */
40392
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
40393
+ if (!(reader instanceof $Reader))
40394
+ reader = new $Reader(reader);
40395
+ return this.decode(reader, reader.uint32());
40396
+ };
40397
+
40398
+ /**
40399
+ * Verifies a PerspectiveCamera message.
40400
+ * @function verify
40401
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40402
+ * @static
40403
+ * @param {Object.<string,*>} message Plain object to verify
40404
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
40405
+ */
40406
+ PerspectiveCamera.verify = function verify(message) {
40407
+ if (typeof message !== "object" || message === null)
40408
+ return "object expected";
40409
+ if (message.position != null && message.hasOwnProperty("position")) {
40410
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
40411
+ if (error)
40412
+ return "position." + error;
40413
+ }
40414
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
40415
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
40416
+ if (error)
40417
+ return "lookAt." + error;
40418
+ }
40419
+ if (message.up != null && message.hasOwnProperty("up")) {
40420
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
40421
+ if (error)
40422
+ return "up." + error;
40423
+ }
40424
+ return null;
40425
+ };
40426
+
40427
+ /**
40428
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
40429
+ * @function fromObject
40430
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40431
+ * @static
40432
+ * @param {Object.<string,*>} object Plain object
40433
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
40434
+ */
40435
+ PerspectiveCamera.fromObject = function fromObject(object) {
40436
+ if (object instanceof $root.vertexvis.protobuf.stream.PerspectiveCamera)
40437
+ return object;
40438
+ let message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
40439
+ if (object.position != null) {
40440
+ if (typeof object.position !== "object")
40441
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
40442
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
40443
+ }
40444
+ if (object.lookAt != null) {
40445
+ if (typeof object.lookAt !== "object")
40446
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
40447
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
40448
+ }
40449
+ if (object.up != null) {
40450
+ if (typeof object.up !== "object")
40451
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
40452
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
40453
+ }
40454
+ return message;
40455
+ };
40456
+
40457
+ /**
40458
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
40459
+ * @function toObject
40460
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40461
+ * @static
40462
+ * @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
40463
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
40464
+ * @returns {Object.<string,*>} Plain object
40465
+ */
40466
+ PerspectiveCamera.toObject = function toObject(message, options) {
40467
+ if (!options)
40468
+ options = {};
40469
+ let object = {};
40470
+ if (options.defaults) {
40471
+ object.position = null;
40472
+ object.lookAt = null;
40473
+ object.up = null;
40474
+ }
40475
+ if (message.position != null && message.hasOwnProperty("position"))
40476
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
40477
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
40478
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
40479
+ if (message.up != null && message.hasOwnProperty("up"))
40480
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
40481
+ return object;
40482
+ };
40483
+
40484
+ /**
40485
+ * Converts this PerspectiveCamera to JSON.
40486
+ * @function toJSON
40487
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
40488
+ * @instance
40489
+ * @returns {Object.<string,*>} JSON object
40490
+ */
40491
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
40492
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
40493
+ };
40494
+
40495
+ return PerspectiveCamera;
40496
+ })();
40497
+
40498
+ stream.OrthographicCamera = (function() {
40499
+
40500
+ /**
40501
+ * Properties of an OrthographicCamera.
40502
+ * @memberof vertexvis.protobuf.stream
40503
+ * @interface IOrthographicCamera
40504
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
40505
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
40506
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
40507
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
40508
+ */
40509
+
40510
+ /**
40511
+ * Constructs a new OrthographicCamera.
40512
+ * @memberof vertexvis.protobuf.stream
40513
+ * @classdesc Represents an OrthographicCamera.
40514
+ * @implements IOrthographicCamera
40515
+ * @constructor
40516
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
40517
+ */
40518
+ function OrthographicCamera(properties) {
40519
+ if (properties)
40520
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40521
+ if (properties[keys[i]] != null)
40522
+ this[keys[i]] = properties[keys[i]];
40523
+ }
40524
+
40525
+ /**
40526
+ * OrthographicCamera viewVector.
40527
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
40528
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40529
+ * @instance
40530
+ */
40531
+ OrthographicCamera.prototype.viewVector = null;
40532
+
40533
+ /**
40534
+ * OrthographicCamera lookAt.
40535
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
40536
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40537
+ * @instance
40538
+ */
40539
+ OrthographicCamera.prototype.lookAt = null;
40540
+
40541
+ /**
40542
+ * OrthographicCamera up.
40543
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
40544
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40545
+ * @instance
40546
+ */
40547
+ OrthographicCamera.prototype.up = null;
40548
+
40549
+ /**
40550
+ * OrthographicCamera fovHeight.
40551
+ * @member {number} fovHeight
40552
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40553
+ * @instance
40554
+ */
40555
+ OrthographicCamera.prototype.fovHeight = 0;
40556
+
40557
+ /**
40558
+ * Creates a new OrthographicCamera instance using the specified properties.
40559
+ * @function create
40560
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40561
+ * @static
40562
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
40563
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
40564
+ */
40565
+ OrthographicCamera.create = function create(properties) {
40566
+ return new OrthographicCamera(properties);
40567
+ };
40568
+
40569
+ /**
40570
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
40571
+ * @function encode
40572
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40573
+ * @static
40574
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
40575
+ * @param {$protobuf.Writer} [writer] Writer to encode to
40576
+ * @returns {$protobuf.Writer} Writer
40577
+ */
40578
+ OrthographicCamera.encode = function encode(message, writer) {
40579
+ if (!writer)
40580
+ writer = $Writer.create();
40581
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
40582
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
40583
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
40584
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
40585
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
40586
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
40587
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
40588
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
40589
+ return writer;
40590
+ };
40591
+
40592
+ /**
40593
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
40594
+ * @function encodeDelimited
40595
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40596
+ * @static
40597
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
40598
+ * @param {$protobuf.Writer} [writer] Writer to encode to
40599
+ * @returns {$protobuf.Writer} Writer
40600
+ */
40601
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
40602
+ return this.encode(message, writer).ldelim();
40603
+ };
40604
+
40605
+ /**
40606
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
40607
+ * @function decode
40608
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40609
+ * @static
40610
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40611
+ * @param {number} [length] Message length if known beforehand
40612
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
40613
+ * @throws {Error} If the payload is not a reader or valid buffer
40614
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
40615
+ */
40616
+ OrthographicCamera.decode = function decode(reader, length) {
40617
+ if (!(reader instanceof $Reader))
40618
+ reader = $Reader.create(reader);
40619
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
40620
+ while (reader.pos < end) {
40621
+ let tag = reader.uint32();
40622
+ switch (tag >>> 3) {
40623
+ case 1:
40624
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40625
+ break;
40626
+ case 2:
40627
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40628
+ break;
40629
+ case 3:
40630
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
40631
+ break;
40632
+ case 4:
40633
+ message.fovHeight = reader.float();
40634
+ break;
40635
+ default:
40636
+ reader.skipType(tag & 7);
40637
+ break;
40638
+ }
40639
+ }
40640
+ return message;
40641
+ };
40642
+
40643
+ /**
40644
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
40645
+ * @function decodeDelimited
40646
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40647
+ * @static
40648
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40649
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
40650
+ * @throws {Error} If the payload is not a reader or valid buffer
40651
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
40652
+ */
40653
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
40654
+ if (!(reader instanceof $Reader))
40655
+ reader = new $Reader(reader);
40656
+ return this.decode(reader, reader.uint32());
40657
+ };
40658
+
40659
+ /**
40660
+ * Verifies an OrthographicCamera message.
40661
+ * @function verify
40662
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40663
+ * @static
40664
+ * @param {Object.<string,*>} message Plain object to verify
40665
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
40666
+ */
40667
+ OrthographicCamera.verify = function verify(message) {
40668
+ if (typeof message !== "object" || message === null)
40669
+ return "object expected";
40670
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
40671
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
40672
+ if (error)
40673
+ return "viewVector." + error;
40674
+ }
40675
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
40676
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
40677
+ if (error)
40678
+ return "lookAt." + error;
40679
+ }
40680
+ if (message.up != null && message.hasOwnProperty("up")) {
40681
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
40682
+ if (error)
40683
+ return "up." + error;
40684
+ }
40685
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
40686
+ if (typeof message.fovHeight !== "number")
40687
+ return "fovHeight: number expected";
40688
+ return null;
40689
+ };
40690
+
40691
+ /**
40692
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
40693
+ * @function fromObject
40694
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40695
+ * @static
40696
+ * @param {Object.<string,*>} object Plain object
40697
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
40698
+ */
40699
+ OrthographicCamera.fromObject = function fromObject(object) {
40700
+ if (object instanceof $root.vertexvis.protobuf.stream.OrthographicCamera)
40701
+ return object;
40702
+ let message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
40703
+ if (object.viewVector != null) {
40704
+ if (typeof object.viewVector !== "object")
40705
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
40706
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
40707
+ }
40708
+ if (object.lookAt != null) {
40709
+ if (typeof object.lookAt !== "object")
40710
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
40711
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
40712
+ }
40713
+ if (object.up != null) {
40714
+ if (typeof object.up !== "object")
40715
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
40716
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
40717
+ }
40718
+ if (object.fovHeight != null)
40719
+ message.fovHeight = Number(object.fovHeight);
40720
+ return message;
40721
+ };
40722
+
40723
+ /**
40724
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
40725
+ * @function toObject
40726
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40727
+ * @static
40728
+ * @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
40729
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
40730
+ * @returns {Object.<string,*>} Plain object
40731
+ */
40732
+ OrthographicCamera.toObject = function toObject(message, options) {
40733
+ if (!options)
40734
+ options = {};
40735
+ let object = {};
40736
+ if (options.defaults) {
40737
+ object.viewVector = null;
40738
+ object.lookAt = null;
40739
+ object.up = null;
40740
+ object.fovHeight = 0;
40741
+ }
40742
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
40743
+ object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
40744
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
40745
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
40746
+ if (message.up != null && message.hasOwnProperty("up"))
40747
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
40748
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
40749
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
40750
+ return object;
40751
+ };
40752
+
40753
+ /**
40754
+ * Converts this OrthographicCamera to JSON.
40755
+ * @function toJSON
40756
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
40757
+ * @instance
40758
+ * @returns {Object.<string,*>} JSON object
40759
+ */
40760
+ OrthographicCamera.prototype.toJSON = function toJSON() {
40761
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
40762
+ };
40763
+
40764
+ return OrthographicCamera;
40765
+ })();
40766
+
39465
40767
  stream.Camera = (function() {
39466
40768
 
39467
40769
  /**
@@ -39471,6 +40773,8 @@ const vertexvis = $root.vertexvis = (() => {
39471
40773
  * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
39472
40774
  * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
39473
40775
  * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
40776
+ * @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
40777
+ * @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
39474
40778
  */
39475
40779
 
39476
40780
  /**
@@ -39512,6 +40816,36 @@ const vertexvis = $root.vertexvis = (() => {
39512
40816
  */
39513
40817
  Camera.prototype.up = null;
39514
40818
 
40819
+ /**
40820
+ * Camera perspective.
40821
+ * @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
40822
+ * @memberof vertexvis.protobuf.stream.Camera
40823
+ * @instance
40824
+ */
40825
+ Camera.prototype.perspective = null;
40826
+
40827
+ /**
40828
+ * Camera orthographic.
40829
+ * @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
40830
+ * @memberof vertexvis.protobuf.stream.Camera
40831
+ * @instance
40832
+ */
40833
+ Camera.prototype.orthographic = null;
40834
+
40835
+ // OneOf field names bound to virtual getters and setters
40836
+ let $oneOfFields;
40837
+
40838
+ /**
40839
+ * Camera type.
40840
+ * @member {"perspective"|"orthographic"|undefined} type
40841
+ * @memberof vertexvis.protobuf.stream.Camera
40842
+ * @instance
40843
+ */
40844
+ Object.defineProperty(Camera.prototype, "type", {
40845
+ get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
40846
+ set: $util.oneOfSetter($oneOfFields)
40847
+ });
40848
+
39515
40849
  /**
39516
40850
  * Creates a new Camera instance using the specified properties.
39517
40851
  * @function create
@@ -39542,6 +40876,10 @@ const vertexvis = $root.vertexvis = (() => {
39542
40876
  $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
39543
40877
  if (message.up != null && Object.hasOwnProperty.call(message, "up"))
39544
40878
  $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
40879
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
40880
+ $root.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
40881
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
40882
+ $root.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
39545
40883
  return writer;
39546
40884
  };
39547
40885
 
@@ -39585,6 +40923,12 @@ const vertexvis = $root.vertexvis = (() => {
39585
40923
  case 3:
39586
40924
  message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
39587
40925
  break;
40926
+ case 4:
40927
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
40928
+ break;
40929
+ case 5:
40930
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
40931
+ break;
39588
40932
  default:
39589
40933
  reader.skipType(tag & 7);
39590
40934
  break;
@@ -39620,6 +40964,7 @@ const vertexvis = $root.vertexvis = (() => {
39620
40964
  Camera.verify = function verify(message) {
39621
40965
  if (typeof message !== "object" || message === null)
39622
40966
  return "object expected";
40967
+ let properties = {};
39623
40968
  if (message.position != null && message.hasOwnProperty("position")) {
39624
40969
  let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
39625
40970
  if (error)
@@ -39635,6 +40980,24 @@ const vertexvis = $root.vertexvis = (() => {
39635
40980
  if (error)
39636
40981
  return "up." + error;
39637
40982
  }
40983
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
40984
+ properties.type = 1;
40985
+ {
40986
+ let error = $root.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
40987
+ if (error)
40988
+ return "perspective." + error;
40989
+ }
40990
+ }
40991
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
40992
+ if (properties.type === 1)
40993
+ return "type: multiple values";
40994
+ properties.type = 1;
40995
+ {
40996
+ let error = $root.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
40997
+ if (error)
40998
+ return "orthographic." + error;
40999
+ }
41000
+ }
39638
41001
  return null;
39639
41002
  };
39640
41003
 
@@ -39665,6 +41028,16 @@ const vertexvis = $root.vertexvis = (() => {
39665
41028
  throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
39666
41029
  message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
39667
41030
  }
41031
+ if (object.perspective != null) {
41032
+ if (typeof object.perspective !== "object")
41033
+ throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
41034
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
41035
+ }
41036
+ if (object.orthographic != null) {
41037
+ if (typeof object.orthographic !== "object")
41038
+ throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
41039
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
41040
+ }
39668
41041
  return message;
39669
41042
  };
39670
41043
 
@@ -39692,6 +41065,16 @@ const vertexvis = $root.vertexvis = (() => {
39692
41065
  object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
39693
41066
  if (message.up != null && message.hasOwnProperty("up"))
39694
41067
  object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
41068
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
41069
+ object.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
41070
+ if (options.oneofs)
41071
+ object.type = "perspective";
41072
+ }
41073
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
41074
+ object.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
41075
+ if (options.oneofs)
41076
+ object.type = "orthographic";
41077
+ }
39695
41078
  return object;
39696
41079
  };
39697
41080
 
@@ -70225,4 +71608,4 @@ const toPbStreamAttributes = mapper.defineMapper(mapper.read(mapper.mapProp('dep
70225
71608
  featureMaps: fm,
70226
71609
  }));
70227
71610
 
70228
- export { AngleUnits as A, DistanceUnits as D, EntityType as E, Frame as F, Orientation as O, StreamApi as S, WebSocketClientImpl as W, FrameImage as a, FrameScene as b, FramePerspectiveCamera as c, AreaUnits as d, fromPbVector3f as e, fromBoundingBoxAndLookAtCamera as f, fromPbPlane as g, fromPbStencilBufferOrThrow as h, decodePng as i, DepthBuffer as j, toPbStreamAttributes as k, toPbRGBi as l, StreamRequestError as m, fromPbFrameOrThrow as n, fromPbStartStreamResponseOrThrow as o, protoToDate as p, fromPbReconnectResponseOrThrow as q, fromPbSyncTimeResponseOrThrow as r, currentDateAsProtoTimestamp as s, toProtoDuration as t, fromPbRefreshTokenResponseOrThrow as u, vertexvis as v, StandardView as w };
71611
+ export { AngleUnits as A, toOrthographic as B, isOrthographicFrameCamera as C, DistanceUnits as D, EntityType as E, Frame as F, toPerspective as G, StandardView as H, Orientation as O, StreamApi as S, WebSocketClientImpl as W, FrameImage as a, FrameScene as b, FrameOrthographicCamera as c, FramePerspectiveCamera as d, AreaUnits as e, toProtobuf as f, fromBoundingBoxAndLookAtCamera as g, fromPbVector3f as h, fromPbPlane as i, fromPbStencilBufferOrThrow as j, decodePng as k, DepthBuffer as l, toPbStreamAttributes as m, toPbRGBi as n, StreamRequestError as o, protoToDate as p, fromPbFrameOrThrow as q, fromPbStartStreamResponseOrThrow as r, fromPbReconnectResponseOrThrow as s, toProtoDuration as t, fromPbSyncTimeResponseOrThrow as u, vertexvis as v, withPositionAndViewVector as w, currentDateAsProtoTimestamp as x, fromPbRefreshTokenResponseOrThrow as y, isPerspectiveFrameCamera as z };