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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
|
## Classes
<dl>
<dt><a href="#AngleComponent">AngleComponent</a> ⇐ <code>external:Serpentity.Component</code></dt>
<dd></dd>
<dt><a href="#BodyComponent">BodyComponent</a> ⇐ <code>external:Serpentity.Component</code></dt>
<dd></dd>
<dt><a href="#CoupledEntitiesComponent">CoupledEntitiesComponent</a> ⇐ <code>external:Serpentity.Component</code></dt>
<dd></dd>
<dt><a href="#PixiContainerComponent">PixiContainerComponent</a> ⇐ <code>external:Serpentity.Component</code></dt>
<dd></dd>
<dt><a href="#PhysicalWithAttributesNode">PhysicalWithAttributesNode</a> ⇐ <code>external:Serpentity.Node</code></dt>
<dd></dd>
<dt><a href="#PhysicalNode">PhysicalNode</a> ⇐ <code>external:Serpentity.Node</code></dt>
<dd></dd>
<dt><a href="#RenderableCoupleNode">RenderableCoupleNode</a> ⇐ <code>external:Serpentity.Node</code></dt>
<dd></dd>
<dt><a href="#RenderableWithAttributesNode">RenderableWithAttributesNode</a> ⇐ <code>external:Serpentity.Node</code></dt>
<dd></dd>
<dt><a href="#RenderableNode">RenderableNode</a> ⇐ <code>external:Serpentity.Node</code></dt>
<dd></dd>
<dt><a href="#Sumo">Sumo</a></dt>
<dd></dd>
<dt><a href="#AttributesToRenderableSystem">AttributesToRenderableSystem</a> ⇐ <code>external:Serpentity.System</code></dt>
<dd></dd>
<dt><a href="#CreateCouplingLineSystem">CreateCouplingLineSystem</a> ⇐ <code>external:Serpentity.System</code></dt>
<dd></dd>
<dt><a href="#PhysicsToAttributesSystem">PhysicsToAttributesSystem</a> ⇐ <code>external:Serpentity.System</code></dt>
<dd></dd>
<dt><a href="#PhysicsWorldControlSystem">PhysicsWorldControlSystem</a> ⇐ <code>external:Serpentity.System</code></dt>
<dd></dd>
<dt><a href="#RenderSystem">RenderSystem</a> ⇐ <code>external:Serpentity.System</code></dt>
<dd></dd>
</dl>
## Members
<dl>
<dt><a href="#PixiFactory">PixiFactory</a> : <code>object</code></dt>
<dd><p>Factory object that contains many methods to create prefab pixi
objects</p>
</dd>
<dt><a href="#SumoFactory">SumoFactory</a> : <code>object</code></dt>
<dd><p>Factory object that contains many methods to create prefab entities.</p>
</dd>
</dl>
<a name="AngleComponent"></a>
## AngleComponent ⇐ <code>external:Serpentity.Component</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Component</code>
<a name="new_AngleComponent_new"></a>
### new AngleComponent(config)
Component that stores an angle
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="BodyComponent"></a>
## BodyComponent ⇐ <code>external:Serpentity.Component</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Component</code>
<a name="new_BodyComponent_new"></a>
### new BodyComponent(config)
Component that stores a body for physics calculation
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="CoupledEntitiesComponent"></a>
## CoupledEntitiesComponent ⇐ <code>external:Serpentity.Component</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Component</code>
<a name="new_CoupledEntitiesComponent_new"></a>
### new CoupledEntitiesComponent(config)
Component that stores a number of entities coupled to this one.
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="PixiContainerComponent"></a>
## PixiContainerComponent ⇐ <code>external:Serpentity.Component</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Component</code>
* [PixiContainerComponent](#PixiContainerComponent) ⇐ <code>external:Serpentity.Component</code>
* [new PixiContainerComponent(config)](#new_PixiContainerComponent_new)
* [.container](#PixiContainerComponent+container)
<a name="new_PixiContainerComponent_new"></a>
### new PixiContainerComponent(config)
Component that stores a pixi container
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="PixiContainerComponent+container"></a>
### pixiContainerComponent.container
The properthy that holds the pixi container
**Kind**: instance property of [<code>PixiContainerComponent</code>](#PixiContainerComponent)
**Properties**
| Name | Type |
| --- | --- |
| container | <code>external:PixiJs.Container</code> |
<a name="PhysicalWithAttributesNode"></a>
## PhysicalWithAttributesNode ⇐ <code>external:Serpentity.Node</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Node</code>
* [PhysicalWithAttributesNode](#PhysicalWithAttributesNode) ⇐ <code>external:Serpentity.Node</code>
* [new PhysicalWithAttributesNode()](#new_PhysicalWithAttributesNode_new)
* [.types](#PhysicalWithAttributesNode.types)
<a name="new_PhysicalWithAttributesNode_new"></a>
### new PhysicalWithAttributesNode()
Node identifying an entity that can interact with physics and has
components updated from its values
<a name="PhysicalWithAttributesNode.types"></a>
### PhysicalWithAttributesNode.types
Holds the types that are used to identify an entity with a physics
object and external attributes
**Kind**: static property of [<code>PhysicalWithAttributesNode</code>](#PhysicalWithAttributesNode)
**Properties**
| Name | Type |
| --- | --- |
| types | <code>object</code> |
<a name="PhysicalNode"></a>
## PhysicalNode ⇐ <code>external:Serpentity.Node</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Node</code>
* [PhysicalNode](#PhysicalNode) ⇐ <code>external:Serpentity.Node</code>
* [new PhysicalNode()](#new_PhysicalNode_new)
* [.types](#PhysicalNode.types)
<a name="new_PhysicalNode_new"></a>
### new PhysicalNode()
Node identifying an entity that can interact with physics
<a name="PhysicalNode.types"></a>
### PhysicalNode.types
Holds the types that are used to identify an entity with a physical
body
**Kind**: static property of [<code>PhysicalNode</code>](#PhysicalNode)
**Properties**
| Name | Type |
| --- | --- |
| types | <code>object</code> |
<a name="RenderableCoupleNode"></a>
## RenderableCoupleNode ⇐ <code>external:Serpentity.Node</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Node</code>
* [RenderableCoupleNode](#RenderableCoupleNode) ⇐ <code>external:Serpentity.Node</code>
* [new RenderableCoupleNode()](#new_RenderableCoupleNode_new)
* [.types](#RenderableCoupleNode.types)
<a name="new_RenderableCoupleNode_new"></a>
### new RenderableCoupleNode()
Node identifying an entity that has coupled entities and can be
rendered
<a name="RenderableCoupleNode.types"></a>
### RenderableCoupleNode.types
Holds the types that are used to identify a renderable couple
**Kind**: static property of [<code>RenderableCoupleNode</code>](#RenderableCoupleNode)
**Properties**
| Name | Type |
| --- | --- |
| types | <code>object</code> |
<a name="RenderableWithAttributesNode"></a>
## RenderableWithAttributesNode ⇐ <code>external:Serpentity.Node</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Node</code>
* [RenderableWithAttributesNode](#RenderableWithAttributesNode) ⇐ <code>external:Serpentity.Node</code>
* [new RenderableWithAttributesNode()](#new_RenderableWithAttributesNode_new)
* [.types](#RenderableWithAttributesNode.types)
<a name="new_RenderableWithAttributesNode_new"></a>
### new RenderableWithAttributesNode()
Node identifying a renderable entity, should have position and a
symbol to render
<a name="RenderableWithAttributesNode.types"></a>
### RenderableWithAttributesNode.types
Holds the types that are used to identify a renderable with external
attributes
**Kind**: static property of [<code>RenderableWithAttributesNode</code>](#RenderableWithAttributesNode)
**Properties**
| Name | Type |
| --- | --- |
| types | <code>object</code> |
<a name="RenderableNode"></a>
## RenderableNode ⇐ <code>external:Serpentity.Node</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.Node</code>
* [RenderableNode](#RenderableNode) ⇐ <code>external:Serpentity.Node</code>
* [new RenderableNode()](#new_RenderableNode_new)
* [.types](#RenderableNode.types)
<a name="new_RenderableNode_new"></a>
### new RenderableNode()
Node identifying a renderable entity, should have a pixi renderable
<a name="RenderableNode.types"></a>
### RenderableNode.types
Holds the types that are used to identify a renderable entity
**Kind**: static property of [<code>RenderableNode</code>](#RenderableNode)
**Properties**
| Name | Type |
| --- | --- |
| types | <code>object</code> |
<a name="Sumo"></a>
## Sumo
**Kind**: global class
**Properties**
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [element] | <code>HTMLElement</code> | <code></code> | the element in which to render. Required, will throw if not provided |
| [fps] | <code>Number</code> | <code>60</code> | the fps target to maintain |
| [verticalResolution] | <code>Number</code> | <code>224</code> | how many pixels to render in the vertical axis (gets scaled if the canvas is larger) |
| [aspectRatio] | <code>Array.<Number></code> | <code>[2.76, 1]</code> | the aspect ratio experssed as an array of two numbers, where aspect ratio x:y is [x, y] (eg. [16, 9]) |
* [Sumo](#Sumo)
* [new Sumo(config)](#new_Sumo_new)
* [.startLoop()](#Sumo+startLoop)
* [.pauseLoop()](#Sumo+pauseLoop)
<a name="new_Sumo_new"></a>
### new Sumo(config)
Sumo - main entry point. Attached to window->load
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | the configuration to extend the object |
<a name="Sumo+startLoop"></a>
### sumo.startLoop()
Starts the main loop. Resets the FPS (if you change it it won't go
live until after you stop and start the loop)
**Kind**: instance method of [<code>Sumo</code>](#Sumo)
<a name="Sumo+pauseLoop"></a>
### sumo.pauseLoop()
Pauses the loop
**Kind**: instance method of [<code>Sumo</code>](#Sumo)
<a name="AttributesToRenderableSystem"></a>
## AttributesToRenderableSystem ⇐ <code>external:Serpentity.System</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.System</code>
* [AttributesToRenderableSystem](#AttributesToRenderableSystem) ⇐ <code>external:Serpentity.System</code>
* [new AttributesToRenderableSystem(config)](#new_AttributesToRenderableSystem_new)
* [.added(engine)](#AttributesToRenderableSystem+added)
* [.removed()](#AttributesToRenderableSystem+removed)
* [.update(currentFrameDuration)](#AttributesToRenderableSystem+update)
<a name="new_AttributesToRenderableSystem_new"></a>
### new AttributesToRenderableSystem(config)
Updates the renderables based on their attribuets
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="AttributesToRenderableSystem+added"></a>
### attributesToRenderableSystem.added(engine)
Initializes system when added. Requests renderable nodes and
attaches to event listeners to add / remove them to pixi stage
**Kind**: instance method of [<code>AttributesToRenderableSystem</code>](#AttributesToRenderableSystem)
| Param | Type | Description |
| --- | --- | --- |
| engine | <code>external:Serpentity.Engine</code> | the serpentity engine to which we are getting added |
<a name="AttributesToRenderableSystem+removed"></a>
### attributesToRenderableSystem.removed()
Clears system resources when removed.
**Kind**: instance method of [<code>AttributesToRenderableSystem</code>](#AttributesToRenderableSystem)
<a name="AttributesToRenderableSystem+update"></a>
### attributesToRenderableSystem.update(currentFrameDuration)
Runs on every update of the loop. Updates the graphics so they're
rendered correctly
**Kind**: instance method of [<code>AttributesToRenderableSystem</code>](#AttributesToRenderableSystem)
| Param | Type | Description |
| --- | --- | --- |
| currentFrameDuration | <code>Number</code> | the duration of the current frame |
<a name="CreateCouplingLineSystem"></a>
## CreateCouplingLineSystem ⇐ <code>external:Serpentity.System</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.System</code>
* [CreateCouplingLineSystem](#CreateCouplingLineSystem) ⇐ <code>external:Serpentity.System</code>
* [new CreateCouplingLineSystem(config)](#new_CreateCouplingLineSystem_new)
* [.added(engine)](#CreateCouplingLineSystem+added)
* [.removed()](#CreateCouplingLineSystem+removed)
* [.update(currentFrameDuration)](#CreateCouplingLineSystem+update)
<a name="new_CreateCouplingLineSystem_new"></a>
### new CreateCouplingLineSystem(config)
Renders renderable objects using pixi
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="CreateCouplingLineSystem+added"></a>
### createCouplingLineSystem.added(engine)
Initializes system when added. Requests renderable nodes and
**Kind**: instance method of [<code>CreateCouplingLineSystem</code>](#CreateCouplingLineSystem)
| Param | Type | Description |
| --- | --- | --- |
| engine | <code>external:Serpentity.Engine</code> | the serpentity engine to which we are getting added |
<a name="CreateCouplingLineSystem+removed"></a>
### createCouplingLineSystem.removed()
Clears system resources when removed.
**Kind**: instance method of [<code>CreateCouplingLineSystem</code>](#CreateCouplingLineSystem)
<a name="CreateCouplingLineSystem+update"></a>
### createCouplingLineSystem.update(currentFrameDuration)
Runs on every update of the loop. Does nothing.
**Kind**: instance method of [<code>CreateCouplingLineSystem</code>](#CreateCouplingLineSystem)
| Param | Type | Description |
| --- | --- | --- |
| currentFrameDuration | <code>Number</code> | the duration of the current frame |
<a name="PhysicsToAttributesSystem"></a>
## PhysicsToAttributesSystem ⇐ <code>external:Serpentity.System</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.System</code>
* [PhysicsToAttributesSystem](#PhysicsToAttributesSystem) ⇐ <code>external:Serpentity.System</code>
* [new PhysicsToAttributesSystem(config)](#new_PhysicsToAttributesSystem_new)
* [.added(engine)](#PhysicsToAttributesSystem+added)
* [.removed()](#PhysicsToAttributesSystem+removed)
* [.update(currentFrameDuration)](#PhysicsToAttributesSystem+update)
<a name="new_PhysicsToAttributesSystem_new"></a>
### new PhysicsToAttributesSystem(config)
Distribuets physics data to the related components
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="PhysicsToAttributesSystem+added"></a>
### physicsToAttributesSystem.added(engine)
Initializes system when added. Requests physics nodes
**Kind**: instance method of [<code>PhysicsToAttributesSystem</code>](#PhysicsToAttributesSystem)
| Param | Type | Description |
| --- | --- | --- |
| engine | <code>external:Serpentity.Engine</code> | the serpentity engine to which we are getting added |
<a name="PhysicsToAttributesSystem+removed"></a>
### physicsToAttributesSystem.removed()
Clears system resources when removed.
**Kind**: instance method of [<code>PhysicsToAttributesSystem</code>](#PhysicsToAttributesSystem)
<a name="PhysicsToAttributesSystem+update"></a>
### physicsToAttributesSystem.update(currentFrameDuration)
Runs on every update of the loop. Updates the other components
based on physics
**Kind**: instance method of [<code>PhysicsToAttributesSystem</code>](#PhysicsToAttributesSystem)
| Param | Type | Description |
| --- | --- | --- |
| currentFrameDuration | <code>Number</code> | the duration of the current frame |
<a name="PhysicsWorldControlSystem"></a>
## PhysicsWorldControlSystem ⇐ <code>external:Serpentity.System</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.System</code>
* [PhysicsWorldControlSystem](#PhysicsWorldControlSystem) ⇐ <code>external:Serpentity.System</code>
* [new PhysicsWorldControlSystem(config)](#new_PhysicsWorldControlSystem_new)
* [.added(engine)](#PhysicsWorldControlSystem+added)
* [.removed()](#PhysicsWorldControlSystem+removed)
* [.update(currentFrameDuration)](#PhysicsWorldControlSystem+update)
<a name="new_PhysicsWorldControlSystem_new"></a>
### new PhysicsWorldControlSystem(config)
Adds and removes objects to the physics world and calls update
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="PhysicsWorldControlSystem+added"></a>
### physicsWorldControlSystem.added(engine)
Initializes system when added. Requests physics nodes and
attaches to event listeners to add / remove them to pixi stage
**Kind**: instance method of [<code>PhysicsWorldControlSystem</code>](#PhysicsWorldControlSystem)
| Param | Type | Description |
| --- | --- | --- |
| engine | <code>external:Serpentity.Engine</code> | the serpentity engine to which we are getting added |
<a name="PhysicsWorldControlSystem+removed"></a>
### physicsWorldControlSystem.removed()
Clears system resources when removed.
**Kind**: instance method of [<code>PhysicsWorldControlSystem</code>](#PhysicsWorldControlSystem)
<a name="PhysicsWorldControlSystem+update"></a>
### physicsWorldControlSystem.update(currentFrameDuration)
Runs on every update of the loop. Updates the physics
**Kind**: instance method of [<code>PhysicsWorldControlSystem</code>](#PhysicsWorldControlSystem)
| Param | Type | Description |
| --- | --- | --- |
| currentFrameDuration | <code>Number</code> | the duration of the current frame |
<a name="RenderSystem"></a>
## RenderSystem ⇐ <code>external:Serpentity.System</code>
**Kind**: global class
**Extends**: <code>external:Serpentity.System</code>
* [RenderSystem](#RenderSystem) ⇐ <code>external:Serpentity.System</code>
* [new RenderSystem(config)](#new_RenderSystem_new)
* [.added(engine)](#RenderSystem+added)
* [.removed()](#RenderSystem+removed)
* [.update(currentFrameDuration)](#RenderSystem+update)
<a name="new_RenderSystem_new"></a>
### new RenderSystem(config)
Renders renderable objects using pixi
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | a configuration object to extend. |
<a name="RenderSystem+added"></a>
### renderSystem.added(engine)
Initializes system when added. Requests renderable nodes and
attaches to event listeners to add / remove them to pixi stage
**Kind**: instance method of [<code>RenderSystem</code>](#RenderSystem)
| Param | Type | Description |
| --- | --- | --- |
| engine | <code>external:Serpentity.Engine</code> | the serpentity engine to which we are getting added |
<a name="RenderSystem+removed"></a>
### renderSystem.removed()
Clears system resources when removed.
**Kind**: instance method of [<code>RenderSystem</code>](#RenderSystem)
<a name="RenderSystem+update"></a>
### renderSystem.update(currentFrameDuration)
Runs on every update of the loop. Does nothing.
**Kind**: instance method of [<code>RenderSystem</code>](#RenderSystem)
| Param | Type | Description |
| --- | --- | --- |
| currentFrameDuration | <code>Number</code> | the duration of the current frame |
<a name="PixiFactory"></a>
## PixiFactory : <code>object</code>
Factory object that contains many methods to create prefab pixi
objects
**Kind**: global variable
* [PixiFactory](#PixiFactory) : <code>object</code>
* [.createSumo()](#PixiFactory.createSumo) ⇒ <code>external:CreateJs.Container</code>
* [.createEmptyGraphic()](#PixiFactory.createEmptyGraphic) ⇒ <code>external:CreateJs.Container</code>
<a name="PixiFactory.createSumo"></a>
### PixiFactory.createSumo() ⇒ <code>external:CreateJs.Container</code>
Creates a sumo container
**Kind**: static method of [<code>PixiFactory</code>](#PixiFactory)
**Returns**: <code>external:CreateJs.Container</code> - the created container
<a name="PixiFactory.createEmptyGraphic"></a>
### PixiFactory.createEmptyGraphic() ⇒ <code>external:CreateJs.Container</code>
Creates an empty graphic
**Kind**: static method of [<code>PixiFactory</code>](#PixiFactory)
**Returns**: <code>external:CreateJs.Container</code> - the created container
<a name="SumoFactory"></a>
## SumoFactory : <code>object</code>
Factory object that contains many methods to create prefab entities.
**Kind**: global variable
* [SumoFactory](#SumoFactory) : <code>object</code>
* [.createSumo([engine], [config])](#SumoFactory.createSumo) ⇒ <code>external:Serpentity.Entity</code>
* [.createRubberBand([engine], [config])](#SumoFactory.createRubberBand) ⇒ <code>external:Serpentity.Entity</code>
<a name="SumoFactory.createSumo"></a>
### SumoFactory.createSumo([engine], [config]) ⇒ <code>external:Serpentity.Entity</code>
Creates a sumo entity and adds it to the engine. Can override
position in the config object
**Kind**: static method of [<code>SumoFactory</code>](#SumoFactory)
**Returns**: <code>external:Serpentity.Entity</code> - the created entity
| Param | Type | Description |
| --- | --- | --- |
| [engine] | <code>external:Serpentity</code> | the serpentity engine to attach to. If not sent, it will not be attached. |
| [config] | <code>object</code> | the config to override the entity, accepts the key `position` as an object with an x and y property. |
<a name="SumoFactory.createRubberBand"></a>
### SumoFactory.createRubberBand([engine], [config]) ⇒ <code>external:Serpentity.Entity</code>
Creates a rubber band entity and adds it to the engine.
**Kind**: static method of [<code>SumoFactory</code>](#SumoFactory)
**Returns**: <code>external:Serpentity.Entity</code> - the created entity
| Param | Type | Description |
| --- | --- | --- |
| [engine] | <code>external:Serpentity</code> | the serpentity engine to attach to. If not sent, it will not be attached. |
| [config] | <code>object</code> | the config to override the entity, it must include entityA and entityB which will be tied by it. If they are not sent or don't have a physics body, this will throw. |
|