Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
FogNetwork
GitHub Repository: FogNetwork/Tsunami
Path: blob/main/public/games/files/garbage-collector/json/level-00.json
1036 views
1
{
2
"name": "Introduction to Introductions 101",
3
"entities": [
4
{
5
"x": 0,
6
"y": 0,
7
"angle": 0,
8
"shapes": [
9
{
10
"type": "circle",
11
"x": 10,
12
"y": 20,
13
"radius": 10,
14
"fill": {
15
"type": "color",
16
"red": 255,
17
"green": 255,
18
"blue": 255,
19
"alpha": 1.0
20
},
21
"stroke": {
22
"type": "color",
23
"red": 255,
24
"green": 0,
25
"blue": 0,
26
"alpha": 1.0
27
},
28
"lineWidth": 4
29
},
30
{
31
"type": "rect",
32
"x": 20,
33
"y": 10,
34
"width": 10,
35
"height": 20
36
},
37
{
38
"type": "polygon",
39
"vertices": [ 100, 20, 100, 100, 0, 100 ]
40
},
41
{
42
"type": "segment",
43
"x0": -10,
44
"y0": 0,
45
"x1": 10,
46
"y1": 0
47
}
48
]
49
}
50
],
51
"physicsEntities": [
52
{
53
"shape": "circle",
54
"radius": 2,
55
"fixture": {
56
"density": 1.0,
57
"friction": 0.5,
58
"restitution": 0.2,
59
"isSensor": false,
60
"filter": {
61
"categoryBits": 1,
62
"maskBits": 65535,
63
"groupIndex": 0
64
}
65
},
66
"body": {
67
"position": {
68
"x": 0,
69
"y": 0
70
},
71
"angle": 0,
72
"linearVelocity": {
73
"x": 0,
74
"y": 0
75
},
76
"angularVelocity": 0,
77
"linearDamping": 0,
78
"angularDamping": 0,
79
"allowSleep": true,
80
"awake": true,
81
"fixedRotation": false,
82
"bullet": false,
83
"type": "static",
84
"active": true,
85
"inertiaScale": 1.0
86
},
87
"shapes": [
88
{
89
"type": "circle",
90
"radius": 2,
91
"fill": {
92
"type": "color",
93
"alpha": 1.0
94
}
95
]
96
}
97
},
98
{
99
"shape": "polygon",
100
"type": "vector",
101
"data": [ 100, 20, 100, 100, 0, 100 ]
102
},
103
{
104
"shape": "polygon",
105
"type": "box",
106
"data": {
107
"hx": 5,
108
"hy": 2
109
}
110
},
111
{
112
"shape": "polygon",
113
"type": "orientedbox",
114
"data": {
115
"hx": 5,
116
"hy": 3,
117
"center": {
118
"x": 0,
119
"y": 0
120
},
121
"angle": 0.52
122
}
123
},
124
{
125
"shape": "polygon",
126
"type": "edge",
127
"data": [ -3, 0, 3, 0 ]
128
}
129
],
130
"batchPhysicsEntities": [
131
{
132
"data": [
133
{
134
"x": 0,
135
"y": 0,
136
"angle": 0,
137
// This could be an array/{hx, hy}/etc.
138
"data": []
139
}
140
],
141
"properties": {
142
"shape": "polygon",
143
"type": "vector",
144
"fixture": {
145
"density": 1.0,
146
"friction": 0.5,
147
"restitution": 0.2,
148
"isSensor": false,
149
"filter": {
150
"categoryBits": 1,
151
"maskBits": 65535,
152
"groupIndex": 0
153
}
154
},
155
"body": {
156
"linearVelocity": {
157
"x": 0,
158
"y": 0
159
},
160
"angularVelocity": 0,
161
"linearDamping": 0,
162
"angularDamping": 0,
163
"allowSleep": true,
164
"awake": true,
165
"fixedRotation": false,
166
"bullet": false,
167
"type": "static",
168
"active": true,
169
"inertiaScale": 1.0
170
},
171
"shapes": [
172
{
173
"type": "polygon",
174
"fill": {
175
"type": "color",
176
"alpha": 1
177
}
178
}
179
]
180
}
181
},
182
// Example of real-world usage.
183
{
184
"data": [
185
{
186
"x": -29.8,
187
"y": 8.2,
188
"angle": 1.571,
189
"data": [ -7.8, 9.6, -2.9, -7.4, 8, 0.8 ]
190
},
191
{
192
"x": -18.1,
193
"y": 5.4,
194
"angle": 0,
195
"data": [ 9.5, 0.3, -2.3, 10.6, -10.6, -5.3 ]
196
},
197
{
198
"x": -9.4,
199
"y": 11,
200
"angle": 0,
201
"data": [ 4.3, 1.6, -11, 5, 0.9, -5.3 ]
202
}
203
],
204
"properties": {
205
"shape": "polygon",
206
"type": "vector",
207
"fixture": {
208
"density": 1,
209
"friction": 0.5,
210
"restitution": 0.2,
211
"filter": {
212
"categoryBits": 6
213
}
214
}
215
}
216
}
217
]
218
}
219
220