Skip to content

Commit

Permalink
chore: add notes
Browse files Browse the repository at this point in the history
  • Loading branch information
CatsJuice committed Aug 1, 2023
1 parent 46a779e commit f917188
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/components/SvgCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,37 @@ function getSvg(options: SvgReplayOptions = {}) {
wipe = 500,
} = options
/**
*
* timeline
* ↑
* ⎮
* ⎮
* ⎮
* line1: ⎮ ========= ⎮ ⎮ =======⎮
* ⎮ lineDurations[0] ⎮ ⎮ lineWipe[0]⎮
* line2: ⎮ ===== ⎮ ⎮ ==== ⎮
* ⎮ lineDurations[1] ⎮ ⎮ lineWipe[1]⎮
* line3: ⎮ ===============⎮ ⎮========= ⎮
* ⎮ lineDurations[2]⎮ ⎮lineWipe[2] ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ ⎮ ⎮ ⎮
* 0 ⎮──────────--------------------⎮----------------------⎮--------------------⎮-------------->
* ⎮ ⎮ ⎮ ⎮ time/s
* ⎮ Draw ⎮ Hold ⎮ Wipe ⎮
* ⎮ ⎮ ⎮ ⎮
* ⎮ - - - - drawDuration - - - - ⎮ - - holdDuration - - ⎮ -- wipeDuration -- ⎮
* ⎮ ⎮
* ⎮- • - - • - - • - - • - - • - totalDuration - • - - • - - • - - • - - • - ⎮
*/
const lineLengths = lines.value.map(line => lineLength(line))
const totalLength = lineLengths.reduce((sum, length) => sum + length, 0)
Expand Down

0 comments on commit f917188

Please sign in to comment.