classicborne
    Preparing search index...

    Class KeyframeRecord

    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.

    Index

    Constructors

    Properties

    path: string

    Methods

    • Adds a keyframe to the database.

      Parameters

      • offset: number

        The offset in the VHS file.

      • totalActionCount: number

        The total action count at this keyframe

      • bufferActionCount: number

        The number of actions recorded after the last keyframe.

      • template: string

        The template associated with this keyframe.

      • voxelData: Buffer<ArrayBufferLike>

        The level voxel data at this keyframe.

      • bounds: Vector3

        The bounds of the level.

      • OptionallevelData: string = "{}"

        Optional level data in JSON format. Default is "{}"

      Returns Promise<void>

    • Gets the latest keyframe before a given action count for a specific template.

      Parameters

      • beforeActionCount: number

        The action count to search before.

      • template: string

        The template to filter by.

      • bounds: Vector3

        The bounds of the level.

      Returns Promise<any>

      The latest keyframe record or null if not found.

    • Purge keyframes after a specific action count.

      Parameters

      • afterActionCount: number

        The action count to purge keyframes after.

      Returns Promise<void>

    • Get a string key for level bounds.

      Parameters

      • bounds: Vector3

        The bounds to generate a key for.

      Returns string

      The string key for the bounds.