Skip to content

Commit

Permalink
Testbed rendering rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
shakiba committed Dec 27, 2024
1 parent 7c400fa commit bb9bb87
Show file tree
Hide file tree
Showing 16 changed files with 1,383 additions and 564 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-eyes-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"planck": minor
---

Testbed rendering rewrite
20 changes: 12 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"node": ">=14.0"
},
"peerDependencies": {
"stage-js": "^1.0.0-alpha.5"
"stage-js": "^1.0.0-alpha.12"
},
"devDependencies": {
"@changesets/cli": "^2.27.11",
Expand Down
23 changes: 23 additions & 0 deletions testbed/Memo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export class Memo {
static init() {
return new Memo();
}

private memory: any = [];

/** Returns true if args are updated. */
update(...args: any[]) {
let equal = this.memory.length === args.length;
for (let i = 0; i < args.length; i++) {
equal = equal && this.memory[i] === args[i];
this.memory[i] = args[i];
}
this.memory.length = args.length;
return !equal;
}


clear() {
this.memory.length = 0;
}
}
Loading

0 comments on commit bb9bb87

Please sign in to comment.