-
Notifications
You must be signed in to change notification settings - Fork 0
/
handBuiltWheels.js
67 lines (43 loc) · 1.32 KB
/
handBuiltWheels.js
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
const Jib = require('./wheelparts/jib.js');
const Rim = require('./wheelparts/rim.js');
const Spokes = require('./wheelparts/spokes.js');
const Hub = require('./wheelparts/hub.js');
const Nipples = require('./wheelparts/nipples.js');
const SPOKE_NUM = 28;
module.exports = function HandBuiltWheels(){
//PRIVATE
jib = new Jib();
rim = new Rim();
spokes = new Spokes(SPOKE_NUM);
hub = new Hub();
nipples = new Nipples(SPOKE_NUM);
wheel = {};
loadSpokes = function(h, s, w){
console.log("...load spokes");
w.hub = h;
w.spokes = s;
return w;
}
addNipples = function(r, n, w){
console.log("...add nipples");
w.rim = r;
w.nipples = n;
return w;
}
centre = function(w){
console.log("...centering");
return w;
}
finalTrue = function(w){
console.log("...truing");
return w;
}
//PUBLIC
function addWheels(){
console.log("Adding Wheels");
return finalTrue(centre(addNipples(rim, nipples, loadSpokes(hub, spokes, wheel))));
}
return {
addWheels: addWheels
}
}