| 262 | } |
| 263 | |
| 264 | private *appendTween(value: string, duration: number) { |
| 265 | let current = this.get(); |
| 266 | const progress = createSignal(0); |
| 267 | const scope = { |
| 268 | progress, |
| 269 | fragments: [insert(value)], |
| 270 | }; |
| 271 | this.set({ |
| 272 | progress: current.progress, |
| 273 | fragments: [...current.fragments, scope], |
| 274 | }); |
| 275 | yield* progress(1, duration); |
| 276 | current = this.get(); |
| 277 | this.set({ |
| 278 | progress: current.progress, |
| 279 | fragments: current.fragments.map(fragment => |
| 280 | fragment === scope ? value : fragment, |
| 281 | ), |
| 282 | }); |
| 283 | progress.context.dispose(); |
| 284 | } |
| 285 | |
| 286 | private *prependTween(value: string, duration: number) { |
| 287 | let current = this.get(); |