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