-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
214 lines (209 loc) · 5.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<title>Trisynaptic - Build a brain</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<style>
body {
font-family: Inter, sans-serif;
font-size: 15px;
margin: 0;
padding: 0;
}
h1 {
font-weight: normal;
font-size: 1.5em;
}
#c {
float: left;
}
.modal {
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.25);
z-index: 1;
width: 100vw;
height: 100vh;
overflow: scroll;
}
.modal-body {
background-color: #fefefe;
padding: 20px;
border-radius: 20px;
width: 100%;
max-width: 900px;
margin: 100px auto;
position: relative;
}
.close {
color: #aaaaaa;
position: absolute;
top: 20px;
right: 20px;
font-size: 28px;
font-weight: bold;
text-decoration: none;
cursor: pointer;
}
.close:hover,
.close:focus {
color: #000;
}
#help {
border-radius: 100%;
width: 36px;
height: 36px;
position: fixed;
bottom: 24px;
right: 24px;
background: #2c2c2c;
color: white;
text-align: center;
line-height: 36px;
cursor: pointer;
}
.toolbar {
height: 40px;
top: 0;
left: 0;
width: 100%;
background: #2c2c2c;
}
.toolbar a {
display: block;
float: left;
padding: 10px 10px;
font-size: 15px;
line-height: 20px;
}
.toolbar a:hover {
background: #000;
color: white;
}
.toolbar a.selected {
background: #18a0fb;
color: white;
}
#sidebar {
float: right;
width: 224px;
height: calc(100vh - 56px);
padding: 8px;
}
hr {
height: 1px;
border: none;
background: #e5e5e5;
}
code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: rgba(27, 31, 35, 0.05);
border-radius: 3px;
font-family: Consolas, monospace;
}
input {
outline: none;
border: 1px solid white;
padding: 4px;
margin: 1px;
width: 40px;
}
input:hover {
border: 1px solid #e5e5e5;
}
input:focus {
border: 2px solid #18a0fb;
margin: 0px;
}
.neuron #synapse {
display: none;
}
.synapse #neuron {
display: none;
}
</style>
<script src="/script.js" defer></script>
</head>
<body>
<div class="modal">
<div class="modal-body">
<span class="close">×</span>
<h1>Trisynaptic</h1>
<p>
The blue circles are excitatory neurons. The red circles are
inhibitory neurons. <br />
Click on a neuron to view its config in the sidepanel on the right.
<br />
Enable <code>Graphed</code> in the sidepanel to view the neuron's
voltage (membrane potential).<br />
Click on an edge to view its config in the right sidepanel. <br />
Connect two neurons by holding down the alt key and dragging between
the two neurons. <br />
Finally, right click a neuron to activate that neuron and simulate the
brain!
<br /><br />
This simulation builds on previous work on leaky integrate and fire
(GLIF) neurons from
<a href="https://www.nature.com/articles/s41467-017-02717-4"
>this paper</a
>
by the Allen Brain Institute and
<a href="https://www.eneuro.org/content/4/2/ENEURO.0022-17.2017"
>this paper</a
>
by Neuronify.
</p>
<iframe
src="https://drive.google.com/file/d/1LzV0ztmvrVu1SyJLlpgvfJMQ927Wy7li/preview"
width="640"
height="480"
></iframe>
<p>
<code>click</code> to create a new neuron<br />
<code>shift+click</code> to create an inhibitory neuron<br />
<code>alt+drag</code> to start a new connection<br />
<code>delete</code> to delete the current neuron<br />
<code>esc</code> to deselect<br />
<code>right click</code> to excite a neuron <br />
<code>cmd+c</code> to copy your graph <br />
<code>cmd+v</code> to paste a copied graph <br />
<code>arrow keys</code> to move the camera arround <br />
<code>r</code> to reset the camera position <br />
</p>
</div>
</div>
<div class="toolbar">
<a class="selected">🔵</a>
<a>🔴</a>
</div>
<canvas id="c" tabindex="1"></canvas>
<div id="sidebar" class="neuron">
<div id="neuron">
<h1>Neuron Info</h1>
<label>
Threshold:
<input id="threshold" value="1" type="number" min="1" max="10" />
</label>
<br />
<label>
Graphed:
<input type="checkbox" id="graph-toggle" />
</label>
</div>
<div id="synapse">
<h1>Synapse Info</h1>
<label>
Strength
<input id="strength" value="1" type="number" />
</label>
</div>
</div>
<div id="help">?</div>
</body>
</html>