MCPcopy
hub / github.com/midrender/revideo / append

Method append

packages/2d/src/lib/code/CodeSignal.ts:133–152  ·  view source on GitHub ↗
(
    first: string | number = 0.6,
    duration?: number,
  )

Source from the content-addressed store, hash-verified

131 public append(code: string, duration: number): ThreadGenerator;
132 public append(duration?: number): TagGenerator;
133 public append(
134 first: string | number = 0.6,
135 duration?: number,
136 ): TOwner | ThreadGenerator | TagGenerator {
137 if (typeof first === 'string') {
138 if (duration === undefined) {
139 const current = this.get();
140 return this.set({
141 progress: 0,
142 fragments: [...current.fragments, first],
143 });
144 } else {
145 return this.appendTween(first, duration);
146 }
147 }
148
149 const savedDuration = first;
150 return (strings, ...tags) =>
151 this.append(resolveCodeTag(CODE(strings, ...tags), true), savedDuration);
152 }
153
154 public prepend(code: string): TOwner;
155 public prepend(code: string, duration: number): ThreadGenerator;

Callers 4

constructorMethod · 0.80
appendedToViewMethod · 0.80
stopMethod · 0.80
StageViewFunction · 0.80

Calls 5

appendTweenMethod · 0.95
resolveCodeTagFunction · 0.90
CODEFunction · 0.90
setMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected