diff --git a/msagent.js/src/character.ts b/msagent.js/src/character.ts index 5a897cf..2d98b5d 100644 --- a/msagent.js/src/character.ts +++ b/msagent.js/src/character.ts @@ -50,3 +50,9 @@ function agentCharacterParseACS(buffer: BufferStream): AcsData { export function agentCreateCharacter(data: Uint8Array): Agent { return new Agent(agentCharacterParseACS(new BufferStream(data))); } + +export async function agentCreateCharacterFromUrl(url: string) { + let res = await fetch(url); + let data = await res.arrayBuffer(); + return agentCreateCharacter(new Uint8Array(data)); +} \ No newline at end of file diff --git a/webapp/src/html/testbed.html b/webapp/src/html/testbed.html index 3f6c126..3736c2c 100644 --- a/webapp/src/html/testbed.html +++ b/webapp/src/html/testbed.html @@ -17,5 +17,12 @@ +