-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroadData.js
54 lines (46 loc) · 1.23 KB
/
roadData.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
const { Vector3 } = require("three")
const turn = {
for: ['road_bend','road_bendSquare','road_bendSidewalk','road_curve','road_curvePavement'],
directions: [
new Vector3(1,0,0),
new Vector3(0,0,-1)
]
}
const straight = {
for: ['road_crossing','road_drivewayDouble','road_drivewaySingle','#road_side','#road_sideEntry','#road_sideExit','#road_split','road_straight'],
directions: [
new Vector3(1,0,0),
new Vector3(-1,0,0)
]
}
const allDirections = {
for: ['road_crossroad','road_crossroadLine','road_crossroadPath','road_roundabout'],
directions: [
new Vector3(1,0,0),
new Vector3(-1,0,0),
new Vector3(0,0,1),
new Vector3(0,0,-1)
]
}
const tripleIntersection = {
for: ['road_curveIntersection','road_intersection','road_intersectionLine','road_intersectionPath'],
directions: [
new Vector3(1,0,0),
new Vector3(-1,0,0),
new Vector3(0,0,-1)
]
}
const roadEnd = {
for: ['road_end'],
directions: [
new Vector3(-1,0,0)
]
}
const noEntry = {
for: ['road_square'],
directions: []
}
const roadTypes = {turn,straight,allDirections,tripleIntersection,roadEnd,noEntry}
module.exports = {
roadTypes
}