Creates a new KeyframeRecord instance.
The path to the SQLite database file.
The adapter class to use. Must be any class that inherits BaseSqliteAdapter.
Adds a keyframe to the database.
The offset in the VHS file.
The total action count at this keyframe
The number of actions recorded after the last keyframe.
The template associated with this keyframe.
The level voxel data at this keyframe.
The bounds of the level.
OptionallevelData: string = "{}"Optional level data in JSON format. Default is "{}"
Close the database connection.
Gets the latest keyframe before a given action count for a specific template.
The action count to search before.
The template to filter by.
The bounds of the level.
The latest keyframe record or null if not found.
Purge keyframes after a specific action count.
The action count to purge keyframes after.
Vacuum the database to optimize it.
StaticfindFinds a suitable SQLite adapter. I use dynamic imports to find an adapter that is able to import.
I attempt to import the following adapter classes in order:
If I can't find an adapter, I'll throw an Error.
StaticgetGet a string key for level bounds.
The bounds to generate a key for.
The string key for the bounds.
I am a keyframe record for a BaseLevel. I manage snapshots of level state snapshots in my SQLite database, allowing for efficient retrieval and management of these keyframes.
I use adapters to interface with my SQLite database. ChangeRecord attempts to initialize me using whatever adapter that successfully imported with my findSuitableSqliteAdapter method. I'm optional and if an adapter fails to import, the ChangeRecord will continue without my help.