You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 395246f
Browse filesBrowse the repository at this point in the historyBrowse files
The overlay film showed the old whole-line behaviour. Both are shot from
the same scene now so they read as a pair: src/git.js from this repo's
own history, where root became base on three lines running.
typing.gif is a third of its former size at the same palette. Nothing
was given up; typing changes one line per frame, so there is almost
nothing between frames to encode.
Copy file name to clipboardExpand all lines: README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ some order that made sense to them. `gitdiff3d` plays it back: your diff becomes
14
14
a 3d scene where every changed line is a plate floating in space, and a caret
15
15
walks through them typing the additions in and erasing the deletions.
16
16
17
-

17
+

18
18
19
19
## Install
20
20
@@ -117,6 +117,31 @@ at him. Nobody finds a moving dot by looking at two plates side by side, because
117
117
that turns a preattentive pop-out into a memory task. The `l` key does the same
118
118
trick with depth instead of flicker.
119
119
120
+
A whole old line behind a whole new one still leaves you hunting, though, when
121
+
only one word moved. So where a removal and the addition after it are plainly
122
+
versions of each other, both lines drop to a whisper except for the run of
123
+
characters that actually differs. That run is lit on each plane, and a
124
+
projection is run between the two:
125
+
126
+
```
127
+
const chars = Math.max(1, spanOf(line.text).length); the new line, in front
128
+
^^^^^^
129
+
:====: the projection, across the gap in depth
130
+
vvvvvv
131
+
const chars = Math.max(1, bodyOf(line.text).length); the old line, behind
132
+
```
133
+
134
+
Head on the projection is a hairline and costs nothing; orbit and it opens into
135
+
a ribbon, so you can see which run came from where. A wavefront travels it,
136
+
narrowing or widening as the old text becomes the new, and walking the short way
137
+
round the colour wheel from the removal red to the addition green.
138
+
139
+
Lines that were rewritten rather than edited keep the plain behaviour: below
140
+
half the characters kept on either side they are not versions of each other,
141
+
there is nothing to point at, and both whole lines are spoken. Nothing is
142
+
projected where nothing was replaced, so a phrase inserted into a line lights up
143
+
in front and leaves only a tick on the line behind.
0 commit comments