melonjs 10.2.0 → 10.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +1 -1
  2. package/dist/melonjs.js +4435 -4283
  3. package/dist/melonjs.min.js +4 -4
  4. package/dist/melonjs.module.d.ts +3348 -3833
  5. package/dist/melonjs.module.js +4025 -3920
  6. package/package.json +13 -14
  7. package/src/audio/audio.js +45 -45
  8. package/src/camera/camera2d.js +78 -101
  9. package/src/entity/draggable.js +21 -29
  10. package/src/entity/droptarget.js +24 -31
  11. package/src/entity/entity.js +34 -38
  12. package/src/game.js +8 -8
  13. package/src/{shapes → geometries}/ellipse.js +46 -46
  14. package/src/{shapes → geometries}/line.js +14 -14
  15. package/src/{shapes → geometries}/poly.js +103 -54
  16. package/src/{shapes → geometries}/rectangle.js +73 -120
  17. package/src/index.js +18 -19
  18. package/src/input/gamepad.js +20 -20
  19. package/src/input/input.js +3 -3
  20. package/src/input/keyboard.js +122 -124
  21. package/src/input/pointer.js +102 -62
  22. package/src/input/pointerevent.js +97 -42
  23. package/src/lang/deprecated.js +29 -18
  24. package/src/level/level.js +34 -26
  25. package/src/level/tiled/TMXGroup.js +12 -13
  26. package/src/level/tiled/TMXLayer.js +41 -42
  27. package/src/level/tiled/TMXObject.js +76 -70
  28. package/src/level/tiled/TMXTile.js +13 -15
  29. package/src/level/tiled/TMXTileMap.js +26 -25
  30. package/src/level/tiled/TMXTileset.js +14 -15
  31. package/src/level/tiled/TMXTilesetGroup.js +5 -6
  32. package/src/level/tiled/TMXUtils.js +13 -11
  33. package/src/level/tiled/renderer/TMXHexagonalRenderer.js +3 -4
  34. package/src/level/tiled/renderer/TMXIsometricRenderer.js +3 -4
  35. package/src/level/tiled/renderer/TMXOrthogonalRenderer.js +2 -3
  36. package/src/level/tiled/renderer/TMXRenderer.js +18 -19
  37. package/src/level/tiled/renderer/TMXStaggeredRenderer.js +2 -3
  38. package/src/loader/loader.js +46 -40
  39. package/src/loader/loadingscreen.js +7 -7
  40. package/src/math/color.js +68 -88
  41. package/src/math/math.js +33 -33
  42. package/src/math/matrix2.js +70 -71
  43. package/src/math/matrix3.js +90 -91
  44. package/src/math/observable_vector2.js +91 -92
  45. package/src/math/observable_vector3.js +110 -106
  46. package/src/math/vector2.js +116 -104
  47. package/src/math/vector3.js +129 -110
  48. package/src/particles/emitter.js +116 -126
  49. package/src/particles/particle.js +4 -5
  50. package/src/particles/particlecontainer.js +2 -3
  51. package/src/physics/body.js +82 -83
  52. package/src/physics/bounds.js +64 -66
  53. package/src/physics/collision.js +21 -22
  54. package/src/physics/detector.js +13 -13
  55. package/src/physics/quadtree.js +26 -25
  56. package/src/physics/sat.js +21 -21
  57. package/src/physics/world.js +23 -22
  58. package/src/plugin/plugin.js +12 -13
  59. package/src/renderable/GUI.js +20 -26
  60. package/src/renderable/collectable.js +6 -7
  61. package/src/renderable/colorlayer.js +11 -12
  62. package/src/renderable/container.js +98 -81
  63. package/src/renderable/imagelayer.js +33 -35
  64. package/src/renderable/nineslicesprite.js +15 -16
  65. package/src/renderable/renderable.js +112 -111
  66. package/src/renderable/sprite.js +71 -58
  67. package/src/renderable/trigger.js +17 -19
  68. package/src/state/stage.js +14 -15
  69. package/src/state/state.js +78 -78
  70. package/src/system/device.js +137 -180
  71. package/src/system/event.js +116 -104
  72. package/src/system/pooling.js +15 -15
  73. package/src/system/save.js +9 -6
  74. package/src/system/timer.js +33 -33
  75. package/src/text/bitmaptext.js +39 -46
  76. package/src/text/bitmaptextdata.js +14 -15
  77. package/src/text/text.js +55 -58
  78. package/src/tweens/easing.js +5 -5
  79. package/src/tweens/interpolation.js +5 -5
  80. package/src/tweens/tween.js +49 -40
  81. package/src/utils/agent.js +12 -11
  82. package/src/utils/array.js +8 -8
  83. package/src/utils/file.js +7 -7
  84. package/src/utils/function.js +8 -8
  85. package/src/utils/string.js +19 -19
  86. package/src/utils/utils.js +23 -23
  87. package/src/video/canvas/canvas_renderer.js +127 -128
  88. package/src/video/renderer.js +69 -69
  89. package/src/video/texture.js +80 -82
  90. package/src/video/texture_cache.js +2 -4
  91. package/src/video/video.js +38 -38
  92. package/src/video/webgl/buffer/vertex.js +11 -3
  93. package/src/video/webgl/glshader.js +31 -32
  94. package/src/video/webgl/webgl_compositor.js +145 -127
  95. package/src/video/webgl/webgl_renderer.js +196 -175
