melonjs 10.5.1 → 10.6.1

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 (47) hide show
  1. package/README.md +4 -6
  2. package/dist/melonjs.js +4342 -4182
  3. package/dist/melonjs.min.js +14 -14
  4. package/dist/melonjs.module.d.ts +250 -267
  5. package/dist/melonjs.module.js +4752 -4606
  6. package/package.json +10 -10
  7. package/src/camera/camera2d.js +11 -10
  8. package/src/geometries/ellipse.js +1 -1
  9. package/src/geometries/poly.js +1 -1
  10. package/src/index.js +1 -1
  11. package/src/input/pointerevent.js +1 -1
  12. package/src/level/tiled/TMXLayer.js +1 -1
  13. package/src/level/tiled/TMXTileMap.js +1 -1
  14. package/src/level/tiled/renderer/TMXHexagonalRenderer.js +1 -1
  15. package/src/level/tiled/renderer/TMXIsometricRenderer.js +1 -1
  16. package/src/level/tiled/renderer/TMXOrthogonalRenderer.js +1 -1
  17. package/src/level/tiled/renderer/TMXRenderer.js +1 -1
  18. package/src/level/tiled/renderer/TMXStaggeredRenderer.js +1 -1
  19. package/src/loader/loadingscreen.js +1 -1
  20. package/src/math/color.js +1 -1
  21. package/src/math/matrix2.js +2 -2
  22. package/src/math/matrix3.js +1 -1
  23. package/src/math/observable_vector2.js +1 -1
  24. package/src/math/observable_vector3.js +1 -1
  25. package/src/math/vector2.js +1 -1
  26. package/src/math/vector3.js +1 -1
  27. package/src/particles/emitter.js +1 -1
  28. package/src/physics/body.js +7 -7
  29. package/src/renderable/colorlayer.js +1 -1
  30. package/src/renderable/container.js +11 -1
  31. package/src/renderable/imagelayer.js +1 -1
  32. package/src/renderable/nineslicesprite.js +6 -3
  33. package/src/renderable/renderable.js +18 -1
  34. package/src/renderable/sprite.js +2 -2
  35. package/src/state/state.js +6 -6
  36. package/src/system/pooling.js +150 -155
  37. package/src/text/bitmaptext.js +35 -91
  38. package/src/text/text.js +82 -145
  39. package/src/text/textmetrics.js +168 -0
  40. package/src/text/textstyle.js +14 -0
  41. package/src/video/canvas/canvas_renderer.js +21 -5
  42. package/src/video/renderer.js +1 -3
  43. package/src/video/texture.js +1 -1
  44. package/src/video/webgl/buffer/vertex.js +0 -3
  45. package/src/video/webgl/glshader.js +0 -2
  46. package/src/video/webgl/webgl_compositor.js +11 -0
  47. package/src/video/webgl/webgl_renderer.js +58 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "melonjs",
3
- "version": "10.5.1",
3
+ "version": "10.6.1",
4
4
  "description": "melonJS Game Engine",
5
5
  "homepage": "http://www.melonjs.org/",
6
6
  "keywords": [
@@ -60,28 +60,28 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@rollup/plugin-buble": "^0.21.3",
63
- "@rollup/plugin-commonjs": "^21.0.2",
64
- "@rollup/plugin-node-resolve": "^13.1.3",
63
+ "@rollup/plugin-commonjs": "^22.0.0",
64
+ "@rollup/plugin-node-resolve": "^13.2.1",
65
65
  "@rollup/plugin-replace": "^4.0.0",
66
66
  "@types/offscreencanvas": "^2019.6.4",
67
67
  "cheerio": "^1.0.0-rc.10",
68
68
  "del-cli": "^4.0.1",
69
- "eslint": "^8.11.0",
70
- "eslint-plugin-jsdoc": "^38.0.4",
71
- "jasmine-core": "^4.0.1",
69
+ "eslint": "^8.14.0",
70
+ "eslint-plugin-jsdoc": "^39.2.8",
71
+ "jasmine-core": "^4.1.0",
72
72
  "jsdoc": "^3.6.10",
73
- "karma": "^6.3.17",
73
+ "karma": "^6.3.19",
74
74
  "karma-chrome-launcher": "^3.1.1",
75
75
  "karma-coverage": "^2.2.0",
76
76
  "karma-html-detailed-reporter": "^2.1.0",
77
- "karma-jasmine": "^4.0.1",
77
+ "karma-jasmine": "^5.0.0",
78
78
  "karma-nyan-reporter": "0.2.5",
79
79
  "qs": "^6.10.3",
80
- "rollup": "^2.70.1",
80
+ "rollup": "^2.70.2",
81
81
  "rollup-plugin-bundle-size": "^1.0.3",
82
82
  "rollup-plugin-string": "^3.0.0",
83
83
  "terser": "^5.12.1",
84
- "typescript": "^4.6.2"
84
+ "typescript": "^4.6.3"
85
85
  },
