Skip to content

Commit c018d6a

Browse files
committed
Got rid of unnessary use strict, added a new file which will contain all relevant neuron type info
1 parent 2be5a94 commit c018d6a

13 files changed

+18
-28
lines changed

actionPotential.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class ActionPotential {
42
constructor(sourceNeuron, destinyNeuron, skew, id, charge, neuronSize) {
53
this.sourceNeuron = sourceNeuron;

characterNeuron.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class CharacterNeuron extends Neuron {
42
constructor(x, y, neuronSize, actlvl) {
53
super(x, y, neuronSize, actlvl);

exampleNeuronNets.js

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<script src='exampleNeuronNets.js'></script>
1515
<script src='sketch.js'></script>
1616
<script src='userDomInteractions.js'></script>
17+
<script src='neuronInfo.js'></script>
1718
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
1819
<link rel='stylesheet' type='text/css' href='style.css'>
1920
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
@@ -22,7 +23,7 @@
2223

2324
<body>
2425
<div id='control-panel'>
25-
<div id='neuron-placement' class='column-left active' data-state='neuronPlacement'>
26+
<div id='neuron-placement' class='column-left active grey' data-state='neuronPlacement'>
2627
<p>Place/Delete Neurons</p>
2728
Neuron Type:
2829
<select id='neuronType'>
@@ -52,18 +53,18 @@
5253
</span>
5354
</div>
5455

55-
<div id='connection-placement' class='column-center' data-state='connectionPlacement'>
56+
<div id='connection-placement' class='column-center grey' data-state='connectionPlacement'>
5657
<p>Place/Delete Connections</p>
5758
<input type="radio" name="connection" value="one" checked> One-way connections<br>
5859
<input type="radio" name="connection" value="two"> Two-way connections
5960
</div>
6061

61-
<div id='live-mode' class='column-right' data-state='live'>
62+
<div id='live-mode' class='column-right grey' data-state='live'>
6263
<p>Live Mode</p>
6364
</div>
6465
</div>
6566

66-
<span id='loadExamples'>
67+
<span class='grey' id='loadExamples'>
6768
Load Example:
6869
<select placeholder='Select Example' id='exampleInput'>
6970
<option value="" disabled selected>Select Example</option>

jasmine/spec/neuron_spec.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
describe('Neuron Class Methods', () => {
42
beforeEach(() => {
53
this.neuron = new Neuron(1, 1, 5, 5);
@@ -46,4 +44,4 @@ describe('Neuron Class Methods', () => {
4644
this.neuron.inBoundConnection(this.otherNeuron);
4745
expect(this.neuron.inBoundConnections['2 2']).toEqual(this.otherNeuron);
4846
});
49-
});
47+
});

negativeNeuron.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class NegativeNeuron extends Neuron {
42
constructor(x, y, neuronSize, actlvl) {
53
super(x, y, neuronSize, actlvl);

neuron.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class Neuron {
42
constructor(x, y, neuronSize, actlvl) {
53
this.xCoord = x;

neuronInfo.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Will hold all neurony info
2+
var neuronTypes = {
3+
4+
};
5+

noteNeuron.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
'use strict';
2-
31
// Oscillator
42
var osc;
53
osc = new p5.Oscillator();
64
osc.setType('triangle');
7-
var twelveTones = ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B'];
85
osc.start();
96
osc.amp(0);
107

8+
var twelveTones = ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B'];
9+
1110
class NoteNeuron extends Neuron {
1211
constructor(x, y, neuronSize, actlvl, note) {
1312
super(x, y, neuronSize, actlvl);

sketch.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
var neuronList = {};
42
var actionPotentialList = {};
53
var state = 'neuronPlacement';
@@ -133,4 +131,4 @@ function live(x, y) {
133131
function windowResized() {
134132
resizeCanvas(window.innerWidth, window.innerHeight - 100);
135133
clearScreen();
136-
}
134+
}

style.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ a:visited {
2626
}
2727

2828
#control-panel div{
29-
background-color: rgb(110, 110, 110);
3029
box-sizing: border-box;
3130
border-right: 2px solid black;
3231
text-align: center;
@@ -68,6 +67,10 @@ a:visited {
6867
background-color: rgb(200, 200, 200);
6968
}
7069

70+
.grey {
71+
background-color: rgb(110, 110, 110);
72+
}
73+
7174
.column-left{
7275
float: left;
7376
width: 33.33%;

timerNeuron.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
class TimerNeuron extends Neuron {
42
constructor(x, y, neuronSize, actlvl, timeInSeconds, maxSteps) {
53
super(x, y, neuronSize, actlvl);

userDomInteractions.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
var prevState;
42
var controlPanel = {
53
onControlPanelClick: function() {

0 commit comments

Comments
 (0)