-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v0.1.2
- Loading branch information
Showing
83 changed files
with
2,621 additions
and
713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## Navigation Panning Design | ||
|
||
This will require the following: | ||
|
||
- A Keyboard manager | ||
|
||
- Can be set to use either key or code, not both | ||
- ~~Refuse to subscribe two events on the same handle~~ | ||
- ~~Allow the second function only if it mentions the first one, | ||
and tell in what order they should be executed | ||
"`next()`"~~ | ||
- No this just sucks. Let's just accept to re-engineer the application. | ||
- Can be discarded | ||
- -> Reuse the keyboard manager of JsTetris? (jst.acq.js) | ||
- Re-reading it will be sufficient | ||
|
||
- A Mouse manager | ||
- Exposes a click subscription interface | ||
- Exposes a drag / drop subscription interface | ||
- Adds / removes mousemove listener on mousedown / mouseup | ||
- Record the position of the mouse on mousedown (offsetX, offsetY) | ||
- Forwards mousemove information to the subscriber | ||
|
||
### Keyboard manager | ||
|
||
#### Todo | ||
|
||
- ~~Disable keys that cannot be used [20 min]~~ | ||
- ~~Move key logic to display.tsx, and use the hub to send events [40 min]~~ | ||
- ~~Prevent logic from moving generation below 0 [5 min - included -- not timed] | ||
- Adding a file in `display/` which does binding of the keyboard keys between the manager and the hub [30 min] | ||
- Reconfigure now.sh to have a shorter address for :develop builds | ||
|
||
#### Design | ||
|
||
- Hook keydown on the right element | ||
- Allow to subscribe a function to a keypress | ||
- Allow to subscribe two functions to the keydown and the keyup events | ||
|
||
(no: Allow to query the state of any key) | ||
|
||
- Allow to remove a subscription |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## CellExp Navigation Specification | ||
|
||
## Panning | ||
|
||
The panning feature can be served via an **inorganic**, numeric interface, allowing to enter the location to display. While such an interface handles well the needs of precision panning, and fast remote access, it is also slow to use and attention-demanding. | ||
|
||
There are some cases where it's nice to be able to pan around without having to | ||
select a field and type in it. We expect that more than 50% of these cases can | ||
be served by allowing to click-and-pan (click and drag), moving the image to | ||
follow the pointer. Some more cases can be served with the keyboard arrows, or | ||
alternatively, on phone, with panning arrow buttons, placed near the display, | ||
probably at it's top. These kind of interfaces can be labelled of **organic** | ||
for their greater ease of use, eventhough their possibilities are more limited. | ||
|
||
### Panning Specification | ||
|
||
#### Inorganic panning | ||
|
||
It is possible to set the currently displayed location via text fields. This | ||
corresponds to the features (**Fconfig-post-t** and **Fconfig-post-x**, defined | ||
in `doc-project-fr/etude/fonctionnalite.md`). | ||
|
||
#### Drag to pan | ||
|
||
The feature is described above. The image is moved to follow the pointer or the | ||
finger while the mouse is clicked or while the finger is held down | ||
(**Fnav-pan-drag**). | ||
|
||
#### Arrow navigation | ||
|
||
Support the following arrows for horizontal movement (**Fnav-pan-horiz**): | ||
|
||
- `<`, `>`, [ArrowLeft, ArrowRight] to perform small moves toward the left or | ||
right. | ||
- `<<`, `>>`, [Home, End], to go to the left end and right end of the ribbon. | ||
These arrows are disabled if the ribbon doesn't have a border in the direction | ||
of the arrow. | ||
- `::` (no keyboard key) to go to the center, for ribbons which have borders | ||
on both sides. | ||
- `⬵`, `⤁` (no keyboard key) to move by left or right by one whole display | ||
size. | ||
|
||
Support the following arrows for vertical movement (**Fnav-pan-vert**): | ||
|
||
- `^`, `v`, [ArrowUp, ArrowDown] to perform small moves up or down. | ||
- `⇞`, `⇟`, [PageUp, PageDown] to move up or down by one whole display size. | ||
- `⏏` (no keyboard key) to go back to the top of the simulation | ||
|
||
Note about `<`, `>`, `⬵`, and `⤁`: Over ribbons that have borders, it's not possible to go past the borders. | ||
|
||
Note about `^` and `⇞`: Going up past the beginning is not possible: `posT` doesn't go below 0. | ||
|
||
Credit to Xahlee's work on [Unicode Arrows](http://xahlee.info/comp/unicode_arrows.html). | ||
|
||
#### Panning and autoscrolling (playing) | ||
|
||
While play is on, **Fnav-pan-drag-vert** will be disabled, while **Fnav-pan-drag-horiz** is still usable. | ||
|
||
Using any horizontal arrow will be possible and will have the expected | ||
horizontal move effect. | ||
|
||
Using any vertical arrow will be possible and will stop autoscrolling and have the expected vertical move effect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## Cellexp Specification Thinking Draft for navigation | ||
|
||
## Panning | ||
|
||
Options : | ||
|
||
- Drag and drop on the display | ||
- Add inertia | ||
- Drag and drop but accelerated (acceleration factor) | ||
- Arrows on the sides of the display | ||
- Arrows inside the rendering area | ||
- Arrows outside the rendering area | ||
- Scroll bars | ||
- Minimap? | ||
- Keyboard arrows | ||
|
||
There seem to be few useable options among the above: | ||
|
||
- Drag and drop | ||
- Keyboard arrows | ||
|
||
### Keyboard keys | ||
|
||
- Use up the keyboard keys | ||
- Probably use up the `home` and `end` keys too | ||
- Requires the user to try using them to discover the feature | ||
- New behaviour than when a text field is selected, so it'd be better to limit | ||
them to when the display component is selected (/ focused ~) | ||
- Allows going from one border to the other (`home` / `end`) | ||
- Allows precise fast navigation | ||
- **Unavailable on phones** | ||
|
||
### Drag and drop panning | ||
|
||
- Use up the mouse or touchscreen | ||
- But **Fshow-propagation** and **Fca-divine-intervention** also require it | ||
- Slow to navigate large distances, such as to go from one border to the other | ||
- Maybe add a minimap? Maybe propose a "scroll anywhere" mode or a "click to jump" mode | ||
- Problems with the minimap, with the "click to jump" behavior for infinit maps | ||
- Let's only implement a "scroll anywhere" mode | ||
- Problem with the "scroll anywhere" mode: when the map is big, it becomes | ||
unprecise. | ||
- User needs to click in the display to discover the feature | ||
|
||
What about panning arrows at the top of the display? | ||
|
||
-- Stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Time tracking | ||
|
||
## Keyboard binding | ||
|
||
Time estimate: 4h | ||
2020-01-15T22:34+01 -> 2020-01-15T23:06+01 :: writing `display/keyboardManager.ts` | ||
2020-01-15T23:06+01 -> 2020-01-16T00:09+01 :: moving arrows and centering them (2x the expected time) | ||
2020-01-16T00:09+01 -> 2020-01-16T00:22+01 :: moving the display block to the top (.7x the expected time) | ||
2020-01-16T00:23+01 -> 2020-01-16T00:30+01 :: changing the button symbols (.7x the expected time) | ||
2020-01-16T07:13+01 -> 2020-01-16T07:45+01 :: disabling arrow that cannot be used (1.5x the expected time) | ||
2020-01-16T18:35+01 -> 2020-01-16T18:51+01 :: add a context for accessing the display (1.1x) | ||
2020-01-16T18:51+01 => 2020-01-16T19:22+01 : | ||
2020-01-16T19:53+01 => 2020-01-16T21:18+01 : | ||
: Move key logic to display.tsx (3x -- 1h50 instead of 40min) | ||
2020-01-16T21:55+01 -> () :: Keyboard binding (~1x ?) | ||
|
||
Total: 5h10! | ||
The estimate was rather decent! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from datetime import datetime | ||
import sys | ||
|
||
def eprint(*a, **kw): | ||
print(*a, file=sys.stderr, **kw) | ||
|
||
book = [] | ||
|
||
with open("time.md") as f: | ||
it = iter(f) | ||
for line in it: | ||
if line == f"## {sys.argv[1]}\n": | ||
break | ||
for line in it: | ||
if line.startswith("## "): | ||
break | ||
if line.startswith("2020") and "> 2020" in line: | ||
book.append(line) | ||
|
||
print(f"{len(book)=}") | ||
|
||
total = 0 | ||
|
||
for line in book: | ||
sep = " -> " | ||
if sep not in line: | ||
sep = " => " | ||
if sep not in line: | ||
eprint(f"WARNING, with line [{line}]") | ||
continue | ||
a, bc = line.split(sep) | ||
b, cc = bc.split(" :") | ||
da = datetime.fromisoformat(a.split("+")[0]) | ||
db = datetime.fromisoformat(b.split("+")[0]) | ||
delta = db - da | ||
print(f"{dir(delta)=}") | ||
total += delta.total_seconds() | ||
|
||
print(f"{total=}") | ||
print(f"{total//60=}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cellular-automaton-explorer-1d", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Unidimensional cellular automaton explorer to highlight their unique properties", | ||
"repository": "[email protected]:mathieucaroff/cellular-automaton-explorer-1d.git", | ||
"author": "Mathieu CAROFF <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
yarn parcel .\src\www\page.html | ||
#!/bin/bash | ||
yarn parcel ./src/www/page.html |
Oops, something went wrong.