FrameList beta
Class of @v12-engine/client/common
ts
export declare class FrameList<T>A list that is filled anew every frame and makes nothing doing it: its slots stay, and count says how many of them are in use. An array emptied with length = 0 gives its room back, and filling it again the next frame makes that room again, which is garbage every frame. Read it from 0 to count, not with for of
Members
add
ts
add(item: T): void;Puts an item in the next slot and counts it
clear
ts
clear(): void;Empties the list for the next frame by setting count to 0, keeping the slots
count
ts
count: number;How many slots of items are in use this frame
items
ts
readonly items: T[];The slots of the list; only the first count are in use, and slots past it hold items of earlier frames