@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
18 lines (11 loc) • 445 B
TypeScript
import {BinaryDataType} from "../type/BinaryDataType";
interface IBinarySchema {
[k: string]: BinaryDataType
}
export class DataViewStructAccessor<T extends IBinarySchema> {
constructor(type: T, little_endian?: boolean)
readonly $record_byte_size: number
bind(view: DataView, offset: number): void
bind_by_index(view: DataView, index: number): void
readonly record: { [prop in keyof T]: number }
}