-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,383 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"planck": minor | ||
--- | ||
|
||
Testbed rendering rewrite |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.