86
86
  "scripts": {
87
87
  "build": "npm run lint && rollup -c --silent",
@@ -7,7 +7,7 @@ import Matrix3d from "./../math/matrix3.js";
7
7
  import Rect from "./../geometries/rectangle.js";
8
8
  import { renderer } from "./../video/video.js";
9
9
  import * as event from "./../system/event.js";
10
- import pool from "./../system/pooling.js";
10
+ import * as pool from "./../system/pooling.js";
11
11
  import Renderable from "./../renderable/renderable.js";
12
12
  import {clamp, toBeCloseTo} from "./../math/math.js";
13
13
  import { world } from "./../game.js";
@@ -408,7 +408,7 @@ class Camera2d extends Renderable {
408
408
 
409
409
  //publish the VIEWPORT_ONCHANGE event if necessary
410
410
  if (_x !== this.pos.x || _y !== this.pos.y) {
411
- event.emit(event.VIEWPORT_ONCHANGE, this.pos);
411
+ this.isDirty = true;
412
412
  }
413
413
  }
414
414
 
@@ -447,22 +447,22 @@ class Camera2d extends Renderable {
447
447
  if (toBeCloseTo(targetV.x, this.pos.x, 2) &&
448
448
  toBeCloseTo(targetV.y, this.pos.y, 2)) {
449
449
  this.pos.setV(targetV);
450
- return false;
450
+ return;
451
451
  } else {
452
452
  this.pos.lerp(targetV, this.damping);
453
453
  }
454
454
  } else {
455
455
  this.pos.setV(targetV);
456
456
  }
457
- return true;
457
+ this.isDirty = true;
458
458
  }
459
459
  }
460
- return false;
461
460
  }
462
461
 
463
462
  /** @ignore */
464
463
  update(dt) {
465
- var updated = this.updateTarget(dt);
464
+ // update the camera position
465
+ this.updateTarget(dt);
466
466
 
467
467
  if (this._shake.duration > 0) {
468
468
  this._shake.duration -= dt;
@@ -484,17 +484,17 @@ class Camera2d extends Renderable {
484
484
  }
485
485
  }
486
486
  // updated!
487
- updated = true;
487
+ this.isDirty = true;
488
488
  }
489
489
 
