Files
node-metaverse/lib/classes/public/MeshData.ts
Casper Warden 4740b07e11 - Add LLWearable parsing
- Remove ExtraParams, TextureAnim, ParticleSystem binary data from GameObjects, instead encode on the fly when needed
- Add XML object decoding (WIP)
- Move FlexibleData, LightDate, LightImageData, MeshData, SculptData inside ExtraParams class
-
2018-11-05 11:45:04 +00:00

27 lines
705 B
TypeScript

import {UUID} from '../UUID';
import {SculptType} from '../..';
export class MeshData
{
meshData: UUID = UUID.zero();
type: SculptType = SculptType.None;
constructor(buf?: Buffer, pos?: number, length?: number)
{
if (buf !== undefined && pos !== undefined && length !== undefined)
{
if (length >= 17)
{
this.meshData = new UUID(buf, pos);
pos += 16;
this.type = buf.readUInt8(pos);
}
}
}
writeToBuffer(buf: Buffer, pos: number)
{
this.meshData.writeToBuffer(buf, pos); pos = pos + 16;
buf.writeUInt8(this.type, pos);
}
}