@@ -2,13 +2,11 @@ import {TimingFunc, timingFunctions} from "./timing";
22import { Point } from "../types" ;
33import { prepare } from "./prepare" ;
44import { interpolateBetween } from "./interpolate" ;
5- import { BlobOptions } from "../../public/blobs" ;
65
76export interface Keyframe {
87 delay ?: number ;
98 duration : number ;
109 timingFunction ?: keyof typeof timingFunctions ;
11- blobOptions : BlobOptions ;
1210}
1311
1412export interface InternalKeyframe {
@@ -38,9 +36,9 @@ export interface RenderOutput {
3836 renderCache : RenderCache ;
3937}
4038
41- export interface TransitionInput extends RenderInput {
42- newFrames : Keyframe [ ] ;
43- blobGenerator : < T extends Keyframe > ( options : T ) => Point [ ] ,
39+ export interface TransitionInput < T extends Keyframe > extends RenderInput {
40+ newFrames : T [ ] ;
41+ blobGenerator :( options : T ) => Point [ ] ,
4442}
4543
4644export interface TransitionOutput {
@@ -126,7 +124,7 @@ export const renderFramesAt = (input: RenderInput): RenderOutput => {
126124// TODO generate internal frames. Delayed frames can just copy the previous one.
127125// TODO store current blob when interrupts happen to use as source.
128126// TODO don't remove any frames.
129- export const transitionFrames = ( input : TransitionInput ) : TransitionOutput => {
127+ export const transitionFrames = < T extends Keyframe > ( input : TransitionInput < T > ) : TransitionOutput => {
130128 const { renderCache, timestamp, newFrames} = input ;
131129
132130 // Wipe animation when given no keyframes.
0 commit comments