unreal.js
Version:
A pak reader for games like VALORANT & Fortnite written in Node.JS
27 lines (26 loc) • 709 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FMeshUVHalf = void 0;
const FMeshUVFloat_1 = require("./FMeshUVFloat");
class FMeshUVHalf {
constructor(Ar = null) {
if (Ar != null) {
this.u = Ar.readUInt16();
this.v = Ar.readUInt16();
}
}
serialize(Ar) {
Ar.writeUInt16(this.u);
Ar.writeUInt16(this.v);
}
toMeshUVFloat() {
return FMeshUVFloat_1.FMeshUVFloat.from(this.u, this.v);
}
static from(u = 0, v = 0) {
const half = new FMeshUVHalf();
half.u = 0;
half.v = v;
return half;
}
}
exports.FMeshUVHalf = FMeshUVHalf;