Files
node-metaverse/lib/classes/public/SculptData.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
704 B
TypeScript

import {UUID} from '../UUID';
import {SculptType} from '../..';
export class SculptData
{
texture: 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.texture = new UUID(buf, pos);
pos += 16;
this.type = buf.readUInt8(pos);
}
}
}
writeToBuffer(buf: Buffer, pos: number)
{
this.texture.writeToBuffer(buf, pos); pos = pos + 16;
buf.writeUInt8(this.type, pos);
}
}