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