• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// automatically generated by the FlatBuffers compiler, do not modify
2
3/**
4 * @const
5 * @namespace
6 */
7var MyGame = MyGame || {};
8
9/**
10 * @const
11 * @namespace
12 */
13MyGame.Example = MyGame.Example || {};
14
15/**
16 * @const
17 * @namespace
18 */
19MyGame.Example2 = MyGame.Example2 || {};
20
21/**
22 * @const
23 * @namespace
24 */
25MyGame.OtherNameSpace = MyGame.OtherNameSpace || {};
26
27/**
28 * @enum
29 */
30MyGame.Example.Color = {
31  Red: 1,
32  Green: 2,
33  Blue: 8
34};
35
36/**
37 * @enum
38 */
39MyGame.Example.Any = {
40  NONE: 0,
41  Monster: 1,
42  TestSimpleTableWithEnum: 2,
43  MyGame_Example2_Monster: 3
44};
45
46/**
47 * @constructor
48 */
49MyGame.Example2.Monster = function() {
50  /**
51   * @type {flatbuffers.ByteBuffer}
52   */
53  this.bb = null;
54
55  /**
56   * @type {number}
57   */
58  this.bb_pos = 0;
59};
60
61/**
62 * @param {number} i
63 * @param {flatbuffers.ByteBuffer} bb
64 * @returns {MyGame.Example2.Monster}
65 */
66MyGame.Example2.Monster.prototype.__init = function(i, bb) {
67  this.bb_pos = i;
68  this.bb = bb;
69  return this;
70};
71
72/**
73 * @param {flatbuffers.ByteBuffer} bb
74 * @param {MyGame.Example2.Monster=} obj
75 * @returns {MyGame.Example2.Monster}
76 */
77MyGame.Example2.Monster.getRootAsMonster = function(bb, obj) {
78  return (obj || new MyGame.Example2.Monster).__init(bb.readInt32(bb.position()) + bb.position(), bb);
79};
80
81/**
82 * @param {flatbuffers.Builder} builder
83 */
84MyGame.Example2.Monster.startMonster = function(builder) {
85  builder.startObject(0);
86};
87
88/**
89 * @param {flatbuffers.Builder} builder
90 * @returns {flatbuffers.Offset}
91 */
92MyGame.Example2.Monster.endMonster = function(builder) {
93  var offset = builder.endObject();
94  return offset;
95};
96
97/**
98 * @constructor
99 */
100MyGame.Example.Test = function() {
101  /**
102   * @type {flatbuffers.ByteBuffer}
103   */
104  this.bb = null;
105
106  /**
107   * @type {number}
108   */
109  this.bb_pos = 0;
110};
111
112/**
113 * @param {number} i
114 * @param {flatbuffers.ByteBuffer} bb
115 * @returns {MyGame.Example.Test}
116 */
117MyGame.Example.Test.prototype.__init = function(i, bb) {
118  this.bb_pos = i;
119  this.bb = bb;
120  return this;
121};
122
123/**
124 * @returns {number}
125 */
126MyGame.Example.Test.prototype.a = function() {
127  return this.bb.readInt16(this.bb_pos);
128};
129
130/**
131 * @param {number} value
132 * @returns {boolean}
133 */
134MyGame.Example.Test.prototype.mutate_a = function(value) {
135  var offset = this.bb.__offset(this.bb_pos, 0);
136
137  if (offset === 0) {
138    return false;
139  }
140
141  this.bb.writeInt16(this.bb_pos + offset, value);
142  return true;
143};
144
145/**
146 * @returns {number}
147 */
148MyGame.Example.Test.prototype.b = function() {
149  return this.bb.readInt8(this.bb_pos + 2);
150};
151
152/**
153 * @param {number} value
154 * @returns {boolean}
155 */
156MyGame.Example.Test.prototype.mutate_b = function(value) {
157  var offset = this.bb.__offset(this.bb_pos, 2);
158
159  if (offset === 0) {
160    return false;
161  }
162
163  this.bb.writeInt8(this.bb_pos + offset, value);
164  return true;
165};
166
167/**
168 * @param {flatbuffers.Builder} builder
169 * @param {number} a
170 * @param {number} b
171 * @returns {flatbuffers.Offset}
172 */
173MyGame.Example.Test.createTest = function(builder, a, b) {
174  builder.prep(2, 4);
175  builder.pad(1);
176  builder.writeInt8(b);
177  builder.writeInt16(a);
178  return builder.offset();
179};
180
181/**
182 * @constructor
183 */
184MyGame.Example.TestSimpleTableWithEnum = function() {
185  /**
186   * @type {flatbuffers.ByteBuffer}
187   */
188  this.bb = null;
189
190  /**
191   * @type {number}
192   */
193  this.bb_pos = 0;
194};
195
196/**
197 * @param {number} i
198 * @param {flatbuffers.ByteBuffer} bb
199 * @returns {MyGame.Example.TestSimpleTableWithEnum}
200 */
201MyGame.Example.TestSimpleTableWithEnum.prototype.__init = function(i, bb) {
202  this.bb_pos = i;
203  this.bb = bb;
204  return this;
205};
206
207/**
208 * @param {flatbuffers.ByteBuffer} bb
209 * @param {MyGame.Example.TestSimpleTableWithEnum=} obj
210 * @returns {MyGame.Example.TestSimpleTableWithEnum}
211 */
212MyGame.Example.TestSimpleTableWithEnum.getRootAsTestSimpleTableWithEnum = function(bb, obj) {
213  return (obj || new MyGame.Example.TestSimpleTableWithEnum).__init(bb.readInt32(bb.position()) + bb.position(), bb);
214};
215
216/**
217 * @returns {MyGame.Example.Color}
218 */
219MyGame.Example.TestSimpleTableWithEnum.prototype.color = function() {
220  var offset = this.bb.__offset(this.bb_pos, 4);
221  return offset ? /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + offset)) : MyGame.Example.Color.Green;
222};
223
224/**
225 * @param {MyGame.Example.Color} value
226 * @returns {boolean}
227 */
228MyGame.Example.TestSimpleTableWithEnum.prototype.mutate_color = function(value) {
229  var offset = this.bb.__offset(this.bb_pos, 4);
230
231  if (offset === 0) {
232    return false;
233  }
234
235  this.bb.writeInt8(this.bb_pos + offset, value);
236  return true;
237};
238
239/**
240 * @param {flatbuffers.Builder} builder
241 */
242MyGame.Example.TestSimpleTableWithEnum.startTestSimpleTableWithEnum = function(builder) {
243  builder.startObject(1);
244};
245
246/**
247 * @param {flatbuffers.Builder} builder
248 * @param {MyGame.Example.Color} color
249 */
250MyGame.Example.TestSimpleTableWithEnum.addColor = function(builder, color) {
251  builder.addFieldInt8(0, color, MyGame.Example.Color.Green);
252};
253
254/**
255 * @param {flatbuffers.Builder} builder
256 * @returns {flatbuffers.Offset}
257 */
258MyGame.Example.TestSimpleTableWithEnum.endTestSimpleTableWithEnum = function(builder) {
259  var offset = builder.endObject();
260  return offset;
261};
262
263/**
264 * @constructor
265 */
266MyGame.Example.Vec3 = function() {
267  /**
268   * @type {flatbuffers.ByteBuffer}
269   */
270  this.bb = null;
271
272  /**
273   * @type {number}
274   */
275  this.bb_pos = 0;
276};
277
278/**
279 * @param {number} i
280 * @param {flatbuffers.ByteBuffer} bb
281 * @returns {MyGame.Example.Vec3}
282 */
283MyGame.Example.Vec3.prototype.__init = function(i, bb) {
284  this.bb_pos = i;
285  this.bb = bb;
286  return this;
287};
288
289/**
290 * @returns {number}
291 */
292MyGame.Example.Vec3.prototype.x = function() {
293  return this.bb.readFloat32(this.bb_pos);
294};
295
296/**
297 * @param {number} value
298 * @returns {boolean}
299 */
300MyGame.Example.Vec3.prototype.mutate_x = function(value) {
301  var offset = this.bb.__offset(this.bb_pos, 0);
302
303  if (offset === 0) {
304    return false;
305  }
306
307  this.bb.writeFloat32(this.bb_pos + offset, value);
308  return true;
309};
310
311/**
312 * @returns {number}
313 */
314MyGame.Example.Vec3.prototype.y = function() {
315  return this.bb.readFloat32(this.bb_pos + 4);
316};
317
318/**
319 * @param {number} value
320 * @returns {boolean}
321 */
322MyGame.Example.Vec3.prototype.mutate_y = function(value) {
323  var offset = this.bb.__offset(this.bb_pos, 4);
324
325  if (offset === 0) {
326    return false;
327  }
328
329  this.bb.writeFloat32(this.bb_pos + offset, value);
330  return true;
331};
332
333/**
334 * @returns {number}
335 */
336MyGame.Example.Vec3.prototype.z = function() {
337  return this.bb.readFloat32(this.bb_pos + 8);
338};
339
340/**
341 * @param {number} value
342 * @returns {boolean}
343 */
344MyGame.Example.Vec3.prototype.mutate_z = function(value) {
345  var offset = this.bb.__offset(this.bb_pos, 8);
346
347  if (offset === 0) {
348    return false;
349  }
350
351  this.bb.writeFloat32(this.bb_pos + offset, value);
352  return true;
353};
354
355/**
356 * @returns {number}
357 */
358MyGame.Example.Vec3.prototype.test1 = function() {
359  return this.bb.readFloat64(this.bb_pos + 16);
360};
361
362/**
363 * @param {number} value
364 * @returns {boolean}
365 */
366MyGame.Example.Vec3.prototype.mutate_test1 = function(value) {
367  var offset = this.bb.__offset(this.bb_pos, 16);
368
369  if (offset === 0) {
370    return false;
371  }
372
373  this.bb.writeFloat64(this.bb_pos + offset, value);
374  return true;
375};
376
377/**
378 * @returns {MyGame.Example.Color}
379 */
380MyGame.Example.Vec3.prototype.test2 = function() {
381  return /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + 24));
382};
383
384/**
385 * @param {MyGame.Example.Color} value
386 * @returns {boolean}
387 */
388MyGame.Example.Vec3.prototype.mutate_test2 = function(value) {
389  var offset = this.bb.__offset(this.bb_pos, 24);
390
391  if (offset === 0) {
392    return false;
393  }
394
395  this.bb.writeInt8(this.bb_pos + offset, value);
396  return true;
397};
398
399/**
400 * @param {MyGame.Example.Test=} obj
401 * @returns {MyGame.Example.Test}
402 */
403MyGame.Example.Vec3.prototype.test3 = function(obj) {
404  return (obj || new MyGame.Example.Test).__init(this.bb_pos + 26, this.bb);
405};
406
407/**
408 * @param {flatbuffers.Builder} builder
409 * @param {number} x
410 * @param {number} y
411 * @param {number} z
412 * @param {number} test1
413 * @param {MyGame.Example.Color} test2
414 * @param {number} test3_a
415 * @param {number} test3_b
416 * @returns {flatbuffers.Offset}
417 */
418MyGame.Example.Vec3.createVec3 = function(builder, x, y, z, test1, test2, test3_a, test3_b) {
419  builder.prep(16, 32);
420  builder.pad(2);
421  builder.prep(2, 4);
422  builder.pad(1);
423  builder.writeInt8(test3_b);
424  builder.writeInt16(test3_a);
425  builder.pad(1);
426  builder.writeInt8(test2);
427  builder.writeFloat64(test1);
428  builder.pad(4);
429  builder.writeFloat32(z);
430  builder.writeFloat32(y);
431  builder.writeFloat32(x);
432  return builder.offset();
433};
434
435/**
436 * @constructor
437 */
438MyGame.Example.Stat = function() {
439  /**
440   * @type {flatbuffers.ByteBuffer}
441   */
442  this.bb = null;
443
444  /**
445   * @type {number}
446   */
447  this.bb_pos = 0;
448};
449
450/**
451 * @param {number} i
452 * @param {flatbuffers.ByteBuffer} bb
453 * @returns {MyGame.Example.Stat}
454 */
455MyGame.Example.Stat.prototype.__init = function(i, bb) {
456  this.bb_pos = i;
457  this.bb = bb;
458  return this;
459};
460
461/**
462 * @param {flatbuffers.ByteBuffer} bb
463 * @param {MyGame.Example.Stat=} obj
464 * @returns {MyGame.Example.Stat}
465 */
466MyGame.Example.Stat.getRootAsStat = function(bb, obj) {
467  return (obj || new MyGame.Example.Stat).__init(bb.readInt32(bb.position()) + bb.position(), bb);
468};
469
470/**
471 * @param {flatbuffers.Encoding=} optionalEncoding
472 * @returns {string|Uint8Array}
473 */
474MyGame.Example.Stat.prototype.id = function(optionalEncoding) {
475  var offset = this.bb.__offset(this.bb_pos, 4);
476  return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
477};
478
479/**
480 * @returns {flatbuffers.Long}
481 */
482MyGame.Example.Stat.prototype.val = function() {
483  var offset = this.bb.__offset(this.bb_pos, 6);
484  return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
485};
486
487/**
488 * @param {flatbuffers.Long} value
489 * @returns {boolean}
490 */
491MyGame.Example.Stat.prototype.mutate_val = function(value) {
492  var offset = this.bb.__offset(this.bb_pos, 6);
493
494  if (offset === 0) {
495    return false;
496  }
497
498  this.bb.writeInt64(this.bb_pos + offset, value);
499  return true;
500};
501
502/**
503 * @returns {number}
504 */
505MyGame.Example.Stat.prototype.count = function() {
506  var offset = this.bb.__offset(this.bb_pos, 8);
507  return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
508};
509
510/**
511 * @param {number} value
512 * @returns {boolean}
513 */
514MyGame.Example.Stat.prototype.mutate_count = function(value) {
515  var offset = this.bb.__offset(this.bb_pos, 8);
516
517  if (offset === 0) {
518    return false;
519  }
520
521  this.bb.writeUint16(this.bb_pos + offset, value);
522  return true;
523};
524
525/**
526 * @param {flatbuffers.Builder} builder
527 */
528MyGame.Example.Stat.startStat = function(builder) {
529  builder.startObject(3);
530};
531
532/**
533 * @param {flatbuffers.Builder} builder
534 * @param {flatbuffers.Offset} idOffset
535 */
536MyGame.Example.Stat.addId = function(builder, idOffset) {
537  builder.addFieldOffset(0, idOffset, 0);
538};
539
540/**
541 * @param {flatbuffers.Builder} builder
542 * @param {flatbuffers.Long} val
543 */
544MyGame.Example.Stat.addVal = function(builder, val) {
545  builder.addFieldInt64(1, val, builder.createLong(0, 0));
546};
547
548/**
549 * @param {flatbuffers.Builder} builder
550 * @param {number} count
551 */
552MyGame.Example.Stat.addCount = function(builder, count) {
553  builder.addFieldInt16(2, count, 0);
554};
555
556/**
557 * @param {flatbuffers.Builder} builder
558 * @returns {flatbuffers.Offset}
559 */
560MyGame.Example.Stat.endStat = function(builder) {
561  var offset = builder.endObject();
562  return offset;
563};
564
565/**
566 * an example documentation comment: monster object
567 *
568 * @constructor
569 */
570MyGame.Example.Monster = function() {
571  /**
572   * @type {flatbuffers.ByteBuffer}
573   */
574  this.bb = null;
575
576  /**
577   * @type {number}
578   */
579  this.bb_pos = 0;
580};
581
582/**
583 * @param {number} i
584 * @param {flatbuffers.ByteBuffer} bb
585 * @returns {MyGame.Example.Monster}
586 */
587MyGame.Example.Monster.prototype.__init = function(i, bb) {
588  this.bb_pos = i;
589  this.bb = bb;
590  return this;
591};
592
593/**
594 * @param {flatbuffers.ByteBuffer} bb
595 * @param {MyGame.Example.Monster=} obj
596 * @returns {MyGame.Example.Monster}
597 */
598MyGame.Example.Monster.getRootAsMonster = function(bb, obj) {
599  return (obj || new MyGame.Example.Monster).__init(bb.readInt32(bb.position()) + bb.position(), bb);
600};
601
602/**
603 * @param {flatbuffers.ByteBuffer} bb
604 * @returns {boolean}
605 */
606MyGame.Example.Monster.bufferHasIdentifier = function(bb) {
607  return bb.__has_identifier('MONS');
608};
609
610/**
611 * @param {MyGame.Example.Vec3=} obj
612 * @returns {MyGame.Example.Vec3}
613 */
614MyGame.Example.Monster.prototype.pos = function(obj) {
615  var offset = this.bb.__offset(this.bb_pos, 4);
616  return offset ? (obj || new MyGame.Example.Vec3).__init(this.bb_pos + offset, this.bb) : null;
617};
618
619/**
620 * @returns {number}
621 */
622MyGame.Example.Monster.prototype.mana = function() {
623  var offset = this.bb.__offset(this.bb_pos, 6);
624  return offset ? this.bb.readInt16(this.bb_pos + offset) : 150;
625};
626
627/**
628 * @param {number} value
629 * @returns {boolean}
630 */
631MyGame.Example.Monster.prototype.mutate_mana = function(value) {
632  var offset = this.bb.__offset(this.bb_pos, 6);
633
634  if (offset === 0) {
635    return false;
636  }
637
638  this.bb.writeInt16(this.bb_pos + offset, value);
639  return true;
640};
641
642/**
643 * @returns {number}
644 */
645MyGame.Example.Monster.prototype.hp = function() {
646  var offset = this.bb.__offset(this.bb_pos, 8);
647  return offset ? this.bb.readInt16(this.bb_pos + offset) : 100;
648};
649
650/**
651 * @param {number} value
652 * @returns {boolean}
653 */
654MyGame.Example.Monster.prototype.mutate_hp = function(value) {
655  var offset = this.bb.__offset(this.bb_pos, 8);
656
657  if (offset === 0) {
658    return false;
659  }
660
661  this.bb.writeInt16(this.bb_pos + offset, value);
662  return true;
663};
664
665/**
666 * @param {flatbuffers.Encoding=} optionalEncoding
667 * @returns {string|Uint8Array}
668 */
669MyGame.Example.Monster.prototype.name = function(optionalEncoding) {
670  var offset = this.bb.__offset(this.bb_pos, 10);
671  return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
672};
673
674/**
675 * @param {number} index
676 * @returns {number}
677 */
678MyGame.Example.Monster.prototype.inventory = function(index) {
679  var offset = this.bb.__offset(this.bb_pos, 14);
680  return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
681};
682
683/**
684 * @returns {number}
685 */
686MyGame.Example.Monster.prototype.inventoryLength = function() {
687  var offset = this.bb.__offset(this.bb_pos, 14);
688  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
689};
690
691/**
692 * @returns {Uint8Array}
693 */
694MyGame.Example.Monster.prototype.inventoryArray = function() {
695  var offset = this.bb.__offset(this.bb_pos, 14);
696  return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
697};
698
699/**
700 * @returns {MyGame.Example.Color}
701 */
702MyGame.Example.Monster.prototype.color = function() {
703  var offset = this.bb.__offset(this.bb_pos, 16);
704  return offset ? /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + offset)) : MyGame.Example.Color.Blue;
705};
706
707/**
708 * @param {MyGame.Example.Color} value
709 * @returns {boolean}
710 */
711MyGame.Example.Monster.prototype.mutate_color = function(value) {
712  var offset = this.bb.__offset(this.bb_pos, 16);
713
714  if (offset === 0) {
715    return false;
716  }
717
718  this.bb.writeInt8(this.bb_pos + offset, value);
719  return true;
720};
721
722/**
723 * @returns {MyGame.Example.Any}
724 */
725MyGame.Example.Monster.prototype.testType = function() {
726  var offset = this.bb.__offset(this.bb_pos, 18);
727  return offset ? /** @type {MyGame.Example.Any} */ (this.bb.readUint8(this.bb_pos + offset)) : MyGame.Example.Any.NONE;
728};
729
730/**
731 * @param {MyGame.Example.Any} value
732 * @returns {boolean}
733 */
734MyGame.Example.Monster.prototype.mutate_test_type = function(value) {
735  var offset = this.bb.__offset(this.bb_pos, 18);
736
737  if (offset === 0) {
738    return false;
739  }
740
741  this.bb.writeUint8(this.bb_pos + offset, value);
742  return true;
743};
744
745/**
746 * @param {flatbuffers.Table} obj
747 * @returns {?flatbuffers.Table}
748 */
749MyGame.Example.Monster.prototype.test = function(obj) {
750  var offset = this.bb.__offset(this.bb_pos, 20);
751  return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
752};
753
754/**
755 * @param {number} index
756 * @param {MyGame.Example.Test=} obj
757 * @returns {MyGame.Example.Test}
758 */
759MyGame.Example.Monster.prototype.test4 = function(index, obj) {
760  var offset = this.bb.__offset(this.bb_pos, 22);
761  return offset ? (obj || new MyGame.Example.Test).__init(this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) : null;
762};
763
764/**
765 * @returns {number}
766 */
767MyGame.Example.Monster.prototype.test4Length = function() {
768  var offset = this.bb.__offset(this.bb_pos, 22);
769  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
770};
771
772/**
773 * @param {number} index
774 * @param {flatbuffers.Encoding=} optionalEncoding
775 * @returns {string|Uint8Array}
776 */
777MyGame.Example.Monster.prototype.testarrayofstring = function(index, optionalEncoding) {
778  var offset = this.bb.__offset(this.bb_pos, 24);
779  return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
780};
781
782/**
783 * @returns {number}
784 */
785MyGame.Example.Monster.prototype.testarrayofstringLength = function() {
786  var offset = this.bb.__offset(this.bb_pos, 24);
787  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
788};
789
790/**
791 * an example documentation comment: this will end up in the generated code
792 * multiline too
793 *
794 * @param {number} index
795 * @param {MyGame.Example.Monster=} obj
796 * @returns {MyGame.Example.Monster}
797 */
798MyGame.Example.Monster.prototype.testarrayoftables = function(index, obj) {
799  var offset = this.bb.__offset(this.bb_pos, 26);
800  return offset ? (obj || new MyGame.Example.Monster).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
801};
802
803/**
804 * @returns {number}
805 */
806MyGame.Example.Monster.prototype.testarrayoftablesLength = function() {
807  var offset = this.bb.__offset(this.bb_pos, 26);
808  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
809};
810
811/**
812 * @param {MyGame.Example.Monster=} obj
813 * @returns {MyGame.Example.Monster}
814 */
815MyGame.Example.Monster.prototype.enemy = function(obj) {
816  var offset = this.bb.__offset(this.bb_pos, 28);
817  return offset ? (obj || new MyGame.Example.Monster).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
818};
819
820/**
821 * @param {number} index
822 * @returns {number}
823 */
824MyGame.Example.Monster.prototype.testnestedflatbuffer = function(index) {
825  var offset = this.bb.__offset(this.bb_pos, 30);
826  return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
827};
828
829/**
830 * @returns {number}
831 */
832MyGame.Example.Monster.prototype.testnestedflatbufferLength = function() {
833  var offset = this.bb.__offset(this.bb_pos, 30);
834  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
835};
836
837/**
838 * @returns {Uint8Array}
839 */
840MyGame.Example.Monster.prototype.testnestedflatbufferArray = function() {
841  var offset = this.bb.__offset(this.bb_pos, 30);
842  return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
843};
844
845/**
846 * @param {MyGame.Example.Stat=} obj
847 * @returns {MyGame.Example.Stat}
848 */
849MyGame.Example.Monster.prototype.testempty = function(obj) {
850  var offset = this.bb.__offset(this.bb_pos, 32);
851  return offset ? (obj || new MyGame.Example.Stat).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
852};
853
854/**
855 * @returns {boolean}
856 */
857MyGame.Example.Monster.prototype.testbool = function() {
858  var offset = this.bb.__offset(this.bb_pos, 34);
859  return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
860};
861
862/**
863 * @param {boolean} value
864 * @returns {boolean}
865 */
866MyGame.Example.Monster.prototype.mutate_testbool = function(value) {
867  var offset = this.bb.__offset(this.bb_pos, 34);
868
869  if (offset === 0) {
870    return false;
871  }
872
873  this.bb.writeInt8(this.bb_pos + offset, value);
874  return true;
875};
876
877/**
878 * @returns {number}
879 */
880MyGame.Example.Monster.prototype.testhashs32Fnv1 = function() {
881  var offset = this.bb.__offset(this.bb_pos, 36);
882  return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
883};
884
885/**
886 * @param {number} value
887 * @returns {boolean}
888 */
889MyGame.Example.Monster.prototype.mutate_testhashs32_fnv1 = function(value) {
890  var offset = this.bb.__offset(this.bb_pos, 36);
891
892  if (offset === 0) {
893    return false;
894  }
895
896  this.bb.writeInt32(this.bb_pos + offset, value);
897  return true;
898};
899
900/**
901 * @returns {number}
902 */
903MyGame.Example.Monster.prototype.testhashu32Fnv1 = function() {
904  var offset = this.bb.__offset(this.bb_pos, 38);
905  return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
906};
907
908/**
909 * @param {number} value
910 * @returns {boolean}
911 */
912MyGame.Example.Monster.prototype.mutate_testhashu32_fnv1 = function(value) {
913  var offset = this.bb.__offset(this.bb_pos, 38);
914
915  if (offset === 0) {
916    return false;
917  }
918
919  this.bb.writeUint32(this.bb_pos + offset, value);
920  return true;
921};
922
923/**
924 * @returns {flatbuffers.Long}
925 */
926MyGame.Example.Monster.prototype.testhashs64Fnv1 = function() {
927  var offset = this.bb.__offset(this.bb_pos, 40);
928  return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
929};
930
931/**
932 * @param {flatbuffers.Long} value
933 * @returns {boolean}
934 */
935MyGame.Example.Monster.prototype.mutate_testhashs64_fnv1 = function(value) {
936  var offset = this.bb.__offset(this.bb_pos, 40);
937
938  if (offset === 0) {
939    return false;
940  }
941
942  this.bb.writeInt64(this.bb_pos + offset, value);
943  return true;
944};
945
946/**
947 * @returns {flatbuffers.Long}
948 */
949MyGame.Example.Monster.prototype.testhashu64Fnv1 = function() {
950  var offset = this.bb.__offset(this.bb_pos, 42);
951  return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(0, 0);
952};
953
954/**
955 * @param {flatbuffers.Long} value
956 * @returns {boolean}
957 */
958MyGame.Example.Monster.prototype.mutate_testhashu64_fnv1 = function(value) {
959  var offset = this.bb.__offset(this.bb_pos, 42);
960
961  if (offset === 0) {
962    return false;
963  }
964
965  this.bb.writeUint64(this.bb_pos + offset, value);
966  return true;
967};
968
969/**
970 * @returns {number}
971 */
972MyGame.Example.Monster.prototype.testhashs32Fnv1a = function() {
973  var offset = this.bb.__offset(this.bb_pos, 44);
974  return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
975};
976
977/**
978 * @param {number} value
979 * @returns {boolean}
980 */
981MyGame.Example.Monster.prototype.mutate_testhashs32_fnv1a = function(value) {
982  var offset = this.bb.__offset(this.bb_pos, 44);
983
984  if (offset === 0) {
985    return false;
986  }
987
988  this.bb.writeInt32(this.bb_pos + offset, value);
989  return true;
990};
991
992/**
993 * @returns {number}
994 */
995MyGame.Example.Monster.prototype.testhashu32Fnv1a = function() {
996  var offset = this.bb.__offset(this.bb_pos, 46);
997  return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
998};
999
1000/**
1001 * @param {number} value
1002 * @returns {boolean}
1003 */
1004MyGame.Example.Monster.prototype.mutate_testhashu32_fnv1a = function(value) {
1005  var offset = this.bb.__offset(this.bb_pos, 46);
1006
1007  if (offset === 0) {
1008    return false;
1009  }
1010
1011  this.bb.writeUint32(this.bb_pos + offset, value);
1012  return true;
1013};
1014
1015/**
1016 * @returns {flatbuffers.Long}
1017 */
1018MyGame.Example.Monster.prototype.testhashs64Fnv1a = function() {
1019  var offset = this.bb.__offset(this.bb_pos, 48);
1020  return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
1021};
1022
1023/**
1024 * @param {flatbuffers.Long} value
1025 * @returns {boolean}
1026 */
1027MyGame.Example.Monster.prototype.mutate_testhashs64_fnv1a = function(value) {
1028  var offset = this.bb.__offset(this.bb_pos, 48);
1029
1030  if (offset === 0) {
1031    return false;
1032  }
1033
1034  this.bb.writeInt64(this.bb_pos + offset, value);
1035  return true;
1036};
1037
1038/**
1039 * @returns {flatbuffers.Long}
1040 */
1041MyGame.Example.Monster.prototype.testhashu64Fnv1a = function() {
1042  var offset = this.bb.__offset(this.bb_pos, 50);
1043  return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(0, 0);
1044};
1045
1046/**
1047 * @param {flatbuffers.Long} value
1048 * @returns {boolean}
1049 */
1050MyGame.Example.Monster.prototype.mutate_testhashu64_fnv1a = function(value) {
1051  var offset = this.bb.__offset(this.bb_pos, 50);
1052
1053  if (offset === 0) {
1054    return false;
1055  }
1056
1057  this.bb.writeUint64(this.bb_pos + offset, value);
1058  return true;
1059};
1060
1061/**
1062 * @param {number} index
1063 * @returns {boolean}
1064 */
1065MyGame.Example.Monster.prototype.testarrayofbools = function(index) {
1066  var offset = this.bb.__offset(this.bb_pos, 52);
1067  return offset ? !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : false;
1068};
1069
1070/**
1071 * @returns {number}
1072 */
1073MyGame.Example.Monster.prototype.testarrayofboolsLength = function() {
1074  var offset = this.bb.__offset(this.bb_pos, 52);
1075  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
1076};
1077
1078/**
1079 * @returns {Int8Array}
1080 */
1081MyGame.Example.Monster.prototype.testarrayofboolsArray = function() {
1082  var offset = this.bb.__offset(this.bb_pos, 52);
1083  return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
1084};
1085
1086/**
1087 * @returns {number}
1088 */
1089MyGame.Example.Monster.prototype.testf = function() {
1090  var offset = this.bb.__offset(this.bb_pos, 54);
1091  return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.14159;
1092};
1093
1094/**
1095 * @param {number} value
1096 * @returns {boolean}
1097 */
1098MyGame.Example.Monster.prototype.mutate_testf = function(value) {
1099  var offset = this.bb.__offset(this.bb_pos, 54);
1100
1101  if (offset === 0) {
1102    return false;
1103  }
1104
1105  this.bb.writeFloat32(this.bb_pos + offset, value);
1106  return true;
1107};
1108
1109/**
1110 * @returns {number}
1111 */
1112MyGame.Example.Monster.prototype.testf2 = function() {
1113  var offset = this.bb.__offset(this.bb_pos, 56);
1114  return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.0;
1115};
1116
1117/**
1118 * @param {number} value
1119 * @returns {boolean}
1120 */
1121MyGame.Example.Monster.prototype.mutate_testf2 = function(value) {
1122  var offset = this.bb.__offset(this.bb_pos, 56);
1123
1124  if (offset === 0) {
1125    return false;
1126  }
1127
1128  this.bb.writeFloat32(this.bb_pos + offset, value);
1129  return true;
1130};
1131
1132/**
1133 * @returns {number}
1134 */
1135MyGame.Example.Monster.prototype.testf3 = function() {
1136  var offset = this.bb.__offset(this.bb_pos, 58);
1137  return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
1138};
1139
1140/**
1141 * @param {number} value
1142 * @returns {boolean}
1143 */
1144MyGame.Example.Monster.prototype.mutate_testf3 = function(value) {
1145  var offset = this.bb.__offset(this.bb_pos, 58);
1146
1147  if (offset === 0) {
1148    return false;
1149  }
1150
1151  this.bb.writeFloat32(this.bb_pos + offset, value);
1152  return true;
1153};
1154
1155/**
1156 * @param {number} index
1157 * @param {flatbuffers.Encoding=} optionalEncoding
1158 * @returns {string|Uint8Array}
1159 */
1160MyGame.Example.Monster.prototype.testarrayofstring2 = function(index, optionalEncoding) {
1161  var offset = this.bb.__offset(this.bb_pos, 60);
1162  return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
1163};
1164
1165/**
1166 * @returns {number}
1167 */
1168MyGame.Example.Monster.prototype.testarrayofstring2Length = function() {
1169  var offset = this.bb.__offset(this.bb_pos, 60);
1170  return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
1171};
1172
1173/**
1174 * @param {flatbuffers.Builder} builder
1175 */
1176MyGame.Example.Monster.startMonster = function(builder) {
1177  builder.startObject(29);
1178};
1179
1180/**
1181 * @param {flatbuffers.Builder} builder
1182 * @param {flatbuffers.Offset} posOffset
1183 */
1184MyGame.Example.Monster.addPos = function(builder, posOffset) {
1185  builder.addFieldStruct(0, posOffset, 0);
1186};
1187
1188/**
1189 * @param {flatbuffers.Builder} builder
1190 * @param {number} mana
1191 */
1192MyGame.Example.Monster.addMana = function(builder, mana) {
1193  builder.addFieldInt16(1, mana, 150);
1194};
1195
1196/**
1197 * @param {flatbuffers.Builder} builder
1198 * @param {number} hp
1199 */
1200MyGame.Example.Monster.addHp = function(builder, hp) {
1201  builder.addFieldInt16(2, hp, 100);
1202};
1203
1204/**
1205 * @param {flatbuffers.Builder} builder
1206 * @param {flatbuffers.Offset} nameOffset
1207 */
1208MyGame.Example.Monster.addName = function(builder, nameOffset) {
1209  builder.addFieldOffset(3, nameOffset, 0);
1210};
1211
1212/**
1213 * @param {flatbuffers.Builder} builder
1214 * @param {flatbuffers.Offset} inventoryOffset
1215 */
1216MyGame.Example.Monster.addInventory = function(builder, inventoryOffset) {
1217  builder.addFieldOffset(5, inventoryOffset, 0);
1218};
1219
1220/**
1221 * @param {flatbuffers.Builder} builder
1222 * @param {Array.<number>} data
1223 * @returns {flatbuffers.Offset}
1224 */
1225MyGame.Example.Monster.createInventoryVector = function(builder, data) {
1226  builder.startVector(1, data.length, 1);
1227  for (var i = data.length - 1; i >= 0; i--) {
1228    builder.addInt8(data[i]);
1229  }
1230  return builder.endVector();
1231};
1232
1233/**
1234 * @param {flatbuffers.Builder} builder
1235 * @param {number} numElems
1236 */
1237MyGame.Example.Monster.startInventoryVector = function(builder, numElems) {
1238  builder.startVector(1, numElems, 1);
1239};
1240
1241/**
1242 * @param {flatbuffers.Builder} builder
1243 * @param {MyGame.Example.Color} color
1244 */
1245MyGame.Example.Monster.addColor = function(builder, color) {
1246  builder.addFieldInt8(6, color, MyGame.Example.Color.Blue);
1247};
1248
1249/**
1250 * @param {flatbuffers.Builder} builder
1251 * @param {MyGame.Example.Any} testType
1252 */
1253MyGame.Example.Monster.addTestType = function(builder, testType) {
1254  builder.addFieldInt8(7, testType, MyGame.Example.Any.NONE);
1255};
1256
1257/**
1258 * @param {flatbuffers.Builder} builder
1259 * @param {flatbuffers.Offset} testOffset
1260 */
1261MyGame.Example.Monster.addTest = function(builder, testOffset) {
1262  builder.addFieldOffset(8, testOffset, 0);
1263};
1264
1265/**
1266 * @param {flatbuffers.Builder} builder
1267 * @param {flatbuffers.Offset} test4Offset
1268 */
1269MyGame.Example.Monster.addTest4 = function(builder, test4Offset) {
1270  builder.addFieldOffset(9, test4Offset, 0);
1271};
1272
1273/**
1274 * @param {flatbuffers.Builder} builder
1275 * @param {number} numElems
1276 */
1277MyGame.Example.Monster.startTest4Vector = function(builder, numElems) {
1278  builder.startVector(4, numElems, 2);
1279};
1280
1281/**
1282 * @param {flatbuffers.Builder} builder
1283 * @param {flatbuffers.Offset} testarrayofstringOffset
1284 */
1285MyGame.Example.Monster.addTestarrayofstring = function(builder, testarrayofstringOffset) {
1286  builder.addFieldOffset(10, testarrayofstringOffset, 0);
1287};
1288
1289/**
1290 * @param {flatbuffers.Builder} builder
1291 * @param {Array.<flatbuffers.Offset>} data
1292 * @returns {flatbuffers.Offset}
1293 */
1294MyGame.Example.Monster.createTestarrayofstringVector = function(builder, data) {
1295  builder.startVector(4, data.length, 4);
1296  for (var i = data.length - 1; i >= 0; i--) {
1297    builder.addOffset(data[i]);
1298  }
1299  return builder.endVector();
1300};
1301
1302/**
1303 * @param {flatbuffers.Builder} builder
1304 * @param {number} numElems
1305 */
1306MyGame.Example.Monster.startTestarrayofstringVector = function(builder, numElems) {
1307  builder.startVector(4, numElems, 4);
1308};
1309
1310/**
1311 * @param {flatbuffers.Builder} builder
1312 * @param {flatbuffers.Offset} testarrayoftablesOffset
1313 */
1314MyGame.Example.Monster.addTestarrayoftables = function(builder, testarrayoftablesOffset) {
1315  builder.addFieldOffset(11, testarrayoftablesOffset, 0);
1316};
1317
1318/**
1319 * @param {flatbuffers.Builder} builder
1320 * @param {Array.<flatbuffers.Offset>} data
1321 * @returns {flatbuffers.Offset}
1322 */
1323MyGame.Example.Monster.createTestarrayoftablesVector = function(builder, data) {
1324  builder.startVector(4, data.length, 4);
1325  for (var i = data.length - 1; i >= 0; i--) {
1326    builder.addOffset(data[i]);
1327  }
1328  return builder.endVector();
1329};
1330
1331/**
1332 * @param {flatbuffers.Builder} builder
1333 * @param {number} numElems
1334 */
1335MyGame.Example.Monster.startTestarrayoftablesVector = function(builder, numElems) {
1336  builder.startVector(4, numElems, 4);
1337};
1338
1339/**
1340 * @param {flatbuffers.Builder} builder
1341 * @param {flatbuffers.Offset} enemyOffset
1342 */
1343MyGame.Example.Monster.addEnemy = function(builder, enemyOffset) {
1344  builder.addFieldOffset(12, enemyOffset, 0);
1345};
1346
1347/**
1348 * @param {flatbuffers.Builder} builder
1349 * @param {flatbuffers.Offset} testnestedflatbufferOffset
1350 */
1351MyGame.Example.Monster.addTestnestedflatbuffer = function(builder, testnestedflatbufferOffset) {
1352  builder.addFieldOffset(13, testnestedflatbufferOffset, 0);
1353};
1354
1355/**
1356 * @param {flatbuffers.Builder} builder
1357 * @param {Array.<number>} data
1358 * @returns {flatbuffers.Offset}
1359 */
1360MyGame.Example.Monster.createTestnestedflatbufferVector = function(builder, data) {
1361  builder.startVector(1, data.length, 1);
1362  for (var i = data.length - 1; i >= 0; i--) {
1363    builder.addInt8(data[i]);
1364  }
1365  return builder.endVector();
1366};
1367
1368/**
1369 * @param {flatbuffers.Builder} builder
1370 * @param {number} numElems
1371 */
1372MyGame.Example.Monster.startTestnestedflatbufferVector = function(builder, numElems) {
1373  builder.startVector(1, numElems, 1);
1374};
1375
1376/**
1377 * @param {flatbuffers.Builder} builder
1378 * @param {flatbuffers.Offset} testemptyOffset
1379 */
1380MyGame.Example.Monster.addTestempty = function(builder, testemptyOffset) {
1381  builder.addFieldOffset(14, testemptyOffset, 0);
1382};
1383
1384/**
1385 * @param {flatbuffers.Builder} builder
1386 * @param {boolean} testbool
1387 */
1388MyGame.Example.Monster.addTestbool = function(builder, testbool) {
1389  builder.addFieldInt8(15, +testbool, +false);
1390};
1391
1392/**
1393 * @param {flatbuffers.Builder} builder
1394 * @param {number} testhashs32Fnv1
1395 */
1396MyGame.Example.Monster.addTesthashs32Fnv1 = function(builder, testhashs32Fnv1) {
1397  builder.addFieldInt32(16, testhashs32Fnv1, 0);
1398};
1399
1400/**
1401 * @param {flatbuffers.Builder} builder
1402 * @param {number} testhashu32Fnv1
1403 */
1404MyGame.Example.Monster.addTesthashu32Fnv1 = function(builder, testhashu32Fnv1) {
1405  builder.addFieldInt32(17, testhashu32Fnv1, 0);
1406};
1407
1408/**
1409 * @param {flatbuffers.Builder} builder
1410 * @param {flatbuffers.Long} testhashs64Fnv1
1411 */
1412MyGame.Example.Monster.addTesthashs64Fnv1 = function(builder, testhashs64Fnv1) {
1413  builder.addFieldInt64(18, testhashs64Fnv1, builder.createLong(0, 0));
1414};
1415
1416/**
1417 * @param {flatbuffers.Builder} builder
1418 * @param {flatbuffers.Long} testhashu64Fnv1
1419 */
1420MyGame.Example.Monster.addTesthashu64Fnv1 = function(builder, testhashu64Fnv1) {
1421  builder.addFieldInt64(19, testhashu64Fnv1, builder.createLong(0, 0));
1422};
1423
1424/**
1425 * @param {flatbuffers.Builder} builder
1426 * @param {number} testhashs32Fnv1a
1427 */
1428MyGame.Example.Monster.addTesthashs32Fnv1a = function(builder, testhashs32Fnv1a) {
1429  builder.addFieldInt32(20, testhashs32Fnv1a, 0);
1430};
1431
1432/**
1433 * @param {flatbuffers.Builder} builder
1434 * @param {number} testhashu32Fnv1a
1435 */
1436MyGame.Example.Monster.addTesthashu32Fnv1a = function(builder, testhashu32Fnv1a) {
1437  builder.addFieldInt32(21, testhashu32Fnv1a, 0);
1438};
1439
1440/**
1441 * @param {flatbuffers.Builder} builder
1442 * @param {flatbuffers.Long} testhashs64Fnv1a
1443 */
1444MyGame.Example.Monster.addTesthashs64Fnv1a = function(builder, testhashs64Fnv1a) {
1445  builder.addFieldInt64(22, testhashs64Fnv1a, builder.createLong(0, 0));
1446};
1447
1448/**
1449 * @param {flatbuffers.Builder} builder
1450 * @param {flatbuffers.Long} testhashu64Fnv1a
1451 */
1452MyGame.Example.Monster.addTesthashu64Fnv1a = function(builder, testhashu64Fnv1a) {
1453  builder.addFieldInt64(23, testhashu64Fnv1a, builder.createLong(0, 0));
1454};
1455
1456/**
1457 * @param {flatbuffers.Builder} builder
1458 * @param {flatbuffers.Offset} testarrayofboolsOffset
1459 */
1460MyGame.Example.Monster.addTestarrayofbools = function(builder, testarrayofboolsOffset) {
1461  builder.addFieldOffset(24, testarrayofboolsOffset, 0);
1462};
1463
1464/**
1465 * @param {flatbuffers.Builder} builder
1466 * @param {Array.<boolean>} data
1467 * @returns {flatbuffers.Offset}
1468 */
1469MyGame.Example.Monster.createTestarrayofboolsVector = function(builder, data) {
1470  builder.startVector(1, data.length, 1);
1471  for (var i = data.length - 1; i >= 0; i--) {
1472    builder.addInt8(+data[i]);
1473  }
1474  return builder.endVector();
1475};
1476
1477/**
1478 * @param {flatbuffers.Builder} builder
1479 * @param {number} numElems
1480 */
1481MyGame.Example.Monster.startTestarrayofboolsVector = function(builder, numElems) {
1482  builder.startVector(1, numElems, 1);
1483};
1484
1485/**
1486 * @param {flatbuffers.Builder} builder
1487 * @param {number} testf
1488 */
1489MyGame.Example.Monster.addTestf = function(builder, testf) {
1490  builder.addFieldFloat32(25, testf, 3.14159);
1491};
1492
1493/**
1494 * @param {flatbuffers.Builder} builder
1495 * @param {number} testf2
1496 */
1497MyGame.Example.Monster.addTestf2 = function(builder, testf2) {
1498  builder.addFieldFloat32(26, testf2, 3.0);
1499};
1500
1501/**
1502 * @param {flatbuffers.Builder} builder
1503 * @param {number} testf3
1504 */
1505MyGame.Example.Monster.addTestf3 = function(builder, testf3) {
1506  builder.addFieldFloat32(27, testf3, 0.0);
1507};
1508
1509/**
1510 * @param {flatbuffers.Builder} builder
1511 * @param {flatbuffers.Offset} testarrayofstring2Offset
1512 */
1513MyGame.Example.Monster.addTestarrayofstring2 = function(builder, testarrayofstring2Offset) {
1514  builder.addFieldOffset(28, testarrayofstring2Offset, 0);
1515};
1516
1517/**
1518 * @param {flatbuffers.Builder} builder
1519 * @param {Array.<flatbuffers.Offset>} data
1520 * @returns {flatbuffers.Offset}
1521 */
1522MyGame.Example.Monster.createTestarrayofstring2Vector = function(builder, data) {
1523  builder.startVector(4, data.length, 4);
1524  for (var i = data.length - 1; i >= 0; i--) {
1525    builder.addOffset(data[i]);
1526  }
1527  return builder.endVector();
1528};
1529
1530/**
1531 * @param {flatbuffers.Builder} builder
1532 * @param {number} numElems
1533 */
1534MyGame.Example.Monster.startTestarrayofstring2Vector = function(builder, numElems) {
1535  builder.startVector(4, numElems, 4);
1536};
1537
1538/**
1539 * @param {flatbuffers.Builder} builder
1540 * @returns {flatbuffers.Offset}
1541 */
1542MyGame.Example.Monster.endMonster = function(builder) {
1543  var offset = builder.endObject();
1544  builder.requiredField(offset, 10); // name
1545  return offset;
1546};
1547
1548/**
1549 * @param {flatbuffers.Builder} builder
1550 * @param {flatbuffers.Offset} offset
1551 */
1552MyGame.Example.Monster.finishMonsterBuffer = function(builder, offset) {
1553  builder.finish(offset, 'MONS');
1554};
1555
1556// Exports for Node.js and RequireJS
1557this.MyGame = MyGame;
1558