Skip to content

TimelineEdit beta ​

TypeAlias of @v12-engine/client/kit

ts
export type TimelineEdit = {
    kind: 'select';
    selection: TimelineSelection | 'all';
} | {
    kind: 'seek';
    at: number;
}
/** What is selected, `dt` seconds on from where it was and `lanes` rows down; `ref` the one grabbed; `copy`: a copy, the original staying */
 | {
    kind: 'move';
    phase: TimelineEditPhase;
    selection: TimelineSelection;
    ref?: TimelineRef;
    dt: number;
    lanes: number;
    copy: boolean;
}
/** A clip's edge at the time `to` (landed on what is near), `dt` seconds from where the pointer pressed it */
 | {
    kind: 'trim';
    phase: TimelineEditPhase;
    ref: TimelineRef;
    edge: 'start' | 'end';
    to: number;
    dt: number;
} | {
    kind: 'split';
    at: number;
} | {
    kind: 'add';
    lane: string;
    at: number;
} | {
    kind: 'remove';
    selection: TimelineSelection;
} | {
    kind: 'zoom';
    by: number;
} | {
    kind: 'fit';
};

What a timeline asks of what it shows, as data: what its host does with each is the host's. move and trim come in phases, the rest at once