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.

68 lines 2.53 kB
// automatically generated by the FlatBuffers compiler, do not modify import * as flatbuffers from 'flatbuffers'; import { Vec3 } from './vec3.js'; export class SyncedCameraModel { bb = null; bb_pos = 0; __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsSyncedCameraModel(bb, obj) { return (obj || new SyncedCameraModel()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsSyncedCameraModel(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new SyncedCameraModel()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } userId(optionalEncoding) { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } guid(optionalEncoding) { const offset = this.bb.__offset(this.bb_pos, 6); return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; } dontSave() { const offset = this.bb.__offset(this.bb_pos, 8); return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false; } pos(obj) { const offset = this.bb.__offset(this.bb_pos, 10); return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null; } rot(obj) { const offset = this.bb.__offset(this.bb_pos, 12); return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null; } static startSyncedCameraModel(builder) { builder.startObject(5); } static addUserId(builder, userIdOffset) { builder.addFieldOffset(0, userIdOffset, 0); } static addGuid(builder, guidOffset) { builder.addFieldOffset(1, guidOffset, 0); } static addDontSave(builder, dontSave) { builder.addFieldInt8(2, +dontSave, +false); } static addPos(builder, posOffset) { builder.addFieldStruct(3, posOffset, 0); } static addRot(builder, rotOffset) { builder.addFieldStruct(4, rotOffset, 0); } static endSyncedCameraModel(builder) { const offset = builder.endObject(); return offset; } static finishSyncedCameraModelBuffer(builder, offset) { builder.finish(offset); } static finishSizePrefixedSyncedCameraModelBuffer(builder, offset) { builder.finish(offset, undefined, true); } } //# sourceMappingURL=synced-camera-model.js.map