UNPKG

@needle-tools/networking

Version:
33 lines (32 loc) 879 B
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify exports.__esModule = true; exports.Vec2 = void 0; var Vec2 = /** @class */ (function () { function Vec2() { this.bb = null; this.bb_pos = 0; } Vec2.prototype.__init = function (i, bb) { this.bb_pos = i; this.bb = bb; return this; }; Vec2.prototype.x = function () { return this.bb.readFloat32(this.bb_pos); }; Vec2.prototype.y = function () { return this.bb.readFloat32(this.bb_pos + 4); }; Vec2.sizeOf = function () { return 8; }; Vec2.createVec2 = function (builder, x, y) { builder.prep(4, 8); builder.writeFloat32(y); builder.writeFloat32(x); return builder.offset(); }; return Vec2; }()); exports.Vec2 = Vec2;