@@ -1,7 +1,7 @@
1
1
  import Vector2d from "./../math/vector2.js";
2
- import Rect from "./../shapes/rectangle.js";
3
- import Ellipse from "./../shapes/ellipse.js";
4
- import Polygon from "./../shapes/poly.js";
2
+ import Rect from "./../geometries/rectangle.js";
3
+ import Ellipse from "./../geometries/ellipse.js";
4
+ import Polygon from "./../geometries/poly.js";
5
5
  import Bounds from "./bounds.js";
6
6
  import collision from "./collision.js";
7
7
  import * as arrayUtil from "./../utils/array.js";
@@ -13,10 +13,9 @@ import { world } from "./../game.js";
13
13
  /**
14
14
  * a Generic Physic Body Object with some physic properties and behavior functionality, to as a member of a Renderable.
15
15
  * @class Body
16
- * @memberOf me
17
- * @constructor
16
+ * @memberof me
18
17
  * @param {me.Renderable} ancestor the parent object this body is attached to
19
- * @param {me.Rect|me.Rect[]|me.Polygon|me.Polygon[]|me.Line|me.Line[]|me.Ellipse|me.Ellipse[]|me.Bounds|me.Bounds[]|Object} [shapes] a initial shape, list of shapes, or JSON object defining the body
18
+ * @param {me.Rect|me.Rect[]|me.Polygon|me.Polygon[]|me.Line|me.Line[]|me.Ellipse|me.Ellipse[]|me.Bounds|me.Bounds[]|object} [shapes] a initial shape, list of shapes, or JSON object defining the body
20
19
  * @param {Function} [onBodyUpdate] callback for when the body is updated (e.g. add/remove shapes)
21
20
  */
