MCPcopy Create free account
hub / github.com/diffusionstudio/core / shiftTrack

Method shiftTrack

src/composition/composition.ts:214–227  ·  view source on GitHub ↗

* Append a new track, it will be inserted at * index 0 and rendered last (top layer)

(Track: (new () => L) | L)

Source from the content-addressed store, hash-verified

212 * index 0 and rendered last (top layer)
213 */
214 public shiftTrack<L extends Track<Clip>>(Track: (new () => L) | L): L {
215 // Check if track has been instantiated
216 const track = typeof Track == 'object' ? Track : new Track();
217
218 track.connect(this);
219
220 this.stage.addChild(track.view);
221 this.tracks.unshift(track);
222
223 track.bubble(this);
224 this.trigger('update', undefined);
225
226 return track;
227 }
228
229 /**
230 * Create a track with the given type

Callers 4

createTrackMethod · 0.95
media.spec.tsFile · 0.80
preset.1.spec.tsFile · 0.80
media.spec.tsFile · 0.80

Calls 3

bubbleMethod · 0.80
triggerMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected