- 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 -
24 lines
602 B
TypeScript
24 lines
602 B
TypeScript
import {UUID} from '../UUID';
|
|
import {Vector3} from '../Vector3';
|
|
|
|
export class LightImageData
|
|
{
|
|
texture: UUID = UUID.zero();
|
|
params: Vector3 = Vector3.getZero();
|
|
|
|
constructor(buf: Buffer, pos: number, length: number)
|
|
{
|
|
if (length >= 28)
|
|
{
|
|
this.texture = new UUID(buf, pos);
|
|
pos += 16;
|
|
this.params = new Vector3(buf, pos);
|
|
}
|
|
}
|
|
writeToBuffer(buf: Buffer, pos: number)
|
|
{
|
|
this.texture.writeToBuffer(buf, pos); pos = pos + 16;
|
|
this.params.writeToBuffer(buf, pos, false);
|
|
}
|
|
}
|