@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.
- package/dist/cjs/{browser.esm-31b03292.js → browser.esm-c51162f8.js} +1 -1
- package/dist/cjs/{bundle.esm-dc0a8361.js → bundle.esm-1b8b1f36.js} +34 -0
- package/dist/cjs/{config-90ee43d5.js → config-91efd353.js} +2 -2
- package/dist/cjs/{cursors-ad2fd395.js → cursors-14827f58.js} +1 -1
- package/dist/cjs/{dom-dd265f48.js → dom-c697cf99.js} +1 -1
- package/dist/cjs/{entities-aa59890e.js → entities-0829b4a4.js} +3 -3
- package/dist/cjs/index.cjs.js +13 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mapper-f6e6cafe.js → mapper-67af470b.js} +2 -2
- package/dist/cjs/{markup-fb1553b1.js → markup-835f2e83.js} +2 -2
- package/dist/cjs/{measurement-aba1e0e8.js → measurement-8e0ce89a.js} +2 -2
- package/dist/cjs/{model-4ec0c36e.js → model-78241d4f.js} +1 -1
- package/dist/cjs/{overlays-40c6cbc7.js → overlays-06786e52.js} +2 -2
- package/dist/cjs/{png-decoder-27d25eed.js → png-decoder-01b76242.js} +1 -1
- package/dist/cjs/{results-bc325974.js → results-7a694238.js} +1 -1
- package/dist/cjs/{scene-d420fd26.js → scene-23535fc0.js} +176 -85
- package/dist/cjs/{streamAttributes-d6236448.js → streamAttributes-f13c1a96.js} +1431 -41
- package/dist/cjs/{utils-f80be307.js → utils-4a02e54b.js} +1 -1
- package/dist/cjs/{utils-545b1865.js → utils-5cc32a26.js} +1 -1
- package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-dom-element_3.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +11 -11
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +6 -6
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +10 -10
- package/dist/cjs/vertex-viewer-measurement-tool.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-measurements.cjs.entry.js +8 -8
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer.cjs.entry.js +198 -79
- package/dist/cjs/viewer.cjs.js +1 -1
- package/dist/cjs/{viewport-8c39089f.js → viewport-052809c7.js} +1 -1
- package/dist/collection/components/viewer/viewer.js +68 -4
- package/dist/collection/components/viewer-dom-renderer/renderer2d.js +1 -1
- package/dist/collection/components/viewer-dom-renderer/renderer3d.js +1 -1
- package/dist/collection/components/viewer-dom-renderer/viewer-dom-renderer.js +3 -3
- package/dist/collection/components/viewer-measurement-distance/viewer-measurement-distance.js +3 -3
- package/dist/collection/components/viewer-measurement-overlays/viewer-measurement-overlays.js +3 -3
- package/dist/collection/index.js +2 -2
- package/dist/collection/lib/errors.js +8 -1
- package/dist/collection/lib/interactions/index.js +3 -1
- package/dist/collection/lib/interactions/interactionApi.js +4 -25
- package/dist/collection/lib/interactions/interactionApiOrthographic.js +50 -0
- package/dist/collection/lib/interactions/interactionApiPerspective.js +50 -0
- package/dist/collection/lib/mappers/frameStreaming.js +27 -5
- package/dist/collection/lib/rendering/matrices.js +13 -4
- package/dist/collection/lib/scenes/__mocks__/mocks.js +2 -2
- package/dist/collection/lib/scenes/camera.js +149 -77
- package/dist/collection/lib/scenes/mapper.js +3 -2
- package/dist/collection/lib/scenes/scene.js +23 -9
- package/dist/collection/lib/types/clippingPlanes.js +54 -17
- package/dist/collection/lib/types/depthBuffer.js +1 -1
- package/dist/collection/lib/types/frame.js +88 -23
- package/dist/collection/lib/types/frameCamera.js +81 -6
- package/dist/collection/lib/types/viewport.js +1 -1
- package/dist/collection/testing/fixtures.js +23 -10
- package/dist/collection/testing/viewer.js +5 -3
- package/dist/custom-elements/index.js +1821 -194
- package/dist/esm/{browser.esm-59e914f6.js → browser.esm-48f051a3.js} +1 -1
- package/dist/esm/{bundle.esm-d899b2d5.js → bundle.esm-df3a8a42.js} +35 -1
- package/dist/esm/{config-604c644e.js → config-3a5d3ea3.js} +2 -2
- package/dist/esm/{cursors-a7ec4adb.js → cursors-45f23dfe.js} +1 -1
- package/dist/esm/{dom-780d25be.js → dom-18d9ac79.js} +1 -1
- package/dist/esm/{entities-759d97cd.js → entities-60dfd79d.js} +3 -3
- package/dist/esm/index.js +12 -12
- package/dist/esm/index.mjs +12 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.mjs +1 -1
- package/dist/esm/{mapper-4b815e31.js → mapper-adf23dc4.js} +2 -2
- package/dist/esm/{markup-1d177b4a.js → markup-accb6b5c.js} +2 -2
- package/dist/esm/{measurement-12cdbf5c.js → measurement-6cd457a6.js} +2 -2
- package/dist/esm/{model-e5a4f00f.js → model-4982c15d.js} +1 -1
- package/dist/esm/{overlays-1919b192.js → overlays-1783a61a.js} +2 -2
- package/dist/esm/{png-decoder-3f1fa486.js → png-decoder-f35def4c.js} +1 -1
- package/dist/esm/{results-994bdb50.js → results-93d45acc.js} +1 -1
- package/dist/esm/{scene-2c2460d5.js → scene-2d8bdccc.js} +176 -85
- package/dist/esm/{streamAttributes-d623bb60.js → streamAttributes-87a3605c.js} +1426 -43
- package/dist/esm/{utils-5e57bf24.js → utils-9f4b25ec.js} +1 -1
- package/dist/esm/{utils-83a19677.js → utils-ed2346c0.js} +1 -1
- package/dist/esm/vertex-scene-tree-search_3.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +4 -4
- package/dist/esm/vertex-viewer-dom-element_3.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +3 -3
- package/dist/esm/vertex-viewer-markup-tool.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup.entry.js +4 -4
- package/dist/esm/vertex-viewer-measurement-details.entry.js +3 -3
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +11 -11
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +6 -6
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +10 -10
- package/dist/esm/vertex-viewer-measurement-tool.entry.js +5 -5
- package/dist/esm/vertex-viewer-measurements.entry.js +8 -8
- package/dist/esm/vertex-viewer-view-cube.entry.js +3 -3
- package/dist/esm/vertex-viewer.entry.js +198 -79
- package/dist/esm/viewer.js +1 -1
- package/dist/esm/{viewport-01c886ea.js → viewport-6d4c0af0.js} +1 -1
- package/dist/types/components/viewer/viewer.d.ts +8 -0
- package/dist/types/components/viewer-dom-renderer/renderer2d.d.ts +2 -2
- package/dist/types/components/viewer-dom-renderer/renderer3d.d.ts +3 -3
- package/dist/types/components/viewer-dom-renderer/viewer-dom-renderer.d.ts +2 -2
- package/dist/types/components/viewer-measurement-distance/utils.d.ts +2 -2
- package/dist/types/components/viewer-measurement-distance/viewer-measurement-distance.d.ts +2 -2
- package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays-components.d.ts +2 -2
- package/dist/types/components/viewer-measurement-overlays/viewer-measurement-overlays.d.ts +2 -2
- package/dist/types/components.d.ts +15 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/errors.d.ts +3 -0
- package/dist/types/lib/interactions/index.d.ts +2 -0
- package/dist/types/lib/interactions/interactionApi.d.ts +20 -21
- package/dist/types/lib/interactions/interactionApiOrthographic.d.ts +21 -0
- package/dist/types/lib/interactions/interactionApiPerspective.d.ts +21 -0
- package/dist/types/lib/mappers/frameStreaming.d.ts +2 -0
- package/dist/types/lib/scenes/__mocks__/mocks.d.ts +2 -2
- package/dist/types/lib/scenes/camera.d.ts +100 -37
- package/dist/types/lib/scenes/scene.d.ts +1 -1
- package/dist/types/lib/types/clippingPlanes.d.ts +3 -1
- package/dist/types/lib/types/depthBuffer.d.ts +4 -4
- package/dist/types/lib/types/frame.d.ts +54 -11
- package/dist/types/lib/types/frameCamera.d.ts +21 -2
- package/dist/types/lib/types/viewport.d.ts +2 -3
- package/dist/types/testing/fixtures.d.ts +4 -2
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-3f6ac74f.js → p-014561cd.js} +1 -1
- package/dist/viewer/p-121f2b40.js +18 -0
- package/dist/viewer/p-18ec4fed.js +4 -0
- package/dist/viewer/{p-e2297df2.entry.js → p-1acd0e56.entry.js} +1 -1
- package/dist/viewer/{p-da2f4a56.js → p-25dfee48.js} +1 -1
- package/dist/viewer/p-2e75198d.js +4 -0
- package/dist/viewer/p-38c06c25.js +4 -0
- package/dist/viewer/{p-67446e35.js → p-463151e0.js} +1 -1
- package/dist/viewer/{p-301660cf.js → p-546ae240.js} +1 -1
- package/dist/viewer/{p-d00e9203.js → p-6120a219.js} +1 -1
- package/dist/viewer/p-61db972b.js +4 -0
- package/dist/viewer/{p-a0df0e0c.js → p-6d9d3553.js} +1 -1
- package/dist/viewer/{p-f8d01b8a.entry.js → p-7c5bee8e.entry.js} +1 -1
- package/dist/viewer/{p-8decee06.entry.js → p-8de749a5.entry.js} +1 -1
- package/dist/viewer/{p-081e6873.js → p-8df35eee.js} +1 -1
- package/dist/viewer/{p-671c113c.entry.js → p-923b616f.entry.js} +1 -1
- package/dist/viewer/p-9b1ecc71.js +4 -0
- package/dist/viewer/{p-3810c24d.js → p-9fd5fc8e.js} +1 -1
- package/dist/viewer/p-b2d4c0cf.entry.js +4 -0
- package/dist/viewer/{p-364ce21c.js → p-b8bc15ec.js} +1 -1
- package/dist/viewer/{p-439220c6.js → p-b8f027eb.js} +1 -1
- package/dist/viewer/p-bc7f0ad6.entry.js +4 -0
- package/dist/viewer/{p-2cefb1b0.js → p-ce0fe8be.js} +1 -1
- package/dist/viewer/p-d939ecd3.entry.js +4 -0
- package/dist/viewer/{p-25eaab00.entry.js → p-de7eecce.entry.js} +1 -1
- package/dist/viewer/{p-4985fad5.js → p-e3fff448.js} +1 -1
- package/dist/viewer/{p-6e80f8b0.entry.js → p-e4934f47.entry.js} +1 -1
- package/dist/viewer/{p-df292b56.entry.js → p-e8f6cba6.entry.js} +1 -1
- package/dist/viewer/{p-353cfc7a.entry.js → p-ee86bed2.entry.js} +1 -1
- package/dist/viewer/{p-c62cb926.entry.js → p-f359a9ac.entry.js} +1 -1
- package/dist/viewer/{p-e07377fa.entry.js → p-fa7f2d0c.entry.js} +1 -1
- package/dist/viewer/{p-915d95ad.entry.js → p-ffde162f.entry.js} +1 -1
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +8 -8
- package/dist/viewer/p-085e908a.js +0 -4
- package/dist/viewer/p-0aba71fd.js +0 -18
- package/dist/viewer/p-423410be.js +0 -4
- package/dist/viewer/p-432267bc.entry.js +0 -4
- package/dist/viewer/p-7cad9bf4.js +0 -4
- package/dist/viewer/p-d90f2f6d.entry.js +0 -4
- package/dist/viewer/p-f755af5a.entry.js +0 -4
- package/dist/viewer/p-f7cb7e59.js +0 -4
- package/dist/viewer/p-fe11d694.js +0 -4
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const bundle_esm = require('./bundle.esm-
|
|
7
|
-
const browser_esm = require('./browser.esm-
|
|
6
|
+
const bundle_esm = require('./bundle.esm-1b8b1f36.js');
|
|
7
|
+
const browser_esm = require('./browser.esm-c51162f8.js');
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-537d719a.js');
|
|
9
9
|
|
|
10
10
|
const fromPbUuid = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.requiredProp('hex')), ([uuid]) => uuid);
|
|
@@ -2688,6 +2688,522 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2688
2688
|
*/
|
|
2689
2689
|
const stream = {};
|
|
2690
2690
|
|
|
2691
|
+
stream.PerspectiveCamera = (function() {
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Properties of a PerspectiveCamera.
|
|
2695
|
+
* @memberof vertexvis.protobuf.stream
|
|
2696
|
+
* @interface IPerspectiveCamera
|
|
2697
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
|
|
2698
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
|
|
2699
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
|
|
2700
|
+
*/
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* Constructs a new PerspectiveCamera.
|
|
2704
|
+
* @memberof vertexvis.protobuf.stream
|
|
2705
|
+
* @classdesc Represents a PerspectiveCamera.
|
|
2706
|
+
* @implements IPerspectiveCamera
|
|
2707
|
+
* @constructor
|
|
2708
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
|
|
2709
|
+
*/
|
|
2710
|
+
function PerspectiveCamera(properties) {
|
|
2711
|
+
if (properties)
|
|
2712
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2713
|
+
if (properties[keys[i]] != null)
|
|
2714
|
+
this[keys[i]] = properties[keys[i]];
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* PerspectiveCamera position.
|
|
2719
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
|
|
2720
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2721
|
+
* @instance
|
|
2722
|
+
*/
|
|
2723
|
+
PerspectiveCamera.prototype.position = null;
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* PerspectiveCamera lookAt.
|
|
2727
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
|
|
2728
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2729
|
+
* @instance
|
|
2730
|
+
*/
|
|
2731
|
+
PerspectiveCamera.prototype.lookAt = null;
|
|
2732
|
+
|
|
2733
|
+
/**
|
|
2734
|
+
* PerspectiveCamera up.
|
|
2735
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
|
|
2736
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2737
|
+
* @instance
|
|
2738
|
+
*/
|
|
2739
|
+
PerspectiveCamera.prototype.up = null;
|
|
2740
|
+
|
|
2741
|
+
/**
|
|
2742
|
+
* Creates a new PerspectiveCamera instance using the specified properties.
|
|
2743
|
+
* @function create
|
|
2744
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2745
|
+
* @static
|
|
2746
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
|
|
2747
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
|
|
2748
|
+
*/
|
|
2749
|
+
PerspectiveCamera.create = function create(properties) {
|
|
2750
|
+
return new PerspectiveCamera(properties);
|
|
2751
|
+
};
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
|
|
2755
|
+
* @function encode
|
|
2756
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2757
|
+
* @static
|
|
2758
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
|
|
2759
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2760
|
+
* @returns {$protobuf.Writer} Writer
|
|
2761
|
+
*/
|
|
2762
|
+
PerspectiveCamera.encode = function encode(message, writer) {
|
|
2763
|
+
if (!writer)
|
|
2764
|
+
writer = $Writer$1.create();
|
|
2765
|
+
if (message.position != null && Object.hasOwnProperty.call(message, "position"))
|
|
2766
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
2767
|
+
if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
|
|
2768
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
2769
|
+
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
2770
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
2771
|
+
return writer;
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2774
|
+
/**
|
|
2775
|
+
* Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
|
|
2776
|
+
* @function encodeDelimited
|
|
2777
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2778
|
+
* @static
|
|
2779
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
|
|
2780
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2781
|
+
* @returns {$protobuf.Writer} Writer
|
|
2782
|
+
*/
|
|
2783
|
+
PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2784
|
+
return this.encode(message, writer).ldelim();
|
|
2785
|
+
};
|
|
2786
|
+
|
|
2787
|
+
/**
|
|
2788
|
+
* Decodes a PerspectiveCamera message from the specified reader or buffer.
|
|
2789
|
+
* @function decode
|
|
2790
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2791
|
+
* @static
|
|
2792
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2793
|
+
* @param {number} [length] Message length if known beforehand
|
|
2794
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
2795
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2796
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2797
|
+
*/
|
|
2798
|
+
PerspectiveCamera.decode = function decode(reader, length) {
|
|
2799
|
+
if (!(reader instanceof $Reader$1))
|
|
2800
|
+
reader = $Reader$1.create(reader);
|
|
2801
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
|
|
2802
|
+
while (reader.pos < end) {
|
|
2803
|
+
let tag = reader.uint32();
|
|
2804
|
+
switch (tag >>> 3) {
|
|
2805
|
+
case 1:
|
|
2806
|
+
message.position = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
2807
|
+
break;
|
|
2808
|
+
case 2:
|
|
2809
|
+
message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
2810
|
+
break;
|
|
2811
|
+
case 3:
|
|
2812
|
+
message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
2813
|
+
break;
|
|
2814
|
+
default:
|
|
2815
|
+
reader.skipType(tag & 7);
|
|
2816
|
+
break;
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
return message;
|
|
2820
|
+
};
|
|
2821
|
+
|
|
2822
|
+
/**
|
|
2823
|
+
* Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
|
|
2824
|
+
* @function decodeDelimited
|
|
2825
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2826
|
+
* @static
|
|
2827
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2828
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
2829
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2830
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2831
|
+
*/
|
|
2832
|
+
PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
|
|
2833
|
+
if (!(reader instanceof $Reader$1))
|
|
2834
|
+
reader = new $Reader$1(reader);
|
|
2835
|
+
return this.decode(reader, reader.uint32());
|
|
2836
|
+
};
|
|
2837
|
+
|
|
2838
|
+
/**
|
|
2839
|
+
* Verifies a PerspectiveCamera message.
|
|
2840
|
+
* @function verify
|
|
2841
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2842
|
+
* @static
|
|
2843
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2844
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2845
|
+
*/
|
|
2846
|
+
PerspectiveCamera.verify = function verify(message) {
|
|
2847
|
+
if (typeof message !== "object" || message === null)
|
|
2848
|
+
return "object expected";
|
|
2849
|
+
if (message.position != null && message.hasOwnProperty("position")) {
|
|
2850
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
|
|
2851
|
+
if (error)
|
|
2852
|
+
return "position." + error;
|
|
2853
|
+
}
|
|
2854
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
|
|
2855
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
|
|
2856
|
+
if (error)
|
|
2857
|
+
return "lookAt." + error;
|
|
2858
|
+
}
|
|
2859
|
+
if (message.up != null && message.hasOwnProperty("up")) {
|
|
2860
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
|
|
2861
|
+
if (error)
|
|
2862
|
+
return "up." + error;
|
|
2863
|
+
}
|
|
2864
|
+
return null;
|
|
2865
|
+
};
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
|
|
2869
|
+
* @function fromObject
|
|
2870
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2871
|
+
* @static
|
|
2872
|
+
* @param {Object.<string,*>} object Plain object
|
|
2873
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
2874
|
+
*/
|
|
2875
|
+
PerspectiveCamera.fromObject = function fromObject(object) {
|
|
2876
|
+
if (object instanceof $root$1.vertexvis.protobuf.stream.PerspectiveCamera)
|
|
2877
|
+
return object;
|
|
2878
|
+
let message = new $root$1.vertexvis.protobuf.stream.PerspectiveCamera();
|
|
2879
|
+
if (object.position != null) {
|
|
2880
|
+
if (typeof object.position !== "object")
|
|
2881
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
|
|
2882
|
+
message.position = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
|
|
2883
|
+
}
|
|
2884
|
+
if (object.lookAt != null) {
|
|
2885
|
+
if (typeof object.lookAt !== "object")
|
|
2886
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
|
|
2887
|
+
message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
|
|
2888
|
+
}
|
|
2889
|
+
if (object.up != null) {
|
|
2890
|
+
if (typeof object.up !== "object")
|
|
2891
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
|
|
2892
|
+
message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
2893
|
+
}
|
|
2894
|
+
return message;
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
/**
|
|
2898
|
+
* Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
|
|
2899
|
+
* @function toObject
|
|
2900
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2901
|
+
* @static
|
|
2902
|
+
* @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
|
|
2903
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2904
|
+
* @returns {Object.<string,*>} Plain object
|
|
2905
|
+
*/
|
|
2906
|
+
PerspectiveCamera.toObject = function toObject(message, options) {
|
|
2907
|
+
if (!options)
|
|
2908
|
+
options = {};
|
|
2909
|
+
let object = {};
|
|
2910
|
+
if (options.defaults) {
|
|
2911
|
+
object.position = null;
|
|
2912
|
+
object.lookAt = null;
|
|
2913
|
+
object.up = null;
|
|
2914
|
+
}
|
|
2915
|
+
if (message.position != null && message.hasOwnProperty("position"))
|
|
2916
|
+
object.position = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
|
|
2917
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt"))
|
|
2918
|
+
object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
2919
|
+
if (message.up != null && message.hasOwnProperty("up"))
|
|
2920
|
+
object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
2921
|
+
return object;
|
|
2922
|
+
};
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Converts this PerspectiveCamera to JSON.
|
|
2926
|
+
* @function toJSON
|
|
2927
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
2928
|
+
* @instance
|
|
2929
|
+
* @returns {Object.<string,*>} JSON object
|
|
2930
|
+
*/
|
|
2931
|
+
PerspectiveCamera.prototype.toJSON = function toJSON() {
|
|
2932
|
+
return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
|
|
2933
|
+
};
|
|
2934
|
+
|
|
2935
|
+
return PerspectiveCamera;
|
|
2936
|
+
})();
|
|
2937
|
+
|
|
2938
|
+
stream.OrthographicCamera = (function() {
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* Properties of an OrthographicCamera.
|
|
2942
|
+
* @memberof vertexvis.protobuf.stream
|
|
2943
|
+
* @interface IOrthographicCamera
|
|
2944
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
|
|
2945
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
|
|
2946
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
|
|
2947
|
+
* @property {number|null} [fovHeight] OrthographicCamera fovHeight
|
|
2948
|
+
*/
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Constructs a new OrthographicCamera.
|
|
2952
|
+
* @memberof vertexvis.protobuf.stream
|
|
2953
|
+
* @classdesc Represents an OrthographicCamera.
|
|
2954
|
+
* @implements IOrthographicCamera
|
|
2955
|
+
* @constructor
|
|
2956
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
|
|
2957
|
+
*/
|
|
2958
|
+
function OrthographicCamera(properties) {
|
|
2959
|
+
if (properties)
|
|
2960
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2961
|
+
if (properties[keys[i]] != null)
|
|
2962
|
+
this[keys[i]] = properties[keys[i]];
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
/**
|
|
2966
|
+
* OrthographicCamera viewVector.
|
|
2967
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
|
|
2968
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
2969
|
+
* @instance
|
|
2970
|
+
*/
|
|
2971
|
+
OrthographicCamera.prototype.viewVector = null;
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* OrthographicCamera lookAt.
|
|
2975
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
|
|
2976
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
2977
|
+
* @instance
|
|
2978
|
+
*/
|
|
2979
|
+
OrthographicCamera.prototype.lookAt = null;
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* OrthographicCamera up.
|
|
2983
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
|
|
2984
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
2985
|
+
* @instance
|
|
2986
|
+
*/
|
|
2987
|
+
OrthographicCamera.prototype.up = null;
|
|
2988
|
+
|
|
2989
|
+
/**
|
|
2990
|
+
* OrthographicCamera fovHeight.
|
|
2991
|
+
* @member {number} fovHeight
|
|
2992
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
2993
|
+
* @instance
|
|
2994
|
+
*/
|
|
2995
|
+
OrthographicCamera.prototype.fovHeight = 0;
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* Creates a new OrthographicCamera instance using the specified properties.
|
|
2999
|
+
* @function create
|
|
3000
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3001
|
+
* @static
|
|
3002
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
|
|
3003
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
|
|
3004
|
+
*/
|
|
3005
|
+
OrthographicCamera.create = function create(properties) {
|
|
3006
|
+
return new OrthographicCamera(properties);
|
|
3007
|
+
};
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
|
|
3011
|
+
* @function encode
|
|
3012
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3013
|
+
* @static
|
|
3014
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
|
|
3015
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3016
|
+
* @returns {$protobuf.Writer} Writer
|
|
3017
|
+
*/
|
|
3018
|
+
OrthographicCamera.encode = function encode(message, writer) {
|
|
3019
|
+
if (!writer)
|
|
3020
|
+
writer = $Writer$1.create();
|
|
3021
|
+
if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
|
|
3022
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
3023
|
+
if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
|
|
3024
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
3025
|
+
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
3026
|
+
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
3027
|
+
if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
|
|
3028
|
+
writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
|
|
3029
|
+
return writer;
|
|
3030
|
+
};
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
|
|
3034
|
+
* @function encodeDelimited
|
|
3035
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3036
|
+
* @static
|
|
3037
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
|
|
3038
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
3039
|
+
* @returns {$protobuf.Writer} Writer
|
|
3040
|
+
*/
|
|
3041
|
+
OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
|
|
3042
|
+
return this.encode(message, writer).ldelim();
|
|
3043
|
+
};
|
|
3044
|
+
|
|
3045
|
+
/**
|
|
3046
|
+
* Decodes an OrthographicCamera message from the specified reader or buffer.
|
|
3047
|
+
* @function decode
|
|
3048
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3049
|
+
* @static
|
|
3050
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3051
|
+
* @param {number} [length] Message length if known beforehand
|
|
3052
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
3053
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3054
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3055
|
+
*/
|
|
3056
|
+
OrthographicCamera.decode = function decode(reader, length) {
|
|
3057
|
+
if (!(reader instanceof $Reader$1))
|
|
3058
|
+
reader = $Reader$1.create(reader);
|
|
3059
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
|
|
3060
|
+
while (reader.pos < end) {
|
|
3061
|
+
let tag = reader.uint32();
|
|
3062
|
+
switch (tag >>> 3) {
|
|
3063
|
+
case 1:
|
|
3064
|
+
message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
3065
|
+
break;
|
|
3066
|
+
case 2:
|
|
3067
|
+
message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
3068
|
+
break;
|
|
3069
|
+
case 3:
|
|
3070
|
+
message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
3071
|
+
break;
|
|
3072
|
+
case 4:
|
|
3073
|
+
message.fovHeight = reader.float();
|
|
3074
|
+
break;
|
|
3075
|
+
default:
|
|
3076
|
+
reader.skipType(tag & 7);
|
|
3077
|
+
break;
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
return message;
|
|
3081
|
+
};
|
|
3082
|
+
|
|
3083
|
+
/**
|
|
3084
|
+
* Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
|
|
3085
|
+
* @function decodeDelimited
|
|
3086
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3087
|
+
* @static
|
|
3088
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
3089
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
3090
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
3091
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
3092
|
+
*/
|
|
3093
|
+
OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
|
|
3094
|
+
if (!(reader instanceof $Reader$1))
|
|
3095
|
+
reader = new $Reader$1(reader);
|
|
3096
|
+
return this.decode(reader, reader.uint32());
|
|
3097
|
+
};
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* Verifies an OrthographicCamera message.
|
|
3101
|
+
* @function verify
|
|
3102
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3103
|
+
* @static
|
|
3104
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
3105
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
3106
|
+
*/
|
|
3107
|
+
OrthographicCamera.verify = function verify(message) {
|
|
3108
|
+
if (typeof message !== "object" || message === null)
|
|
3109
|
+
return "object expected";
|
|
3110
|
+
if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
|
|
3111
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
|
|
3112
|
+
if (error)
|
|
3113
|
+
return "viewVector." + error;
|
|
3114
|
+
}
|
|
3115
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
|
|
3116
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
|
|
3117
|
+
if (error)
|
|
3118
|
+
return "lookAt." + error;
|
|
3119
|
+
}
|
|
3120
|
+
if (message.up != null && message.hasOwnProperty("up")) {
|
|
3121
|
+
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.up);
|
|
3122
|
+
if (error)
|
|
3123
|
+
return "up." + error;
|
|
3124
|
+
}
|
|
3125
|
+
if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
|
|
3126
|
+
if (typeof message.fovHeight !== "number")
|
|
3127
|
+
return "fovHeight: number expected";
|
|
3128
|
+
return null;
|
|
3129
|
+
};
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
|
|
3133
|
+
* @function fromObject
|
|
3134
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3135
|
+
* @static
|
|
3136
|
+
* @param {Object.<string,*>} object Plain object
|
|
3137
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
3138
|
+
*/
|
|
3139
|
+
OrthographicCamera.fromObject = function fromObject(object) {
|
|
3140
|
+
if (object instanceof $root$1.vertexvis.protobuf.stream.OrthographicCamera)
|
|
3141
|
+
return object;
|
|
3142
|
+
let message = new $root$1.vertexvis.protobuf.stream.OrthographicCamera();
|
|
3143
|
+
if (object.viewVector != null) {
|
|
3144
|
+
if (typeof object.viewVector !== "object")
|
|
3145
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
|
|
3146
|
+
message.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
|
|
3147
|
+
}
|
|
3148
|
+
if (object.lookAt != null) {
|
|
3149
|
+
if (typeof object.lookAt !== "object")
|
|
3150
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
|
|
3151
|
+
message.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
|
|
3152
|
+
}
|
|
3153
|
+
if (object.up != null) {
|
|
3154
|
+
if (typeof object.up !== "object")
|
|
3155
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
|
|
3156
|
+
message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
3157
|
+
}
|
|
3158
|
+
if (object.fovHeight != null)
|
|
3159
|
+
message.fovHeight = Number(object.fovHeight);
|
|
3160
|
+
return message;
|
|
3161
|
+
};
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
|
|
3165
|
+
* @function toObject
|
|
3166
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3167
|
+
* @static
|
|
3168
|
+
* @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
|
|
3169
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
3170
|
+
* @returns {Object.<string,*>} Plain object
|
|
3171
|
+
*/
|
|
3172
|
+
OrthographicCamera.toObject = function toObject(message, options) {
|
|
3173
|
+
if (!options)
|
|
3174
|
+
options = {};
|
|
3175
|
+
let object = {};
|
|
3176
|
+
if (options.defaults) {
|
|
3177
|
+
object.viewVector = null;
|
|
3178
|
+
object.lookAt = null;
|
|
3179
|
+
object.up = null;
|
|
3180
|
+
object.fovHeight = 0;
|
|
3181
|
+
}
|
|
3182
|
+
if (message.viewVector != null && message.hasOwnProperty("viewVector"))
|
|
3183
|
+
object.viewVector = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
|
|
3184
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt"))
|
|
3185
|
+
object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
3186
|
+
if (message.up != null && message.hasOwnProperty("up"))
|
|
3187
|
+
object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
3188
|
+
if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
|
|
3189
|
+
object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
|
|
3190
|
+
return object;
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
/**
|
|
3194
|
+
* Converts this OrthographicCamera to JSON.
|
|
3195
|
+
* @function toJSON
|
|
3196
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
3197
|
+
* @instance
|
|
3198
|
+
* @returns {Object.<string,*>} JSON object
|
|
3199
|
+
*/
|
|
3200
|
+
OrthographicCamera.prototype.toJSON = function toJSON() {
|
|
3201
|
+
return this.constructor.toObject(this, minimal$2.util.toJSONOptions);
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3204
|
+
return OrthographicCamera;
|
|
3205
|
+
})();
|
|
3206
|
+
|
|
2691
3207
|
stream.Camera = (function() {
|
|
2692
3208
|
|
|
2693
3209
|
/**
|
|
@@ -2697,6 +3213,8 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2697
3213
|
* @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
|
|
2698
3214
|
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
|
|
2699
3215
|
* @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
|
|
3216
|
+
* @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
|
|
3217
|
+
* @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
|
|
2700
3218
|
*/
|
|
2701
3219
|
|
|
2702
3220
|
/**
|
|
@@ -2738,6 +3256,36 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2738
3256
|
*/
|
|
2739
3257
|
Camera.prototype.up = null;
|
|
2740
3258
|
|
|
3259
|
+
/**
|
|
3260
|
+
* Camera perspective.
|
|
3261
|
+
* @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
|
|
3262
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
3263
|
+
* @instance
|
|
3264
|
+
*/
|
|
3265
|
+
Camera.prototype.perspective = null;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* Camera orthographic.
|
|
3269
|
+
* @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
|
|
3270
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
3271
|
+
* @instance
|
|
3272
|
+
*/
|
|
3273
|
+
Camera.prototype.orthographic = null;
|
|
3274
|
+
|
|
3275
|
+
// OneOf field names bound to virtual getters and setters
|
|
3276
|
+
let $oneOfFields;
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Camera type.
|
|
3280
|
+
* @member {"perspective"|"orthographic"|undefined} type
|
|
3281
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
3282
|
+
* @instance
|
|
3283
|
+
*/
|
|
3284
|
+
Object.defineProperty(Camera.prototype, "type", {
|
|
3285
|
+
get: $util$1.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
|
|
3286
|
+
set: $util$1.oneOfSetter($oneOfFields)
|
|
3287
|
+
});
|
|
3288
|
+
|
|
2741
3289
|
/**
|
|
2742
3290
|
* Creates a new Camera instance using the specified properties.
|
|
2743
3291
|
* @function create
|
|
@@ -2768,6 +3316,10 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2768
3316
|
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
2769
3317
|
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
2770
3318
|
$root$1.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
3319
|
+
if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
|
|
3320
|
+
$root$1.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
3321
|
+
if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
|
|
3322
|
+
$root$1.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
2771
3323
|
return writer;
|
|
2772
3324
|
};
|
|
2773
3325
|
|
|
@@ -2811,6 +3363,12 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2811
3363
|
case 3:
|
|
2812
3364
|
message.up = $root$1.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
2813
3365
|
break;
|
|
3366
|
+
case 4:
|
|
3367
|
+
message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
|
|
3368
|
+
break;
|
|
3369
|
+
case 5:
|
|
3370
|
+
message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
|
|
3371
|
+
break;
|
|
2814
3372
|
default:
|
|
2815
3373
|
reader.skipType(tag & 7);
|
|
2816
3374
|
break;
|
|
@@ -2846,6 +3404,7 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2846
3404
|
Camera.verify = function verify(message) {
|
|
2847
3405
|
if (typeof message !== "object" || message === null)
|
|
2848
3406
|
return "object expected";
|
|
3407
|
+
let properties = {};
|
|
2849
3408
|
if (message.position != null && message.hasOwnProperty("position")) {
|
|
2850
3409
|
let error = $root$1.vertexvis.protobuf.core.Vector3f.verify(message.position);
|
|
2851
3410
|
if (error)
|
|
@@ -2861,6 +3420,24 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2861
3420
|
if (error)
|
|
2862
3421
|
return "up." + error;
|
|
2863
3422
|
}
|
|
3423
|
+
if (message.perspective != null && message.hasOwnProperty("perspective")) {
|
|
3424
|
+
properties.type = 1;
|
|
3425
|
+
{
|
|
3426
|
+
let error = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
|
|
3427
|
+
if (error)
|
|
3428
|
+
return "perspective." + error;
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
|
|
3432
|
+
if (properties.type === 1)
|
|
3433
|
+
return "type: multiple values";
|
|
3434
|
+
properties.type = 1;
|
|
3435
|
+
{
|
|
3436
|
+
let error = $root$1.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
|
|
3437
|
+
if (error)
|
|
3438
|
+
return "orthographic." + error;
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
2864
3441
|
return null;
|
|
2865
3442
|
};
|
|
2866
3443
|
|
|
@@ -2891,6 +3468,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2891
3468
|
throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
|
|
2892
3469
|
message.up = $root$1.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
2893
3470
|
}
|
|
3471
|
+
if (object.perspective != null) {
|
|
3472
|
+
if (typeof object.perspective !== "object")
|
|
3473
|
+
throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
|
|
3474
|
+
message.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
|
|
3475
|
+
}
|
|
3476
|
+
if (object.orthographic != null) {
|
|
3477
|
+
if (typeof object.orthographic !== "object")
|
|
3478
|
+
throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
|
|
3479
|
+
message.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
|
|
3480
|
+
}
|
|
2894
3481
|
return message;
|
|
2895
3482
|
};
|
|
2896
3483
|
|
|
@@ -2918,6 +3505,16 @@ const vertexvis$1 = $root$1.vertexvis = (() => {
|
|
|
2918
3505
|
object.lookAt = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
2919
3506
|
if (message.up != null && message.hasOwnProperty("up"))
|
|
2920
3507
|
object.up = $root$1.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
3508
|
+
if (message.perspective != null && message.hasOwnProperty("perspective")) {
|
|
3509
|
+
object.perspective = $root$1.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
|
|
3510
|
+
if (options.oneofs)
|
|
3511
|
+
object.type = "perspective";
|
|
3512
|
+
}
|
|
3513
|
+
if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
|
|
3514
|
+
object.orthographic = $root$1.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
|
|
3515
|
+
if (options.oneofs)
|
|
3516
|
+
object.type = "orthographic";
|
|
3517
|
+
}
|
|
2921
3518
|
return object;
|
|
2922
3519
|
};
|
|
2923
3520
|
|
|
@@ -35820,25 +36417,128 @@ class Token {
|
|
|
35820
36417
|
}
|
|
35821
36418
|
}
|
|
35822
36419
|
|
|
36420
|
+
function isPerspectiveFrameCamera(camera) {
|
|
36421
|
+
return camera.position != null;
|
|
36422
|
+
}
|
|
36423
|
+
function isOrthographicFrameCamera(camera) {
|
|
36424
|
+
const asOrtho = camera;
|
|
36425
|
+
return asOrtho.viewVector != null && asOrtho.fovHeight != null;
|
|
36426
|
+
}
|
|
36427
|
+
function withPositionAndViewVector(camera) {
|
|
36428
|
+
if (isOrthographicFrameCamera(camera)) {
|
|
36429
|
+
return Object.assign(Object.assign({}, camera), { position: bundle_esm.vector3.add(camera.lookAt, bundle_esm.vector3.negate(camera.viewVector)) });
|
|
36430
|
+
}
|
|
36431
|
+
else {
|
|
36432
|
+
return Object.assign(Object.assign({}, camera), { viewVector: bundle_esm.vector3.subtract(camera.lookAt, camera.position) });
|
|
36433
|
+
}
|
|
36434
|
+
}
|
|
36435
|
+
function toOrthographic(data) {
|
|
36436
|
+
const viewVector = bundle_esm.vector3.subtract(data.lookAt, data.position);
|
|
36437
|
+
return {
|
|
36438
|
+
viewVector,
|
|
36439
|
+
up: data.up,
|
|
36440
|
+
lookAt: data.lookAt,
|
|
36441
|
+
fovHeight: 2 *
|
|
36442
|
+
bundle_esm.vector3.magnitude(viewVector) *
|
|
36443
|
+
Math.tan(bundle_esm.angle.toRadians(data.fovY / 2.0)),
|
|
36444
|
+
};
|
|
36445
|
+
}
|
|
36446
|
+
function toPerspective(data, fovY = 45) {
|
|
36447
|
+
const expectedMagnitude = data.fovHeight / (2 * Math.tan(bundle_esm.angle.toRadians(fovY / 2)));
|
|
36448
|
+
const receivedMagnitude = bundle_esm.vector3.magnitude(data.viewVector);
|
|
36449
|
+
const magnitudeScale = expectedMagnitude / receivedMagnitude;
|
|
36450
|
+
return {
|
|
36451
|
+
position: bundle_esm.vector3.add(data.lookAt, bundle_esm.vector3.negate(bundle_esm.vector3.scale(magnitudeScale, data.viewVector))),
|
|
36452
|
+
up: data.up,
|
|
36453
|
+
lookAt: data.lookAt,
|
|
36454
|
+
fovY,
|
|
36455
|
+
};
|
|
36456
|
+
}
|
|
36457
|
+
function toProtobuf(camera) {
|
|
36458
|
+
if (isOrthographicFrameCamera(camera)) {
|
|
36459
|
+
return {
|
|
36460
|
+
orthographic: {
|
|
36461
|
+
viewVector: Object.assign({}, camera.viewVector),
|
|
36462
|
+
lookAt: Object.assign({}, camera.lookAt),
|
|
36463
|
+
up: Object.assign({}, camera.up),
|
|
36464
|
+
fovHeight: camera.fovHeight,
|
|
36465
|
+
},
|
|
36466
|
+
};
|
|
36467
|
+
}
|
|
36468
|
+
else if (isPerspectiveFrameCamera(camera)) {
|
|
36469
|
+
return {
|
|
36470
|
+
perspective: {
|
|
36471
|
+
position: Object.assign({}, camera.position),
|
|
36472
|
+
lookAt: Object.assign({}, camera.lookAt),
|
|
36473
|
+
up: Object.assign({}, camera.up),
|
|
36474
|
+
},
|
|
36475
|
+
position: Object.assign({}, camera.position),
|
|
36476
|
+
lookAt: Object.assign({}, camera.lookAt),
|
|
36477
|
+
up: Object.assign({}, camera.up),
|
|
36478
|
+
};
|
|
36479
|
+
}
|
|
36480
|
+
else {
|
|
36481
|
+
return Object.assign({}, camera);
|
|
36482
|
+
}
|
|
36483
|
+
}
|
|
36484
|
+
|
|
35823
36485
|
function fromBoundingBoxAndLookAtCamera(boundingBox, camera) {
|
|
36486
|
+
return isOrthographicFrameCamera(camera)
|
|
36487
|
+
? fromBoundingBoxAndOrthographicCamera(boundingBox, camera)
|
|
36488
|
+
: fromBoundingBoxAndPerspectiveCamera(boundingBox, camera);
|
|
36489
|
+
}
|
|
36490
|
+
// Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/PerspectiveCamera.java#L65
|
|
36491
|
+
// and needs to remain in sync with that computation.
|
|
36492
|
+
// TODO: revisit computation of these values in a single location
|
|
36493
|
+
function fromBoundingBoxAndPerspectiveCamera(boundingBox, camera) {
|
|
35824
36494
|
const boundingBoxCenter = bundle_esm.boundingBox.center(boundingBox);
|
|
35825
|
-
const cameraToCenter = bundle_esm.vector3.subtract(camera.position, boundingBoxCenter);
|
|
35826
36495
|
const centerToBoundingPlane = bundle_esm.vector3.subtract(boundingBox.max, boundingBoxCenter);
|
|
35827
|
-
const
|
|
35828
|
-
const
|
|
35829
|
-
|
|
35830
|
-
|
|
35831
|
-
|
|
35832
|
-
|
|
35833
|
-
|
|
35834
|
-
|
|
35835
|
-
|
|
35836
|
-
|
|
36496
|
+
const radius = bundle_esm.vector3.magnitude(centerToBoundingPlane);
|
|
36497
|
+
const length = Math.max(radius, bundle_esm.vector3.magnitude(boundingBoxCenter));
|
|
36498
|
+
const epsilon = length === 0 ? 1.0 : length * 1e-6;
|
|
36499
|
+
const minRange = epsilon * 1e2;
|
|
36500
|
+
const signedDistToEye = bundle_esm.vector3.dot(bundle_esm.vector3.subtract(boundingBoxCenter, camera.position), bundle_esm.vector3.normalize(bundle_esm.vector3.subtract(camera.lookAt, camera.position)));
|
|
36501
|
+
const bRadius = Math.max(radius, minRange);
|
|
36502
|
+
let newFar = bRadius + signedDistToEye < minRange
|
|
36503
|
+
? bRadius * 3.0
|
|
36504
|
+
: bRadius + signedDistToEye;
|
|
36505
|
+
let newNear = newFar - bRadius * 2.0 < minRange
|
|
36506
|
+
? Math.min(minRange, newFar)
|
|
36507
|
+
: newFar - bRadius * 2.0;
|
|
36508
|
+
if (newFar - newNear < minRange) {
|
|
36509
|
+
newNear = Math.max(newNear, minRange);
|
|
36510
|
+
newFar += newNear + minRange;
|
|
35837
36511
|
}
|
|
35838
|
-
else {
|
|
35839
|
-
|
|
36512
|
+
else if (newNear / newFar < 0.0001) {
|
|
36513
|
+
newNear = newFar * 0.0001;
|
|
36514
|
+
}
|
|
36515
|
+
if (newNear > newFar - bRadius * 2.0) {
|
|
36516
|
+
if (newNear > 1000 + minRange) {
|
|
36517
|
+
newFar -= newNear - 1000;
|
|
36518
|
+
newNear = 1000;
|
|
36519
|
+
}
|
|
35840
36520
|
}
|
|
35841
|
-
return {
|
|
36521
|
+
return {
|
|
36522
|
+
near: newNear,
|
|
36523
|
+
far: newFar,
|
|
36524
|
+
};
|
|
36525
|
+
}
|
|
36526
|
+
// Logic pulled from https://github.com/Vertexvis/rendering-client-lib-java/blob/master/src/main/java/com/vertexvis/rendering/graphics/OrthographicCamera.java#L35
|
|
36527
|
+
// and needs to remain in sync with that computation.
|
|
36528
|
+
// TODO: revisit computation of these values in a single location
|
|
36529
|
+
function fromBoundingBoxAndOrthographicCamera(boundingBox, camera) {
|
|
36530
|
+
const boundingBoxCenter = bundle_esm.boundingBox.center(boundingBox);
|
|
36531
|
+
const centerToBoundingPlane = bundle_esm.vector3.subtract(boundingBox.max, boundingBoxCenter);
|
|
36532
|
+
const radius = bundle_esm.vector3.magnitude(centerToBoundingPlane);
|
|
36533
|
+
const length = Math.max(radius, bundle_esm.vector3.magnitude(boundingBoxCenter));
|
|
36534
|
+
const epsilon = length === 0 ? 1.0 : length * 1e-6;
|
|
36535
|
+
const minRange = epsilon * 1e2;
|
|
36536
|
+
const projCenter = bundle_esm.vector3.dot(bundle_esm.vector3.subtract(boundingBoxCenter, camera.lookAt), camera.viewVector);
|
|
36537
|
+
const bRadius = Math.max(radius, minRange);
|
|
36538
|
+
return {
|
|
36539
|
+
near: projCenter - bRadius,
|
|
36540
|
+
far: projCenter + bRadius,
|
|
36541
|
+
};
|
|
35842
36542
|
}
|
|
35843
36543
|
|
|
35844
36544
|
function create$2(data = {}) {
|
|
@@ -36113,7 +36813,7 @@ class FeatureMap {
|
|
|
36113
36813
|
}
|
|
36114
36814
|
|
|
36115
36815
|
async function loadWorker() {
|
|
36116
|
-
return Promise.resolve().then(function () { return require('./png-decoder-
|
|
36816
|
+
return Promise.resolve().then(function () { return require('./png-decoder-01b76242.js'); });
|
|
36117
36817
|
}
|
|
36118
36818
|
|
|
36119
36819
|
let workerLoader;
|
|
@@ -36205,19 +36905,14 @@ class FrameScene {
|
|
|
36205
36905
|
this.hasChanged = hasChanged;
|
|
36206
36906
|
}
|
|
36207
36907
|
}
|
|
36208
|
-
class
|
|
36209
|
-
constructor(position, lookAt, up, near, far, aspectRatio
|
|
36908
|
+
class FrameCameraBase {
|
|
36909
|
+
constructor(position, lookAt, up, near, far, aspectRatio) {
|
|
36210
36910
|
this.position = position;
|
|
36211
36911
|
this.lookAt = lookAt;
|
|
36212
36912
|
this.up = up;
|
|
36213
36913
|
this.near = near;
|
|
36214
36914
|
this.far = far;
|
|
36215
36915
|
this.aspectRatio = aspectRatio;
|
|
36216
|
-
this.fovY = fovY;
|
|
36217
|
-
}
|
|
36218
|
-
static fromBoundingBox(camera, boundingBox, aspectRatio) {
|
|
36219
|
-
const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
|
|
36220
|
-
return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
|
|
36221
36916
|
}
|
|
36222
36917
|
get direction() {
|
|
36223
36918
|
return bundle_esm.vector3.normalize(this.viewVector);
|
|
@@ -36240,22 +36935,14 @@ class FramePerspectiveCamera {
|
|
|
36240
36935
|
get projectionViewMatrix() {
|
|
36241
36936
|
return this.computeCameraMatrices().projectionViewMatrix;
|
|
36242
36937
|
}
|
|
36243
|
-
|
|
36244
|
-
|
|
36245
|
-
|
|
36246
|
-
|
|
36247
|
-
|
|
36248
|
-
|
|
36249
|
-
|
|
36250
|
-
this.cameraMatrices = {
|
|
36251
|
-
viewMatrix,
|
|
36252
|
-
worldMatrix,
|
|
36253
|
-
projectionMatrix,
|
|
36254
|
-
projectionMatrixInverse,
|
|
36255
|
-
projectionViewMatrix,
|
|
36256
|
-
};
|
|
36938
|
+
static fromBoundingBox(camera, boundingBox, aspectRatio) {
|
|
36939
|
+
const { near, far } = fromBoundingBoxAndLookAtCamera(boundingBox, camera);
|
|
36940
|
+
if (isOrthographicFrameCamera(camera)) {
|
|
36941
|
+
return new FrameOrthographicCamera(camera.viewVector, camera.lookAt, camera.up, near, far, aspectRatio, camera.fovHeight);
|
|
36942
|
+
}
|
|
36943
|
+
else {
|
|
36944
|
+
return new FramePerspectiveCamera(camera.position, camera.lookAt, camera.up, near, far, aspectRatio, 45);
|
|
36257
36945
|
}
|
|
36258
|
-
return this.cameraMatrices;
|
|
36259
36946
|
}
|
|
36260
36947
|
/**
|
|
36261
36948
|
* Checks if the given point, in world space, is behind the near plane
|
|
@@ -36286,6 +36973,83 @@ class FramePerspectiveCamera {
|
|
|
36286
36973
|
const pt = bundle_esm.plane.intersectLine(nearP, vl);
|
|
36287
36974
|
return pt != null ? bundle_esm.vector3.add(pt, position) : undefined;
|
|
36288
36975
|
}
|
|
36976
|
+
computeCameraMatrices() {
|
|
36977
|
+
if (this.cameraMatrices == null) {
|
|
36978
|
+
return {
|
|
36979
|
+
viewMatrix: bundle_esm.matrix4.makeIdentity(),
|
|
36980
|
+
worldMatrix: bundle_esm.matrix4.makeIdentity(),
|
|
36981
|
+
projectionMatrix: bundle_esm.matrix4.makeIdentity(),
|
|
36982
|
+
projectionMatrixInverse: bundle_esm.matrix4.makeIdentity(),
|
|
36983
|
+
projectionViewMatrix: bundle_esm.matrix4.makeIdentity(),
|
|
36984
|
+
};
|
|
36985
|
+
}
|
|
36986
|
+
return this.cameraMatrices;
|
|
36987
|
+
}
|
|
36988
|
+
updateCameraMatrices(cameraMatrices) {
|
|
36989
|
+
this.cameraMatrices = cameraMatrices;
|
|
36990
|
+
return this.cameraMatrices;
|
|
36991
|
+
}
|
|
36992
|
+
}
|
|
36993
|
+
class FramePerspectiveCamera extends FrameCameraBase {
|
|
36994
|
+
constructor(position, lookAt, up, near, far, aspectRatio, fovY) {
|
|
36995
|
+
super(position, lookAt, up, near, far, aspectRatio);
|
|
36996
|
+
this.position = position;
|
|
36997
|
+
this.lookAt = lookAt;
|
|
36998
|
+
this.up = up;
|
|
36999
|
+
this.near = near;
|
|
37000
|
+
this.far = far;
|
|
37001
|
+
this.aspectRatio = aspectRatio;
|
|
37002
|
+
this.fovY = fovY;
|
|
37003
|
+
}
|
|
37004
|
+
computeCameraMatrices() {
|
|
37005
|
+
if (this.cameraMatrices == null) {
|
|
37006
|
+
const viewMatrix = bundle_esm.matrix4.makeLookAtView(this.position, this.lookAt, this.up);
|
|
37007
|
+
const worldMatrix = bundle_esm.matrix4.invert(viewMatrix);
|
|
37008
|
+
const projectionMatrix = bundle_esm.matrix4.makePerspective(this.near, this.far, this.fovY, this.aspectRatio);
|
|
37009
|
+
const projectionMatrixInverse = bundle_esm.matrix4.invert(projectionMatrix);
|
|
37010
|
+
const projectionViewMatrix = bundle_esm.matrix4.multiply(projectionMatrix, viewMatrix);
|
|
37011
|
+
return super.updateCameraMatrices({
|
|
37012
|
+
viewMatrix,
|
|
37013
|
+
worldMatrix,
|
|
37014
|
+
projectionMatrix,
|
|
37015
|
+
projectionMatrixInverse,
|
|
37016
|
+
projectionViewMatrix,
|
|
37017
|
+
});
|
|
37018
|
+
}
|
|
37019
|
+
return this.cameraMatrices;
|
|
37020
|
+
}
|
|
37021
|
+
}
|
|
37022
|
+
class FrameOrthographicCamera extends FrameCameraBase {
|
|
37023
|
+
constructor(viewVector, lookAt, up, near, far, aspectRatio, fovHeight) {
|
|
37024
|
+
super(bundle_esm.vector3.add(lookAt, bundle_esm.vector3.negate(viewVector)), lookAt, up, near, far, aspectRatio);
|
|
37025
|
+
this.lookAt = lookAt;
|
|
37026
|
+
this.up = up;
|
|
37027
|
+
this.near = near;
|
|
37028
|
+
this.far = far;
|
|
37029
|
+
this.aspectRatio = aspectRatio;
|
|
37030
|
+
this.fovHeight = fovHeight;
|
|
37031
|
+
this.top = fovHeight * 0.5;
|
|
37032
|
+
this.bottom = -this.top;
|
|
37033
|
+
this.right = this.top * aspectRatio;
|
|
37034
|
+
this.left = -this.right;
|
|
37035
|
+
}
|
|
37036
|
+
computeCameraMatrices() {
|
|
37037
|
+
if (this.cameraMatrices == null) {
|
|
37038
|
+
const viewMatrix = bundle_esm.matrix4.makeLookAtView(this.position, this.lookAt, this.up);
|
|
37039
|
+
const worldMatrix = bundle_esm.matrix4.invert(viewMatrix);
|
|
37040
|
+
const projectionMatrix = bundle_esm.matrix4.makeOrthographic(this.left, this.right, this.bottom, this.top, this.near, this.far);
|
|
37041
|
+
const projectionMatrixInverse = bundle_esm.matrix4.invert(projectionMatrix);
|
|
37042
|
+
const projectionViewMatrix = bundle_esm.matrix4.multiply(projectionMatrix, viewMatrix);
|
|
37043
|
+
return super.updateCameraMatrices({
|
|
37044
|
+
viewMatrix,
|
|
37045
|
+
worldMatrix,
|
|
37046
|
+
projectionMatrix,
|
|
37047
|
+
projectionMatrixInverse,
|
|
37048
|
+
projectionViewMatrix,
|
|
37049
|
+
});
|
|
37050
|
+
}
|
|
37051
|
+
return this.cameraMatrices;
|
|
37052
|
+
}
|
|
36289
37053
|
}
|
|
36290
37054
|
|
|
36291
37055
|
class ScaledUnitConverter {
|
|
@@ -36739,7 +37503,29 @@ function fromPbScalarWrapper() {
|
|
|
36739
37503
|
return browser_esm.mapper.defineMapper((value) => (value === null || value === void 0 ? void 0 : value.value) || undefined, (value) => value);
|
|
36740
37504
|
}
|
|
36741
37505
|
|
|
36742
|
-
const
|
|
37506
|
+
const fromPbPerspectiveCamera = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('position', browser_esm.mapper.compose(browser_esm.mapper.required('position'), fromPbVector3f)), browser_esm.mapper.mapProp('lookAt', browser_esm.mapper.compose(browser_esm.mapper.required('lookAt'), fromPbVector3f)), browser_esm.mapper.mapProp('up', browser_esm.mapper.compose(browser_esm.mapper.required('up'), fromPbVector3f))), ([position, lookAt, up]) => ({
|
|
37507
|
+
position,
|
|
37508
|
+
lookAt,
|
|
37509
|
+
up,
|
|
37510
|
+
// TODO: map fovY property when available
|
|
37511
|
+
fovY: 45,
|
|
37512
|
+
}));
|
|
37513
|
+
const fromPbOrthographicCamera = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('viewVector', browser_esm.mapper.compose(browser_esm.mapper.required('viewVector'), fromPbVector3f)), browser_esm.mapper.mapProp('lookAt', browser_esm.mapper.compose(browser_esm.mapper.required('lookAt'), fromPbVector3f)), browser_esm.mapper.mapProp('up', browser_esm.mapper.compose(browser_esm.mapper.required('up'), fromPbVector3f)), browser_esm.mapper.mapProp('fovHeight', browser_esm.mapper.required('fovHeight'))), ([viewVector, lookAt, up, fovHeight]) => ({
|
|
37514
|
+
viewVector,
|
|
37515
|
+
lookAt,
|
|
37516
|
+
up,
|
|
37517
|
+
fovHeight,
|
|
37518
|
+
}));
|
|
37519
|
+
const fromPbCamera = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('position', browser_esm.mapper.ifDefined(fromPbVector3f)), browser_esm.mapper.mapProp('lookAt', browser_esm.mapper.ifDefined(fromPbVector3f)), browser_esm.mapper.mapProp('up', browser_esm.mapper.ifDefined(fromPbVector3f)), browser_esm.mapper.mapProp('perspective', browser_esm.mapper.ifDefined(fromPbPerspectiveCamera)), browser_esm.mapper.mapProp('orthographic', browser_esm.mapper.ifDefined(fromPbOrthographicCamera))), ([position, lookAt, up, perspective, orthographic]) => {
|
|
37520
|
+
var _a;
|
|
37521
|
+
return (_a = perspective !== null && perspective !== void 0 ? perspective : orthographic) !== null && _a !== void 0 ? _a : {
|
|
37522
|
+
position: position !== null && position !== void 0 ? position : bundle_esm.vector3.back(),
|
|
37523
|
+
lookAt: lookAt !== null && lookAt !== void 0 ? lookAt : bundle_esm.vector3.origin(),
|
|
37524
|
+
up: up !== null && up !== void 0 ? up : bundle_esm.vector3.up(),
|
|
37525
|
+
// TODO: map fovY property when available
|
|
37526
|
+
fovY: 45,
|
|
37527
|
+
};
|
|
37528
|
+
});
|
|
36743
37529
|
const fromPbSectionPlane = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('normal', browser_esm.mapper.compose(browser_esm.mapper.required('normal'), fromPbVector3f)), browser_esm.mapper.requiredProp('offset')), ([normal, offset]) => ({ normal, offset }));
|
|
36744
37530
|
const fromPbImageAttributes = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('frameDimensions', browser_esm.mapper.compose(browser_esm.mapper.required('frameDimensions'), fromPbDim)), browser_esm.mapper.mapProp('imageRect', browser_esm.mapper.compose(browser_esm.mapper.required('imageRect'), fromPbRect)), browser_esm.mapper.mapProp('scaleFactor', browser_esm.mapper.required('scaleFactor'))), ([frameDimensions, imageRect, imageScale]) => ({
|
|
36745
37531
|
frameDimensions,
|
|
@@ -36759,7 +37545,7 @@ const fromPbSceneAttributes = browser_esm.mapper.defineMapper(browser_esm.mapper
|
|
|
36759
37545
|
hasChanged,
|
|
36760
37546
|
}));
|
|
36761
37547
|
const fromPbFrameSceneAttributes = browser_esm.mapper.defineMapper(browser_esm.mapper.read(browser_esm.mapper.mapProp('sceneAttributes', browser_esm.mapper.compose(browser_esm.mapper.required('sceneAttributes'), fromPbSceneAttributes))), ([sceneAttr]) => sceneAttr);
|
|
36762
|
-
const fromPbFrameCamera = browser_esm.mapper.defineMapper(browser_esm.mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) =>
|
|
37548
|
+
const fromPbFrameCamera = browser_esm.mapper.defineMapper(browser_esm.mapper.read(fromPbFrameSceneAttributes, fromPbFrameImageAttributes), ([sceneAttr, imageAttr]) => FrameCameraBase.fromBoundingBox(sceneAttr.camera, sceneAttr.boundingBox, bundle_esm.dimensions.aspectRatio(imageAttr.frameDimensions)));
|
|
36763
37549
|
function fromPbFrameScene(worldOrientation) {
|
|
36764
37550
|
return browser_esm.mapper.defineMapper(browser_esm.mapper.read(fromPbFrameSceneAttributes, fromPbFrameCamera), ([sceneAttr, camera]) => new FrameScene(camera, sceneAttr.boundingBox, sceneAttr.crossSectioning, worldOrientation, sceneAttr.hasChanged));
|
|
36765
37551
|
}
|
|
@@ -39464,6 +40250,522 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39464
40250
|
*/
|
|
39465
40251
|
const stream = {};
|
|
39466
40252
|
|
|
40253
|
+
stream.PerspectiveCamera = (function() {
|
|
40254
|
+
|
|
40255
|
+
/**
|
|
40256
|
+
* Properties of a PerspectiveCamera.
|
|
40257
|
+
* @memberof vertexvis.protobuf.stream
|
|
40258
|
+
* @interface IPerspectiveCamera
|
|
40259
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
|
|
40260
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
|
|
40261
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
|
|
40262
|
+
*/
|
|
40263
|
+
|
|
40264
|
+
/**
|
|
40265
|
+
* Constructs a new PerspectiveCamera.
|
|
40266
|
+
* @memberof vertexvis.protobuf.stream
|
|
40267
|
+
* @classdesc Represents a PerspectiveCamera.
|
|
40268
|
+
* @implements IPerspectiveCamera
|
|
40269
|
+
* @constructor
|
|
40270
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
|
|
40271
|
+
*/
|
|
40272
|
+
function PerspectiveCamera(properties) {
|
|
40273
|
+
if (properties)
|
|
40274
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
40275
|
+
if (properties[keys[i]] != null)
|
|
40276
|
+
this[keys[i]] = properties[keys[i]];
|
|
40277
|
+
}
|
|
40278
|
+
|
|
40279
|
+
/**
|
|
40280
|
+
* PerspectiveCamera position.
|
|
40281
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
|
|
40282
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40283
|
+
* @instance
|
|
40284
|
+
*/
|
|
40285
|
+
PerspectiveCamera.prototype.position = null;
|
|
40286
|
+
|
|
40287
|
+
/**
|
|
40288
|
+
* PerspectiveCamera lookAt.
|
|
40289
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
|
|
40290
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40291
|
+
* @instance
|
|
40292
|
+
*/
|
|
40293
|
+
PerspectiveCamera.prototype.lookAt = null;
|
|
40294
|
+
|
|
40295
|
+
/**
|
|
40296
|
+
* PerspectiveCamera up.
|
|
40297
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
|
|
40298
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40299
|
+
* @instance
|
|
40300
|
+
*/
|
|
40301
|
+
PerspectiveCamera.prototype.up = null;
|
|
40302
|
+
|
|
40303
|
+
/**
|
|
40304
|
+
* Creates a new PerspectiveCamera instance using the specified properties.
|
|
40305
|
+
* @function create
|
|
40306
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40307
|
+
* @static
|
|
40308
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
|
|
40309
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
|
|
40310
|
+
*/
|
|
40311
|
+
PerspectiveCamera.create = function create(properties) {
|
|
40312
|
+
return new PerspectiveCamera(properties);
|
|
40313
|
+
};
|
|
40314
|
+
|
|
40315
|
+
/**
|
|
40316
|
+
* Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
|
|
40317
|
+
* @function encode
|
|
40318
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40319
|
+
* @static
|
|
40320
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
|
|
40321
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40322
|
+
* @returns {$protobuf.Writer} Writer
|
|
40323
|
+
*/
|
|
40324
|
+
PerspectiveCamera.encode = function encode(message, writer) {
|
|
40325
|
+
if (!writer)
|
|
40326
|
+
writer = $Writer.create();
|
|
40327
|
+
if (message.position != null && Object.hasOwnProperty.call(message, "position"))
|
|
40328
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
40329
|
+
if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
|
|
40330
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
40331
|
+
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
40332
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
40333
|
+
return writer;
|
|
40334
|
+
};
|
|
40335
|
+
|
|
40336
|
+
/**
|
|
40337
|
+
* Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
|
|
40338
|
+
* @function encodeDelimited
|
|
40339
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40340
|
+
* @static
|
|
40341
|
+
* @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
|
|
40342
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40343
|
+
* @returns {$protobuf.Writer} Writer
|
|
40344
|
+
*/
|
|
40345
|
+
PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
|
|
40346
|
+
return this.encode(message, writer).ldelim();
|
|
40347
|
+
};
|
|
40348
|
+
|
|
40349
|
+
/**
|
|
40350
|
+
* Decodes a PerspectiveCamera message from the specified reader or buffer.
|
|
40351
|
+
* @function decode
|
|
40352
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40353
|
+
* @static
|
|
40354
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40355
|
+
* @param {number} [length] Message length if known beforehand
|
|
40356
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
40357
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40358
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40359
|
+
*/
|
|
40360
|
+
PerspectiveCamera.decode = function decode(reader, length) {
|
|
40361
|
+
if (!(reader instanceof $Reader))
|
|
40362
|
+
reader = $Reader.create(reader);
|
|
40363
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
|
|
40364
|
+
while (reader.pos < end) {
|
|
40365
|
+
let tag = reader.uint32();
|
|
40366
|
+
switch (tag >>> 3) {
|
|
40367
|
+
case 1:
|
|
40368
|
+
message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40369
|
+
break;
|
|
40370
|
+
case 2:
|
|
40371
|
+
message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40372
|
+
break;
|
|
40373
|
+
case 3:
|
|
40374
|
+
message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40375
|
+
break;
|
|
40376
|
+
default:
|
|
40377
|
+
reader.skipType(tag & 7);
|
|
40378
|
+
break;
|
|
40379
|
+
}
|
|
40380
|
+
}
|
|
40381
|
+
return message;
|
|
40382
|
+
};
|
|
40383
|
+
|
|
40384
|
+
/**
|
|
40385
|
+
* Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
|
|
40386
|
+
* @function decodeDelimited
|
|
40387
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40388
|
+
* @static
|
|
40389
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40390
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
40391
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40392
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40393
|
+
*/
|
|
40394
|
+
PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
|
|
40395
|
+
if (!(reader instanceof $Reader))
|
|
40396
|
+
reader = new $Reader(reader);
|
|
40397
|
+
return this.decode(reader, reader.uint32());
|
|
40398
|
+
};
|
|
40399
|
+
|
|
40400
|
+
/**
|
|
40401
|
+
* Verifies a PerspectiveCamera message.
|
|
40402
|
+
* @function verify
|
|
40403
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40404
|
+
* @static
|
|
40405
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40406
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40407
|
+
*/
|
|
40408
|
+
PerspectiveCamera.verify = function verify(message) {
|
|
40409
|
+
if (typeof message !== "object" || message === null)
|
|
40410
|
+
return "object expected";
|
|
40411
|
+
if (message.position != null && message.hasOwnProperty("position")) {
|
|
40412
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
|
|
40413
|
+
if (error)
|
|
40414
|
+
return "position." + error;
|
|
40415
|
+
}
|
|
40416
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
|
|
40417
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
|
|
40418
|
+
if (error)
|
|
40419
|
+
return "lookAt." + error;
|
|
40420
|
+
}
|
|
40421
|
+
if (message.up != null && message.hasOwnProperty("up")) {
|
|
40422
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
|
|
40423
|
+
if (error)
|
|
40424
|
+
return "up." + error;
|
|
40425
|
+
}
|
|
40426
|
+
return null;
|
|
40427
|
+
};
|
|
40428
|
+
|
|
40429
|
+
/**
|
|
40430
|
+
* Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
|
|
40431
|
+
* @function fromObject
|
|
40432
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40433
|
+
* @static
|
|
40434
|
+
* @param {Object.<string,*>} object Plain object
|
|
40435
|
+
* @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
|
|
40436
|
+
*/
|
|
40437
|
+
PerspectiveCamera.fromObject = function fromObject(object) {
|
|
40438
|
+
if (object instanceof $root.vertexvis.protobuf.stream.PerspectiveCamera)
|
|
40439
|
+
return object;
|
|
40440
|
+
let message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
|
|
40441
|
+
if (object.position != null) {
|
|
40442
|
+
if (typeof object.position !== "object")
|
|
40443
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
|
|
40444
|
+
message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
|
|
40445
|
+
}
|
|
40446
|
+
if (object.lookAt != null) {
|
|
40447
|
+
if (typeof object.lookAt !== "object")
|
|
40448
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
|
|
40449
|
+
message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
|
|
40450
|
+
}
|
|
40451
|
+
if (object.up != null) {
|
|
40452
|
+
if (typeof object.up !== "object")
|
|
40453
|
+
throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
|
|
40454
|
+
message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
40455
|
+
}
|
|
40456
|
+
return message;
|
|
40457
|
+
};
|
|
40458
|
+
|
|
40459
|
+
/**
|
|
40460
|
+
* Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
|
|
40461
|
+
* @function toObject
|
|
40462
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40463
|
+
* @static
|
|
40464
|
+
* @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
|
|
40465
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40466
|
+
* @returns {Object.<string,*>} Plain object
|
|
40467
|
+
*/
|
|
40468
|
+
PerspectiveCamera.toObject = function toObject(message, options) {
|
|
40469
|
+
if (!options)
|
|
40470
|
+
options = {};
|
|
40471
|
+
let object = {};
|
|
40472
|
+
if (options.defaults) {
|
|
40473
|
+
object.position = null;
|
|
40474
|
+
object.lookAt = null;
|
|
40475
|
+
object.up = null;
|
|
40476
|
+
}
|
|
40477
|
+
if (message.position != null && message.hasOwnProperty("position"))
|
|
40478
|
+
object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
|
|
40479
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt"))
|
|
40480
|
+
object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
40481
|
+
if (message.up != null && message.hasOwnProperty("up"))
|
|
40482
|
+
object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
40483
|
+
return object;
|
|
40484
|
+
};
|
|
40485
|
+
|
|
40486
|
+
/**
|
|
40487
|
+
* Converts this PerspectiveCamera to JSON.
|
|
40488
|
+
* @function toJSON
|
|
40489
|
+
* @memberof vertexvis.protobuf.stream.PerspectiveCamera
|
|
40490
|
+
* @instance
|
|
40491
|
+
* @returns {Object.<string,*>} JSON object
|
|
40492
|
+
*/
|
|
40493
|
+
PerspectiveCamera.prototype.toJSON = function toJSON() {
|
|
40494
|
+
return this.constructor.toObject(this, minimal.util.toJSONOptions);
|
|
40495
|
+
};
|
|
40496
|
+
|
|
40497
|
+
return PerspectiveCamera;
|
|
40498
|
+
})();
|
|
40499
|
+
|
|
40500
|
+
stream.OrthographicCamera = (function() {
|
|
40501
|
+
|
|
40502
|
+
/**
|
|
40503
|
+
* Properties of an OrthographicCamera.
|
|
40504
|
+
* @memberof vertexvis.protobuf.stream
|
|
40505
|
+
* @interface IOrthographicCamera
|
|
40506
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
|
|
40507
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
|
|
40508
|
+
* @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
|
|
40509
|
+
* @property {number|null} [fovHeight] OrthographicCamera fovHeight
|
|
40510
|
+
*/
|
|
40511
|
+
|
|
40512
|
+
/**
|
|
40513
|
+
* Constructs a new OrthographicCamera.
|
|
40514
|
+
* @memberof vertexvis.protobuf.stream
|
|
40515
|
+
* @classdesc Represents an OrthographicCamera.
|
|
40516
|
+
* @implements IOrthographicCamera
|
|
40517
|
+
* @constructor
|
|
40518
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
|
|
40519
|
+
*/
|
|
40520
|
+
function OrthographicCamera(properties) {
|
|
40521
|
+
if (properties)
|
|
40522
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
40523
|
+
if (properties[keys[i]] != null)
|
|
40524
|
+
this[keys[i]] = properties[keys[i]];
|
|
40525
|
+
}
|
|
40526
|
+
|
|
40527
|
+
/**
|
|
40528
|
+
* OrthographicCamera viewVector.
|
|
40529
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
|
|
40530
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40531
|
+
* @instance
|
|
40532
|
+
*/
|
|
40533
|
+
OrthographicCamera.prototype.viewVector = null;
|
|
40534
|
+
|
|
40535
|
+
/**
|
|
40536
|
+
* OrthographicCamera lookAt.
|
|
40537
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
|
|
40538
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40539
|
+
* @instance
|
|
40540
|
+
*/
|
|
40541
|
+
OrthographicCamera.prototype.lookAt = null;
|
|
40542
|
+
|
|
40543
|
+
/**
|
|
40544
|
+
* OrthographicCamera up.
|
|
40545
|
+
* @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
|
|
40546
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40547
|
+
* @instance
|
|
40548
|
+
*/
|
|
40549
|
+
OrthographicCamera.prototype.up = null;
|
|
40550
|
+
|
|
40551
|
+
/**
|
|
40552
|
+
* OrthographicCamera fovHeight.
|
|
40553
|
+
* @member {number} fovHeight
|
|
40554
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40555
|
+
* @instance
|
|
40556
|
+
*/
|
|
40557
|
+
OrthographicCamera.prototype.fovHeight = 0;
|
|
40558
|
+
|
|
40559
|
+
/**
|
|
40560
|
+
* Creates a new OrthographicCamera instance using the specified properties.
|
|
40561
|
+
* @function create
|
|
40562
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40563
|
+
* @static
|
|
40564
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
|
|
40565
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
|
|
40566
|
+
*/
|
|
40567
|
+
OrthographicCamera.create = function create(properties) {
|
|
40568
|
+
return new OrthographicCamera(properties);
|
|
40569
|
+
};
|
|
40570
|
+
|
|
40571
|
+
/**
|
|
40572
|
+
* Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
|
|
40573
|
+
* @function encode
|
|
40574
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40575
|
+
* @static
|
|
40576
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
|
|
40577
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40578
|
+
* @returns {$protobuf.Writer} Writer
|
|
40579
|
+
*/
|
|
40580
|
+
OrthographicCamera.encode = function encode(message, writer) {
|
|
40581
|
+
if (!writer)
|
|
40582
|
+
writer = $Writer.create();
|
|
40583
|
+
if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
|
|
40584
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
40585
|
+
if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
|
|
40586
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
40587
|
+
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
40588
|
+
$root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
40589
|
+
if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
|
|
40590
|
+
writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
|
|
40591
|
+
return writer;
|
|
40592
|
+
};
|
|
40593
|
+
|
|
40594
|
+
/**
|
|
40595
|
+
* Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
|
|
40596
|
+
* @function encodeDelimited
|
|
40597
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40598
|
+
* @static
|
|
40599
|
+
* @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
|
|
40600
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
40601
|
+
* @returns {$protobuf.Writer} Writer
|
|
40602
|
+
*/
|
|
40603
|
+
OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
|
|
40604
|
+
return this.encode(message, writer).ldelim();
|
|
40605
|
+
};
|
|
40606
|
+
|
|
40607
|
+
/**
|
|
40608
|
+
* Decodes an OrthographicCamera message from the specified reader or buffer.
|
|
40609
|
+
* @function decode
|
|
40610
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40611
|
+
* @static
|
|
40612
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40613
|
+
* @param {number} [length] Message length if known beforehand
|
|
40614
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
40615
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40616
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40617
|
+
*/
|
|
40618
|
+
OrthographicCamera.decode = function decode(reader, length) {
|
|
40619
|
+
if (!(reader instanceof $Reader))
|
|
40620
|
+
reader = $Reader.create(reader);
|
|
40621
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
|
|
40622
|
+
while (reader.pos < end) {
|
|
40623
|
+
let tag = reader.uint32();
|
|
40624
|
+
switch (tag >>> 3) {
|
|
40625
|
+
case 1:
|
|
40626
|
+
message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40627
|
+
break;
|
|
40628
|
+
case 2:
|
|
40629
|
+
message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40630
|
+
break;
|
|
40631
|
+
case 3:
|
|
40632
|
+
message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
40633
|
+
break;
|
|
40634
|
+
case 4:
|
|
40635
|
+
message.fovHeight = reader.float();
|
|
40636
|
+
break;
|
|
40637
|
+
default:
|
|
40638
|
+
reader.skipType(tag & 7);
|
|
40639
|
+
break;
|
|
40640
|
+
}
|
|
40641
|
+
}
|
|
40642
|
+
return message;
|
|
40643
|
+
};
|
|
40644
|
+
|
|
40645
|
+
/**
|
|
40646
|
+
* Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
|
|
40647
|
+
* @function decodeDelimited
|
|
40648
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40649
|
+
* @static
|
|
40650
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
40651
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
40652
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
40653
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
40654
|
+
*/
|
|
40655
|
+
OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
|
|
40656
|
+
if (!(reader instanceof $Reader))
|
|
40657
|
+
reader = new $Reader(reader);
|
|
40658
|
+
return this.decode(reader, reader.uint32());
|
|
40659
|
+
};
|
|
40660
|
+
|
|
40661
|
+
/**
|
|
40662
|
+
* Verifies an OrthographicCamera message.
|
|
40663
|
+
* @function verify
|
|
40664
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40665
|
+
* @static
|
|
40666
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
40667
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
40668
|
+
*/
|
|
40669
|
+
OrthographicCamera.verify = function verify(message) {
|
|
40670
|
+
if (typeof message !== "object" || message === null)
|
|
40671
|
+
return "object expected";
|
|
40672
|
+
if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
|
|
40673
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
|
|
40674
|
+
if (error)
|
|
40675
|
+
return "viewVector." + error;
|
|
40676
|
+
}
|
|
40677
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
|
|
40678
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
|
|
40679
|
+
if (error)
|
|
40680
|
+
return "lookAt." + error;
|
|
40681
|
+
}
|
|
40682
|
+
if (message.up != null && message.hasOwnProperty("up")) {
|
|
40683
|
+
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
|
|
40684
|
+
if (error)
|
|
40685
|
+
return "up." + error;
|
|
40686
|
+
}
|
|
40687
|
+
if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
|
|
40688
|
+
if (typeof message.fovHeight !== "number")
|
|
40689
|
+
return "fovHeight: number expected";
|
|
40690
|
+
return null;
|
|
40691
|
+
};
|
|
40692
|
+
|
|
40693
|
+
/**
|
|
40694
|
+
* Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
|
|
40695
|
+
* @function fromObject
|
|
40696
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40697
|
+
* @static
|
|
40698
|
+
* @param {Object.<string,*>} object Plain object
|
|
40699
|
+
* @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
|
|
40700
|
+
*/
|
|
40701
|
+
OrthographicCamera.fromObject = function fromObject(object) {
|
|
40702
|
+
if (object instanceof $root.vertexvis.protobuf.stream.OrthographicCamera)
|
|
40703
|
+
return object;
|
|
40704
|
+
let message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
|
|
40705
|
+
if (object.viewVector != null) {
|
|
40706
|
+
if (typeof object.viewVector !== "object")
|
|
40707
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
|
|
40708
|
+
message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
|
|
40709
|
+
}
|
|
40710
|
+
if (object.lookAt != null) {
|
|
40711
|
+
if (typeof object.lookAt !== "object")
|
|
40712
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
|
|
40713
|
+
message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
|
|
40714
|
+
}
|
|
40715
|
+
if (object.up != null) {
|
|
40716
|
+
if (typeof object.up !== "object")
|
|
40717
|
+
throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
|
|
40718
|
+
message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
40719
|
+
}
|
|
40720
|
+
if (object.fovHeight != null)
|
|
40721
|
+
message.fovHeight = Number(object.fovHeight);
|
|
40722
|
+
return message;
|
|
40723
|
+
};
|
|
40724
|
+
|
|
40725
|
+
/**
|
|
40726
|
+
* Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
|
|
40727
|
+
* @function toObject
|
|
40728
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40729
|
+
* @static
|
|
40730
|
+
* @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
|
|
40731
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
40732
|
+
* @returns {Object.<string,*>} Plain object
|
|
40733
|
+
*/
|
|
40734
|
+
OrthographicCamera.toObject = function toObject(message, options) {
|
|
40735
|
+
if (!options)
|
|
40736
|
+
options = {};
|
|
40737
|
+
let object = {};
|
|
40738
|
+
if (options.defaults) {
|
|
40739
|
+
object.viewVector = null;
|
|
40740
|
+
object.lookAt = null;
|
|
40741
|
+
object.up = null;
|
|
40742
|
+
object.fovHeight = 0;
|
|
40743
|
+
}
|
|
40744
|
+
if (message.viewVector != null && message.hasOwnProperty("viewVector"))
|
|
40745
|
+
object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
|
|
40746
|
+
if (message.lookAt != null && message.hasOwnProperty("lookAt"))
|
|
40747
|
+
object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
40748
|
+
if (message.up != null && message.hasOwnProperty("up"))
|
|
40749
|
+
object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
40750
|
+
if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
|
|
40751
|
+
object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
|
|
40752
|
+
return object;
|
|
40753
|
+
};
|
|
40754
|
+
|
|
40755
|
+
/**
|
|
40756
|
+
* Converts this OrthographicCamera to JSON.
|
|
40757
|
+
* @function toJSON
|
|
40758
|
+
* @memberof vertexvis.protobuf.stream.OrthographicCamera
|
|
40759
|
+
* @instance
|
|
40760
|
+
* @returns {Object.<string,*>} JSON object
|
|
40761
|
+
*/
|
|
40762
|
+
OrthographicCamera.prototype.toJSON = function toJSON() {
|
|
40763
|
+
return this.constructor.toObject(this, minimal.util.toJSONOptions);
|
|
40764
|
+
};
|
|
40765
|
+
|
|
40766
|
+
return OrthographicCamera;
|
|
40767
|
+
})();
|
|
40768
|
+
|
|
39467
40769
|
stream.Camera = (function() {
|
|
39468
40770
|
|
|
39469
40771
|
/**
|
|
@@ -39473,6 +40775,8 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39473
40775
|
* @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
|
|
39474
40776
|
* @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
|
|
39475
40777
|
* @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
|
|
40778
|
+
* @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
|
|
40779
|
+
* @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
|
|
39476
40780
|
*/
|
|
39477
40781
|
|
|
39478
40782
|
/**
|
|
@@ -39514,6 +40818,36 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39514
40818
|
*/
|
|
39515
40819
|
Camera.prototype.up = null;
|
|
39516
40820
|
|
|
40821
|
+
/**
|
|
40822
|
+
* Camera perspective.
|
|
40823
|
+
* @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
|
|
40824
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
40825
|
+
* @instance
|
|
40826
|
+
*/
|
|
40827
|
+
Camera.prototype.perspective = null;
|
|
40828
|
+
|
|
40829
|
+
/**
|
|
40830
|
+
* Camera orthographic.
|
|
40831
|
+
* @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
|
|
40832
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
40833
|
+
* @instance
|
|
40834
|
+
*/
|
|
40835
|
+
Camera.prototype.orthographic = null;
|
|
40836
|
+
|
|
40837
|
+
// OneOf field names bound to virtual getters and setters
|
|
40838
|
+
let $oneOfFields;
|
|
40839
|
+
|
|
40840
|
+
/**
|
|
40841
|
+
* Camera type.
|
|
40842
|
+
* @member {"perspective"|"orthographic"|undefined} type
|
|
40843
|
+
* @memberof vertexvis.protobuf.stream.Camera
|
|
40844
|
+
* @instance
|
|
40845
|
+
*/
|
|
40846
|
+
Object.defineProperty(Camera.prototype, "type", {
|
|
40847
|
+
get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
|
|
40848
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
40849
|
+
});
|
|
40850
|
+
|
|
39517
40851
|
/**
|
|
39518
40852
|
* Creates a new Camera instance using the specified properties.
|
|
39519
40853
|
* @function create
|
|
@@ -39544,6 +40878,10 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39544
40878
|
$root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
39545
40879
|
if (message.up != null && Object.hasOwnProperty.call(message, "up"))
|
|
39546
40880
|
$root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
40881
|
+
if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
|
|
40882
|
+
$root.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
40883
|
+
if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
|
|
40884
|
+
$root.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
39547
40885
|
return writer;
|
|
39548
40886
|
};
|
|
39549
40887
|
|
|
@@ -39587,6 +40925,12 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39587
40925
|
case 3:
|
|
39588
40926
|
message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
|
|
39589
40927
|
break;
|
|
40928
|
+
case 4:
|
|
40929
|
+
message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
|
|
40930
|
+
break;
|
|
40931
|
+
case 5:
|
|
40932
|
+
message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
|
|
40933
|
+
break;
|
|
39590
40934
|
default:
|
|
39591
40935
|
reader.skipType(tag & 7);
|
|
39592
40936
|
break;
|
|
@@ -39622,6 +40966,7 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39622
40966
|
Camera.verify = function verify(message) {
|
|
39623
40967
|
if (typeof message !== "object" || message === null)
|
|
39624
40968
|
return "object expected";
|
|
40969
|
+
let properties = {};
|
|
39625
40970
|
if (message.position != null && message.hasOwnProperty("position")) {
|
|
39626
40971
|
let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
|
|
39627
40972
|
if (error)
|
|
@@ -39637,6 +40982,24 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39637
40982
|
if (error)
|
|
39638
40983
|
return "up." + error;
|
|
39639
40984
|
}
|
|
40985
|
+
if (message.perspective != null && message.hasOwnProperty("perspective")) {
|
|
40986
|
+
properties.type = 1;
|
|
40987
|
+
{
|
|
40988
|
+
let error = $root.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
|
|
40989
|
+
if (error)
|
|
40990
|
+
return "perspective." + error;
|
|
40991
|
+
}
|
|
40992
|
+
}
|
|
40993
|
+
if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
|
|
40994
|
+
if (properties.type === 1)
|
|
40995
|
+
return "type: multiple values";
|
|
40996
|
+
properties.type = 1;
|
|
40997
|
+
{
|
|
40998
|
+
let error = $root.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
|
|
40999
|
+
if (error)
|
|
41000
|
+
return "orthographic." + error;
|
|
41001
|
+
}
|
|
41002
|
+
}
|
|
39640
41003
|
return null;
|
|
39641
41004
|
};
|
|
39642
41005
|
|
|
@@ -39667,6 +41030,16 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39667
41030
|
throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
|
|
39668
41031
|
message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
|
|
39669
41032
|
}
|
|
41033
|
+
if (object.perspective != null) {
|
|
41034
|
+
if (typeof object.perspective !== "object")
|
|
41035
|
+
throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
|
|
41036
|
+
message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
|
|
41037
|
+
}
|
|
41038
|
+
if (object.orthographic != null) {
|
|
41039
|
+
if (typeof object.orthographic !== "object")
|
|
41040
|
+
throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
|
|
41041
|
+
message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
|
|
41042
|
+
}
|
|
39670
41043
|
return message;
|
|
39671
41044
|
};
|
|
39672
41045
|
|
|
@@ -39694,6 +41067,16 @@ const vertexvis = $root.vertexvis = (() => {
|
|
|
39694
41067
|
object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
|
|
39695
41068
|
if (message.up != null && message.hasOwnProperty("up"))
|
|
39696
41069
|
object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
|
|
41070
|
+
if (message.perspective != null && message.hasOwnProperty("perspective")) {
|
|
41071
|
+
object.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
|
|
41072
|
+
if (options.oneofs)
|
|
41073
|
+
object.type = "perspective";
|
|
41074
|
+
}
|
|
41075
|
+
if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
|
|
41076
|
+
object.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
|
|
41077
|
+
if (options.oneofs)
|
|
41078
|
+
object.type = "orthographic";
|
|
41079
|
+
}
|
|
39697
41080
|
return object;
|
|
39698
41081
|
};
|
|
39699
41082
|
|
|
@@ -70233,6 +71616,7 @@ exports.DepthBuffer = DepthBuffer;
|
|
|
70233
71616
|
exports.DistanceUnits = DistanceUnits;
|
|
70234
71617
|
exports.Frame = Frame;
|
|
70235
71618
|
exports.FrameImage = FrameImage;
|
|
71619
|
+
exports.FrameOrthographicCamera = FrameOrthographicCamera;
|
|
70236
71620
|
exports.FramePerspectiveCamera = FramePerspectiveCamera;
|
|
70237
71621
|
exports.FrameScene = FrameScene;
|
|
70238
71622
|
exports.Orientation = Orientation;
|
|
@@ -70251,8 +71635,14 @@ exports.fromPbStartStreamResponseOrThrow = fromPbStartStreamResponseOrThrow;
|
|
|
70251
71635
|
exports.fromPbStencilBufferOrThrow = fromPbStencilBufferOrThrow;
|
|
70252
71636
|
exports.fromPbSyncTimeResponseOrThrow = fromPbSyncTimeResponseOrThrow;
|
|
70253
71637
|
exports.fromPbVector3f = fromPbVector3f;
|
|
71638
|
+
exports.isOrthographicFrameCamera = isOrthographicFrameCamera;
|
|
71639
|
+
exports.isPerspectiveFrameCamera = isPerspectiveFrameCamera;
|
|
70254
71640
|
exports.protoToDate = protoToDate;
|
|
71641
|
+
exports.toOrthographic = toOrthographic;
|
|
70255
71642
|
exports.toPbRGBi = toPbRGBi;
|
|
70256
71643
|
exports.toPbStreamAttributes = toPbStreamAttributes;
|
|
71644
|
+
exports.toPerspective = toPerspective;
|
|
70257
71645
|
exports.toProtoDuration = toProtoDuration;
|
|
71646
|
+
exports.toProtobuf = toProtobuf;
|
|
70258
71647
|
exports.vertexvis = vertexvis;
|
|
71648
|
+
exports.withPositionAndViewVector = withPositionAndViewVector;
|