Improve python library, add LLGLTF asset parser, Add tests

This commit is contained in:
Casper Warden
2023-11-10 00:14:59 +00:00
parent 6c8273ea5e
commit 72d4eff2d8
13 changed files with 591 additions and 348 deletions

View File

@@ -30,10 +30,13 @@ export class ImprovedInstantMessageMessage implements MessageBase
Message: Buffer;
BinaryBucket: Buffer;
};
EstateBlock: {
EstateID: number;
};
getSize(): number
{
return (this.MessageBlock['FromAgentName'].length + 1 + this.MessageBlock['Message'].length + 2 + this.MessageBlock['BinaryBucket'].length + 2) + 103;
return (this.MessageBlock['FromAgentName'].length + 1 + this.MessageBlock['Message'].length + 2 + this.MessageBlock['BinaryBucket'].length + 2) + 107;
}
// @ts-ignore
@@ -70,6 +73,8 @@ export class ImprovedInstantMessageMessage implements MessageBase
pos += 2;
this.MessageBlock['BinaryBucket'].copy(buf, pos);
pos += this.MessageBlock['BinaryBucket'].length;
buf.writeUInt32LE(this.EstateBlock['EstateID'], pos);
pos += 4;
return pos - startPos;
}
@@ -144,7 +149,14 @@ export class ImprovedInstantMessageMessage implements MessageBase
newObjMessageBlock['BinaryBucket'] = buf.slice(pos, pos + varLength);
pos += varLength;
this.MessageBlock = newObjMessageBlock;
const newObjEstateBlock: {
EstateID: number
} = {
EstateID: 0
};
newObjEstateBlock['EstateID'] = buf.readUInt32LE(pos);
pos += 4;
this.EstateBlock = newObjEstateBlock;
return pos - startPos;
}
}