@vertexvis/stream-api 0.13.1 → 0.13.2-canary.10

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.
@@ -2680,6 +2680,522 @@ const vertexvis = $root.vertexvis = (() => {
2680
2680
  */
2681
2681
  const stream = {};
2682
2682
 
2683
+ stream.PerspectiveCamera = (function() {
2684
+
2685
+ /**
2686
+ * Properties of a PerspectiveCamera.
2687
+ * @memberof vertexvis.protobuf.stream
2688
+ * @interface IPerspectiveCamera
2689
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
2690
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
2691
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
2692
+ */
2693
+
2694
+ /**
2695
+ * Constructs a new PerspectiveCamera.
2696
+ * @memberof vertexvis.protobuf.stream
2697
+ * @classdesc Represents a PerspectiveCamera.
2698
+ * @implements IPerspectiveCamera
2699
+ * @constructor
2700
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
2701
+ */
2702
+ function PerspectiveCamera(properties) {
2703
+ if (properties)
2704
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2705
+ if (properties[keys[i]] != null)
2706
+ this[keys[i]] = properties[keys[i]];
2707
+ }
2708
+
2709
+ /**
2710
+ * PerspectiveCamera position.
2711
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
2712
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2713
+ * @instance
2714
+ */
2715
+ PerspectiveCamera.prototype.position = null;
2716
+
2717
+ /**
2718
+ * PerspectiveCamera lookAt.
2719
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
2720
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2721
+ * @instance
2722
+ */
2723
+ PerspectiveCamera.prototype.lookAt = null;
2724
+
2725
+ /**
2726
+ * PerspectiveCamera up.
2727
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
2728
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2729
+ * @instance
2730
+ */
2731
+ PerspectiveCamera.prototype.up = null;
2732
+
2733
+ /**
2734
+ * Creates a new PerspectiveCamera instance using the specified properties.
2735
+ * @function create
2736
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2737
+ * @static
2738
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera=} [properties] Properties to set
2739
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera instance
2740
+ */
2741
+ PerspectiveCamera.create = function create(properties) {
2742
+ return new PerspectiveCamera(properties);
2743
+ };
2744
+
2745
+ /**
2746
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
2747
+ * @function encode
2748
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2749
+ * @static
2750
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
2751
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2752
+ * @returns {$protobuf.Writer} Writer
2753
+ */
2754
+ PerspectiveCamera.encode = function encode(message, writer) {
2755
+ if (!writer)
2756
+ writer = $Writer.create();
2757
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
2758
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
2759
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
2760
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2761
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
2762
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2763
+ return writer;
2764
+ };
2765
+
2766
+ /**
2767
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.PerspectiveCamera.verify|verify} messages.
2768
+ * @function encodeDelimited
2769
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2770
+ * @static
2771
+ * @param {vertexvis.protobuf.stream.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
2772
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2773
+ * @returns {$protobuf.Writer} Writer
2774
+ */
2775
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
2776
+ return this.encode(message, writer).ldelim();
2777
+ };
2778
+
2779
+ /**
2780
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
2781
+ * @function decode
2782
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2783
+ * @static
2784
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2785
+ * @param {number} [length] Message length if known beforehand
2786
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2787
+ * @throws {Error} If the payload is not a reader or valid buffer
2788
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2789
+ */
2790
+ PerspectiveCamera.decode = function decode(reader, length) {
2791
+ if (!(reader instanceof $Reader))
2792
+ reader = $Reader.create(reader);
2793
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
2794
+ while (reader.pos < end) {
2795
+ let tag = reader.uint32();
2796
+ switch (tag >>> 3) {
2797
+ case 1:
2798
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2799
+ break;
2800
+ case 2:
2801
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2802
+ break;
2803
+ case 3:
2804
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2805
+ break;
2806
+ default:
2807
+ reader.skipType(tag & 7);
2808
+ break;
2809
+ }
2810
+ }
2811
+ return message;
2812
+ };
2813
+
2814
+ /**
2815
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
2816
+ * @function decodeDelimited
2817
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2818
+ * @static
2819
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2820
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2821
+ * @throws {Error} If the payload is not a reader or valid buffer
2822
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2823
+ */
2824
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
2825
+ if (!(reader instanceof $Reader))
2826
+ reader = new $Reader(reader);
2827
+ return this.decode(reader, reader.uint32());
2828
+ };
2829
+
2830
+ /**
2831
+ * Verifies a PerspectiveCamera message.
2832
+ * @function verify
2833
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2834
+ * @static
2835
+ * @param {Object.<string,*>} message Plain object to verify
2836
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2837
+ */
2838
+ PerspectiveCamera.verify = function verify(message) {
2839
+ if (typeof message !== "object" || message === null)
2840
+ return "object expected";
2841
+ if (message.position != null && message.hasOwnProperty("position")) {
2842
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
2843
+ if (error)
2844
+ return "position." + error;
2845
+ }
2846
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
2847
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
2848
+ if (error)
2849
+ return "lookAt." + error;
2850
+ }
2851
+ if (message.up != null && message.hasOwnProperty("up")) {
2852
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
2853
+ if (error)
2854
+ return "up." + error;
2855
+ }
2856
+ return null;
2857
+ };
2858
+
2859
+ /**
2860
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
2861
+ * @function fromObject
2862
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2863
+ * @static
2864
+ * @param {Object.<string,*>} object Plain object
2865
+ * @returns {vertexvis.protobuf.stream.PerspectiveCamera} PerspectiveCamera
2866
+ */
2867
+ PerspectiveCamera.fromObject = function fromObject(object) {
2868
+ if (object instanceof $root.vertexvis.protobuf.stream.PerspectiveCamera)
2869
+ return object;
2870
+ let message = new $root.vertexvis.protobuf.stream.PerspectiveCamera();
2871
+ if (object.position != null) {
2872
+ if (typeof object.position !== "object")
2873
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.position: object expected");
2874
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
2875
+ }
2876
+ if (object.lookAt != null) {
2877
+ if (typeof object.lookAt !== "object")
2878
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.lookAt: object expected");
2879
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
2880
+ }
2881
+ if (object.up != null) {
2882
+ if (typeof object.up !== "object")
2883
+ throw TypeError(".vertexvis.protobuf.stream.PerspectiveCamera.up: object expected");
2884
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
2885
+ }
2886
+ return message;
2887
+ };
2888
+
2889
+ /**
2890
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
2891
+ * @function toObject
2892
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2893
+ * @static
2894
+ * @param {vertexvis.protobuf.stream.PerspectiveCamera} message PerspectiveCamera
2895
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2896
+ * @returns {Object.<string,*>} Plain object
2897
+ */
2898
+ PerspectiveCamera.toObject = function toObject(message, options) {
2899
+ if (!options)
2900
+ options = {};
2901
+ let object = {};
2902
+ if (options.defaults) {
2903
+ object.position = null;
2904
+ object.lookAt = null;
2905
+ object.up = null;
2906
+ }
2907
+ if (message.position != null && message.hasOwnProperty("position"))
2908
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
2909
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
2910
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
2911
+ if (message.up != null && message.hasOwnProperty("up"))
2912
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
2913
+ return object;
2914
+ };
2915
+
2916
+ /**
2917
+ * Converts this PerspectiveCamera to JSON.
2918
+ * @function toJSON
2919
+ * @memberof vertexvis.protobuf.stream.PerspectiveCamera
2920
+ * @instance
2921
+ * @returns {Object.<string,*>} JSON object
2922
+ */
2923
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
2924
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
2925
+ };
2926
+
2927
+ return PerspectiveCamera;
2928
+ })();
2929
+
2930
+ stream.OrthographicCamera = (function() {
2931
+
2932
+ /**
2933
+ * Properties of an OrthographicCamera.
2934
+ * @memberof vertexvis.protobuf.stream
2935
+ * @interface IOrthographicCamera
2936
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
2937
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
2938
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
2939
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
2940
+ */
2941
+
2942
+ /**
2943
+ * Constructs a new OrthographicCamera.
2944
+ * @memberof vertexvis.protobuf.stream
2945
+ * @classdesc Represents an OrthographicCamera.
2946
+ * @implements IOrthographicCamera
2947
+ * @constructor
2948
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
2949
+ */
2950
+ function OrthographicCamera(properties) {
2951
+ if (properties)
2952
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2953
+ if (properties[keys[i]] != null)
2954
+ this[keys[i]] = properties[keys[i]];
2955
+ }
2956
+
2957
+ /**
2958
+ * OrthographicCamera viewVector.
2959
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
2960
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2961
+ * @instance
2962
+ */
2963
+ OrthographicCamera.prototype.viewVector = null;
2964
+
2965
+ /**
2966
+ * OrthographicCamera lookAt.
2967
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
2968
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2969
+ * @instance
2970
+ */
2971
+ OrthographicCamera.prototype.lookAt = null;
2972
+
2973
+ /**
2974
+ * OrthographicCamera up.
2975
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
2976
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2977
+ * @instance
2978
+ */
2979
+ OrthographicCamera.prototype.up = null;
2980
+
2981
+ /**
2982
+ * OrthographicCamera fovHeight.
2983
+ * @member {number} fovHeight
2984
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2985
+ * @instance
2986
+ */
2987
+ OrthographicCamera.prototype.fovHeight = 0;
2988
+
2989
+ /**
2990
+ * Creates a new OrthographicCamera instance using the specified properties.
2991
+ * @function create
2992
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
2993
+ * @static
2994
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera=} [properties] Properties to set
2995
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera instance
2996
+ */
2997
+ OrthographicCamera.create = function create(properties) {
2998
+ return new OrthographicCamera(properties);
2999
+ };
3000
+
3001
+ /**
3002
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
3003
+ * @function encode
3004
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3005
+ * @static
3006
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
3007
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3008
+ * @returns {$protobuf.Writer} Writer
3009
+ */
3010
+ OrthographicCamera.encode = function encode(message, writer) {
3011
+ if (!writer)
3012
+ writer = $Writer.create();
3013
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
3014
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3015
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
3016
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3017
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
3018
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3019
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
3020
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
3021
+ return writer;
3022
+ };
3023
+
3024
+ /**
3025
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.OrthographicCamera.verify|verify} messages.
3026
+ * @function encodeDelimited
3027
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3028
+ * @static
3029
+ * @param {vertexvis.protobuf.stream.IOrthographicCamera} message OrthographicCamera message or plain object to encode
3030
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3031
+ * @returns {$protobuf.Writer} Writer
3032
+ */
3033
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
3034
+ return this.encode(message, writer).ldelim();
3035
+ };
3036
+
3037
+ /**
3038
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
3039
+ * @function decode
3040
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3041
+ * @static
3042
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3043
+ * @param {number} [length] Message length if known beforehand
3044
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3045
+ * @throws {Error} If the payload is not a reader or valid buffer
3046
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3047
+ */
3048
+ OrthographicCamera.decode = function decode(reader, length) {
3049
+ if (!(reader instanceof $Reader))
3050
+ reader = $Reader.create(reader);
3051
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
3052
+ while (reader.pos < end) {
3053
+ let tag = reader.uint32();
3054
+ switch (tag >>> 3) {
3055
+ case 1:
3056
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3057
+ break;
3058
+ case 2:
3059
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3060
+ break;
3061
+ case 3:
3062
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
3063
+ break;
3064
+ case 4:
3065
+ message.fovHeight = reader.float();
3066
+ break;
3067
+ default:
3068
+ reader.skipType(tag & 7);
3069
+ break;
3070
+ }
3071
+ }
3072
+ return message;
3073
+ };
3074
+
3075
+ /**
3076
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
3077
+ * @function decodeDelimited
3078
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3079
+ * @static
3080
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3081
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3082
+ * @throws {Error} If the payload is not a reader or valid buffer
3083
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3084
+ */
3085
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
3086
+ if (!(reader instanceof $Reader))
3087
+ reader = new $Reader(reader);
3088
+ return this.decode(reader, reader.uint32());
3089
+ };
3090
+
3091
+ /**
3092
+ * Verifies an OrthographicCamera message.
3093
+ * @function verify
3094
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3095
+ * @static
3096
+ * @param {Object.<string,*>} message Plain object to verify
3097
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3098
+ */
3099
+ OrthographicCamera.verify = function verify(message) {
3100
+ if (typeof message !== "object" || message === null)
3101
+ return "object expected";
3102
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
3103
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
3104
+ if (error)
3105
+ return "viewVector." + error;
3106
+ }
3107
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
3108
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
3109
+ if (error)
3110
+ return "lookAt." + error;
3111
+ }
3112
+ if (message.up != null && message.hasOwnProperty("up")) {
3113
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
3114
+ if (error)
3115
+ return "up." + error;
3116
+ }
3117
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
3118
+ if (typeof message.fovHeight !== "number")
3119
+ return "fovHeight: number expected";
3120
+ return null;
3121
+ };
3122
+
3123
+ /**
3124
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
3125
+ * @function fromObject
3126
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3127
+ * @static
3128
+ * @param {Object.<string,*>} object Plain object
3129
+ * @returns {vertexvis.protobuf.stream.OrthographicCamera} OrthographicCamera
3130
+ */
3131
+ OrthographicCamera.fromObject = function fromObject(object) {
3132
+ if (object instanceof $root.vertexvis.protobuf.stream.OrthographicCamera)
3133
+ return object;
3134
+ let message = new $root.vertexvis.protobuf.stream.OrthographicCamera();
3135
+ if (object.viewVector != null) {
3136
+ if (typeof object.viewVector !== "object")
3137
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.viewVector: object expected");
3138
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
3139
+ }
3140
+ if (object.lookAt != null) {
3141
+ if (typeof object.lookAt !== "object")
3142
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.lookAt: object expected");
3143
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
3144
+ }
3145
+ if (object.up != null) {
3146
+ if (typeof object.up !== "object")
3147
+ throw TypeError(".vertexvis.protobuf.stream.OrthographicCamera.up: object expected");
3148
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
3149
+ }
3150
+ if (object.fovHeight != null)
3151
+ message.fovHeight = Number(object.fovHeight);
3152
+ return message;
3153
+ };
3154
+
3155
+ /**
3156
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
3157
+ * @function toObject
3158
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3159
+ * @static
3160
+ * @param {vertexvis.protobuf.stream.OrthographicCamera} message OrthographicCamera
3161
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3162
+ * @returns {Object.<string,*>} Plain object
3163
+ */
3164
+ OrthographicCamera.toObject = function toObject(message, options) {
3165
+ if (!options)
3166
+ options = {};
3167
+ let object = {};
3168
+ if (options.defaults) {
3169
+ object.viewVector = null;
3170
+ object.lookAt = null;
3171
+ object.up = null;
3172
+ object.fovHeight = 0;
3173
+ }
3174
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
3175
+ object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
3176
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
3177
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
3178
+ if (message.up != null && message.hasOwnProperty("up"))
3179
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
3180
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
3181
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
3182
+ return object;
3183
+ };
3184
+
3185
+ /**
3186
+ * Converts this OrthographicCamera to JSON.
3187
+ * @function toJSON
3188
+ * @memberof vertexvis.protobuf.stream.OrthographicCamera
3189
+ * @instance
3190
+ * @returns {Object.<string,*>} JSON object
3191
+ */
3192
+ OrthographicCamera.prototype.toJSON = function toJSON() {
3193
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
3194
+ };
3195
+
3196
+ return OrthographicCamera;
3197
+ })();
3198
+
2683
3199
  stream.Camera = (function() {
2684
3200
 
2685
3201
  /**
@@ -2689,6 +3205,8 @@ const vertexvis = $root.vertexvis = (() => {
2689
3205
  * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
2690
3206
  * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
2691
3207
  * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
3208
+ * @property {vertexvis.protobuf.stream.IPerspectiveCamera|null} [perspective] Camera perspective
3209
+ * @property {vertexvis.protobuf.stream.IOrthographicCamera|null} [orthographic] Camera orthographic
2692
3210
  */
2693
3211
 
2694
3212
  /**
@@ -2730,6 +3248,36 @@ const vertexvis = $root.vertexvis = (() => {
2730
3248
  */
2731
3249
  Camera.prototype.up = null;
2732
3250
 
3251
+ /**
3252
+ * Camera perspective.
3253
+ * @member {vertexvis.protobuf.stream.IPerspectiveCamera|null|undefined} perspective
3254
+ * @memberof vertexvis.protobuf.stream.Camera
3255
+ * @instance
3256
+ */
3257
+ Camera.prototype.perspective = null;
3258
+
3259
+ /**
3260
+ * Camera orthographic.
3261
+ * @member {vertexvis.protobuf.stream.IOrthographicCamera|null|undefined} orthographic
3262
+ * @memberof vertexvis.protobuf.stream.Camera
3263
+ * @instance
3264
+ */
3265
+ Camera.prototype.orthographic = null;
3266
+
3267
+ // OneOf field names bound to virtual getters and setters
3268
+ let $oneOfFields;
3269
+
3270
+ /**
3271
+ * Camera type.
3272
+ * @member {"perspective"|"orthographic"|undefined} type
3273
+ * @memberof vertexvis.protobuf.stream.Camera
3274
+ * @instance
3275
+ */
3276
+ Object.defineProperty(Camera.prototype, "type", {
3277
+ get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
3278
+ set: $util.oneOfSetter($oneOfFields)
3279
+ });
3280
+
2733
3281
  /**
2734
3282
  * Creates a new Camera instance using the specified properties.
2735
3283
  * @function create
@@ -2760,6 +3308,10 @@ const vertexvis = $root.vertexvis = (() => {
2760
3308
  $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
2761
3309
  if (message.up != null && Object.hasOwnProperty.call(message, "up"))
2762
3310
  $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3311
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
3312
+ $root.vertexvis.protobuf.stream.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
3313
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
3314
+ $root.vertexvis.protobuf.stream.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
2763
3315
  return writer;
2764
3316
  };
2765
3317
 
@@ -2803,6 +3355,12 @@ const vertexvis = $root.vertexvis = (() => {
2803
3355
  case 3:
2804
3356
  message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
2805
3357
  break;
3358
+ case 4:
3359
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.decode(reader, reader.uint32());
3360
+ break;
3361
+ case 5:
3362
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.decode(reader, reader.uint32());
3363
+ break;
2806
3364
  default:
2807
3365
  reader.skipType(tag & 7);
2808
3366
  break;
@@ -2838,6 +3396,7 @@ const vertexvis = $root.vertexvis = (() => {
2838
3396
  Camera.verify = function verify(message) {
2839
3397
  if (typeof message !== "object" || message === null)
2840
3398
  return "object expected";
3399
+ let properties = {};
2841
3400
  if (message.position != null && message.hasOwnProperty("position")) {
2842
3401
  let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
2843
3402
  if (error)
@@ -2853,6 +3412,24 @@ const vertexvis = $root.vertexvis = (() => {
2853
3412
  if (error)
2854
3413
  return "up." + error;
2855
3414
  }
3415
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
3416
+ properties.type = 1;
3417
+ {
3418
+ let error = $root.vertexvis.protobuf.stream.PerspectiveCamera.verify(message.perspective);
3419
+ if (error)
3420
+ return "perspective." + error;
3421
+ }
3422
+ }
3423
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
3424
+ if (properties.type === 1)
3425
+ return "type: multiple values";
3426
+ properties.type = 1;
3427
+ {
3428
+ let error = $root.vertexvis.protobuf.stream.OrthographicCamera.verify(message.orthographic);
3429
+ if (error)
3430
+ return "orthographic." + error;
3431
+ }
3432
+ }
2856
3433
  return null;
2857
3434
  };
2858
3435
 
@@ -2883,6 +3460,16 @@ const vertexvis = $root.vertexvis = (() => {
2883
3460
  throw TypeError(".vertexvis.protobuf.stream.Camera.up: object expected");
2884
3461
  message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
2885
3462
  }
3463
+ if (object.perspective != null) {
3464
+ if (typeof object.perspective !== "object")
3465
+ throw TypeError(".vertexvis.protobuf.stream.Camera.perspective: object expected");
3466
+ message.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.fromObject(object.perspective);
3467
+ }
3468
+ if (object.orthographic != null) {
3469
+ if (typeof object.orthographic !== "object")
3470
+ throw TypeError(".vertexvis.protobuf.stream.Camera.orthographic: object expected");
3471
+ message.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.fromObject(object.orthographic);
3472
+ }
2886
3473
  return message;
2887
3474
  };
2888
3475
 
@@ -2910,6 +3497,16 @@ const vertexvis = $root.vertexvis = (() => {
2910
3497
  object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
2911
3498
  if (message.up != null && message.hasOwnProperty("up"))
2912
3499
  object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
3500
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
3501
+ object.perspective = $root.vertexvis.protobuf.stream.PerspectiveCamera.toObject(message.perspective, options);
3502
+ if (options.oneofs)
3503
+ object.type = "perspective";
3504
+ }
3505
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
3506
+ object.orthographic = $root.vertexvis.protobuf.stream.OrthographicCamera.toObject(message.orthographic, options);
3507
+ if (options.oneofs)
3508
+ object.type = "orthographic";
3509
+ }
2913
3510
  return object;
2914
3511
  };
2915
3512