- expose agent to window in testbed
- ts-ignore setTimeout line causing errors
This commit is contained in:
parent
8d029c682f
commit
36ad3fe178
2 changed files with 3 additions and 2 deletions
|
@ -37,7 +37,7 @@ class AgentAnimationState {
|
|||
this.char.animationFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
this.interval = setTimeout(() => {
|
||||
this.nextFrame();
|
||||
}, this.anim.frameInfo[this.frameIndex].frameDuration * 10)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// This will go away when it isn't needed
|
||||
|
||||
import * as msagent from "@msagent-chat/msagent.js";
|
||||
|
||||
let w = window as any;
|
||||
let input = document.getElementById("testbed-input") as HTMLInputElement;
|
||||
|
||||
input.addEventListener("change", async () => {
|
||||
|
@ -10,6 +10,7 @@ input.addEventListener("change", async () => {
|
|||
|
||||
console.log("About to parse character");
|
||||
let agent = msagent.agentParseCharacterTestbed(new Uint8Array(buffer));
|
||||
w.agent = agent;
|
||||
agent.addToDom(document.body);
|
||||
|
||||
agent.show();
|
||||
|
|
Loading…
Reference in a new issue