490
- if (updated === true) {
490
+ if (this.isDirty === true) {
491
491
  //publish the corresponding message
492
492
  event.emit(event.VIEWPORT_ONCHANGE, this.pos);
493
493
  }
494
494
 
495
495
  // check for fade/flash effect
496
496
  if ((this._fadeIn.tween != null) || (this._fadeOut.tween != null)) {
497
- updated = true;
497
+ this.isDirty = true;
498
498
  }
499
499
 
500
500
  if (!this.currentTransform.isIdentity()) {
@@ -503,7 +503,8 @@ class Camera2d extends Renderable {
503
503
  // reset to default
504
504
  this.invCurrentTransform.identity();
505
505
  }
506
- return updated;
506
+
507
+ return super.update(dt);
507
508
  }
508
509
 
509
510
  /**
@@ -1,5 +1,5 @@
1
1
  import Vector2d from "./../math/vector2.js";
2
- import pool from "./../system/pooling.js";
2
+ import * as pool from "./../system/pooling.js";
3
3
 
4
4
  /**
5
5
  * @classdesc
@@ -1,6 +1,6 @@
1
1
  import earcut from "earcut";
2
2
  import Vector2d from "./../math/vector2.js";
3
- import pool from "./../system/pooling.js";
3
+ import * as pool from "./../system/pooling.js";
4
4
 
5
5
  /**
6
6
  * @classdesc
package/src/index.js CHANGED
@@ -16,7 +16,7 @@ import { plugin, plugins } from "./plugin/plugin.js";
16
16
  import * as video from "./video/video.js";
17
17
  import save from "./system/save.js";
18
18
  import timer from "./system/timer.js";
19
- import pool from "./system/pooling.js";
19
+ import * as pool from "./system/pooling.js";
20
20
  import state from "./state/state.js";
21
21
  import level from "./level/level.js";
22
22
 
@@ -5,7 +5,7 @@ import { throttle } from "./../utils/function.js";
5
5
  import { remove } from "./../utils/array.js";
6
6
  import * as event from "./../system/event.js";
7
7
  import timer from "./../system/timer.js";
8
- import pool from "./../system/pooling.js";
8
+ import * as pool from "./../system/pooling.js";
9
9
  import device from "./../system/device.js";
10
10
  import Pointer from "./pointer.js";
11
11
  import Rect from "./../geometries/rectangle.js";
@@ -1,5 +1,5 @@
1
1
  import { createCanvas } from "./../../video/video.js";
2
- import pool from "./../../system/pooling.js";
2
+ import * as pool from "./../../system/pooling.js";
3
3
  import * as TMXUtils from "./TMXUtils.js";
4
4
  import Tile from "./TMXTile.js";
5
5
  import Renderable from "./../../renderable/renderable.js";
@@ -1,4 +1,4 @@
1
- import pool from "./../../system/pooling.js";
1
+ import * as pool from "./../../system/pooling.js";
2
2
  import * as event from "./../../system/event.js";
3
3
  import { viewport } from "./../../game.js";
4
4
  import collision from "./../../physics/collision.js";
@@ -1,5 +1,5 @@
1
1
  import Vector2d from "./../../../math/vector2.js";
2
- import pool from "./../../../system/pooling.js";
2
+ import * as pool from "./../../../system/pooling.js";
3
3
  import TMXRenderer from "./TMXRenderer.js";
4
4
  import TMXLayer from "./../TMXLayer.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import Vector2d from "./../../../math/vector2.js";
2
- import pool from "./../../../system/pooling.js";
2
+ import * as pool from "./../../../system/pooling.js";
3
3
  import TMXRenderer from "./TMXRenderer.js";
4
4
  import TMXLayer from "./../TMXLayer.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import Vector2d from "./../../../math/vector2.js";
2
- import pool from "./../../../system/pooling.js";
2
+ import * as pool from "./../../../system/pooling.js";
3
3
  import TMXRenderer from "./TMXRenderer.js";
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
 
3
- import pool from "./../../../system/pooling.js";
3
+ import * as pool from "./../../../system/pooling.js";
4
4
  import TMXLayer from "./../TMXLayer.js";
5
5
  import Bounds from "./../../../physics/Bounds.js";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import Vector2d from "./../../../math/vector2.js";
2
- import pool from "./../../../system/pooling.js";
2
+ import * as pool from "./../../../system/pooling.js";
3
3
  import TMXHexagonalRenderer from "./TMXHexagonalRenderer.js";
4
4
  import { degToRad } from "./../../../math/math.js";
5
5
 
@@ -2,7 +2,7 @@ import { world, viewport } from "./../game.js";
2
2
  import { createCanvas, renderer } from "./../video/video.js";
3
3
  import * as event from "./../system/event.js";
4
4
  import {nextPowerOfTwo} from "./../math/math.js";
5
- import pool from "./../system/pooling.js";
5
+ import * as pool from "./../system/pooling.js";
6
6
  import Renderable from "./../renderable/renderable.js";
7
7
  import Stage from "./../state/stage.js";
8
8
 
package/src/math/color.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { clamp, random } from "./math.js";
2
- import pool from "./../system/pooling.js";
2
+ import * as pool from "./../system/pooling.js";
3
3
 
4
4
  // convert a give color component to it hexadecimal value
5
5
  var toHex = function (component) {
@@ -1,4 +1,4 @@
1
- import pool from "./../system/pooling.js";
1
+ import * as pool from "./../system/pooling.js";
2
2
  import Matrix3d from "./matrix3.js";
3
3
 
4
4
  /**
@@ -9,7 +9,7 @@ import Matrix3d from "./matrix3.js";
9
9
  */
10
10
  class Matrix2d {
11
11
  /**
12
- * @param {(Matrix2d|Matrix3d|...number)} args an instance of me.Matrix2d or me.Matrix3d to copy from, or individual matrix components (See {@link Matrix2d.setTransform}). If not arguments are given, the matrix will be set to Identity.
12
+ * @param {(Matrix2d|Matrix3d|...number)} args an instance of me.Matrix2d or me.Matrix3d to copy from, or individual matrix components (See {@link Matrix2d.setTransform}). If not arguments are given, the matrix will be set to Identity.
13
13
  */
14
14
  constructor(...args) {
15
15
  this.onResetEvent(...args);
@@ -1,4 +1,4 @@
1
- import pool from "./../system/pooling.js";
1
+ import * as pool from "./../system/pooling.js";
2
2
  import { EPSILON } from "./math.js";
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import pool from "./../system/pooling.js";
1
+ import * as pool from "./../system/pooling.js";
2
2
  import Vector2d from "./vector2.js";
3
3
  import {clamp} from "./math.js";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import Vector3d from "./vector3.js";
2
2
  import {clamp} from "./math.js";
3
- import pool from "./../system/pooling.js";
3
+ import * as pool from "./../system/pooling.js";
4
4
 
5
5
  /**
6
6
  * @classdesc
@@ -1,5 +1,5 @@
1
1
  import {clamp} from "./math.js";
2
- import pool from "./../system/pooling.js";
2
+ import * as pool from "./../system/pooling.js";
3
3
 
4
4
  /**
5
5
  * @classdesc
@@ -1,5 +1,5 @@
1
1
  import {clamp} from "./math.js";
2
- import pool from "./../system/pooling.js";
2
+ import * as pool from "./../system/pooling.js";
3
3
 
4
4
  /**
5
5
  * @classdesc
@@ -1,5 +1,5 @@
1
1
  import { createCanvas } from "./../video/video.js";
2
- import pool from "./../system/pooling.js";
2
+ import * as pool from "./../system/pooling.js";
3
3
  import Renderable from "./../renderable/renderable.js";
4
4
  import ParticleContainer from "./particlecontainer.js";
5
5
  import { randomFloat } from "./../math/math.js";
@@ -67,7 +67,7 @@ class Body {
67
67
  * @see collision.types
68
68
  * @example
69
69
  * // set the body collision type
70
- * myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;
70
+ * body.collisionType = me.collision.types.PLAYER_OBJECT;
71
71
  */
72
72
  this.collisionType = collision.types.ENEMY_OBJECT;
73
73
 
@@ -404,17 +404,17 @@ class Body {
404
404
  }
405
405
 
406
406
  /**
407
- * By default all entities are able to collide with all other entities, <br>
407
+ * By default all physic bodies are able to collide with all other bodies, <br>
408
408
  * but it's also possible to specify 'collision filters' to provide a finer <br>
409
- * control over which entities can collide with each other.
409
+ * control over which body can collide with each other.
410
410
  * @see collision.types
411
411
  * @param {number} [bitmask = collision.types.ALL_OBJECT] the collision mask
412
412
  * @example
413
413
  * // filter collision detection with collision shapes, enemies and collectables
414
- * myEntity.body.setCollisionMask(me.collision.types.WORLD_SHAPE | me.collision.types.ENEMY_OBJECT | me.collision.types.COLLECTABLE_OBJECT);
414
+ * body.setCollisionMask(me.collision.types.WORLD_SHAPE | me.collision.types.ENEMY_OBJECT | me.collision.types.COLLECTABLE_OBJECT);
415
415
  * ...
416
416
  * // disable collision detection with all other objects
417
- * myEntity.body.setCollisionMask(me.collision.types.NO_OBJECT);
417
+ * body.setCollisionMask(me.collision.types.NO_OBJECT);
418
418
  */
419
419
  setCollisionMask(bitmask = collision.types.ALL_OBJECT) {
420
420
  this.collisionMask = bitmask;
@@ -426,7 +426,7 @@ class Body {
426
426
  * @param {number} type the collision type
427
427
  * @example
428
428
  * // set the body collision type
429
- * myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;
429
+ * body.collisionType = me.collision.types.PLAYER_OBJECT;
430
430
  */
431
431
  setCollisionType(type) {
432
432
  if (typeof type !== "undefined") {
@@ -657,7 +657,7 @@ class Body {
657
657
  * Updates the parent's position as well as computes the new body's velocity based
658
658
  * on the values of force/friction/gravity. Velocity chages are proportional to the
659
659
  * me.timer.tick value (which can be used to scale velocities). The approach to moving the
660
- * parent Entity is to compute new values of the Body.vel property then add them to
660
+ * parent renderable is to compute new values of the Body.vel property then add them to
661
661
  * the parent.pos value thus changing the postion the amount of Body.vel each time the
662
662
  * update call is made. <br>
663
663
  * Updates to Body.vel are bounded by maxVel (which defaults to viewport size if not set) <br>
@@ -1,4 +1,4 @@
1
- import pool from "./../system/pooling.js";
1
+ import * as pool from "./../system/pooling.js";
2
2
  import { viewport } from "./../game.js";
3
3
  import Renderable from "./renderable.js";
4
4
 
@@ -1,7 +1,7 @@
1
1
  import utils from "./../utils/utils.js";
2
2
  import * as game from "./../game.js";
3
3
  import * as event from "./../system/event.js";
4
- import pool from "./../system/pooling.js";
4
+ import * as pool from "./../system/pooling.js";
5
5
  import state from "./../state/state.js";
6
6
  import Renderable from "./renderable.js";
7
7
  import Body from "./../physics/body.js";
@@ -369,6 +369,8 @@ class Container extends Renderable {
369
369
  // swap the positions..
370
370
  this.getChildren()[index] = child2;
371
371
  this.getChildren()[index2] = child;
372
+ // mark the container as dirty
373
+ this.isDirty = true;
372
374
  }
373
375
  else {
374
376
  throw new Error(child + " Both the supplied childs must be a child of the caller " + this);
@@ -748,6 +750,8 @@ class Container extends Renderable {
748
750
  if (childIndex - 1 >= 0) {
749
751
  // note : we use an inverted loop
750
752
  this.swapChildren(child, this.getChildAt(childIndex - 1));
753
+ // mark the container as dirty
754
+ this.isDirty = true;
751
755
  }
752
756
  }
753
757
 
@@ -763,6 +767,8 @@ class Container extends Renderable {
763
767
  if (childIndex >= 0 && (childIndex + 1) < this.getChildren().length) {
764
768
  // note : we use an inverted loop
765
769
  this.swapChildren(child, this.getChildAt(childIndex + 1));
770
+ // mark the container as dirty
771
+ this.isDirty = true;
766
772
  }
767
773
  }
768
774
 
@@ -781,6 +787,8 @@ class Container extends Renderable {
781
787
  children.splice(0, 0, children.splice(childIndex, 1)[0]);
782
788
  // increment our child z value based on the previous child depth
783
789
  child.pos.z = children[1].pos.z + 1;
790
+ // mark the container as dirty
791
+ this.isDirty = true;
784
792
  }
785
793
  }
786
794
 
@@ -799,6 +807,8 @@ class Container extends Renderable {
799
807
  children.splice((children.length - 1), 0, children.splice(childIndex, 1)[0]);
800
808
  // increment our child z value based on the next child depth
801
809
  child.pos.z = children[(children.length - 2)].pos.z - 1;
810
+ // mark the container as dirty
811
+ this.isDirty = true;
802
812
  }
803
813
  }
804
814
 
@@ -1,6 +1,6 @@
1
1
  import { renderer } from "./../video/video.js";
2
2
  import * as event from "./../system/event.js";
3
- import pool from "./../system/pooling.js";
3
+ import * as pool from "./../system/pooling.js";
4
4
  import { viewport } from "./../game.js";
5
5
  import Sprite from "./sprite.js";
6
6
  import * as stringUtil from "./../utils/string.js";
@@ -43,13 +43,16 @@ class NineSliceSprite extends Sprite {
43
43
  throw new Error("height and width properties are mandatory");
44
44
  }
45
45
 
46
+ // adjust the nss sprite size accordingly to the target "expanded" size
47
+ this.width = Math.floor(settings.width);
48
+ this.height = Math.floor(settings.height);
49
+
46
50
  // nine slice sprite specific local variables
47
- this.nss_width = Math.floor(settings.width);
48
- this.nss_height = Math.floor(settings.height);
51
+ this.nss_width = this.width;
52
+ this.nss_height = this.height;
49
53
 
50
54
  this.insetx = settings.insetx;
51
55
  this.insety = settings.insety;
52
-
53
56
  }
54
57
 
55
58
  /**
@@ -2,7 +2,7 @@ import ObservableVector2d from "./../math/observable_vector2.js";
2
2
  import ObservableVector3d from "./../math/observable_vector3.js";
3
3
  import Rect from "./../geometries/rectangle.js";
4
4
  import Container from "./container.js";
5
- import pool from "./../system/pooling.js";
5
+ import * as pool from "./../system/pooling.js";
6
6
  import { releaseAllPointerEvents } from "./../input/input.js";
7
7
  import { clamp } from "./../math/math.js";
8
8
 
@@ -264,6 +264,18 @@ class Renderable extends Rect {
264
264
  */
265
265
  this.tint = pool.pull("Color", 255, 255, 255, 1.0);
266
266
 
267
+ /**
268
+ * the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
269
+ * @public
270
+ * @type {string}
271
+ * @name blendMode
272
+ * @default "normal"
273
+ * @see CanvasRenderer#setBlendMode
274
+ * @see WebGLRenderer#setBlendMode
275
+ * @memberof Renderable#
276
+ */
277
+ this.blendMode = "normal";
278
+
267
279
  /**
268
280
  * The name of the renderable
269
281
  * @public
@@ -732,6 +744,11 @@ class Renderable extends Rect {
732
744
 
733
745
  // apply the current tint and opacity
734
746
  renderer.setTint(this.tint, this.getOpacity());
747
+
748
+ // apply blending if different from "normal"
749
+ if (this.blendMode !== renderer.getBlendMode()) {
750
+ renderer.setBlendMode(this.blendMode);
751
+ }
735
752
  }
736
753
 
737
754
  /**
@@ -1,6 +1,6 @@
1
1
  import Vector2d from "./../math/vector2.js";
2
2
  import { renderer } from "./../video/video.js";
3
- import pool from "./../system/pooling.js";
3
+ import * as pool from "./../system/pooling.js";
4
4
  import loader from "./../loader/loader.js";
5
5
  import { TextureAtlas } from "./../video/texture.js";
6
6
  import Renderable from "./renderable.js";
@@ -584,7 +584,7 @@ class Sprite extends Renderable {
584
584
  this.isDirty = true;
585
585
  }
586
586
 
587
- return this.isDirty;
587
+ return super.update(dt);
588
588
  }
589
589
 
590
590
  /**
@@ -64,7 +64,7 @@ function _resumeRunLoop() {
64
64
  }
65
65
 
66
66
  /**
67
- * Pause the loop for most screen objects.
67
+ * Pause the loop for most stage objects.
68
68
  * @ignore
69
69
  */
70
70
  function _pauseRunLoop() {
@@ -249,7 +249,7 @@ var state = {
249
249
  USER : 100,
250
250
 
251
251
  /**
252
- * Stop the current screen object.
252
+ * Stop the current stage.
253
253
  * @name stop
254
254
  * @memberof state
255
255
  * @public
@@ -276,7 +276,7 @@ var state = {
276
276
  },
277
277
 
278
278
  /**
279
- * pause the current screen object
279
+ * pause the current stage
280
280
  * @name pause
281
281
  * @memberof state
282
282
  * @public
@@ -302,7 +302,7 @@ var state = {
302
302
  },
303
303
 
304
304
  /**
305
- * Restart the screen object from a full stop.
305
+ * Restart the current stage from a full stop.
306
306
  * @name restart
307
307
  * @memberof state
308
308
  * @public
@@ -330,7 +330,7 @@ var state = {
330
330
  },
331
331
 
332
332
  /**
333
- * resume the screen object
333
+ * resume the current stage
334
334
  * @name resume
335
335
  * @memberof state
336
336
  * @public
@@ -438,7 +438,7 @@ var state = {
438
438
  },
439
439
 
440
440
  /**
441
- * return a reference to the current screen object<br>
441
+ * return a reference to the current stage<br>
442
442
  * useful to call a object specific method
443
443
  * @name current
444
444
  * @memberof state