multyx-client
Version:
Framework designed to simplify the creation of multiplayer browser games by addressing the complexities of managing server-client communication, shared state, and input handling
30 lines (29 loc) • 1.1 kB
TypeScript
import { Constraint, RawObject, Value } from "./types";
export declare const Unpack: unique symbol;
export declare const Done: unique symbol;
export declare const Add: unique symbol;
export declare const Edit: unique symbol;
export declare class EditWrapper<T> {
value: T;
constructor(value: T);
}
/**
* Set a customized interpolation curve for values to follow
* @param values Slices to interpolate through. Time must be between 0 and 1, while progress is the percentage between the old value and new value at the respective time, where 0 represents old value and 1 represents new value
* @example
* ```js
* car.get('speed').interpolate([
* { time: 0, progress: 0 },
* { time: 0.2, progress: 0.6 },
* { time: 0.4, progress: 1.2 },
* { time: 0.6, progress: 1.4 },
* { time: 0.8, progress: 1.2 },
* { time: 1, progress: 1 }
* ]);
* ```
*/
export declare function Interpolate(object: RawObject, property: string, interpolationCurve: {
time: number;
progress: number;
}[]): void;
export declare function BuildConstraint(name: string, args: Value[]): Constraint | void;