@vertexvis/stream-api 0.24.6-canary.0 → 0.24.6-testing.1

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.
@@ -4249,6 +4249,226 @@ const vertexvis = $root.vertexvis = (() => {
4249
4249
  return DisplayListSummary;
4250
4250
  })();
4251
4251
 
4252
+ stream.ItemModelViewAttributes = (function() {
4253
+
4254
+ /**
4255
+ * Properties of an ItemModelViewAttributes.
4256
+ * @memberof vertexvis.protobuf.stream
4257
+ * @interface IItemModelViewAttributes
4258
+ * @property {vertexvis.protobuf.core.IUuid|null} [modelViewId] ItemModelViewAttributes modelViewId
4259
+ * @property {vertexvis.protobuf.core.IUuid|null} [sceneItemId] ItemModelViewAttributes sceneItemId
4260
+ */
4261
+
4262
+ /**
4263
+ * Constructs a new ItemModelViewAttributes.
4264
+ * @memberof vertexvis.protobuf.stream
4265
+ * @classdesc Represents an ItemModelViewAttributes.
4266
+ * @implements IItemModelViewAttributes
4267
+ * @constructor
4268
+ * @param {vertexvis.protobuf.stream.IItemModelViewAttributes=} [properties] Properties to set
4269
+ */
4270
+ function ItemModelViewAttributes(properties) {
4271
+ if (properties)
4272
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4273
+ if (properties[keys[i]] != null)
4274
+ this[keys[i]] = properties[keys[i]];
4275
+ }
4276
+
4277
+ /**
4278
+ * ItemModelViewAttributes modelViewId.
4279
+ * @member {vertexvis.protobuf.core.IUuid|null|undefined} modelViewId
4280
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4281
+ * @instance
4282
+ */
4283
+ ItemModelViewAttributes.prototype.modelViewId = null;
4284
+
4285
+ /**
4286
+ * ItemModelViewAttributes sceneItemId.
4287
+ * @member {vertexvis.protobuf.core.IUuid|null|undefined} sceneItemId
4288
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4289
+ * @instance
4290
+ */
4291
+ ItemModelViewAttributes.prototype.sceneItemId = null;
4292
+
4293
+ /**
4294
+ * Creates a new ItemModelViewAttributes instance using the specified properties.
4295
+ * @function create
4296
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4297
+ * @static
4298
+ * @param {vertexvis.protobuf.stream.IItemModelViewAttributes=} [properties] Properties to set
4299
+ * @returns {vertexvis.protobuf.stream.ItemModelViewAttributes} ItemModelViewAttributes instance
4300
+ */
4301
+ ItemModelViewAttributes.create = function create(properties) {
4302
+ return new ItemModelViewAttributes(properties);
4303
+ };
4304
+
4305
+ /**
4306
+ * Encodes the specified ItemModelViewAttributes message. Does not implicitly {@link vertexvis.protobuf.stream.ItemModelViewAttributes.verify|verify} messages.
4307
+ * @function encode
4308
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4309
+ * @static
4310
+ * @param {vertexvis.protobuf.stream.IItemModelViewAttributes} message ItemModelViewAttributes message or plain object to encode
4311
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4312
+ * @returns {$protobuf.Writer} Writer
4313
+ */
4314
+ ItemModelViewAttributes.encode = function encode(message, writer) {
4315
+ if (!writer)
4316
+ writer = $Writer.create();
4317
+ if (message.modelViewId != null && Object.hasOwnProperty.call(message, "modelViewId"))
4318
+ $root.vertexvis.protobuf.core.Uuid.encode(message.modelViewId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4319
+ if (message.sceneItemId != null && Object.hasOwnProperty.call(message, "sceneItemId"))
4320
+ $root.vertexvis.protobuf.core.Uuid.encode(message.sceneItemId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4321
+ return writer;
4322
+ };
4323
+
4324
+ /**
4325
+ * Encodes the specified ItemModelViewAttributes message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.ItemModelViewAttributes.verify|verify} messages.
4326
+ * @function encodeDelimited
4327
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4328
+ * @static
4329
+ * @param {vertexvis.protobuf.stream.IItemModelViewAttributes} message ItemModelViewAttributes message or plain object to encode
4330
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4331
+ * @returns {$protobuf.Writer} Writer
4332
+ */
4333
+ ItemModelViewAttributes.encodeDelimited = function encodeDelimited(message, writer) {
4334
+ return this.encode(message, writer).ldelim();
4335
+ };
4336
+
4337
+ /**
4338
+ * Decodes an ItemModelViewAttributes message from the specified reader or buffer.
4339
+ * @function decode
4340
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4341
+ * @static
4342
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4343
+ * @param {number} [length] Message length if known beforehand
4344
+ * @returns {vertexvis.protobuf.stream.ItemModelViewAttributes} ItemModelViewAttributes
4345
+ * @throws {Error} If the payload is not a reader or valid buffer
4346
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4347
+ */
4348
+ ItemModelViewAttributes.decode = function decode(reader, length) {
4349
+ if (!(reader instanceof $Reader))
4350
+ reader = $Reader.create(reader);
4351
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.ItemModelViewAttributes();
4352
+ while (reader.pos < end) {
4353
+ let tag = reader.uint32();
4354
+ switch (tag >>> 3) {
4355
+ case 1:
4356
+ message.modelViewId = $root.vertexvis.protobuf.core.Uuid.decode(reader, reader.uint32());
4357
+ break;
4358
+ case 2:
4359
+ message.sceneItemId = $root.vertexvis.protobuf.core.Uuid.decode(reader, reader.uint32());
4360
+ break;
4361
+ default:
4362
+ reader.skipType(tag & 7);
4363
+ break;
4364
+ }
4365
+ }
4366
+ return message;
4367
+ };
4368
+
4369
+ /**
4370
+ * Decodes an ItemModelViewAttributes message from the specified reader or buffer, length delimited.
4371
+ * @function decodeDelimited
4372
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4373
+ * @static
4374
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4375
+ * @returns {vertexvis.protobuf.stream.ItemModelViewAttributes} ItemModelViewAttributes
4376
+ * @throws {Error} If the payload is not a reader or valid buffer
4377
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4378
+ */
4379
+ ItemModelViewAttributes.decodeDelimited = function decodeDelimited(reader) {
4380
+ if (!(reader instanceof $Reader))
4381
+ reader = new $Reader(reader);
4382
+ return this.decode(reader, reader.uint32());
4383
+ };
4384
+
4385
+ /**
4386
+ * Verifies an ItemModelViewAttributes message.
4387
+ * @function verify
4388
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4389
+ * @static
4390
+ * @param {Object.<string,*>} message Plain object to verify
4391
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4392
+ */
4393
+ ItemModelViewAttributes.verify = function verify(message) {
4394
+ if (typeof message !== "object" || message === null)
4395
+ return "object expected";
4396
+ if (message.modelViewId != null && message.hasOwnProperty("modelViewId")) {
4397
+ let error = $root.vertexvis.protobuf.core.Uuid.verify(message.modelViewId);
4398
+ if (error)
4399
+ return "modelViewId." + error;
4400
+ }
4401
+ if (message.sceneItemId != null && message.hasOwnProperty("sceneItemId")) {
4402
+ let error = $root.vertexvis.protobuf.core.Uuid.verify(message.sceneItemId);
4403
+ if (error)
4404
+ return "sceneItemId." + error;
4405
+ }
4406
+ return null;
4407
+ };
4408
+
4409
+ /**
4410
+ * Creates an ItemModelViewAttributes message from a plain object. Also converts values to their respective internal types.
4411
+ * @function fromObject
4412
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4413
+ * @static
4414
+ * @param {Object.<string,*>} object Plain object
4415
+ * @returns {vertexvis.protobuf.stream.ItemModelViewAttributes} ItemModelViewAttributes
4416
+ */
4417
+ ItemModelViewAttributes.fromObject = function fromObject(object) {
4418
+ if (object instanceof $root.vertexvis.protobuf.stream.ItemModelViewAttributes)
4419
+ return object;
4420
+ let message = new $root.vertexvis.protobuf.stream.ItemModelViewAttributes();
4421
+ if (object.modelViewId != null) {
4422
+ if (typeof object.modelViewId !== "object")
4423
+ throw TypeError(".vertexvis.protobuf.stream.ItemModelViewAttributes.modelViewId: object expected");
4424
+ message.modelViewId = $root.vertexvis.protobuf.core.Uuid.fromObject(object.modelViewId);
4425
+ }
4426
+ if (object.sceneItemId != null) {
4427
+ if (typeof object.sceneItemId !== "object")
4428
+ throw TypeError(".vertexvis.protobuf.stream.ItemModelViewAttributes.sceneItemId: object expected");
4429
+ message.sceneItemId = $root.vertexvis.protobuf.core.Uuid.fromObject(object.sceneItemId);
4430
+ }
4431
+ return message;
4432
+ };
4433
+
4434
+ /**
4435
+ * Creates a plain object from an ItemModelViewAttributes message. Also converts values to other types if specified.
4436
+ * @function toObject
4437
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4438
+ * @static
4439
+ * @param {vertexvis.protobuf.stream.ItemModelViewAttributes} message ItemModelViewAttributes
4440
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4441
+ * @returns {Object.<string,*>} Plain object
4442
+ */
4443
+ ItemModelViewAttributes.toObject = function toObject(message, options) {
4444
+ if (!options)
4445
+ options = {};
4446
+ let object = {};
4447
+ if (options.defaults) {
4448
+ object.modelViewId = null;
4449
+ object.sceneItemId = null;
4450
+ }
4451
+ if (message.modelViewId != null && message.hasOwnProperty("modelViewId"))
4452
+ object.modelViewId = $root.vertexvis.protobuf.core.Uuid.toObject(message.modelViewId, options);
4453
+ if (message.sceneItemId != null && message.hasOwnProperty("sceneItemId"))
4454
+ object.sceneItemId = $root.vertexvis.protobuf.core.Uuid.toObject(message.sceneItemId, options);
4455
+ return object;
4456
+ };
4457
+
4458
+ /**
4459
+ * Converts this ItemModelViewAttributes to JSON.
4460
+ * @function toJSON
4461
+ * @memberof vertexvis.protobuf.stream.ItemModelViewAttributes
4462
+ * @instance
4463
+ * @returns {Object.<string,*>} JSON object
4464
+ */
4465
+ ItemModelViewAttributes.prototype.toJSON = function toJSON() {
4466
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
4467
+ };
4468
+
4469
+ return ItemModelViewAttributes;
4470
+ })();
4471
+
4252
4472
  stream.SceneAttributes = (function() {
4253
4473
 
4254
4474
  /**
@@ -4261,6 +4481,7 @@ const vertexvis = $root.vertexvis = (() => {
4261
4481
  * @property {boolean|null} [hasChanged] SceneAttributes hasChanged
4262
4482
  * @property {vertexvis.protobuf.stream.IDisplayListSummary|null} [displayListSummary] SceneAttributes displayListSummary
4263
4483
  * @property {vertexvis.protobuf.core.IUuid2l|null} [modelViewId] SceneAttributes modelViewId
4484
+ * @property {vertexvis.protobuf.stream.IItemModelViewAttributes|null} [itemModelView] SceneAttributes itemModelView
4264
4485
  */
4265
4486
 
4266
4487
  /**
@@ -4326,6 +4547,14 @@ const vertexvis = $root.vertexvis = (() => {
4326
4547
  */
4327
4548
  SceneAttributes.prototype.modelViewId = null;
4328
4549
 
4550
+ /**
4551
+ * SceneAttributes itemModelView.
4552
+ * @member {vertexvis.protobuf.stream.IItemModelViewAttributes|null|undefined} itemModelView
4553
+ * @memberof vertexvis.protobuf.stream.SceneAttributes
4554
+ * @instance
4555
+ */
4556
+ SceneAttributes.prototype.itemModelView = null;
4557
+
4329
4558
  /**
4330
4559
  * Creates a new SceneAttributes instance using the specified properties.
4331
4560
  * @function create
@@ -4362,6 +4591,8 @@ const vertexvis = $root.vertexvis = (() => {
4362
4591
  $root.vertexvis.protobuf.stream.DisplayListSummary.encode(message.displayListSummary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
4363
4592
  if (message.modelViewId != null && Object.hasOwnProperty.call(message, "modelViewId"))
4364
4593
  $root.vertexvis.protobuf.core.Uuid2l.encode(message.modelViewId, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
4594
+ if (message.itemModelView != null && Object.hasOwnProperty.call(message, "itemModelView"))
4595
+ $root.vertexvis.protobuf.stream.ItemModelViewAttributes.encode(message.itemModelView, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
4365
4596
  return writer;
4366
4597
  };
4367
4598
 
@@ -4414,6 +4645,9 @@ const vertexvis = $root.vertexvis = (() => {
4414
4645
  case 6:
4415
4646
  message.modelViewId = $root.vertexvis.protobuf.core.Uuid2l.decode(reader, reader.uint32());
4416
4647
  break;
4648
+ case 7:
4649
+ message.itemModelView = $root.vertexvis.protobuf.stream.ItemModelViewAttributes.decode(reader, reader.uint32());
4650
+ break;
4417
4651
  default:
4418
4652
  reader.skipType(tag & 7);
4419
4653
  break;
@@ -4477,6 +4711,11 @@ const vertexvis = $root.vertexvis = (() => {
4477
4711
  if (error)
4478
4712
  return "modelViewId." + error;
4479
4713
  }
4714
+ if (message.itemModelView != null && message.hasOwnProperty("itemModelView")) {
4715
+ let error = $root.vertexvis.protobuf.stream.ItemModelViewAttributes.verify(message.itemModelView);
4716
+ if (error)
4717
+ return "itemModelView." + error;
4718
+ }
4480
4719
  return null;
4481
4720
  };
4482
4721
 
@@ -4519,6 +4758,11 @@ const vertexvis = $root.vertexvis = (() => {
4519
4758
  throw TypeError(".vertexvis.protobuf.stream.SceneAttributes.modelViewId: object expected");
4520
4759
  message.modelViewId = $root.vertexvis.protobuf.core.Uuid2l.fromObject(object.modelViewId);
4521
4760
  }
4761
+ if (object.itemModelView != null) {
4762
+ if (typeof object.itemModelView !== "object")
4763
+ throw TypeError(".vertexvis.protobuf.stream.SceneAttributes.itemModelView: object expected");
4764
+ message.itemModelView = $root.vertexvis.protobuf.stream.ItemModelViewAttributes.fromObject(object.itemModelView);
4765
+ }
4522
4766
  return message;
4523
4767
  };
4524
4768
 
@@ -4542,6 +4786,7 @@ const vertexvis = $root.vertexvis = (() => {
4542
4786
  object.hasChanged = false;
4543
4787
  object.displayListSummary = null;
4544
4788
  object.modelViewId = null;
4789
+ object.itemModelView = null;
4545
4790
  }
4546
4791
  if (message.camera != null && message.hasOwnProperty("camera"))
4547
4792
  object.camera = $root.vertexvis.protobuf.stream.Camera.toObject(message.camera, options);
@@ -4555,6 +4800,8 @@ const vertexvis = $root.vertexvis = (() => {
4555
4800
  object.displayListSummary = $root.vertexvis.protobuf.stream.DisplayListSummary.toObject(message.displayListSummary, options);
4556
4801
  if (message.modelViewId != null && message.hasOwnProperty("modelViewId"))
4557
4802
  object.modelViewId = $root.vertexvis.protobuf.core.Uuid2l.toObject(message.modelViewId, options);
4803
+ if (message.itemModelView != null && message.hasOwnProperty("itemModelView"))
4804
+ object.itemModelView = $root.vertexvis.protobuf.stream.ItemModelViewAttributes.toObject(message.itemModelView, options);
4558
4805
  return object;
4559
4806
  };
4560
4807
 
@@ -20881,6 +21128,221 @@ const vertexvis = $root.vertexvis = (() => {
20881
21128
  return SectionPlane;
20882
21129
  })();
20883
21130
 
21131
+ stream.EndCapping = (function() {
21132
+
21133
+ /**
21134
+ * Properties of an EndCapping.
21135
+ * @memberof vertexvis.protobuf.stream
21136
+ * @interface IEndCapping
21137
+ * @property {boolean|null} [enabled] EndCapping enabled
21138
+ * @property {vertexvis.protobuf.core.IRGBi|null} [capColor] EndCapping capColor
21139
+ */
21140
+
21141
+ /**
21142
+ * Constructs a new EndCapping.
21143
+ * @memberof vertexvis.protobuf.stream
21144
+ * @classdesc Represents an EndCapping.
21145
+ * @implements IEndCapping
21146
+ * @constructor
21147
+ * @param {vertexvis.protobuf.stream.IEndCapping=} [properties] Properties to set
21148
+ */
21149
+ function EndCapping(properties) {
21150
+ if (properties)
21151
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21152
+ if (properties[keys[i]] != null)
21153
+ this[keys[i]] = properties[keys[i]];
21154
+ }
21155
+
21156
+ /**
21157
+ * EndCapping enabled.
21158
+ * @member {boolean} enabled
21159
+ * @memberof vertexvis.protobuf.stream.EndCapping
21160
+ * @instance
21161
+ */
21162
+ EndCapping.prototype.enabled = false;
21163
+
21164
+ /**
21165
+ * EndCapping capColor.
21166
+ * @member {vertexvis.protobuf.core.IRGBi|null|undefined} capColor
21167
+ * @memberof vertexvis.protobuf.stream.EndCapping
21168
+ * @instance
21169
+ */
21170
+ EndCapping.prototype.capColor = null;
21171
+
21172
+ /**
21173
+ * Creates a new EndCapping instance using the specified properties.
21174
+ * @function create
21175
+ * @memberof vertexvis.protobuf.stream.EndCapping
21176
+ * @static
21177
+ * @param {vertexvis.protobuf.stream.IEndCapping=} [properties] Properties to set
21178
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping instance
21179
+ */
21180
+ EndCapping.create = function create(properties) {
21181
+ return new EndCapping(properties);
21182
+ };
21183
+
21184
+ /**
21185
+ * Encodes the specified EndCapping message. Does not implicitly {@link vertexvis.protobuf.stream.EndCapping.verify|verify} messages.
21186
+ * @function encode
21187
+ * @memberof vertexvis.protobuf.stream.EndCapping
21188
+ * @static
21189
+ * @param {vertexvis.protobuf.stream.IEndCapping} message EndCapping message or plain object to encode
21190
+ * @param {$protobuf.Writer} [writer] Writer to encode to
21191
+ * @returns {$protobuf.Writer} Writer
21192
+ */
21193
+ EndCapping.encode = function encode(message, writer) {
21194
+ if (!writer)
21195
+ writer = $Writer.create();
21196
+ if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled"))
21197
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled);
21198
+ if (message.capColor != null && Object.hasOwnProperty.call(message, "capColor"))
21199
+ $root.vertexvis.protobuf.core.RGBi.encode(message.capColor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
21200
+ return writer;
21201
+ };
21202
+
21203
+ /**
21204
+ * Encodes the specified EndCapping message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.EndCapping.verify|verify} messages.
21205
+ * @function encodeDelimited
21206
+ * @memberof vertexvis.protobuf.stream.EndCapping
21207
+ * @static
21208
+ * @param {vertexvis.protobuf.stream.IEndCapping} message EndCapping message or plain object to encode
21209
+ * @param {$protobuf.Writer} [writer] Writer to encode to
21210
+ * @returns {$protobuf.Writer} Writer
21211
+ */
21212
+ EndCapping.encodeDelimited = function encodeDelimited(message, writer) {
21213
+ return this.encode(message, writer).ldelim();
21214
+ };
21215
+
21216
+ /**
21217
+ * Decodes an EndCapping message from the specified reader or buffer.
21218
+ * @function decode
21219
+ * @memberof vertexvis.protobuf.stream.EndCapping
21220
+ * @static
21221
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
21222
+ * @param {number} [length] Message length if known beforehand
21223
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
21224
+ * @throws {Error} If the payload is not a reader or valid buffer
21225
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
21226
+ */
21227
+ EndCapping.decode = function decode(reader, length) {
21228
+ if (!(reader instanceof $Reader))
21229
+ reader = $Reader.create(reader);
21230
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.EndCapping();
21231
+ while (reader.pos < end) {
21232
+ let tag = reader.uint32();
21233
+ switch (tag >>> 3) {
21234
+ case 1:
21235
+ message.enabled = reader.bool();
21236
+ break;
21237
+ case 2:
21238
+ message.capColor = $root.vertexvis.protobuf.core.RGBi.decode(reader, reader.uint32());
21239
+ break;
21240
+ default:
21241
+ reader.skipType(tag & 7);
21242
+ break;
21243
+ }
21244
+ }
21245
+ return message;
21246
+ };
21247
+
21248
+ /**
21249
+ * Decodes an EndCapping message from the specified reader or buffer, length delimited.
21250
+ * @function decodeDelimited
21251
+ * @memberof vertexvis.protobuf.stream.EndCapping
21252
+ * @static
21253
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
21254
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
21255
+ * @throws {Error} If the payload is not a reader or valid buffer
21256
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
21257
+ */
21258
+ EndCapping.decodeDelimited = function decodeDelimited(reader) {
21259
+ if (!(reader instanceof $Reader))
21260
+ reader = new $Reader(reader);
21261
+ return this.decode(reader, reader.uint32());
21262
+ };
21263
+
21264
+ /**
21265
+ * Verifies an EndCapping message.
21266
+ * @function verify
21267
+ * @memberof vertexvis.protobuf.stream.EndCapping
21268
+ * @static
21269
+ * @param {Object.<string,*>} message Plain object to verify
21270
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
21271
+ */
21272
+ EndCapping.verify = function verify(message) {
21273
+ if (typeof message !== "object" || message === null)
21274
+ return "object expected";
21275
+ if (message.enabled != null && message.hasOwnProperty("enabled"))
21276
+ if (typeof message.enabled !== "boolean")
21277
+ return "enabled: boolean expected";
21278
+ if (message.capColor != null && message.hasOwnProperty("capColor")) {
21279
+ let error = $root.vertexvis.protobuf.core.RGBi.verify(message.capColor);
21280
+ if (error)
21281
+ return "capColor." + error;
21282
+ }
21283
+ return null;
21284
+ };
21285
+
21286
+ /**
21287
+ * Creates an EndCapping message from a plain object. Also converts values to their respective internal types.
21288
+ * @function fromObject
21289
+ * @memberof vertexvis.protobuf.stream.EndCapping
21290
+ * @static
21291
+ * @param {Object.<string,*>} object Plain object
21292
+ * @returns {vertexvis.protobuf.stream.EndCapping} EndCapping
21293
+ */
21294
+ EndCapping.fromObject = function fromObject(object) {
21295
+ if (object instanceof $root.vertexvis.protobuf.stream.EndCapping)
21296
+ return object;
21297
+ let message = new $root.vertexvis.protobuf.stream.EndCapping();
21298
+ if (object.enabled != null)
21299
+ message.enabled = Boolean(object.enabled);
21300
+ if (object.capColor != null) {
21301
+ if (typeof object.capColor !== "object")
21302
+ throw TypeError(".vertexvis.protobuf.stream.EndCapping.capColor: object expected");
21303
+ message.capColor = $root.vertexvis.protobuf.core.RGBi.fromObject(object.capColor);
21304
+ }
21305
+ return message;
21306
+ };
21307
+
21308
+ /**
21309
+ * Creates a plain object from an EndCapping message. Also converts values to other types if specified.
21310
+ * @function toObject
21311
+ * @memberof vertexvis.protobuf.stream.EndCapping
21312
+ * @static
21313
+ * @param {vertexvis.protobuf.stream.EndCapping} message EndCapping
21314
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
21315
+ * @returns {Object.<string,*>} Plain object
21316
+ */
21317
+ EndCapping.toObject = function toObject(message, options) {
21318
+ if (!options)
21319
+ options = {};
21320
+ let object = {};
21321
+ if (options.defaults) {
21322
+ object.enabled = false;
21323
+ object.capColor = null;
21324
+ }
21325
+ if (message.enabled != null && message.hasOwnProperty("enabled"))
21326
+ object.enabled = message.enabled;
21327
+ if (message.capColor != null && message.hasOwnProperty("capColor"))
21328
+ object.capColor = $root.vertexvis.protobuf.core.RGBi.toObject(message.capColor, options);
21329
+ return object;
21330
+ };
21331
+
21332
+ /**
21333
+ * Converts this EndCapping to JSON.
21334
+ * @function toJSON
21335
+ * @memberof vertexvis.protobuf.stream.EndCapping
21336
+ * @instance
21337
+ * @returns {Object.<string,*>} JSON object
21338
+ */
21339
+ EndCapping.prototype.toJSON = function toJSON() {
21340
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
21341
+ };
21342
+
21343
+ return EndCapping;
21344
+ })();
21345
+
20884
21346
  stream.CrossSectioning = (function() {
20885
21347
 
20886
21348
  /**
@@ -20890,6 +21352,7 @@ const vertexvis = $root.vertexvis = (() => {
20890
21352
  * @property {Array.<vertexvis.protobuf.stream.ISectionPlane>|null} [sectionPlanes] CrossSectioning sectionPlanes
20891
21353
  * @property {vertexvis.protobuf.core.IRGBi|null} [highlightColor] CrossSectioning highlightColor
20892
21354
  * @property {google.protobuf.IFloatValue|null} [lineWidth] CrossSectioning lineWidth
21355
+ * @property {vertexvis.protobuf.stream.IEndCapping|null} [endCapping] CrossSectioning endCapping
20893
21356
  */
20894
21357
 
20895
21358
  /**
@@ -20932,6 +21395,14 @@ const vertexvis = $root.vertexvis = (() => {
20932
21395
  */
20933
21396
  CrossSectioning.prototype.lineWidth = null;
20934
21397
 
21398
+ /**
21399
+ * CrossSectioning endCapping.
21400
+ * @member {vertexvis.protobuf.stream.IEndCapping|null|undefined} endCapping
21401
+ * @memberof vertexvis.protobuf.stream.CrossSectioning
21402
+ * @instance
21403
+ */
21404
+ CrossSectioning.prototype.endCapping = null;
21405
+
20935
21406
  /**
20936
21407
  * Creates a new CrossSectioning instance using the specified properties.
20937
21408
  * @function create
@@ -20963,6 +21434,8 @@ const vertexvis = $root.vertexvis = (() => {
20963
21434
  $root.vertexvis.protobuf.core.RGBi.encode(message.highlightColor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20964
21435
  if (message.lineWidth != null && Object.hasOwnProperty.call(message, "lineWidth"))
20965
21436
  $root.google.protobuf.FloatValue.encode(message.lineWidth, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
21437
+ if (message.endCapping != null && Object.hasOwnProperty.call(message, "endCapping"))
21438
+ $root.vertexvis.protobuf.stream.EndCapping.encode(message.endCapping, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
20966
21439
  return writer;
20967
21440
  };
20968
21441
 
@@ -21008,6 +21481,9 @@ const vertexvis = $root.vertexvis = (() => {
21008
21481
  case 3:
21009
21482
  message.lineWidth = $root.google.protobuf.FloatValue.decode(reader, reader.uint32());
21010
21483
  break;
21484
+ case 4:
21485
+ message.endCapping = $root.vertexvis.protobuf.stream.EndCapping.decode(reader, reader.uint32());
21486
+ break;
21011
21487
  default:
21012
21488
  reader.skipType(tag & 7);
21013
21489
  break;
@@ -21062,6 +21538,11 @@ const vertexvis = $root.vertexvis = (() => {
21062
21538
  if (error)
21063
21539
  return "lineWidth." + error;
21064
21540
  }
21541
+ if (message.endCapping != null && message.hasOwnProperty("endCapping")) {
21542
+ let error = $root.vertexvis.protobuf.stream.EndCapping.verify(message.endCapping);
21543
+ if (error)
21544
+ return "endCapping." + error;
21545
+ }
21065
21546
  return null;
21066
21547
  };
21067
21548
 
@@ -21097,6 +21578,11 @@ const vertexvis = $root.vertexvis = (() => {
21097
21578
  throw TypeError(".vertexvis.protobuf.stream.CrossSectioning.lineWidth: object expected");
21098
21579
  message.lineWidth = $root.google.protobuf.FloatValue.fromObject(object.lineWidth);
21099
21580
  }
21581
+ if (object.endCapping != null) {
21582
+ if (typeof object.endCapping !== "object")
21583
+ throw TypeError(".vertexvis.protobuf.stream.CrossSectioning.endCapping: object expected");
21584
+ message.endCapping = $root.vertexvis.protobuf.stream.EndCapping.fromObject(object.endCapping);
21585
+ }
21100
21586
  return message;
21101
21587
  };
21102
21588
 
@@ -21118,6 +21604,7 @@ const vertexvis = $root.vertexvis = (() => {
21118
21604
  if (options.defaults) {
21119
21605
  object.highlightColor = null;
21120
21606
  object.lineWidth = null;
21607
+ object.endCapping = null;
21121
21608
  }
21122
21609
  if (message.sectionPlanes && message.sectionPlanes.length) {
21123
21610
  object.sectionPlanes = [];
@@ -21128,6 +21615,8 @@ const vertexvis = $root.vertexvis = (() => {
21128
21615
  object.highlightColor = $root.vertexvis.protobuf.core.RGBi.toObject(message.highlightColor, options);
21129
21616
  if (message.lineWidth != null && message.hasOwnProperty("lineWidth"))
21130
21617
  object.lineWidth = $root.google.protobuf.FloatValue.toObject(message.lineWidth, options);
21618
+ if (message.endCapping != null && message.hasOwnProperty("endCapping"))
21619
+ object.endCapping = $root.vertexvis.protobuf.stream.EndCapping.toObject(message.endCapping, options);
21131
21620
  return object;
21132
21621
  };
21133
21622
 
@@ -27584,6 +28073,7 @@ const vertexvis = $root.vertexvis = (() => {
27584
28073
  * @property {google.protobuf.IBytesValue|null} [featureMap] DrawFramePayload featureMap
27585
28074
  * @property {boolean|null} [temporalRefinement] DrawFramePayload temporalRefinement
27586
28075
  * @property {vertexvis.protobuf.core.IUuid|null} [temporalRefinementCorrelationId] DrawFramePayload temporalRefinementCorrelationId
28076
+ * @property {google.protobuf.IBoolValue|null} [partialFrame] DrawFramePayload partialFrame
27587
28077
  */
27588
28078
 
27589
28079
  /**
@@ -27674,6 +28164,14 @@ const vertexvis = $root.vertexvis = (() => {
27674
28164
  */
27675
28165
  DrawFramePayload.prototype.temporalRefinementCorrelationId = null;
27676
28166
 
28167
+ /**
28168
+ * DrawFramePayload partialFrame.
28169
+ * @member {google.protobuf.IBoolValue|null|undefined} partialFrame
28170
+ * @memberof vertexvis.protobuf.stream.DrawFramePayload
28171
+ * @instance
28172
+ */
28173
+ DrawFramePayload.prototype.partialFrame = null;
28174
+
27677
28175
  /**
27678
28176
  * Creates a new DrawFramePayload instance using the specified properties.
27679
28177
  * @function create
@@ -27717,6 +28215,8 @@ const vertexvis = $root.vertexvis = (() => {
27717
28215
  writer.uint32(/* id 8, wireType 0 =*/64).bool(message.temporalRefinement);
27718
28216
  if (message.temporalRefinementCorrelationId != null && Object.hasOwnProperty.call(message, "temporalRefinementCorrelationId"))
27719
28217
  $root.vertexvis.protobuf.core.Uuid.encode(message.temporalRefinementCorrelationId, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
28218
+ if (message.partialFrame != null && Object.hasOwnProperty.call(message, "partialFrame"))
28219
+ $root.google.protobuf.BoolValue.encode(message.partialFrame, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
27720
28220
  return writer;
27721
28221
  };
27722
28222
 
@@ -27780,6 +28280,9 @@ const vertexvis = $root.vertexvis = (() => {
27780
28280
  case 9:
27781
28281
  message.temporalRefinementCorrelationId = $root.vertexvis.protobuf.core.Uuid.decode(reader, reader.uint32());
27782
28282
  break;
28283
+ case 10:
28284
+ message.partialFrame = $root.google.protobuf.BoolValue.decode(reader, reader.uint32());
28285
+ break;
27783
28286
  default:
27784
28287
  reader.skipType(tag & 7);
27785
28288
  break;
@@ -27856,6 +28359,11 @@ const vertexvis = $root.vertexvis = (() => {
27856
28359
  if (error)
27857
28360
  return "temporalRefinementCorrelationId." + error;
27858
28361
  }
28362
+ if (message.partialFrame != null && message.hasOwnProperty("partialFrame")) {
28363
+ let error = $root.google.protobuf.BoolValue.verify(message.partialFrame);
28364
+ if (error)
28365
+ return "partialFrame." + error;
28366
+ }
27859
28367
  return null;
27860
28368
  };
27861
28369
 
@@ -27912,6 +28420,11 @@ const vertexvis = $root.vertexvis = (() => {
27912
28420
  throw TypeError(".vertexvis.protobuf.stream.DrawFramePayload.temporalRefinementCorrelationId: object expected");
27913
28421
  message.temporalRefinementCorrelationId = $root.vertexvis.protobuf.core.Uuid.fromObject(object.temporalRefinementCorrelationId);
27914
28422
  }
28423
+ if (object.partialFrame != null) {
28424
+ if (typeof object.partialFrame !== "object")
28425
+ throw TypeError(".vertexvis.protobuf.stream.DrawFramePayload.partialFrame: object expected");
28426
+ message.partialFrame = $root.google.protobuf.BoolValue.fromObject(object.partialFrame);
28427
+ }
27915
28428
  return message;
27916
28429
  };
27917
28430
 
@@ -27945,6 +28458,7 @@ const vertexvis = $root.vertexvis = (() => {
27945
28458
  object.featureMap = null;
27946
28459
  object.temporalRefinement = false;
27947
28460
  object.temporalRefinementCorrelationId = null;
28461
+ object.partialFrame = null;
27948
28462
  }
27949
28463
  if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
27950
28464
  object.sequenceNumber = message.sequenceNumber;
@@ -27967,6 +28481,8 @@ const vertexvis = $root.vertexvis = (() => {
27967
28481
  object.temporalRefinement = message.temporalRefinement;
27968
28482
  if (message.temporalRefinementCorrelationId != null && message.hasOwnProperty("temporalRefinementCorrelationId"))
27969
28483
  object.temporalRefinementCorrelationId = $root.vertexvis.protobuf.core.Uuid.toObject(message.temporalRefinementCorrelationId, options);
28484
+ if (message.partialFrame != null && message.hasOwnProperty("partialFrame"))
28485
+ object.partialFrame = $root.google.protobuf.BoolValue.toObject(message.partialFrame, options);
27970
28486
  return object;
27971
28487
  };
27972
28488
 
@@ -45864,6 +46380,7 @@ const vertexvis = $root.vertexvis = (() => {
45864
46380
  * @property {vertexvis.protobuf.core.IUuid2l|null} [id] ModelView id
45865
46381
  * @property {vertexvis.protobuf.core.IUuid2l|null} [partRevisionId] ModelView partRevisionId
45866
46382
  * @property {string|null} [displayName] ModelView displayName
46383
+ * @property {vertexvis.protobuf.core.ICamera|null} [camera] ModelView camera
45867
46384
  */
45868
46385
 
45869
46386
  /**
@@ -45905,6 +46422,14 @@ const vertexvis = $root.vertexvis = (() => {
45905
46422
  */
45906
46423
  ModelView.prototype.displayName = "";
45907
46424
 
46425
+ /**
46426
+ * ModelView camera.
46427
+ * @member {vertexvis.protobuf.core.ICamera|null|undefined} camera
46428
+ * @memberof vertexvis.protobuf.core.ModelView
46429
+ * @instance
46430
+ */
46431
+ ModelView.prototype.camera = null;
46432
+
45908
46433
  /**
45909
46434
  * Creates a new ModelView instance using the specified properties.
45910
46435
  * @function create
@@ -45935,6 +46460,8 @@ const vertexvis = $root.vertexvis = (() => {
45935
46460
  $root.vertexvis.protobuf.core.Uuid2l.encode(message.partRevisionId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
45936
46461
  if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
45937
46462
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
46463
+ if (message.camera != null && Object.hasOwnProperty.call(message, "camera"))
46464
+ $root.vertexvis.protobuf.core.Camera.encode(message.camera, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
45938
46465
  return writer;
45939
46466
  };
45940
46467
 
@@ -45978,6 +46505,9 @@ const vertexvis = $root.vertexvis = (() => {
45978
46505
  case 3:
45979
46506
  message.displayName = reader.string();
45980
46507
  break;
46508
+ case 4:
46509
+ message.camera = $root.vertexvis.protobuf.core.Camera.decode(reader, reader.uint32());
46510
+ break;
45981
46511
  default:
45982
46512
  reader.skipType(tag & 7);
45983
46513
  break;
@@ -46026,6 +46556,11 @@ const vertexvis = $root.vertexvis = (() => {
46026
46556
  if (message.displayName != null && message.hasOwnProperty("displayName"))
46027
46557
  if (!$util.isString(message.displayName))
46028
46558
  return "displayName: string expected";
46559
+ if (message.camera != null && message.hasOwnProperty("camera")) {
46560
+ let error = $root.vertexvis.protobuf.core.Camera.verify(message.camera);
46561
+ if (error)
46562
+ return "camera." + error;
46563
+ }
46029
46564
  return null;
46030
46565
  };
46031
46566
 
@@ -46053,6 +46588,11 @@ const vertexvis = $root.vertexvis = (() => {
46053
46588
  }
46054
46589
  if (object.displayName != null)
46055
46590
  message.displayName = String(object.displayName);
46591
+ if (object.camera != null) {
46592
+ if (typeof object.camera !== "object")
46593
+ throw TypeError(".vertexvis.protobuf.core.ModelView.camera: object expected");
46594
+ message.camera = $root.vertexvis.protobuf.core.Camera.fromObject(object.camera);
46595
+ }
46056
46596
  return message;
46057
46597
  };
46058
46598
 
@@ -46073,6 +46613,7 @@ const vertexvis = $root.vertexvis = (() => {
46073
46613
  object.id = null;
46074
46614
  object.partRevisionId = null;
46075
46615
  object.displayName = "";
46616
+ object.camera = null;
46076
46617
  }
46077
46618
  if (message.id != null && message.hasOwnProperty("id"))
46078
46619
  object.id = $root.vertexvis.protobuf.core.Uuid2l.toObject(message.id, options);
@@ -46080,6 +46621,8 @@ const vertexvis = $root.vertexvis = (() => {
46080
46621
  object.partRevisionId = $root.vertexvis.protobuf.core.Uuid2l.toObject(message.partRevisionId, options);
46081
46622
  if (message.displayName != null && message.hasOwnProperty("displayName"))
46082
46623
  object.displayName = message.displayName;
46624
+ if (message.camera != null && message.hasOwnProperty("camera"))
46625
+ object.camera = $root.vertexvis.protobuf.core.Camera.toObject(message.camera, options);
46083
46626
  return object;
46084
46627
  };
46085
46628
 
@@ -46532,6 +47075,877 @@ const vertexvis = $root.vertexvis = (() => {
46532
47075
  return PmiAnnotation;
46533
47076
  })();
46534
47077
 
47078
+ core.PerspectiveCamera = (function() {
47079
+
47080
+ /**
47081
+ * Properties of a PerspectiveCamera.
47082
+ * @memberof vertexvis.protobuf.core
47083
+ * @interface IPerspectiveCamera
47084
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] PerspectiveCamera position
47085
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] PerspectiveCamera lookAt
47086
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] PerspectiveCamera up
47087
+ * @property {google.protobuf.IFloatValue|null} [fovY] PerspectiveCamera fovY
47088
+ */
47089
+
47090
+ /**
47091
+ * Constructs a new PerspectiveCamera.
47092
+ * @memberof vertexvis.protobuf.core
47093
+ * @classdesc Represents a PerspectiveCamera.
47094
+ * @implements IPerspectiveCamera
47095
+ * @constructor
47096
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera=} [properties] Properties to set
47097
+ */
47098
+ function PerspectiveCamera(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
+ * PerspectiveCamera position.
47107
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
47108
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47109
+ * @instance
47110
+ */
47111
+ PerspectiveCamera.prototype.position = null;
47112
+
47113
+ /**
47114
+ * PerspectiveCamera lookAt.
47115
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
47116
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47117
+ * @instance
47118
+ */
47119
+ PerspectiveCamera.prototype.lookAt = null;
47120
+
47121
+ /**
47122
+ * PerspectiveCamera up.
47123
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
47124
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47125
+ * @instance
47126
+ */
47127
+ PerspectiveCamera.prototype.up = null;
47128
+
47129
+ /**
47130
+ * PerspectiveCamera fovY.
47131
+ * @member {google.protobuf.IFloatValue|null|undefined} fovY
47132
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47133
+ * @instance
47134
+ */
47135
+ PerspectiveCamera.prototype.fovY = null;
47136
+
47137
+ /**
47138
+ * Creates a new PerspectiveCamera instance using the specified properties.
47139
+ * @function create
47140
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47141
+ * @static
47142
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera=} [properties] Properties to set
47143
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera instance
47144
+ */
47145
+ PerspectiveCamera.create = function create(properties) {
47146
+ return new PerspectiveCamera(properties);
47147
+ };
47148
+
47149
+ /**
47150
+ * Encodes the specified PerspectiveCamera message. Does not implicitly {@link vertexvis.protobuf.core.PerspectiveCamera.verify|verify} messages.
47151
+ * @function encode
47152
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47153
+ * @static
47154
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
47155
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47156
+ * @returns {$protobuf.Writer} Writer
47157
+ */
47158
+ PerspectiveCamera.encode = function encode(message, writer) {
47159
+ if (!writer)
47160
+ writer = $Writer.create();
47161
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
47162
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, 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.fovY != null && Object.hasOwnProperty.call(message, "fovY"))
47168
+ $root.google.protobuf.FloatValue.encode(message.fovY, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
47169
+ return writer;
47170
+ };
47171
+
47172
+ /**
47173
+ * Encodes the specified PerspectiveCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.PerspectiveCamera.verify|verify} messages.
47174
+ * @function encodeDelimited
47175
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47176
+ * @static
47177
+ * @param {vertexvis.protobuf.core.IPerspectiveCamera} message PerspectiveCamera message or plain object to encode
47178
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47179
+ * @returns {$protobuf.Writer} Writer
47180
+ */
47181
+ PerspectiveCamera.encodeDelimited = function encodeDelimited(message, writer) {
47182
+ return this.encode(message, writer).ldelim();
47183
+ };
47184
+
47185
+ /**
47186
+ * Decodes a PerspectiveCamera message from the specified reader or buffer.
47187
+ * @function decode
47188
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
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.PerspectiveCamera} PerspectiveCamera
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
+ PerspectiveCamera.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.PerspectiveCamera();
47200
+ while (reader.pos < end) {
47201
+ let tag = reader.uint32();
47202
+ switch (tag >>> 3) {
47203
+ case 1:
47204
+ message.position = $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.fovY = $root.google.protobuf.FloatValue.decode(reader, reader.uint32());
47214
+ break;
47215
+ default:
47216
+ reader.skipType(tag & 7);
47217
+ break;
47218
+ }
47219
+ }
47220
+ return message;
47221
+ };
47222
+
47223
+ /**
47224
+ * Decodes a PerspectiveCamera message from the specified reader or buffer, length delimited.
47225
+ * @function decodeDelimited
47226
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47227
+ * @static
47228
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47229
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera
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
+ PerspectiveCamera.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 a PerspectiveCamera message.
47241
+ * @function verify
47242
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
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
+ PerspectiveCamera.verify = function verify(message) {
47248
+ if (typeof message !== "object" || message === null)
47249
+ return "object expected";
47250
+ if (message.position != null && message.hasOwnProperty("position")) {
47251
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
47252
+ if (error)
47253
+ return "position." + 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.fovY != null && message.hasOwnProperty("fovY")) {
47266
+ let error = $root.google.protobuf.FloatValue.verify(message.fovY);
47267
+ if (error)
47268
+ return "fovY." + error;
47269
+ }
47270
+ return null;
47271
+ };
47272
+
47273
+ /**
47274
+ * Creates a PerspectiveCamera message from a plain object. Also converts values to their respective internal types.
47275
+ * @function fromObject
47276
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47277
+ * @static
47278
+ * @param {Object.<string,*>} object Plain object
47279
+ * @returns {vertexvis.protobuf.core.PerspectiveCamera} PerspectiveCamera
47280
+ */
47281
+ PerspectiveCamera.fromObject = function fromObject(object) {
47282
+ if (object instanceof $root.vertexvis.protobuf.core.PerspectiveCamera)
47283
+ return object;
47284
+ let message = new $root.vertexvis.protobuf.core.PerspectiveCamera();
47285
+ if (object.position != null) {
47286
+ if (typeof object.position !== "object")
47287
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.position: object expected");
47288
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
47289
+ }
47290
+ if (object.lookAt != null) {
47291
+ if (typeof object.lookAt !== "object")
47292
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.lookAt: object expected");
47293
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47294
+ }
47295
+ if (object.up != null) {
47296
+ if (typeof object.up !== "object")
47297
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.up: object expected");
47298
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47299
+ }
47300
+ if (object.fovY != null) {
47301
+ if (typeof object.fovY !== "object")
47302
+ throw TypeError(".vertexvis.protobuf.core.PerspectiveCamera.fovY: object expected");
47303
+ message.fovY = $root.google.protobuf.FloatValue.fromObject(object.fovY);
47304
+ }
47305
+ return message;
47306
+ };
47307
+
47308
+ /**
47309
+ * Creates a plain object from a PerspectiveCamera message. Also converts values to other types if specified.
47310
+ * @function toObject
47311
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47312
+ * @static
47313
+ * @param {vertexvis.protobuf.core.PerspectiveCamera} message PerspectiveCamera
47314
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47315
+ * @returns {Object.<string,*>} Plain object
47316
+ */
47317
+ PerspectiveCamera.toObject = function toObject(message, options) {
47318
+ if (!options)
47319
+ options = {};
47320
+ let object = {};
47321
+ if (options.defaults) {
47322
+ object.position = null;
47323
+ object.lookAt = null;
47324
+ object.up = null;
47325
+ object.fovY = null;
47326
+ }
47327
+ if (message.position != null && message.hasOwnProperty("position"))
47328
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
47329
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47330
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47331
+ if (message.up != null && message.hasOwnProperty("up"))
47332
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47333
+ if (message.fovY != null && message.hasOwnProperty("fovY"))
47334
+ object.fovY = $root.google.protobuf.FloatValue.toObject(message.fovY, options);
47335
+ return object;
47336
+ };
47337
+
47338
+ /**
47339
+ * Converts this PerspectiveCamera to JSON.
47340
+ * @function toJSON
47341
+ * @memberof vertexvis.protobuf.core.PerspectiveCamera
47342
+ * @instance
47343
+ * @returns {Object.<string,*>} JSON object
47344
+ */
47345
+ PerspectiveCamera.prototype.toJSON = function toJSON() {
47346
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47347
+ };
47348
+
47349
+ return PerspectiveCamera;
47350
+ })();
47351
+
47352
+ core.OrthographicCamera = (function() {
47353
+
47354
+ /**
47355
+ * Properties of an OrthographicCamera.
47356
+ * @memberof vertexvis.protobuf.core
47357
+ * @interface IOrthographicCamera
47358
+ * @property {vertexvis.protobuf.core.IVector3f|null} [viewVector] OrthographicCamera viewVector
47359
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] OrthographicCamera lookAt
47360
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] OrthographicCamera up
47361
+ * @property {number|null} [fovHeight] OrthographicCamera fovHeight
47362
+ */
47363
+
47364
+ /**
47365
+ * Constructs a new OrthographicCamera.
47366
+ * @memberof vertexvis.protobuf.core
47367
+ * @classdesc Represents an OrthographicCamera.
47368
+ * @implements IOrthographicCamera
47369
+ * @constructor
47370
+ * @param {vertexvis.protobuf.core.IOrthographicCamera=} [properties] Properties to set
47371
+ */
47372
+ function OrthographicCamera(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
+ * OrthographicCamera viewVector.
47381
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} viewVector
47382
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47383
+ * @instance
47384
+ */
47385
+ OrthographicCamera.prototype.viewVector = null;
47386
+
47387
+ /**
47388
+ * OrthographicCamera lookAt.
47389
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
47390
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47391
+ * @instance
47392
+ */
47393
+ OrthographicCamera.prototype.lookAt = null;
47394
+
47395
+ /**
47396
+ * OrthographicCamera up.
47397
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
47398
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47399
+ * @instance
47400
+ */
47401
+ OrthographicCamera.prototype.up = null;
47402
+
47403
+ /**
47404
+ * OrthographicCamera fovHeight.
47405
+ * @member {number} fovHeight
47406
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47407
+ * @instance
47408
+ */
47409
+ OrthographicCamera.prototype.fovHeight = 0;
47410
+
47411
+ /**
47412
+ * Creates a new OrthographicCamera instance using the specified properties.
47413
+ * @function create
47414
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47415
+ * @static
47416
+ * @param {vertexvis.protobuf.core.IOrthographicCamera=} [properties] Properties to set
47417
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera instance
47418
+ */
47419
+ OrthographicCamera.create = function create(properties) {
47420
+ return new OrthographicCamera(properties);
47421
+ };
47422
+
47423
+ /**
47424
+ * Encodes the specified OrthographicCamera message. Does not implicitly {@link vertexvis.protobuf.core.OrthographicCamera.verify|verify} messages.
47425
+ * @function encode
47426
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47427
+ * @static
47428
+ * @param {vertexvis.protobuf.core.IOrthographicCamera} message OrthographicCamera message or plain object to encode
47429
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47430
+ * @returns {$protobuf.Writer} Writer
47431
+ */
47432
+ OrthographicCamera.encode = function encode(message, writer) {
47433
+ if (!writer)
47434
+ writer = $Writer.create();
47435
+ if (message.viewVector != null && Object.hasOwnProperty.call(message, "viewVector"))
47436
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.viewVector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47437
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
47438
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47439
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
47440
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47441
+ if (message.fovHeight != null && Object.hasOwnProperty.call(message, "fovHeight"))
47442
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.fovHeight);
47443
+ return writer;
47444
+ };
47445
+
47446
+ /**
47447
+ * Encodes the specified OrthographicCamera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.OrthographicCamera.verify|verify} messages.
47448
+ * @function encodeDelimited
47449
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47450
+ * @static
47451
+ * @param {vertexvis.protobuf.core.IOrthographicCamera} message OrthographicCamera message or plain object to encode
47452
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47453
+ * @returns {$protobuf.Writer} Writer
47454
+ */
47455
+ OrthographicCamera.encodeDelimited = function encodeDelimited(message, writer) {
47456
+ return this.encode(message, writer).ldelim();
47457
+ };
47458
+
47459
+ /**
47460
+ * Decodes an OrthographicCamera message from the specified reader or buffer.
47461
+ * @function decode
47462
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47463
+ * @static
47464
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47465
+ * @param {number} [length] Message length if known beforehand
47466
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47467
+ * @throws {Error} If the payload is not a reader or valid buffer
47468
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47469
+ */
47470
+ OrthographicCamera.decode = function decode(reader, length) {
47471
+ if (!(reader instanceof $Reader))
47472
+ reader = $Reader.create(reader);
47473
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.core.OrthographicCamera();
47474
+ while (reader.pos < end) {
47475
+ let tag = reader.uint32();
47476
+ switch (tag >>> 3) {
47477
+ case 1:
47478
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47479
+ break;
47480
+ case 2:
47481
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47482
+ break;
47483
+ case 3:
47484
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47485
+ break;
47486
+ case 4:
47487
+ message.fovHeight = reader.float();
47488
+ break;
47489
+ default:
47490
+ reader.skipType(tag & 7);
47491
+ break;
47492
+ }
47493
+ }
47494
+ return message;
47495
+ };
47496
+
47497
+ /**
47498
+ * Decodes an OrthographicCamera message from the specified reader or buffer, length delimited.
47499
+ * @function decodeDelimited
47500
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47501
+ * @static
47502
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47503
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47504
+ * @throws {Error} If the payload is not a reader or valid buffer
47505
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47506
+ */
47507
+ OrthographicCamera.decodeDelimited = function decodeDelimited(reader) {
47508
+ if (!(reader instanceof $Reader))
47509
+ reader = new $Reader(reader);
47510
+ return this.decode(reader, reader.uint32());
47511
+ };
47512
+
47513
+ /**
47514
+ * Verifies an OrthographicCamera message.
47515
+ * @function verify
47516
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47517
+ * @static
47518
+ * @param {Object.<string,*>} message Plain object to verify
47519
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47520
+ */
47521
+ OrthographicCamera.verify = function verify(message) {
47522
+ if (typeof message !== "object" || message === null)
47523
+ return "object expected";
47524
+ if (message.viewVector != null && message.hasOwnProperty("viewVector")) {
47525
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.viewVector);
47526
+ if (error)
47527
+ return "viewVector." + error;
47528
+ }
47529
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
47530
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
47531
+ if (error)
47532
+ return "lookAt." + error;
47533
+ }
47534
+ if (message.up != null && message.hasOwnProperty("up")) {
47535
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
47536
+ if (error)
47537
+ return "up." + error;
47538
+ }
47539
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
47540
+ if (typeof message.fovHeight !== "number")
47541
+ return "fovHeight: number expected";
47542
+ return null;
47543
+ };
47544
+
47545
+ /**
47546
+ * Creates an OrthographicCamera message from a plain object. Also converts values to their respective internal types.
47547
+ * @function fromObject
47548
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47549
+ * @static
47550
+ * @param {Object.<string,*>} object Plain object
47551
+ * @returns {vertexvis.protobuf.core.OrthographicCamera} OrthographicCamera
47552
+ */
47553
+ OrthographicCamera.fromObject = function fromObject(object) {
47554
+ if (object instanceof $root.vertexvis.protobuf.core.OrthographicCamera)
47555
+ return object;
47556
+ let message = new $root.vertexvis.protobuf.core.OrthographicCamera();
47557
+ if (object.viewVector != null) {
47558
+ if (typeof object.viewVector !== "object")
47559
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.viewVector: object expected");
47560
+ message.viewVector = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.viewVector);
47561
+ }
47562
+ if (object.lookAt != null) {
47563
+ if (typeof object.lookAt !== "object")
47564
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.lookAt: object expected");
47565
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47566
+ }
47567
+ if (object.up != null) {
47568
+ if (typeof object.up !== "object")
47569
+ throw TypeError(".vertexvis.protobuf.core.OrthographicCamera.up: object expected");
47570
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47571
+ }
47572
+ if (object.fovHeight != null)
47573
+ message.fovHeight = Number(object.fovHeight);
47574
+ return message;
47575
+ };
47576
+
47577
+ /**
47578
+ * Creates a plain object from an OrthographicCamera message. Also converts values to other types if specified.
47579
+ * @function toObject
47580
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47581
+ * @static
47582
+ * @param {vertexvis.protobuf.core.OrthographicCamera} message OrthographicCamera
47583
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47584
+ * @returns {Object.<string,*>} Plain object
47585
+ */
47586
+ OrthographicCamera.toObject = function toObject(message, options) {
47587
+ if (!options)
47588
+ options = {};
47589
+ let object = {};
47590
+ if (options.defaults) {
47591
+ object.viewVector = null;
47592
+ object.lookAt = null;
47593
+ object.up = null;
47594
+ object.fovHeight = 0;
47595
+ }
47596
+ if (message.viewVector != null && message.hasOwnProperty("viewVector"))
47597
+ object.viewVector = $root.vertexvis.protobuf.core.Vector3f.toObject(message.viewVector, options);
47598
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47599
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47600
+ if (message.up != null && message.hasOwnProperty("up"))
47601
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47602
+ if (message.fovHeight != null && message.hasOwnProperty("fovHeight"))
47603
+ object.fovHeight = options.json && !isFinite(message.fovHeight) ? String(message.fovHeight) : message.fovHeight;
47604
+ return object;
47605
+ };
47606
+
47607
+ /**
47608
+ * Converts this OrthographicCamera to JSON.
47609
+ * @function toJSON
47610
+ * @memberof vertexvis.protobuf.core.OrthographicCamera
47611
+ * @instance
47612
+ * @returns {Object.<string,*>} JSON object
47613
+ */
47614
+ OrthographicCamera.prototype.toJSON = function toJSON() {
47615
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47616
+ };
47617
+
47618
+ return OrthographicCamera;
47619
+ })();
47620
+
47621
+ core.Camera = (function() {
47622
+
47623
+ /**
47624
+ * Properties of a Camera.
47625
+ * @memberof vertexvis.protobuf.core
47626
+ * @interface ICamera
47627
+ * @property {vertexvis.protobuf.core.IVector3f|null} [position] Camera position
47628
+ * @property {vertexvis.protobuf.core.IVector3f|null} [lookAt] Camera lookAt
47629
+ * @property {vertexvis.protobuf.core.IVector3f|null} [up] Camera up
47630
+ * @property {vertexvis.protobuf.core.IPerspectiveCamera|null} [perspective] Camera perspective
47631
+ * @property {vertexvis.protobuf.core.IOrthographicCamera|null} [orthographic] Camera orthographic
47632
+ */
47633
+
47634
+ /**
47635
+ * Constructs a new Camera.
47636
+ * @memberof vertexvis.protobuf.core
47637
+ * @classdesc Represents a Camera.
47638
+ * @implements ICamera
47639
+ * @constructor
47640
+ * @param {vertexvis.protobuf.core.ICamera=} [properties] Properties to set
47641
+ */
47642
+ function Camera(properties) {
47643
+ if (properties)
47644
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47645
+ if (properties[keys[i]] != null)
47646
+ this[keys[i]] = properties[keys[i]];
47647
+ }
47648
+
47649
+ /**
47650
+ * Camera position.
47651
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} position
47652
+ * @memberof vertexvis.protobuf.core.Camera
47653
+ * @instance
47654
+ */
47655
+ Camera.prototype.position = null;
47656
+
47657
+ /**
47658
+ * Camera lookAt.
47659
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} lookAt
47660
+ * @memberof vertexvis.protobuf.core.Camera
47661
+ * @instance
47662
+ */
47663
+ Camera.prototype.lookAt = null;
47664
+
47665
+ /**
47666
+ * Camera up.
47667
+ * @member {vertexvis.protobuf.core.IVector3f|null|undefined} up
47668
+ * @memberof vertexvis.protobuf.core.Camera
47669
+ * @instance
47670
+ */
47671
+ Camera.prototype.up = null;
47672
+
47673
+ /**
47674
+ * Camera perspective.
47675
+ * @member {vertexvis.protobuf.core.IPerspectiveCamera|null|undefined} perspective
47676
+ * @memberof vertexvis.protobuf.core.Camera
47677
+ * @instance
47678
+ */
47679
+ Camera.prototype.perspective = null;
47680
+
47681
+ /**
47682
+ * Camera orthographic.
47683
+ * @member {vertexvis.protobuf.core.IOrthographicCamera|null|undefined} orthographic
47684
+ * @memberof vertexvis.protobuf.core.Camera
47685
+ * @instance
47686
+ */
47687
+ Camera.prototype.orthographic = null;
47688
+
47689
+ // OneOf field names bound to virtual getters and setters
47690
+ let $oneOfFields;
47691
+
47692
+ /**
47693
+ * Camera type.
47694
+ * @member {"perspective"|"orthographic"|undefined} type
47695
+ * @memberof vertexvis.protobuf.core.Camera
47696
+ * @instance
47697
+ */
47698
+ Object.defineProperty(Camera.prototype, "type", {
47699
+ get: $util.oneOfGetter($oneOfFields = ["perspective", "orthographic"]),
47700
+ set: $util.oneOfSetter($oneOfFields)
47701
+ });
47702
+
47703
+ /**
47704
+ * Creates a new Camera instance using the specified properties.
47705
+ * @function create
47706
+ * @memberof vertexvis.protobuf.core.Camera
47707
+ * @static
47708
+ * @param {vertexvis.protobuf.core.ICamera=} [properties] Properties to set
47709
+ * @returns {vertexvis.protobuf.core.Camera} Camera instance
47710
+ */
47711
+ Camera.create = function create(properties) {
47712
+ return new Camera(properties);
47713
+ };
47714
+
47715
+ /**
47716
+ * Encodes the specified Camera message. Does not implicitly {@link vertexvis.protobuf.core.Camera.verify|verify} messages.
47717
+ * @function encode
47718
+ * @memberof vertexvis.protobuf.core.Camera
47719
+ * @static
47720
+ * @param {vertexvis.protobuf.core.ICamera} message Camera message or plain object to encode
47721
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47722
+ * @returns {$protobuf.Writer} Writer
47723
+ */
47724
+ Camera.encode = function encode(message, writer) {
47725
+ if (!writer)
47726
+ writer = $Writer.create();
47727
+ if (message.position != null && Object.hasOwnProperty.call(message, "position"))
47728
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.position, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
47729
+ if (message.lookAt != null && Object.hasOwnProperty.call(message, "lookAt"))
47730
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.lookAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
47731
+ if (message.up != null && Object.hasOwnProperty.call(message, "up"))
47732
+ $root.vertexvis.protobuf.core.Vector3f.encode(message.up, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
47733
+ if (message.perspective != null && Object.hasOwnProperty.call(message, "perspective"))
47734
+ $root.vertexvis.protobuf.core.PerspectiveCamera.encode(message.perspective, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
47735
+ if (message.orthographic != null && Object.hasOwnProperty.call(message, "orthographic"))
47736
+ $root.vertexvis.protobuf.core.OrthographicCamera.encode(message.orthographic, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
47737
+ return writer;
47738
+ };
47739
+
47740
+ /**
47741
+ * Encodes the specified Camera message, length delimited. Does not implicitly {@link vertexvis.protobuf.core.Camera.verify|verify} messages.
47742
+ * @function encodeDelimited
47743
+ * @memberof vertexvis.protobuf.core.Camera
47744
+ * @static
47745
+ * @param {vertexvis.protobuf.core.ICamera} message Camera message or plain object to encode
47746
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47747
+ * @returns {$protobuf.Writer} Writer
47748
+ */
47749
+ Camera.encodeDelimited = function encodeDelimited(message, writer) {
47750
+ return this.encode(message, writer).ldelim();
47751
+ };
47752
+
47753
+ /**
47754
+ * Decodes a Camera message from the specified reader or buffer.
47755
+ * @function decode
47756
+ * @memberof vertexvis.protobuf.core.Camera
47757
+ * @static
47758
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47759
+ * @param {number} [length] Message length if known beforehand
47760
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47761
+ * @throws {Error} If the payload is not a reader or valid buffer
47762
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47763
+ */
47764
+ Camera.decode = function decode(reader, length) {
47765
+ if (!(reader instanceof $Reader))
47766
+ reader = $Reader.create(reader);
47767
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.core.Camera();
47768
+ while (reader.pos < end) {
47769
+ let tag = reader.uint32();
47770
+ switch (tag >>> 3) {
47771
+ case 1:
47772
+ message.position = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47773
+ break;
47774
+ case 2:
47775
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47776
+ break;
47777
+ case 3:
47778
+ message.up = $root.vertexvis.protobuf.core.Vector3f.decode(reader, reader.uint32());
47779
+ break;
47780
+ case 4:
47781
+ message.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.decode(reader, reader.uint32());
47782
+ break;
47783
+ case 5:
47784
+ message.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.decode(reader, reader.uint32());
47785
+ break;
47786
+ default:
47787
+ reader.skipType(tag & 7);
47788
+ break;
47789
+ }
47790
+ }
47791
+ return message;
47792
+ };
47793
+
47794
+ /**
47795
+ * Decodes a Camera message from the specified reader or buffer, length delimited.
47796
+ * @function decodeDelimited
47797
+ * @memberof vertexvis.protobuf.core.Camera
47798
+ * @static
47799
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47800
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47801
+ * @throws {Error} If the payload is not a reader or valid buffer
47802
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47803
+ */
47804
+ Camera.decodeDelimited = function decodeDelimited(reader) {
47805
+ if (!(reader instanceof $Reader))
47806
+ reader = new $Reader(reader);
47807
+ return this.decode(reader, reader.uint32());
47808
+ };
47809
+
47810
+ /**
47811
+ * Verifies a Camera message.
47812
+ * @function verify
47813
+ * @memberof vertexvis.protobuf.core.Camera
47814
+ * @static
47815
+ * @param {Object.<string,*>} message Plain object to verify
47816
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47817
+ */
47818
+ Camera.verify = function verify(message) {
47819
+ if (typeof message !== "object" || message === null)
47820
+ return "object expected";
47821
+ let properties = {};
47822
+ if (message.position != null && message.hasOwnProperty("position")) {
47823
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.position);
47824
+ if (error)
47825
+ return "position." + error;
47826
+ }
47827
+ if (message.lookAt != null && message.hasOwnProperty("lookAt")) {
47828
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.lookAt);
47829
+ if (error)
47830
+ return "lookAt." + error;
47831
+ }
47832
+ if (message.up != null && message.hasOwnProperty("up")) {
47833
+ let error = $root.vertexvis.protobuf.core.Vector3f.verify(message.up);
47834
+ if (error)
47835
+ return "up." + error;
47836
+ }
47837
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
47838
+ properties.type = 1;
47839
+ {
47840
+ let error = $root.vertexvis.protobuf.core.PerspectiveCamera.verify(message.perspective);
47841
+ if (error)
47842
+ return "perspective." + error;
47843
+ }
47844
+ }
47845
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
47846
+ if (properties.type === 1)
47847
+ return "type: multiple values";
47848
+ properties.type = 1;
47849
+ {
47850
+ let error = $root.vertexvis.protobuf.core.OrthographicCamera.verify(message.orthographic);
47851
+ if (error)
47852
+ return "orthographic." + error;
47853
+ }
47854
+ }
47855
+ return null;
47856
+ };
47857
+
47858
+ /**
47859
+ * Creates a Camera message from a plain object. Also converts values to their respective internal types.
47860
+ * @function fromObject
47861
+ * @memberof vertexvis.protobuf.core.Camera
47862
+ * @static
47863
+ * @param {Object.<string,*>} object Plain object
47864
+ * @returns {vertexvis.protobuf.core.Camera} Camera
47865
+ */
47866
+ Camera.fromObject = function fromObject(object) {
47867
+ if (object instanceof $root.vertexvis.protobuf.core.Camera)
47868
+ return object;
47869
+ let message = new $root.vertexvis.protobuf.core.Camera();
47870
+ if (object.position != null) {
47871
+ if (typeof object.position !== "object")
47872
+ throw TypeError(".vertexvis.protobuf.core.Camera.position: object expected");
47873
+ message.position = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.position);
47874
+ }
47875
+ if (object.lookAt != null) {
47876
+ if (typeof object.lookAt !== "object")
47877
+ throw TypeError(".vertexvis.protobuf.core.Camera.lookAt: object expected");
47878
+ message.lookAt = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.lookAt);
47879
+ }
47880
+ if (object.up != null) {
47881
+ if (typeof object.up !== "object")
47882
+ throw TypeError(".vertexvis.protobuf.core.Camera.up: object expected");
47883
+ message.up = $root.vertexvis.protobuf.core.Vector3f.fromObject(object.up);
47884
+ }
47885
+ if (object.perspective != null) {
47886
+ if (typeof object.perspective !== "object")
47887
+ throw TypeError(".vertexvis.protobuf.core.Camera.perspective: object expected");
47888
+ message.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.fromObject(object.perspective);
47889
+ }
47890
+ if (object.orthographic != null) {
47891
+ if (typeof object.orthographic !== "object")
47892
+ throw TypeError(".vertexvis.protobuf.core.Camera.orthographic: object expected");
47893
+ message.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.fromObject(object.orthographic);
47894
+ }
47895
+ return message;
47896
+ };
47897
+
47898
+ /**
47899
+ * Creates a plain object from a Camera message. Also converts values to other types if specified.
47900
+ * @function toObject
47901
+ * @memberof vertexvis.protobuf.core.Camera
47902
+ * @static
47903
+ * @param {vertexvis.protobuf.core.Camera} message Camera
47904
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47905
+ * @returns {Object.<string,*>} Plain object
47906
+ */
47907
+ Camera.toObject = function toObject(message, options) {
47908
+ if (!options)
47909
+ options = {};
47910
+ let object = {};
47911
+ if (options.defaults) {
47912
+ object.position = null;
47913
+ object.lookAt = null;
47914
+ object.up = null;
47915
+ }
47916
+ if (message.position != null && message.hasOwnProperty("position"))
47917
+ object.position = $root.vertexvis.protobuf.core.Vector3f.toObject(message.position, options);
47918
+ if (message.lookAt != null && message.hasOwnProperty("lookAt"))
47919
+ object.lookAt = $root.vertexvis.protobuf.core.Vector3f.toObject(message.lookAt, options);
47920
+ if (message.up != null && message.hasOwnProperty("up"))
47921
+ object.up = $root.vertexvis.protobuf.core.Vector3f.toObject(message.up, options);
47922
+ if (message.perspective != null && message.hasOwnProperty("perspective")) {
47923
+ object.perspective = $root.vertexvis.protobuf.core.PerspectiveCamera.toObject(message.perspective, options);
47924
+ if (options.oneofs)
47925
+ object.type = "perspective";
47926
+ }
47927
+ if (message.orthographic != null && message.hasOwnProperty("orthographic")) {
47928
+ object.orthographic = $root.vertexvis.protobuf.core.OrthographicCamera.toObject(message.orthographic, options);
47929
+ if (options.oneofs)
47930
+ object.type = "orthographic";
47931
+ }
47932
+ return object;
47933
+ };
47934
+
47935
+ /**
47936
+ * Converts this Camera to JSON.
47937
+ * @function toJSON
47938
+ * @memberof vertexvis.protobuf.core.Camera
47939
+ * @instance
47940
+ * @returns {Object.<string,*>} JSON object
47941
+ */
47942
+ Camera.prototype.toJSON = function toJSON() {
47943
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
47944
+ };
47945
+
47946
+ return Camera;
47947
+ })();
47948
+
46535
47949
  /**
46536
47950
  * SceneElementTypeMask enum.
46537
47951
  * @name vertexvis.protobuf.core.SceneElementTypeMask