@vertexvis/stream-api 0.24.5 → 0.24.6-testing.0

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.
@@ -20881,6 +20881,221 @@ const vertexvis = $root.vertexvis = (() => {
20881
20881
  return SectionPlane;
20882
20882
  })();
20883
20883
 
20884
+ stream.EndCapping = (function() {
20885
+
20886
+ /**
20887
+ * Properties of an EndCapping.
20888
+ * @memberof vertexvis.protobuf.stream
20889
+ * @interface IEndCapping
20890
+ * @property {boolean|null} [enabled] EndCapping enabled
20891
+ * @property {vertexvis.protobuf.core.IRGBi|null} [capColor] EndCapping capColor
20892
+ */
20893
+
20894
+ /**
20895
+ * Constructs a new EndCapping.
20896
+ * @memberof vertexvis.protobuf.stream
20897
+ * @classdesc Represents an EndCapping.
20898
+ * @implements IEndCapping
20899
+ * @constructor
20900
+ * @param {vertexvis.protobuf.stream.IEndCapping=} [properties] Properties to set
20901
+ */
20902
+ function EndCapping(properties) {
20903
+ if (properties)
20904
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20905
+ if (properties[keys[i]] != null)
20906
+ this[keys[i]] = properties[keys[i]];
20907
+ }
20908
+
20909
+ /**
20910
+ * EndCapping enabled.
20911
+ * @member {boolean} enabled
20912
+ * @memberof vertexvis.protobuf.stream.EndCapping
20913
+ * @instance
20914
+ */
20915
+ EndCapping.prototype.enabled = false;
20916
+
20917
+ /**
20918
+ * EndCapping capColor.
20919
+ * @member {vertexvis.protobuf.core.IRGBi|null|undefined} capColor
20920
+ * @memberof vertexvis.protobuf.stream.EndCapping
20921
+ * @instance
20922
+ */
20923
+ EndCapping.prototype.capColor = null;
20924
+
20925
+ /**
20926
+ * Creates a new EndCapping instance using the specified properties.
20927
+ * @function create
20928
+ * @memberof vertexvis.protobuf.stream.EndCapping
20929
+ * @static
20930
+ * @param {vertexvis.protobuf.stream.IEndCapping=} [properties] Properties to set
20931
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping instance
20932
+ */
20933
+ EndCapping.create = function create(properties) {
20934
+ return new EndCapping(properties);
20935
+ };
20936
+
20937
+ /**
20938
+ * Encodes the specified EndCapping message. Does not implicitly {@link vertexvis.protobuf.stream.EndCapping.verify|verify} messages.
20939
+ * @function encode
20940
+ * @memberof vertexvis.protobuf.stream.EndCapping
20941
+ * @static
20942
+ * @param {vertexvis.protobuf.stream.IEndCapping} message EndCapping message or plain object to encode
20943
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20944
+ * @returns {$protobuf.Writer} Writer
20945
+ */
20946
+ EndCapping.encode = function encode(message, writer) {
20947
+ if (!writer)
20948
+ writer = $Writer.create();
20949
+ if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled"))
20950
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled);
20951
+ if (message.capColor != null && Object.hasOwnProperty.call(message, "capColor"))
20952
+ $root.vertexvis.protobuf.core.RGBi.encode(message.capColor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20953
+ return writer;
20954
+ };
20955
+
20956
+ /**
20957
+ * Encodes the specified EndCapping message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.EndCapping.verify|verify} messages.
20958
+ * @function encodeDelimited
20959
+ * @memberof vertexvis.protobuf.stream.EndCapping
20960
+ * @static
20961
+ * @param {vertexvis.protobuf.stream.IEndCapping} message EndCapping message or plain object to encode
20962
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20963
+ * @returns {$protobuf.Writer} Writer
20964
+ */
20965
+ EndCapping.encodeDelimited = function encodeDelimited(message, writer) {
20966
+ return this.encode(message, writer).ldelim();
20967
+ };
20968
+
20969
+ /**
20970
+ * Decodes an EndCapping message from the specified reader or buffer.
20971
+ * @function decode
20972
+ * @memberof vertexvis.protobuf.stream.EndCapping
20973
+ * @static
20974
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20975
+ * @param {number} [length] Message length if known beforehand
20976
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
20977
+ * @throws {Error} If the payload is not a reader or valid buffer
20978
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20979
+ */
20980
+ EndCapping.decode = function decode(reader, length) {
20981
+ if (!(reader instanceof $Reader))
20982
+ reader = $Reader.create(reader);
20983
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.EndCapping();
20984
+ while (reader.pos < end) {
20985
+ let tag = reader.uint32();
20986
+ switch (tag >>> 3) {
20987
+ case 1:
20988
+ message.enabled = reader.bool();
20989
+ break;
20990
+ case 2:
20991
+ message.capColor = $root.vertexvis.protobuf.core.RGBi.decode(reader, reader.uint32());
20992
+ break;
20993
+ default:
20994
+ reader.skipType(tag & 7);
20995
+ break;
20996
+ }
20997
+ }
20998
+ return message;
20999
+ };
21000
+
21001
+ /**
21002
+ * Decodes an EndCapping message from the specified reader or buffer, length delimited.
21003
+ * @function decodeDelimited
21004
+ * @memberof vertexvis.protobuf.stream.EndCapping
21005
+ * @static
21006
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
21007
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
21008
+ * @throws {Error} If the payload is not a reader or valid buffer
21009
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
21010
+ */
21011
+ EndCapping.decodeDelimited = function decodeDelimited(reader) {
21012
+ if (!(reader instanceof $Reader))
21013
+ reader = new $Reader(reader);
21014
+ return this.decode(reader, reader.uint32());
21015
+ };
21016
+
21017
+ /**
21018
+ * Verifies an EndCapping message.
21019
+ * @function verify
21020
+ * @memberof vertexvis.protobuf.stream.EndCapping
21021
+ * @static
21022
+ * @param {Object.<string,*>} message Plain object to verify
21023
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
21024
+ */
21025
+ EndCapping.verify = function verify(message) {
21026
+ if (typeof message !== "object" || message === null)
21027
+ return "object expected";
21028
+ if (message.enabled != null && message.hasOwnProperty("enabled"))
21029
+ if (typeof message.enabled !== "boolean")
21030
+ return "enabled: boolean expected";
21031
+ if (message.capColor != null && message.hasOwnProperty("capColor")) {
21032
+ let error = $root.vertexvis.protobuf.core.RGBi.verify(message.capColor);
21033
+ if (error)
21034
+ return "capColor." + error;
21035
+ }
21036
+ return null;
21037
+ };
21038
+
21039
+ /**
21040
+ * Creates an EndCapping message from a plain object. Also converts values to their respective internal types.
21041
+ * @function fromObject
21042
+ * @memberof vertexvis.protobuf.stream.EndCapping
21043
+ * @static
21044
+ * @param {Object.<string,*>} object Plain object
21045
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
21046
+ */
21047
+ EndCapping.fromObject = function fromObject(object) {
21048
+ if (object instanceof $root.vertexvis.protobuf.stream.EndCapping)
21049
+ return object;
21050
+ let message = new $root.vertexvis.protobuf.stream.EndCapping();
21051
+ if (object.enabled != null)
21052
+ message.enabled = Boolean(object.enabled);
21053
+ if (object.capColor != null) {
21054
+ if (typeof object.capColor !== "object")
21055
+ throw TypeError(".vertexvis.protobuf.stream.EndCapping.capColor: object expected");
21056
+ message.capColor = $root.vertexvis.protobuf.core.RGBi.fromObject(object.capColor);
21057
+ }
21058
+ return message;
21059
+ };
21060
+
21061
+ /**
21062
+ * Creates a plain object from an EndCapping message. Also converts values to other types if specified.
21063
+ * @function toObject
21064
+ * @memberof vertexvis.protobuf.stream.EndCapping
21065
+ * @static
21066
+ * @param {vertexvis.protobuf.stream.EndCapping} message EndCapping
21067
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
21068
+ * @returns {Object.<string,*>} Plain object
21069
+ */
21070
+ EndCapping.toObject = function toObject(message, options) {
21071
+ if (!options)
21072
+ options = {};
21073
+ let object = {};
21074
+ if (options.defaults) {
21075
+ object.enabled = false;
21076
+ object.capColor = null;
21077
+ }
21078
+ if (message.enabled != null && message.hasOwnProperty("enabled"))
21079
+ object.enabled = message.enabled;
21080
+ if (message.capColor != null && message.hasOwnProperty("capColor"))
21081
+ object.capColor = $root.vertexvis.protobuf.core.RGBi.toObject(message.capColor, options);
21082
+ return object;
21083
+ };
21084
+
21085
+ /**
21086
+ * Converts this EndCapping to JSON.
21087
+ * @function toJSON
21088
+ * @memberof vertexvis.protobuf.stream.EndCapping
21089
+ * @instance
21090
+ * @returns {Object.<string,*>} JSON object
21091
+ */
21092
+ EndCapping.prototype.toJSON = function toJSON() {
21093
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
21094
+ };
21095
+
21096
+ return EndCapping;
21097
+ })();
21098
+
20884
21099
  stream.CrossSectioning = (function() {
20885
21100
 
20886
21101
  /**
@@ -20890,6 +21105,7 @@ const vertexvis = $root.vertexvis = (() => {
20890
21105
  * @property {Array.<vertexvis.protobuf.stream.ISectionPlane>|null} [sectionPlanes] CrossSectioning sectionPlanes
20891
21106
  * @property {vertexvis.protobuf.core.IRGBi|null} [highlightColor] CrossSectioning highlightColor
20892
21107
  * @property {google.protobuf.IFloatValue|null} [lineWidth] CrossSectioning lineWidth
21108
+ * @property {vertexvis.protobuf.stream.IEndCapping|null} [endCapping] CrossSectioning endCapping
20893
21109
  */
20894
21110
 
20895
21111
  /**
@@ -20932,6 +21148,14 @@ const vertexvis = $root.vertexvis = (() => {
20932
21148
  */
20933
21149
  CrossSectioning.prototype.lineWidth = null;
20934
21150
 
21151
+ /**
21152
+ * CrossSectioning endCapping.
21153
+ * @member {vertexvis.protobuf.stream.IEndCapping|null|undefined} endCapping
21154
+ * @memberof vertexvis.protobuf.stream.CrossSectioning
21155
+ * @instance
21156
+ */
21157
+ CrossSectioning.prototype.endCapping = null;
21158
+
20935
21159
  /**
20936
21160
  * Creates a new CrossSectioning instance using the specified properties.
20937
21161
  * @function create
@@ -20963,6 +21187,8 @@ const vertexvis = $root.vertexvis = (() => {
20963
21187
  $root.vertexvis.protobuf.core.RGBi.encode(message.highlightColor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20964
21188
  if (message.lineWidth != null && Object.hasOwnProperty.call(message, "lineWidth"))
20965
21189
  $root.google.protobuf.FloatValue.encode(message.lineWidth, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
21190
+ if (message.endCapping != null && Object.hasOwnProperty.call(message, "endCapping"))
21191
+ $root.vertexvis.protobuf.stream.EndCapping.encode(message.endCapping, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
20966
21192
  return writer;
20967
21193
  };
20968
21194
 
@@ -21008,6 +21234,9 @@ const vertexvis = $root.vertexvis = (() => {
21008
21234
  case 3:
21009
21235
  message.lineWidth = $root.google.protobuf.FloatValue.decode(reader, reader.uint32());
21010
21236
  break;
21237
+ case 4:
21238
+ message.endCapping = $root.vertexvis.protobuf.stream.EndCapping.decode(reader, reader.uint32());
21239
+ break;
21011
21240
  default:
21012
21241
  reader.skipType(tag & 7);
21013
21242
  break;
@@ -21062,6 +21291,11 @@ const vertexvis = $root.vertexvis = (() => {
21062
21291
  if (error)
21063
21292
  return "lineWidth." + error;
21064
21293
  }
21294
+ if (message.endCapping != null && message.hasOwnProperty("endCapping")) {
21295
+ let error = $root.vertexvis.protobuf.stream.EndCapping.verify(message.endCapping);
21296
+ if (error)
21297
+ return "endCapping." + error;
21298
+ }
21065
21299
  return null;
21066
21300
  };
21067
21301
 
@@ -21097,6 +21331,11 @@ const vertexvis = $root.vertexvis = (() => {
21097
21331
  throw TypeError(".vertexvis.protobuf.stream.CrossSectioning.lineWidth: object expected");
21098
21332
  message.lineWidth = $root.google.protobuf.FloatValue.fromObject(object.lineWidth);
21099
21333
  }
21334
+ if (object.endCapping != null) {
21335
+ if (typeof object.endCapping !== "object")
21336
+ throw TypeError(".vertexvis.protobuf.stream.CrossSectioning.endCapping: object expected");
21337
+ message.endCapping = $root.vertexvis.protobuf.stream.EndCapping.fromObject(object.endCapping);
21338
+ }
21100
21339
  return message;
21101
21340
  };
21102
21341
 
@@ -21118,6 +21357,7 @@ const vertexvis = $root.vertexvis = (() => {
21118
21357
  if (options.defaults) {
21119
21358
  object.highlightColor = null;
21120
21359
  object.lineWidth = null;
21360
+ object.endCapping = null;
21121
21361
  }
21122
21362
  if (message.sectionPlanes && message.sectionPlanes.length) {
21123
21363
  object.sectionPlanes = [];
@@ -21128,6 +21368,8 @@ const vertexvis = $root.vertexvis = (() => {
21128
21368
  object.highlightColor = $root.vertexvis.protobuf.core.RGBi.toObject(message.highlightColor, options);
21129
21369
  if (message.lineWidth != null && message.hasOwnProperty("lineWidth"))
21130
21370
  object.lineWidth = $root.google.protobuf.FloatValue.toObject(message.lineWidth, options);
21371
+ if (message.endCapping != null && message.hasOwnProperty("endCapping"))
21372
+ object.endCapping = $root.vertexvis.protobuf.stream.EndCapping.toObject(message.endCapping, options);
21131
21373
  return object;
21132
21374
  };
21133
21375
 
@@ -45864,6 +46106,7 @@ const vertexvis = $root.vertexvis = (() => {
45864
46106
  * @property {vertexvis.protobuf.core.IUuid2l|null} [id] ModelView id
45865
46107
  * @property {vertexvis.protobuf.core.IUuid2l|null} [partRevisionId] ModelView partRevisionId
45866
46108
  * @property {string|null} [displayName] ModelView displayName
46109
+ * @property {vertexvis.protobuf.core.ICamera|null} [camera] ModelView camera
45867
46110
  */
45868
46111
 
45869
46112
  /**
@@ -45905,6 +46148,14 @@ const vertexvis = $root.vertexvis = (() => {
45905
46148
  */
45906
46149
  ModelView.prototype.displayName = "";
45907
46150
 
46151
+ /**
46152
+ * ModelView camera.
46153
+ * @member {vertexvis.protobuf.core.ICamera|null|undefined} camera
46154
+ * @memberof vertexvis.protobuf.core.ModelView
46155
+ * @instance
46156
+ */
46157
+ ModelView.prototype.camera = null;
46158
+
45908
46159
  /**
45909
46160
  * Creates a new ModelView instance using the specified properties.
45910
46161
  * @function create
@@ -45935,6 +46186,8 @@ const vertexvis = $root.vertexvis = (() => {
45935
46186
  $root.vertexvis.protobuf.core.Uuid2l.encode(message.partRevisionId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
45936
46187
  if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
45937
46188
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
46189
+ if (message.camera != null && Object.hasOwnProperty.call(message, "camera"))
46190
+ $root.vertexvis.protobuf.core.Camera.encode(message.camera, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
45938
46191
  return writer;
45939
46192
  };
45940
46193
 
@@ -45978,6 +46231,9 @@ const vertexvis = $root.vertexvis = (() => {
45978
46231
  case 3:
45979
46232
  message.displayName = reader.string();
45980
46233
  break;
46234
+ case 4:
46235
+ message.camera = $root.vertexvis.protobuf.core.Camera.decode(reader, reader.uint32());
46236
+ break;
45981
46237
  default:
45982
46238
  reader.skipType(tag & 7);
45983
46239
  break;
@@ -46026,6 +46282,11 @@ const vertexvis = $root.vertexvis = (() => {
46026
46282
  if (message.displayName != null && message.hasOwnProperty("displayName"))
46027
46283
  if (!$util.isString(message.displayName))
46028
46284
  return "displayName: string expected";
46285
+ if (message.camera != null && message.hasOwnProperty("camera")) {
46286
+ let error = $root.vertexvis.protobuf.core.Camera.verify(message.camera);
46287
+ if (error)
46288
+ return "camera." + error;
46289
+ }
46029
46290
  return null;
46030
46291
  };
46031
46292
 
@@ -46053,6 +46314,11 @@ const vertexvis = $root.vertexvis = (() => {
46053
46314
  }
46054
46315
  if (object.displayName != null)
46055
46316
  message.displayName = String(object.displayName);
46317
+ if (object.camera != null) {
46318
+ if (typeof object.camera !== "object")
46319
+ throw TypeError(".vertexvis.protobuf.core.ModelView.camera: object expected");
46320
+ message.camera = $root.vertexvis.protobuf.core.Camera.fromObject(object.camera);
46321
+ }
46056
46322
  return message;
46057
46323
  };
46058
46324
 
@@ -46073,6 +46339,7 @@ const vertexvis = $root.vertexvis = (() => {
46073
46339
  object.id = null;
46074
46340
  object.partRevisionId = null;
46075
46341
  object.displayName = "";
46342
+ object.camera = null;
46076
46343
  }
46077
46344
  if (message.id != null && message.hasOwnProperty("id"))
46078
46345
  object.id = $root.vertexvis.protobuf.core.Uuid2l.toObject(message.id, options);
@@ -46080,6 +46347,8 @@ const vertexvis = $root.vertexvis = (() => {
46080
46347
  object.partRevisionId = $root.vertexvis.protobuf.core.Uuid2l.toObject(message.partRevisionId, options);
46081
46348
  if (message.displayName != null && message.hasOwnProperty("displayName"))
46082
46349
  object.displayName = message.displayName;
46350
+ if (message.camera != null && message.hasOwnProperty("camera"))
46351
+ object.camera = $root.vertexvis.protobuf.core.Camera.toObject(message.camera, options);
46083
46352
  return object;
46084
46353
  };
46085
46354
 
@@ -46532,6 +46801,877 @@ const vertexvis = $root.vertexvis = (() => {
46532
46801
  return PmiAnnotation;
46533
46802
  })();
46534
46803
 
46804
+ core.PerspectiveCamera = (function() {
46805
+
46806
+ /**
46807
+ * Properties of a PerspectiveCamera.
46808
+ * @memberof vertexvis.protobuf.core
46809
+ * @interface IPerspectiveCamera
46810
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
46811
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
46812
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
46813
+ * @property {google.protobuf.IFloatValue|null} [fovY] PerspectiveCamera fovY
46814
+ */
46815
+
46816
+ /**
46817
+ * Constructs a new PerspectiveCamera.
46818
+ * @memberof vertexvis.protobuf.core
46819
+ * @classdesc Represents a PerspectiveCamera.
46820
+ * @implements IPerspectiveCamera
46821
+ * @constructor
46822
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera=} [properties] Properties to set
46823
+ */
46824
+ function PerspectiveCamera(properties) {
46825
+ if (properties)
46826
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46827
+ if (properties[keys[i]] != null)
46828
+ this[keys[i]] = properties[keys[i]];
46829
+ }
46830
+
46831
+ /**
46832
+ * PerspectiveCamera position.
46833
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
46834
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46835
+ * @instance
46836
+ */
46837
+ PerspectiveCamera.prototype.position = null;
46838
+
46839
+ /**
46840
+ * PerspectiveCamera lookAt.
46841
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
46842
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46843
+ * @instance
46844
+ */
46845
+ PerspectiveCamera.prototype.lookAt = null;
46846
+
46847
+ /**
46848
+ * PerspectiveCamera up.
46849
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
46850
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46851
+ * @instance
46852
+ */
46853
+ PerspectiveCamera.prototype.up = null;
46854
+
46855
+ /**
46856
+ * PerspectiveCamera fovY.
46857
+ * @member {google.protobuf.IFloatValue|null|undefined} fovY
46858
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46859
+ * @instance
46860
+ */
46861
+ PerspectiveCamera.prototype.fovY = null;
46862
+
46863
+ /**
46864
+ * Creates a new PerspectiveCamera instance using the specified properties.
46865
+ * @function create
46866
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46867
+ * @static
46868
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera=} [properties] Properties to set
46869
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera instance
46870
+ */
46871
+ PerspectiveCamera.create = function create(properties) {
46872
+ return new PerspectiveCamera(properties);
46873
+ };
46874
+
46875
+ /**
46876
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.core.PerspectiveCamera.verify|verify} messages.
46877
+ * @function encode
46878
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46879
+ * @static
46880
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
46881
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46882
+ * @returns {$protobuf.Writer} Writer
46883
+ */
46884
+ PerspectiveCamera.encode = function encode(message, writer) {
46885
+ if (!writer)
46886
+ writer = $Writer.create();
46887
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
46888
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
46889
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
46890
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
46891
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
46892
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
46893
+ if (message.fovY != null && Object.hasOwnProperty.call(message, "fovY"))
46894
+ $root.google.protobuf.FloatValue.encode(message.fovY, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
46895
+ return writer;
46896
+ };
46897
+
46898
+ /**
46899
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.PerspectiveCamera.verify|verify} messages.
46900
+ * @function encodeDelimited
46901
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46902
+ * @static
46903
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
46904
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46905
+ * @returns {$protobuf.Writer} Writer
46906
+ */
46907
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
46908
+ return this.encode(message, writer).ldelim();
46909
+ };
46910
+
46911
+ /**
46912
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
46913
+ * @function decode
46914
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46915
+ * @static
46916
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46917
+ * @param {number} [length] Message length if known beforehand
46918
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera
46919
+ * @throws {Error} If the payload is not a reader or valid buffer
46920
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46921
+ */
46922
+ PerspectiveCamera.decode = function decode(reader, length) {
46923
+ if (!(reader instanceof $Reader))
46924
+ reader = $Reader.create(reader);
46925
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.core.PerspectiveCamera();
46926
+ while (reader.pos < end) {
46927
+ let tag = reader.uint32();
46928
+ switch (tag >>> 3) {
46929
+ case 1:
46930
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
46931
+ break;
46932
+ case 2:
46933
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
46934
+ break;
46935
+ case 3:
46936
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
46937
+ break;
46938
+ case 4:
46939
+ message.fovY = $root.google.protobuf.FloatValue.decode(reader, reader.uint32());
46940
+ break;
46941
+ default:
46942
+ reader.skipType(tag & 7);
46943
+ break;
46944
+ }
46945
+ }
46946
+ return message;
46947
+ };
46948
+
46949
+ /**
46950
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
46951
+ * @function decodeDelimited
46952
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46953
+ * @static
46954
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46955
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera
46956
+ * @throws {Error} If the payload is not a reader or valid buffer
46957
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46958
+ */
46959
+ PerspectiveCamera.decodeDelimited = function decodeDelimited(reader) {
46960
+ if (!(reader instanceof $Reader))
46961
+ reader = new $Reader(reader);
46962
+ return this.decode(reader, reader.uint32());
46963
+ };
46964
+
46965
+ /**
46966
+ * Verifies a PerspectiveCamera message.
46967
+ * @function verify
46968
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
46969
+ * @static
46970
+ * @param {Object.<string,*>} message Plain object to verify
46971
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46972
+ */
46973
+ PerspectiveCamera.verify = function verify(message) {
46974
+ if (typeof message !== "object" || message === null)
46975
+ return "object expected";
46976
+ if (message.position != null && message.hasOwnProperty("position")) {
46977
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
46978
+ if (error)
46979
+ return "position." + error;
46980
+ }
46981
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
46982
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
46983
+ if (error)
46984
+ return "lookAt." + error;
46985
+ }
46986
+ if (message.up != null && message.hasOwnProperty("up")) {
46987
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
46988
+ if (error)
46989
+ return "up." + error;
46990
+ }
46991
+ if (message.fovY != null && message.hasOwnProperty("fovY")) {
46992
+ let error = $root.google.protobuf.FloatValue.verify(message.fovY);
46993
+ if (error)
46994
+ return "fovY." + error;
46995
+ }
46996
+ return null;
46997
+ };
46998
+
46999
+ /**
47000
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
47001
+ * @function fromObject
47002
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47003
+ * @static
47004
+ * @param {Object.<string,*>} object Plain object
47005
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera
47006
+ */
47007
+ PerspectiveCamera.fromObject = function fromObject(object) {
47008
+ if (object instanceof $root.vertexvis.protobuf.core.PerspectiveCamera)
47009
+ return object;
47010
+ let message = new $root.vertexvis.protobuf.core.PerspectiveCamera();
47011
+ if (object.position != null) {
47012
+ if (typeof object.position !== "object")
47013
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.position: object expected");
47014
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
47015
+ }
47016
+ if (object.lookAt != null) {
47017
+ if (typeof object.lookAt !== "object")
47018
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.lookAt: object expected");
47019
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47020
+ }
47021
+ if (object.up != null) {
47022
+ if (typeof object.up !== "object")
47023
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.up: object expected");
47024
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47025
+ }
47026
+ if (object.fovY != null) {
47027
+ if (typeof object.fovY !== "object")
47028
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.fovY: object expected");
47029
+ message.fovY = $root.google.protobuf.FloatValue.fromObject(object.fovY);
47030
+ }
47031
+ return message;
47032
+ };
47033
+
47034
+ /**
47035
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
47036
+ * @function toObject
47037
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47038
+ * @static
47039
+ * @param {vertexvis.protobuf.core.PerspectiveCamera} message PerspectiveCamera
47040
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47041
+ * @returns {Object.<string,*>} Plain object
47042
+ */
47043
+ PerspectiveCamera.toObject = function toObject(message, options) {
47044
+ if (!options)
47045
+ options = {};
47046
+ let object = {};
47047
+ if (options.defaults) {
47048
+ object.position = null;
47049
+ object.lookAt = null;
47050
+ object.up = null;
47051
+ object.fovY = null;
47052
+ }
47053
+ if (message.position != null && message.hasOwnProperty("position"))
47054
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
47055
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47056
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47057
+ if (message.up != null && message.hasOwnProperty("up"))
47058
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47059
+ if (message.fovY != null && message.hasOwnProperty("fovY"))
47060
+ object.fovY = $root.google.protobuf.FloatValue.toObject(message.fovY, options);
47061
+ return object;
47062
+ };
47063
+
47064
+ /**
47065
+ * Converts this PerspectiveCamera to JSON.
47066
+ * @function toJSON
47067
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47068
+ * @instance
47069
+ * @returns {Object.<string,*>} JSON object
47070
+ */
47071
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
47072
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47073
+ };
47074
+
47075
+ return PerspectiveCamera;
47076
+ })();
47077
+
47078
+ core.OrthographicCamera = (function() {
47079
+
47080
+ /**
47081
+ * Properties of an OrthographicCamera.
47082
+ * @memberof vertexvis.protobuf.core
47083
+ * @interface IOrthographicCamera
47084
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
47085
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
47086
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
47087
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
47088
+ */
47089
+
47090
+ /**
47091
+ * Constructs a new OrthographicCamera.
47092
+ * @memberof vertexvis.protobuf.core
47093
+ * @classdesc Represents an OrthographicCamera.
47094
+ * @implements IOrthographicCamera
47095
+ * @constructor
47096
+ * @param {vertexvis.protobuf.core.IOrthographicCamera=} [properties] Properties to set
47097
+ */
47098
+ function OrthographicCamera(properties) {
47099
+ if (properties)
47100
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47101
+ if (properties[keys[i]] != null)
47102
+ this[keys[i]] = properties[keys[i]];
47103
+ }
47104
+
47105
+ /**
47106
+ * OrthographicCamera viewVector.
47107
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
47108
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47109
+ * @instance
47110
+ */
47111
+ OrthographicCamera.prototype.viewVector = null;
47112
+
47113
+ /**
47114
+ * OrthographicCamera lookAt.
47115
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
47116
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47117
+ * @instance
47118
+ */
47119
+ OrthographicCamera.prototype.lookAt = null;
47120
+
47121
+ /**
47122
+ * OrthographicCamera up.
47123
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
47124
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47125
+ * @instance
47126
+ */
47127
+ OrthographicCamera.prototype.up = null;
47128
+
47129
+ /**
47130
+ * OrthographicCamera fovHeight.
47131
+ * @member {number} fovHeight
47132
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47133
+ * @instance
47134
+ */
47135
+ OrthographicCamera.prototype.fovHeight = 0;
47136
+
47137
+ /**
47138
+ * Creates a new OrthographicCamera instance using the specified properties.
47139
+ * @function create
47140
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47141
+ * @static
47142
+ * @param {vertexvis.protobuf.core.IOrthographicCamera=} [properties] Properties to set
47143
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera instance
47144
+ */
47145
+ OrthographicCamera.create = function create(properties) {
47146
+ return new OrthographicCamera(properties);
47147
+ };
47148
+
47149
+ /**
47150
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.core.OrthographicCamera.verify|verify} messages.
47151
+ * @function encode
47152
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47153
+ * @static
47154
+ * @param {vertexvis.protobuf.core.IOrthographicCamera} message OrthographicCamera message or plain object to encode
47155
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47156
+ * @returns {$protobuf.Writer} Writer
47157
+ */
47158
+ OrthographicCamera.encode = function encode(message, writer) {
47159
+ if (!writer)
47160
+ writer = $Writer.create();
47161
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
47162
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47163
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
47164
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47165
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
47166
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47167
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
47168
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
47169
+ return writer;
47170
+ };
47171
+
47172
+ /**
47173
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.OrthographicCamera.verify|verify} messages.
47174
+ * @function encodeDelimited
47175
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47176
+ * @static
47177
+ * @param {vertexvis.protobuf.core.IOrthographicCamera} message OrthographicCamera message or plain object to encode
47178
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47179
+ * @returns {$protobuf.Writer} Writer
47180
+ */
47181
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
47182
+ return this.encode(message, writer).ldelim();
47183
+ };
47184
+
47185
+ /**
47186
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
47187
+ * @function decode
47188
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47189
+ * @static
47190
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47191
+ * @param {number} [length] Message length if known beforehand
47192
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47193
+ * @throws {Error} If the payload is not a reader or valid buffer
47194
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47195
+ */
47196
+ OrthographicCamera.decode = function decode(reader, length) {
47197
+ if (!(reader instanceof $Reader))
47198
+ reader = $Reader.create(reader);
47199
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.core.OrthographicCamera();
47200
+ while (reader.pos < end) {
47201
+ let tag = reader.uint32();
47202
+ switch (tag >>> 3) {
47203
+ case 1:
47204
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47205
+ break;
47206
+ case 2:
47207
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47208
+ break;
47209
+ case 3:
47210
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47211
+ break;
47212
+ case 4:
47213
+ message.fovHeight = reader.float();
47214
+ break;
47215
+ default:
47216
+ reader.skipType(tag & 7);
47217
+ break;
47218
+ }
47219
+ }
47220
+ return message;
47221
+ };
47222
+
47223
+ /**
47224
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
47225
+ * @function decodeDelimited
47226
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47227
+ * @static
47228
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47229
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47230
+ * @throws {Error} If the payload is not a reader or valid buffer
47231
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47232
+ */
47233
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
47234
+ if (!(reader instanceof $Reader))
47235
+ reader = new $Reader(reader);
47236
+ return this.decode(reader, reader.uint32());
47237
+ };
47238
+
47239
+ /**
47240
+ * Verifies an OrthographicCamera message.
47241
+ * @function verify
47242
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47243
+ * @static
47244
+ * @param {Object.<string,*>} message Plain object to verify
47245
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47246
+ */
47247
+ OrthographicCamera.verify = function verify(message) {
47248
+ if (typeof message !== "object" || message === null)
47249
+ return "object expected";
47250
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
47251
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
47252
+ if (error)
47253
+ return "viewVector." + error;
47254
+ }
47255
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
47256
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
47257
+ if (error)
47258
+ return "lookAt." + error;
47259
+ }
47260
+ if (message.up != null && message.hasOwnProperty("up")) {
47261
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
47262
+ if (error)
47263
+ return "up." + error;
47264
+ }
47265
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
47266
+ if (typeof message.fovHeight !== "number")
47267
+ return "fovHeight: number expected";
47268
+ return null;
47269
+ };
47270
+
47271
+ /**
47272
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
47273
+ * @function fromObject
47274
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47275
+ * @static
47276
+ * @param {Object.<string,*>} object Plain object
47277
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47278
+ */
47279
+ OrthographicCamera.fromObject = function fromObject(object) {
47280
+ if (object instanceof $root.vertexvis.protobuf.core.OrthographicCamera)
47281
+ return object;
47282
+ let message = new $root.vertexvis.protobuf.core.OrthographicCamera();
47283
+ if (object.viewVector != null) {
47284
+ if (typeof object.viewVector !== "object")
47285
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.viewVector: object expected");
47286
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
47287
+ }
47288
+ if (object.lookAt != null) {
47289
+ if (typeof object.lookAt !== "object")
47290
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.lookAt: object expected");
47291
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47292
+ }
47293
+ if (object.up != null) {
47294
+ if (typeof object.up !== "object")
47295
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.up: object expected");
47296
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47297
+ }
47298
+ if (object.fovHeight != null)
47299
+ message.fovHeight = Number(object.fovHeight);
47300
+ return message;
47301
+ };
47302
+
47303
+ /**
47304
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
47305
+ * @function toObject
47306
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47307
+ * @static
47308
+ * @param {vertexvis.protobuf.core.OrthographicCamera} message OrthographicCamera
47309
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47310
+ * @returns {Object.<string,*>} Plain object
47311
+ */
47312
+ OrthographicCamera.toObject = function toObject(message, options) {
47313
+ if (!options)
47314
+ options = {};
47315
+ let object = {};
47316
+ if (options.defaults) {
47317
+ object.viewVector = null;
47318
+ object.lookAt = null;
47319
+ object.up = null;
47320
+ object.fovHeight = 0;
47321
+ }
47322
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
47323
+ object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
47324
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47325
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47326
+ if (message.up != null && message.hasOwnProperty("up"))
47327
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47328
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
47329
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
47330
+ return object;
47331
+ };
47332
+
47333
+ /**
47334
+ * Converts this OrthographicCamera to JSON.
47335
+ * @function toJSON
47336
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47337
+ * @instance
47338
+ * @returns {Object.<string,*>} JSON object
47339
+ */
47340
+ OrthographicCamera.prototype.toJSON = function toJSON() {
47341
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47342
+ };
47343
+
47344
+ return OrthographicCamera;
47345
+ })();
47346
+
47347
+ core.Camera = (function() {
47348
+
47349
+ /**
47350
+ * Properties of a Camera.
47351
+ * @memberof vertexvis.protobuf.core
47352
+ * @interface ICamera
47353
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
47354
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
47355
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
47356
+ * @property {vertexvis.protobuf.core.IPerspectiveCamera|null} [perspective] Camera perspective
47357
+ * @property {vertexvis.protobuf.core.IOrthographicCamera|null} [orthographic] Camera orthographic
47358
+ */
47359
+
47360
+ /**
47361
+ * Constructs a new Camera.
47362
+ * @memberof vertexvis.protobuf.core
47363
+ * @classdesc Represents a Camera.
47364
+ * @implements ICamera
47365
+ * @constructor
47366
+ * @param {vertexvis.protobuf.core.ICamera=} [properties] Properties to set
47367
+ */
47368
+ function Camera(properties) {
47369
+ if (properties)
47370
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47371
+ if (properties[keys[i]] != null)
47372
+ this[keys[i]] = properties[keys[i]];
47373
+ }
47374
+
47375
+ /**
47376
+ * Camera position.
47377
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
47378
+ * @memberof vertexvis.protobuf.core.Camera
47379
+ * @instance
47380
+ */
47381
+ Camera.prototype.position = null;
47382
+
47383
+ /**
47384
+ * Camera lookAt.
47385
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
47386
+ * @memberof vertexvis.protobuf.core.Camera
47387
+ * @instance
47388
+ */
47389
+ Camera.prototype.lookAt = null;
47390
+
47391
+ /**
47392
+ * Camera up.
47393
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
47394
+ * @memberof vertexvis.protobuf.core.Camera
47395
+ * @instance
47396
+ */
47397
+ Camera.prototype.up = null;
47398
+
47399
+ /**
47400
+ * Camera perspective.
47401
+ * @member {vertexvis.protobuf.core.IPerspectiveCamera|null|undefined} perspective
47402
+ * @memberof vertexvis.protobuf.core.Camera
47403
+ * @instance
47404
+ */
47405
+ Camera.prototype.perspective = null;
47406
+
47407
+ /**
47408
+ * Camera orthographic.
47409
+ * @member {vertexvis.protobuf.core.IOrthographicCamera|null|undefined} orthographic
47410
+ * @memberof vertexvis.protobuf.core.Camera
47411
+ * @instance
47412
+ */
47413
+ Camera.prototype.orthographic = null;
47414
+
47415
+ // OneOf field names bound to virtual getters and setters
47416
+ let $oneOfFields;
47417
+
47418
+ /**
47419
+ * Camera type.
47420
+ * @member {"perspective"|"orthographic"|undefined} type
47421
+ * @memberof vertexvis.protobuf.core.Camera
47422
+ * @instance
47423
+ */
47424
+ Object.defineProperty(Camera.prototype, "type", {
47425
+ get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
47426
+ set: $util.oneOfSetter($oneOfFields)
47427
+ });
47428
+
47429
+ /**
47430
+ * Creates a new Camera instance using the specified properties.
47431
+ * @function create
47432
+ * @memberof vertexvis.protobuf.core.Camera
47433
+ * @static
47434
+ * @param {vertexvis.protobuf.core.ICamera=} [properties] Properties to set
47435
+ * @returns {vertexvis.protobuf.core.Camera} Camera instance
47436
+ */
47437
+ Camera.create = function create(properties) {
47438
+ return new Camera(properties);
47439
+ };
47440
+
47441
+ /**
47442
+ * Encodes the specified Camera message. Does not implicitly {@link vertexvis.protobuf.core.Camera.verify|verify} messages.
47443
+ * @function encode
47444
+ * @memberof vertexvis.protobuf.core.Camera
47445
+ * @static
47446
+ * @param {vertexvis.protobuf.core.ICamera} message Camera message or plain object to encode
47447
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47448
+ * @returns {$protobuf.Writer} Writer
47449
+ */
47450
+ Camera.encode = function encode(message, writer) {
47451
+ if (!writer)
47452
+ writer = $Writer.create();
47453
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
47454
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47455
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
47456
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47457
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
47458
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47459
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
47460
+ $root.vertexvis.protobuf.core.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
47461
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
47462
+ $root.vertexvis.protobuf.core.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
47463
+ return writer;
47464
+ };
47465
+
47466
+ /**
47467
+ * Encodes the specified Camera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.Camera.verify|verify} messages.
47468
+ * @function encodeDelimited
47469
+ * @memberof vertexvis.protobuf.core.Camera
47470
+ * @static
47471
+ * @param {vertexvis.protobuf.core.ICamera} message Camera message or plain object to encode
47472
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47473
+ * @returns {$protobuf.Writer} Writer
47474
+ */
47475
+ Camera.encodeDelimited = function encodeDelimited(message, writer) {
47476
+ return this.encode(message, writer).ldelim();
47477
+ };
47478
+
47479
+ /**
47480
+ * Decodes a Camera message from the specified reader or buffer.
47481
+ * @function decode
47482
+ * @memberof vertexvis.protobuf.core.Camera
47483
+ * @static
47484
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47485
+ * @param {number} [length] Message length if known beforehand
47486
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47487
+ * @throws {Error} If the payload is not a reader or valid buffer
47488
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47489
+ */
47490
+ Camera.decode = function decode(reader, length) {
47491
+ if (!(reader instanceof $Reader))
47492
+ reader = $Reader.create(reader);
47493
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.core.Camera();
47494
+ while (reader.pos < end) {
47495
+ let tag = reader.uint32();
47496
+ switch (tag >>> 3) {
47497
+ case 1:
47498
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47499
+ break;
47500
+ case 2:
47501
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47502
+ break;
47503
+ case 3:
47504
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47505
+ break;
47506
+ case 4:
47507
+ message.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.decode(reader, reader.uint32());
47508
+ break;
47509
+ case 5:
47510
+ message.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.decode(reader, reader.uint32());
47511
+ break;
47512
+ default:
47513
+ reader.skipType(tag & 7);
47514
+ break;
47515
+ }
47516
+ }
47517
+ return message;
47518
+ };
47519
+
47520
+ /**
47521
+ * Decodes a Camera message from the specified reader or buffer, length delimited.
47522
+ * @function decodeDelimited
47523
+ * @memberof vertexvis.protobuf.core.Camera
47524
+ * @static
47525
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47526
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47527
+ * @throws {Error} If the payload is not a reader or valid buffer
47528
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47529
+ */
47530
+ Camera.decodeDelimited = function decodeDelimited(reader) {
47531
+ if (!(reader instanceof $Reader))
47532
+ reader = new $Reader(reader);
47533
+ return this.decode(reader, reader.uint32());
47534
+ };
47535
+
47536
+ /**
47537
+ * Verifies a Camera message.
47538
+ * @function verify
47539
+ * @memberof vertexvis.protobuf.core.Camera
47540
+ * @static
47541
+ * @param {Object.<string,*>} message Plain object to verify
47542
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47543
+ */
47544
+ Camera.verify = function verify(message) {
47545
+ if (typeof message !== "object" || message === null)
47546
+ return "object expected";
47547
+ let properties = {};
47548
+ if (message.position != null && message.hasOwnProperty("position")) {
47549
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
47550
+ if (error)
47551
+ return "position." + error;
47552
+ }
47553
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
47554
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
47555
+ if (error)
47556
+ return "lookAt." + error;
47557
+ }
47558
+ if (message.up != null && message.hasOwnProperty("up")) {
47559
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
47560
+ if (error)
47561
+ return "up." + error;
47562
+ }
47563
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
47564
+ properties.type = 1;
47565
+ {
47566
+ let error = $root.vertexvis.protobuf.core.PerspectiveCamera.verify(message.perspective);
47567
+ if (error)
47568
+ return "perspective." + error;
47569
+ }
47570
+ }
47571
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
47572
+ if (properties.type === 1)
47573
+ return "type: multiple values";
47574
+ properties.type = 1;
47575
+ {
47576
+ let error = $root.vertexvis.protobuf.core.OrthographicCamera.verify(message.orthographic);
47577
+ if (error)
47578
+ return "orthographic." + error;
47579
+ }
47580
+ }
47581
+ return null;
47582
+ };
47583
+
47584
+ /**
47585
+ * Creates a Camera message from a plain object. Also converts values to their respective internal types.
47586
+ * @function fromObject
47587
+ * @memberof vertexvis.protobuf.core.Camera
47588
+ * @static
47589
+ * @param {Object.<string,*>} object Plain object
47590
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47591
+ */
47592
+ Camera.fromObject = function fromObject(object) {
47593
+ if (object instanceof $root.vertexvis.protobuf.core.Camera)
47594
+ return object;
47595
+ let message = new $root.vertexvis.protobuf.core.Camera();
47596
+ if (object.position != null) {
47597
+ if (typeof object.position !== "object")
47598
+ throw TypeError(".vertexvis.protobuf.core.Camera.position: object expected");
47599
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
47600
+ }
47601
+ if (object.lookAt != null) {
47602
+ if (typeof object.lookAt !== "object")
47603
+ throw TypeError(".vertexvis.protobuf.core.Camera.lookAt: object expected");
47604
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47605
+ }
47606
+ if (object.up != null) {
47607
+ if (typeof object.up !== "object")
47608
+ throw TypeError(".vertexvis.protobuf.core.Camera.up: object expected");
47609
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47610
+ }
47611
+ if (object.perspective != null) {
47612
+ if (typeof object.perspective !== "object")
47613
+ throw TypeError(".vertexvis.protobuf.core.Camera.perspective: object expected");
47614
+ message.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.fromObject(object.perspective);
47615
+ }
47616
+ if (object.orthographic != null) {
47617
+ if (typeof object.orthographic !== "object")
47618
+ throw TypeError(".vertexvis.protobuf.core.Camera.orthographic: object expected");
47619
+ message.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.fromObject(object.orthographic);
47620
+ }
47621
+ return message;
47622
+ };
47623
+
47624
+ /**
47625
+ * Creates a plain object from a Camera message. Also converts values to other types if specified.
47626
+ * @function toObject
47627
+ * @memberof vertexvis.protobuf.core.Camera
47628
+ * @static
47629
+ * @param {vertexvis.protobuf.core.Camera} message Camera
47630
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47631
+ * @returns {Object.<string,*>} Plain object
47632
+ */
47633
+ Camera.toObject = function toObject(message, options) {
47634
+ if (!options)
47635
+ options = {};
47636
+ let object = {};
47637
+ if (options.defaults) {
47638
+ object.position = null;
47639
+ object.lookAt = null;
47640
+ object.up = null;
47641
+ }
47642
+ if (message.position != null && message.hasOwnProperty("position"))
47643
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
47644
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47645
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47646
+ if (message.up != null && message.hasOwnProperty("up"))
47647
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47648
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
47649
+ object.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.toObject(message.perspective, options);
47650
+ if (options.oneofs)
47651
+ object.type = "perspective";
47652
+ }
47653
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
47654
+ object.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.toObject(message.orthographic, options);
47655
+ if (options.oneofs)
47656
+ object.type = "orthographic";
47657
+ }
47658
+ return object;
47659
+ };
47660
+
47661
+ /**
47662
+ * Converts this Camera to JSON.
47663
+ * @function toJSON
47664
+ * @memberof vertexvis.protobuf.core.Camera
47665
+ * @instance
47666
+ * @returns {Object.<string,*>} JSON object
47667
+ */
47668
+ Camera.prototype.toJSON = function toJSON() {
47669
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47670
+ };
47671
+
47672
+ return Camera;
47673
+ })();
47674
+
46535
47675
  /**
46536
47676
  * SceneElementTypeMask enum.
46537
47677
  * @name vertexvis.protobuf.core.SceneElementTypeMask