Skip to content

A library for client side interpolation of state updates

Notifications You must be signed in to change notification settings

hathora/interpolation-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interpolation-buffer

Installation

npm install interpolation-buffer

Usage

import { InterpolationBuffer } from "interpolation-buffer";

// initialize
const stateBuffer = new InterpolationBuffer(state, 50, lerp);

// enqueue
stateBuffer.enqueue(state, [], timestamp);

// fetch
const { state } = this.stateBuffer.getInterpolatedState(Date.now());

About

A library for client side interpolation of state updates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published