22
21
  class Body {
@@ -27,7 +26,7 @@ class Body {
27
26
  * a reference to the parent object that contains this body,
28
27
  * or undefined if it has not been added to one.
29
28
  * @public
30
- * @type me.Renderable
29
+ * @type {me.Renderable}
31
30
  * @default undefined
32
31
  * @name me.Body#ancestor
33
32
  */
@@ -38,7 +37,7 @@ class Body {
38
37
  * @public
39
38
  * @type {me.Bounds}
40
39
  * @name bounds
41
- * @memberOf me.Body
40
+ * @memberof me.Body
42
41
  */
43
42
  if (typeof this.bounds === "undefined") {
44
43
  this.bounds = new Bounds();
@@ -49,7 +48,7 @@ class Body {
49
48
  * @ignore
50
49
  * @type {me.Polygon[]|me.Line[]|me.Ellipse[]}
51
50
  * @name shapes
52
- * @memberOf me.Body
51
+ * @memberof me.Body
53
52
  */
54
53
  if (typeof this.shapes === "undefined") {
55
54
  this.shapes = [];
@@ -59,22 +58,22 @@ class Body {
59
58
  * The body collision mask, that defines what should collide with what.<br>
60
59
  * (by default will collide with all entities)
61
60
  * @ignore
62
- * @type Number
61
+ * @type {number}
63
62
  * @default me.collision.types.ALL_OBJECT
64
63
  * @name collisionMask
65
64
  * @see me.collision.types
66
- * @memberOf me.Body
65
+ * @memberof me.Body
67
66
  */
68
67
  this.collisionMask = collision.types.ALL_OBJECT;
69
68
 
70
69
  /**
71
70
  * define the collision type of the body for collision filtering
72
71
  * @public
73
- * @type Number
72
+ * @type {number}
74
73
  * @default me.collision.types.ENEMY_OBJECT
75
74
  * @name collisionType
76
75
  * @see me.collision.types
77
- * @memberOf me.Body
76
+ * @memberof me.Body
78
77
  * @example
79
78
  * // set the body collision type
80
79
  * myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;
@@ -84,10 +83,10 @@ class Body {
84
83
  /**
85
84
  * body velocity
86
85
  * @public
87
- * @type me.Vector2d
86
+ * @type {me.Vector2d}
88
87
  * @default <0,0>
89
88
  * @name vel
90
- * @memberOf me.Body
89
+ * @memberof me.Body
91
90
  */
92
91
  if (typeof this.vel === "undefined") {
93
92
  this.vel = new Vector2d();
@@ -98,11 +97,11 @@ class Body {
98
97
  * body force or acceleration (automatically) applied to the body.
99
98
  * when defining a force, user should also define a max velocity
100
99
  * @public
101
- * @type me.Vector2d
100
+ * @type {me.Vector2d}
102
101
  * @default <0,0>
103
102
  * @name force
104
103
  * @see me.Body.setMaxVelocity
105
- * @memberOf me.Body
104
+ * @memberof me.Body
106
105
  * @example
107
106
  * // define a default maximum acceleration, initial force and friction
108
107
  * this.body.force.set(0, 0);
@@ -129,10 +128,10 @@ class Body {
129
128
  /**
130
129
  * body friction
131
130
  * @public
132
- * @type me.Vector2d
131
+ * @type {me.Vector2d}
133
132
  * @default <0,0>
134
133
  * @name friction
135
- * @memberOf me.Body
134
+ * @memberof me.Body
136
135
  */
137
136
  if (typeof this.friction === "undefined") {
138
137
  this.friction = new Vector2d();
@@ -143,30 +142,30 @@ class Body {
143
142
  * the body bouciness level when colliding with other solid bodies :
144
143
  * a value of 0 will not bounce, a value of 1 will fully rebound.
145
144
  * @public
146
- * @type {Number}
145
+ * @type {number}
147
146
  * @default 0
148
147
  * @name bounce
149
- * @memberOf me.Body
148
+ * @memberof me.Body
150
149
  */
151
150
  this.bounce = 0;
152
151
 
153
152
  /**
154
153
  * the body mass
155
154
  * @public
156
- * @type {Number}
155
+ * @type {number}
157
156
  * @default 1
158
157
  * @name mass
159
- * @memberOf me.Body
158
+ * @memberof me.Body
160
159
  */
161
160
  this.mass = 1;
162
161
 
163
162
  /**
164
163
  * max velocity (to limit body velocity)
165
164
  * @public
166
- * @type me.Vector2d
165
+ * @type {me.Vector2d}
167
166
  * @default <490,490>
168
167
  * @name maxVel
169
- * @memberOf me.Body
168
+ * @memberof me.Body
170
169
  */
171
170
  if (typeof this.maxVel === "undefined") {
172
171
  this.maxVel = new Vector2d();
@@ -179,10 +178,10 @@ class Body {
179
178
  * either this body is a static body or not
180
179
  * @readonly
181
180
  * @public
182
- * @type Boolean
181
+ * @type {boolean}
183
182
  * @default false
184
183
  * @name isStatic
185
- * @memberOf me.Body
184
+ * @memberof me.Body
186
185
  */
187
186
  this.isStatic = false;
188
187
 
@@ -191,10 +190,10 @@ class Body {
191
190
  * The degree to which this body is affected by the world gravity
192
191
  * @public
193
192
  * @see me.World.gravity
194
- * @type Number
193
+ * @type {number}
195
194
  * @default 1.0
196
195
  * @name gravityScale
197
- * @memberOf me.Body
196
+ * @memberof me.Body
198
197
  */
199
198
  this.gravityScale = 1.0;
200
199
 
@@ -202,10 +201,10 @@ class Body {
202
201
  * If true this body won't be affected by the world gravity
203
202
  * @public
204
203
  * @see me.World.gravity
205
- * @type Boolean
204
+ * @type {boolean}
206
205
  * @default false
207
206
  * @name ignoreGravity
208
- * @memberOf me.Body
207
+ * @memberof me.Body
209
208
  */
210
209
  this.ignoreGravity = false;
211
210
 
@@ -215,10 +214,10 @@ class Body {
215
214
  * false if the object is standing on something<br>
216
215
  * @readonly
217
216
  * @public
218
- * @type Boolean
217
+ * @type {boolean}
219
218
  * @default false
220
219
  * @name falling
221
- * @memberOf me.Body
220
+ * @memberof me.Body
222
221
  */
223
222
  this.falling = false;
224
223
 
@@ -227,10 +226,10 @@ class Body {
227
226
  * equal true if the body is jumping<br>
228
227
  * @readonly
229
228
  * @public
230
- * @type Boolean
229
+ * @type {boolean}
231
230
  * @default false
232
231
  * @name jumping
233
- * @memberOf me.Body
232
+ * @memberof me.Body
234
233
  */
235
234
  this.jumping = false;
236
235
 
@@ -260,10 +259,10 @@ class Body {
260
259
  * set the body as a static body
261
260
  * static body do not move automatically and do not check againt collision with others
262
261
  * @name setStatic
263
- * @memberOf me.Body
262
+ * @memberof me.Body
264
263
  * @public
265
264
  * @function
266
- * @param {Boolean} [isStatic=true]
265
+ * @param {boolean} [isStatic=true]
267
266
  */
268
267
  setStatic(isStatic = true) {
269
268
  this.isStatic = isStatic === true;
@@ -273,11 +272,11 @@ class Body {
273
272
  * add a collision shape to this body <br>
274
273
  * (note: me.Rect objects will be converted to me.Polygon before being added)
275
274
  * @name addShape
276
- * @memberOf me.Body
275
+ * @memberof me.Body
277
276
  * @public
278
277
  * @function
279
- * @param {me.Rect|me.Polygon|me.Line|me.Ellipse|me.Bounds|Object} shape a shape or JSON object
280
- * @return {Number} the shape array length
278
+ * @param {me.Rect|me.Polygon|me.Line|me.Ellipse|me.Bounds|object} shape a shape or JSON object
279
+ * @returns {number} the shape array length
281
280
  * @example
282
281
  * // add a rectangle shape
283
282
  * this.body.addShape(new me.Rect(0, 0, image.width, image.height));
@@ -327,11 +326,11 @@ class Body {
327
326
  /**
328
327
  * set the body vertices to the given one
329
328
  * @name setVertices
330
- * @memberOf me.Body
329
+ * @memberof me.Body
331
330
  * @public
332
331
  * @function
333
332
  * @param {me.Vector2d[]} vertices an array of me.Vector2d points defining a convex hull
334
- * @param {Number} [index=0] the shape object for which to set the vertices
333
+ * @param {number} [index=0] the shape object for which to set the vertices
335
334
  * @param {boolean} [clear=true] either to reset the body definition before adding the new vertices
336
335
  */
337
336
  setVertices(vertices, index = 0, clear = true) {
@@ -354,11 +353,11 @@ class Body {
354
353
  /**
355
354
  * add the given vertices to the body shape
356
355
  * @name addVertices
357
- * @memberOf me.Body
356
+ * @memberof me.Body
358
357
  * @public
359
358
  * @function
360
359
  * @param {me.Vector2d[]} vertices an array of me.Vector2d points defining a convex hull
361
- * @param {Number} [index=0] the shape object for which to set the vertices
360
+ * @param {number} [index=0] the shape object for which to set the vertices
362
361
  */
363
362
  addVertices(vertices, index = 0) {
364
363
  this.setVertices(vertices, index, false);
@@ -368,13 +367,13 @@ class Body {
368
367
  * add collision mesh based on a JSON object
369
368
  * (this will also apply any physic properties defined in the given JSON file)
370
369
  * @name fromJSON
371
- * @memberOf me.Body
370
+ * @memberof me.Body
372
371
  * @public
373
372
  * @function
374
- * @param {Object} json a JSON object as exported from a Physics Editor tool
375
- * @param {String} [id] an optional shape identifier within the given the json object
373
+ * @param {object} json a JSON object as exported from a Physics Editor tool
374
+ * @param {string} [id] an optional shape identifier within the given the json object
376
375
  * @see https://www.codeandweb.com/physicseditor
377
- * @return {Number} how many shapes were added to the body
376
+ * @returns {number} how many shapes were added to the body
378
377
  * @example
379
378
  * // define the body based on the banana shape
380
379
  * this.body.fromJSON(me.loader.getJSON("shapesdef").banana);
@@ -412,11 +411,11 @@ class Body {
412
411
  /**
413
412
  * return the collision shape at the given index
414
413
  * @name getShape
415
- * @memberOf me.Body
414
+ * @memberof me.Body
416
415
  * @public
417
416
  * @function
418
- * @param {Number} [index=0] the shape object at the specified index
419
- * @return {me.Polygon|me.Line|me.Ellipse} shape a shape object if defined
417
+ * @param {number} [index=0] the shape object at the specified index
418
+ * @returns {me.Polygon|me.Line|me.Ellipse} shape a shape object if defined
420
419
  */
421
420
  getShape(index) {
422
421
  return this.shapes[index || 0];
@@ -425,9 +424,9 @@ class Body {
425
424
  /**
426
425
  * returns the AABB bounding box for this body
427
426
  * @name getBounds
428
- * @memberOf me.Body
427
+ * @memberof me.Body
429
428
  * @function
430
- * @return {me.Bounds} bounding box Rectangle object
429
+ * @returns {me.Bounds} bounding box Rectangle object
431
430
  */
432
431
  getBounds() {
433
432
  return this.bounds;
@@ -436,11 +435,11 @@ class Body {
436
435
  /**
437
436
  * remove the specified shape from the body shape list
438
437
  * @name removeShape
439
- * @memberOf me.Body
438
+ * @memberof me.Body
440
439
  * @public
441
440
  * @function
442
441
  * @param {me.Polygon|me.Line|me.Ellipse} shape a shape object
443
- * @return {Number} the shape array length
442
+ * @returns {number} the shape array length
444
443
  */
445
444
  removeShape(shape) {
446
445
  // clear the current bounds
@@ -458,11 +457,11 @@ class Body {
458
457
  /**
459
458
  * remove the shape at the given index from the body shape list
460
459
  * @name removeShapeAt
461
- * @memberOf me.Body
460
+ * @memberof me.Body
462
461
  * @public
463
462
  * @function
464
- * @param {Number} index the shape object at the specified index
465
- * @return {Number} the shape array length
463
+ * @param {number} index the shape object at the specified index
464
+ * @returns {number} the shape array length
466
465
  */
467
466
  removeShapeAt(index) {
468
467
  return this.removeShape(this.getShape(index));
@@ -473,11 +472,11 @@ class Body {
473
472
  * but it's also possible to specify 'collision filters' to provide a finer <br>
474
473
  * control over which entities can collide with each other.
475
474
  * @name setCollisionMask
476
- * @memberOf me.Body
475
+ * @memberof me.Body
477
476
  * @public
478
477
  * @function
479
478
  * @see me.collision.types
480
- * @param {Number} [bitmask = me.collision.types.ALL_OBJECT] the collision mask
479
+ * @param {number} [bitmask = me.collision.types.ALL_OBJECT] the collision mask
481
480
  * @example
482
481
  * // filter collision detection with collision shapes, enemies and collectables
483
482
  * myEntity.body.setCollisionMask(me.collision.types.WORLD_SHAPE | me.collision.types.ENEMY_OBJECT | me.collision.types.COLLECTABLE_OBJECT);
@@ -492,11 +491,11 @@ class Body {
492
491
  /**
493
492
  * define the collision type of the body for collision filtering
494
493
  * @name setCollisionType
495
- * @memberOf me.Body
494
+ * @memberof me.Body
496
495
  * @public
497
496
  * @function
498
497
  * @see me.collision.types
499
- * @param {Number} type the collision type
498
+ * @param {number} type the collision type
500
499
  * @example
501
500
  * // set the body collision type
502
501
  * myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;
@@ -515,7 +514,7 @@ class Body {
515
514
  * the built-in function to solve the collision response
516
515
  * @protected
517
516
  * @name respondToCollision
518
- * @memberOf me.Body
517
+ * @memberof me.Body
519
518
  * @function
520
519
  * @param {me.collision.ResponseObject} response the collision response object
521
520
  */
@@ -555,10 +554,10 @@ class Body {
555
554
  * - The index of element in the array. <br>
556
555
  * - The array forEach() was called upon. <br>
557
556
  * @name forEach
558
- * @memberOf me.Body.prototype
557
+ * @memberof me.Body.prototype
559
558
  * @function
560
559
  * @param {Function} callback fnction to execute on each element
561
- * @param {Object} [thisArg] value to use as this(i.e reference Object) when executing callback.
560
+ * @param {object} [thisArg] value to use as this(i.e reference Object) when executing callback.
562
561
  * @example
563
562
  * // iterate through all shapes of the physic body
564
563
  * mySprite.body.forEach((shape) => {
@@ -592,20 +591,20 @@ class Body {
592
591
  /**
593
592
  * Returns true if the any of the shape composing the body contains the given point.
594
593
  * @name contains
595
- * @memberOf me.Body
594
+ * @memberof me.Body
596
595
  * @function
597
596
  * @param {me.Vector2d} point
598
- * @return {boolean} true if contains
597
+ * @returns {boolean} true if contains
599
598
  */
600
599
 
601
600
  /**
602
601
  * Returns true if the any of the shape composing the body contains the given point.
603
602
  * @name contains
604
- * @memberOf me.Body
603
+ * @memberof me.Body
605
604
  * @function
606
- * @param {Number} x x coordinate
607
- * @param {Number} y y coordinate
608
- * @return {boolean} true if contains
605
+ * @param {number} x x coordinate
606
+ * @param {number} y y coordinate
607
+ * @returns {boolean} true if contains
609
608
  */
610
609
  contains() {
611
610
  var _x, _y;
@@ -635,11 +634,11 @@ class Body {
635
634
  * Rotate this body (counter-clockwise) by the specified angle (in radians).
636
635
  * Unless specified the body will be rotated around its center point
637
636
  * @name rotate
638
- * @memberOf me.Body
637
+ * @memberof me.Body
639
638
  * @function
640
- * @param {Number} angle The angle to rotate (in radians)
639
+ * @param {number} angle The angle to rotate (in radians)
641
640
  * @param {me.Vector2d|me.ObservableVector2d} [v=me.Body.getBounds().center] an optional point to rotate around
642
- * @return {me.Body} Reference to this object for method chaining
641
+ * @returns {me.Body} Reference to this object for method chaining
643
642
  */
644
643
  rotate(angle, v = this.getBounds().center) {
645
644
  this.bounds.clear();
@@ -662,10 +661,10 @@ class Body {
662
661
  /**
663
662
  * cap the body velocity (body.maxVel property) to the specified value<br>
664
663
  * @name setMaxVelocity
665
- * @memberOf me.Body
664
+ * @memberof me.Body
666
665
  * @function
667
- * @param {Number} x max velocity on x axis
668
- * @param {Number} y max velocity on y axis
666
+ * @param {number} x max velocity on x axis
667
+ * @param {number} y max velocity on y axis
669
668
  * @protected
670
669
  */
671
670
  setMaxVelocity(x, y) {
@@ -676,10 +675,10 @@ class Body {
676
675
  /**
677
676
  * set the body default friction
678
677
  * @name setFriction
679
- * @memberOf me.Body
678
+ * @memberof me.Body
680
679
  * @function
681
- * @param {Number} x horizontal friction
682
- * @param {Number} y vertical friction
680
+ * @param {number} x horizontal friction
681
+ * @param {number} y vertical friction
683
682
  * @protected
684
683
  */
685
684
  setFriction(x = 0, y = 0) {
@@ -763,10 +762,10 @@ class Body {
763
762
  * At this time a call to Body.Update does not call the onBodyUpdate callback that is listed in the constructor arguments.
764
763
  * @name update
765
764
  * @ignore
766
- * @memberOf me.Body
765
+ * @memberof me.Body
767
766
  * @function
768
- * @return {boolean} true if resulting velocity is different than 0
769
- * @see source code for me.Body.computeVelocity (private member)
767
+ * @param {number} dt time since the last update in milliseconds.
768
+ * @returns {boolean} true if resulting velocity is different than 0
770
769
  */
771
770
  update(dt) {
772
771
  // update the velocity