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