Spline.js 223 B

1234567891011121314
  1. export default class Spline {
  2. constructor(lerp = (t, a, b) => (a + t * (b - a))) {
  3. this.steps = []
  4. this.lerp = lerp
  5. }
  6. addStep(time, newValue) {
  7. this.steps.push([time, newValue])
  8. }
  9. get(deltaTime) {
  10. //TODO
  11. }
  12. }