Tracker made in React for keeping track of HP and MP and so on.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
fabula-ultima-react/src/FixedInterpolation.ts

11 lines
474 B

import {Interpolation, InterpolatorArgs, Globals} from "@react-spring/web";
import {getAnimated} from "@react-spring/animated";
export class FixedInterpolation<Input = any, Output = any> extends Interpolation<Input, Output> {
constructor(readonly source: unknown, args: InterpolatorArgs<Input, Output>) {
super(source, args);
getAnimated(this)!.setValue(this._get())
}
}
Globals.assign({to: (source, args) => new FixedInterpolation(source, args)})