- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathConstants.js
More file actions
Latest commit
51 lines (46 loc) · 1.39 KB
/
Copy pathConstants.js
File metadata and controls
51 lines (46 loc) · 1.39 KB
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
constCONSTANTS={
//Game world
ballsParams: [
[newVector2(1022,413),COLOR.YELLOW],
[newVector2(1056,393),COLOR.YELLOW],
[newVector2(1056,433),COLOR.RED],
[newVector2(1090,374),COLOR.RED],
[newVector2(1090,413),COLOR.BLACK],
[newVector2(1090,452),COLOR.YELLOW],
[newVector2(1126,354),COLOR.YELLOW],
[newVector2(1126,393),COLOR.RED],
[newVector2(1126,433),COLOR.YELLOW],
[newVector2(1126,472),COLOR.RED],
[newVector2(1162,335),COLOR.RED],
[newVector2(1162,374),COLOR.RED],
[newVector2(1162,413),COLOR.YELLOW],
[newVector2(1162,452),COLOR.RED],
[newVector2(1162,491),COLOR.YELLOW],
[newVector2(413,413),COLOR.WHITE]
],
delta: 1/177,
// Stick
maxShotPower: 8000,
powerInterval: 120,
originXInterval: 5,
stickOrigin: newVector2(970,11),
stickShotOrigin: newVector2(950,11),
// Ball
whiteBallInitialPos: newVector2(413,413),
ballOrigin: newVector2(25,25),
ballDiameter: 38,
ballRadius: 19,
minVelocityLength: 5,
frictionEnergyLoss: 0.016,
collisionEnergyLoss: 0.02,
// Table
pocketRadius: 46,
pockets: [
newVector2(750,32),
newVector2(750,794),
newVector2(62,62),
newVector2(1435,62),
newVector2(62,762),
newVector2(1435,762)
]
}