UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

37 lines (36 loc) 1.02 kB
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify exports.__esModule = true; exports.Vec3 = void 0; var Vec3 = /** @class */ (function () { function Vec3() { this.bb = null; this.bb_pos = 0; } Vec3.prototype.__init = function (i, bb) { this.bb_pos = i; this.bb = bb; return this; }; Vec3.prototype.x = function () { return this.bb.readFloat32(this.bb_pos); }; Vec3.prototype.y = function () { return this.bb.readFloat32(this.bb_pos + 4); }; Vec3.prototype.z = function () { return this.bb.readFloat32(this.bb_pos + 8); }; Vec3.sizeOf = function () { return 12; }; Vec3.createVec3 = function (builder, x, y, z) { builder.prep(4, 12); builder.writeFloat32(z); builder.writeFloat32(y); builder.writeFloat32(x); return builder.offset(); }; return Vec3; }()); exports.Vec3 = Vec3;