melonjs 10.3.0 → 10.5.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 (95) hide show
  1. package/README.md +6 -6
  2. package/dist/melonjs.js +3147 -3293
  3. package/dist/melonjs.min.js +4 -4
  4. package/dist/melonjs.module.d.ts +3411 -3852
  5. package/dist/melonjs.module.js +3448 -3210
  6. package/package.json +18 -17
  7. package/src/audio/audio.js +29 -30
  8. package/src/camera/camera2d.js +46 -56
  9. package/src/entity/entity.js +30 -36
  10. package/src/game.js +21 -22
  11. package/src/geometries/ellipse.js +40 -46
  12. package/src/geometries/line.js +9 -11
  13. package/src/geometries/poly.js +53 -53
  14. package/src/geometries/rectangle.js +42 -44
  15. package/src/index.js +9 -26
  16. package/src/input/gamepad.js +11 -10
  17. package/src/input/input.js +2 -3
  18. package/src/input/keyboard.js +113 -113
  19. package/src/input/pointer.js +30 -31
  20. package/src/input/pointerevent.js +26 -26
  21. package/src/lang/deprecated.js +65 -6
  22. package/src/level/level.js +23 -24
  23. package/src/level/tiled/TMXGroup.js +7 -8
  24. package/src/level/tiled/TMXLayer.js +30 -32
  25. package/src/level/tiled/TMXObject.js +21 -21
  26. package/src/level/tiled/TMXTile.js +18 -18
  27. package/src/level/tiled/TMXTileMap.js +39 -44
  28. package/src/level/tiled/TMXTileset.js +12 -15
  29. package/src/level/tiled/TMXTilesetGroup.js +9 -9
  30. package/src/level/tiled/renderer/TMXHexagonalRenderer.js +7 -8
  31. package/src/level/tiled/renderer/TMXIsometricRenderer.js +7 -8
  32. package/src/level/tiled/renderer/TMXOrthogonalRenderer.js +4 -5
  33. package/src/level/tiled/renderer/TMXRenderer.js +24 -25
  34. package/src/level/tiled/renderer/TMXStaggeredRenderer.js +1 -4
  35. package/src/loader/loader.js +14 -15
  36. package/src/loader/loadingscreen.js +2 -4
  37. package/src/math/color.js +47 -66
  38. package/src/math/math.js +15 -16
  39. package/src/math/matrix2.js +53 -58
  40. package/src/math/matrix3.js +56 -62
  41. package/src/math/observable_vector2.js +75 -76
  42. package/src/math/observable_vector3.js +79 -80
  43. package/src/math/vector2.js +91 -92
  44. package/src/math/vector3.js +94 -96
  45. package/src/particles/emitter.js +38 -40
  46. package/src/particles/particle.js +4 -5
  47. package/src/particles/particlecontainer.js +2 -3
  48. package/src/physics/body.js +46 -143
  49. package/src/physics/bounds.js +47 -47
  50. package/src/physics/collision.js +13 -14
  51. package/src/physics/detector.js +18 -17
  52. package/src/physics/quadtree.js +17 -19
  53. package/src/physics/sat.js +26 -26
  54. package/src/physics/world.js +24 -28
  55. package/src/plugin/plugin.js +11 -14
  56. package/src/renderable/GUI.js +41 -46
  57. package/src/renderable/collectable.js +4 -8
  58. package/src/renderable/colorlayer.js +6 -10
  59. package/src/renderable/container.js +87 -72
  60. package/src/renderable/dragndrop.js +224 -0
  61. package/src/renderable/imagelayer.js +25 -31
  62. package/src/renderable/nineslicesprite.js +41 -41
  63. package/src/renderable/renderable.js +114 -125
  64. package/src/renderable/sprite.js +62 -68
  65. package/src/renderable/trigger.js +25 -30
  66. package/src/state/stage.js +13 -17
  67. package/src/state/state.js +26 -27
  68. package/src/system/device.js +74 -75
  69. package/src/system/event.js +71 -72
  70. package/src/system/pooling.js +11 -12
  71. package/src/system/save.js +3 -4
  72. package/src/system/timer.js +19 -20
  73. package/src/text/bitmaptext.js +57 -54
  74. package/src/text/bitmaptextdata.js +10 -10
  75. package/src/text/glyph.js +3 -0
  76. package/src/text/text.js +44 -49
  77. package/src/tweens/easing.js +1 -1
  78. package/src/tweens/interpolation.js +1 -1
  79. package/src/tweens/tween.js +43 -44
  80. package/src/utils/agent.js +3 -4
  81. package/src/utils/array.js +4 -5
  82. package/src/utils/file.js +3 -4
  83. package/src/utils/function.js +4 -5
  84. package/src/utils/string.js +7 -9
  85. package/src/utils/utils.js +4 -5
  86. package/src/video/canvas/canvas_renderer.js +58 -59
  87. package/src/video/renderer.js +49 -53
  88. package/src/video/texture.js +98 -111
  89. package/src/video/texture_cache.js +24 -6
  90. package/src/video/video.js +16 -17
  91. package/src/video/webgl/glshader.js +37 -38
  92. package/src/video/webgl/webgl_compositor.js +31 -32
  93. package/src/video/webgl/webgl_renderer.js +79 -80
  94. package/src/entity/draggable.js +0 -130
  95. package/src/entity/droptarget.js +0 -101
@@ -8,32 +8,26 @@ import Polygon from "./../geometries/poly.js";
8
8
  /**
9
9
  * @classdesc
10
10
  * a Generic Object Entity
11
- * @class Entity
12
- * @augments me.Renderable
13
- * @memberof me
14
- * @see me.Renderable
15
- * @param {number} x the x coordinates of the entity object
16
- * @param {number} y the y coordinates of the entity object
17
- * @param {object} settings Entity properties, to be defined through Tiled or when calling the entity constructor
18
- * <img src="images/object_properties.png"/>
19
- * @param {number} settings.width the physical width the entity takes up in game
20
- * @param {number} settings.height the physical height the entity takes up in game
21
- * @param {string} [settings.name] object entity name
22
- * @param {string} [settings.id] object unique IDs
23
- * @param {Image|string} [settings.image] resource name of a spritesheet to use for the entity renderable component
24
- * @param {me.Vector2d} [settings.anchorPoint=0.0] Entity anchor point
25
- * @param {number} [settings.framewidth=settings.width] width of a single frame in the given spritesheet
26
- * @param {number} [settings.frameheight=settings.width] height of a single frame in the given spritesheet
27
- * @param {string} [settings.type] object type
28
- * @param {number} [settings.collisionMask] Mask collision detection for this object
29
- * @param {me.Rect[]|me.Polygon[]|me.Line[]|me.Ellipse[]} [settings.shapes] the initial list of collision shapes (usually populated through Tiled)
11
+ * @augments Renderable
12
+ * @see Renderable
30
13
  */
31
-
32
14
  class Entity extends Renderable {
33
-
34
-
35
15
  /**
36
- * @ignore
16
+ * @param {number} x the x coordinates of the entity object
17
+ * @param {number} y the y coordinates of the entity object
18
+ * @param {object} settings Entity properties, to be defined through Tiled or when calling the entity constructor
19
+ * <img src="images/object_properties.png"/>
20
+ * @param {number} settings.width the physical width the entity takes up in game
21
+ * @param {number} settings.height the physical height the entity takes up in game
22
+ * @param {string} [settings.name] object entity name
23
+ * @param {string} [settings.id] object unique IDs
24
+ * @param {Image|string} [settings.image] resource name of a spritesheet to use for the entity renderable component
25
+ * @param {Vector2d} [settings.anchorPoint=0.0] Entity anchor point
26
+ * @param {number} [settings.framewidth=settings.width] width of a single frame in the given spritesheet
27
+ * @param {number} [settings.frameheight=settings.width] height of a single frame in the given spritesheet
28
+ * @param {string} [settings.type] object type
29
+ * @param {number} [settings.collisionMask] Mask collision detection for this object
30
+ * @param {Rect[]|Polygon[]|Line[]|Ellipse[]} [settings.shapes] the initial list of collision shapes (usually populated through Tiled)
37
31
  */
38
32
  constructor(x, y, settings) {
39
33
 
@@ -76,7 +70,7 @@ class Entity extends Renderable {
76
70
  * @public
77
71
  * @type {string}
78
72
  * @name type
79
- * @memberof me.Entity
73
+ * @memberof Entity
80
74
  */
81
75
  this.type = settings.type || "";
82
76
 
@@ -85,7 +79,7 @@ class Entity extends Renderable {
85
79
  * @public
86
80
  * @type {number}
87
81
  * @name id
88
- * @memberof me.Entity
82
+ * @memberof Entity
89
83
  */
90
84
  this.id = settings.id || "";
91
85
 
@@ -95,16 +89,16 @@ class Entity extends Renderable {
95
89
  * @public
96
90
  * @type {boolean}
97
91
  * @name alive
98
- * @memberof me.Entity
92
+ * @memberof Entity
99
93
  */
100
94
  this.alive = true;
101
95
 
102
96
  /**
103
97
  * the entity body object
104
98
  * @public
105
- * @type {me.Body}
99
+ * @type {Body}
106
100
  * @name body
107
- * @memberof me.Entity
101
+ * @memberof Entity
108
102
  */
109
103
  // initialize the default body
110
104
  if (typeof settings.shapes === "undefined") {
@@ -134,9 +128,9 @@ class Entity extends Renderable {
134
128
  /**
135
129
  * The entity renderable component (can be any objects deriving from me.Renderable, like me.Sprite for example)
136
130
  * @public
137
- * @type {me.Renderable}
131
+ * @type {Renderable}
138
132
  * @name renderable
139
- * @memberof me.Entity
133
+ * @memberof Entity
140
134
  */
141
135
 
142
136
  get renderable() {
@@ -164,9 +158,9 @@ class Entity extends Renderable {
164
158
  * update the bounds position when the body is modified
165
159
  * @ignore
166
160
  * @name onBodyUpdate
167
- * @memberof me.Entity
161
+ * @memberof Entity
168
162
  * @function
169
- * @param {me.Body} body the body whose bounds to update
163
+ * @param {Body} body the body whose bounds to update
170
164
  */
171
165
  onBodyUpdate(body) {
172
166
  // update the entity bounds to include the body bounds
@@ -200,11 +194,11 @@ class Entity extends Renderable {
200
194
  * not to be called by the end user<br>
201
195
  * called by the game manager on each game loop
202
196
  * @name draw
203
- * @memberof me.Entity
197
+ * @memberof Entity
204
198
  * @function
205
199
  * @protected
206
- * @param {me.CanvasRenderer|me.WebGLRenderer} renderer a renderer object
207
- * @param {me.Rect} rect region to draw
200
+ * @param {CanvasRenderer|WebGLRenderer} renderer a renderer object
201
+ * @param {Rect} rect region to draw
208
202
  */
209
203
  draw(renderer, rect) {
210
204
  var renderable = this.renderable;
@@ -239,7 +233,7 @@ class Entity extends Renderable {
239
233
  * onDeactivateEvent Notification function<br>
240
234
  * Called by engine before deleting the object
241
235
  * @name onDeactivateEvent
242
- * @memberof me.Entity
236
+ * @memberof Entity
243
237
  * @function
244
238
  */
245
239
  onDeactivateEvent() {
package/src/game.js CHANGED
@@ -8,8 +8,7 @@ import World from "./physics/world.js";
8
8
  * me.game represents your current game, it contains all the objects,
9
9
  * tilemap layers, current viewport, collision map, etc...<br>
10
10
  * me.game is also responsible for updating (each frame) the object status and draw them.
11
- * @namespace me.game
12
- * @memberof me
11
+ * @namespace game
13
12
  */
14
13
 
15
14
  // to know when we have to refresh the display
@@ -47,9 +46,9 @@ event.on(event.BOOT, () => {
47
46
  /**
48
47
  * a reference to the current active stage "default" camera
49
48
  * @public
50
- * @type {me.Camera2d}
49
+ * @type {Camera2d}
51
50
  * @name viewport
52
- * @memberof me.game
51
+ * @memberof game
53
52
  */
54
53
  export let viewport;
55
54
 
@@ -57,9 +56,9 @@ export let viewport;
57
56
  * a reference to the game world, <br>
58
57
  * a world is a virtual environment containing all the game objects
59
58
  * @public
60
- * @type {me.World}
59
+ * @type {World}
61
60
  * @name world
62
- * @memberof me.game
61
+ * @memberof game
63
62
  */
64
63
  export let world;
65
64
 
@@ -70,7 +69,7 @@ export let world;
70
69
  * @type {boolean}
71
70
  * @default true
72
71
  * @name mergeGroup
73
- * @memberof me.game
72
+ * @memberof game
74
73
  */
75
74
  export let mergeGroup = true;
76
75
 
@@ -81,7 +80,7 @@ export let mergeGroup = true;
81
80
  * @type {string}
82
81
  * @default "z"
83
82
  * @name sortOn
84
- * @memberof me.game
83
+ * @memberof game
85
84
  */
86
85
  export let sortOn = "z";
87
86
 
@@ -93,14 +92,14 @@ export let sortOn = "z";
93
92
  * @public
94
93
  * @type {DOMHighResTimeStamp}
95
94
  * @name lastUpdate
96
- * @memberof me.game
95
+ * @memberof game
97
96
  */
98
97
  export let lastUpdate = window.performance.now();
99
98
 
100
99
  /**
101
100
  * Fired when a level is fully loaded and all entities instantiated. <br>
102
101
  * Additionnaly the level id will also be passed to the called function.
103
- * @function me.game.onLevelLoaded
102
+ * @function game.onLevelLoaded
104
103
  * @example
105
104
  * // call myFunction () everytime a level is loaded
106
105
  * me.game.onLevelLoaded = this.myFunction.bind(this);
@@ -110,7 +109,7 @@ export function onLevelLoaded() {};
110
109
  /**
111
110
  * reset the game Object manager<br>
112
111
  * destroy all current objects
113
- * @function me.game.reset
112
+ * @function game.reset
114
113
  */
115
114
  export function reset () {
116
115
  // point to the current active stage "default" camera
@@ -128,9 +127,9 @@ export function reset () {
128
127
 
129
128
  /**
130
129
  * Update the renderer framerate using the system config variables.
131
- * @function me.game.updateFrameRate
132
- * @see me.timer.maxfps
133
- * @see me.World.fps
130
+ * @function game.updateFrameRate
131
+ * @see timer.maxfps
132
+ * @see World.fps
134
133
  */
135
134
  export function updateFrameRate() {
136
135
  // reset the frame counter
@@ -149,9 +148,9 @@ export function updateFrameRate() {
149
148
 
150
149
  /**
151
150
  * Returns the parent container of the specified Child in the game world
152
- * @function me.game.getParentContainer
153
- * @param {me.Renderable} child
154
- * @returns {me.Container}
151
+ * @function game.getParentContainer
152
+ * @param {Renderable} child
153
+ * @returns {Container}
155
154
  */
156
155
  export function getParentContainer(child) {
157
156
  return child.ancestor;
@@ -159,7 +158,7 @@ export function getParentContainer(child) {
159
158
 
160
159
  /**
161
160
  * force the redraw (not update) of all objects
162
- * @function me.game.repaint
161
+ * @function game.repaint
163
162
  */
164
163
  export function repaint() {
165
164
  isDirty = true;
@@ -169,9 +168,9 @@ export function repaint() {
169
168
  /**
170
169
  * update all objects of the game manager
171
170
  * @ignore
172
- * @function me.game.update
171
+ * @function game.update
173
172
  * @param {number} time current timestamp as provided by the RAF callback
174
- * @param {me.Stage} stage the current stage
173
+ * @param {Stage} stage the current stage
175
174
  */
176
175
  export function update(time, stage) {
177
176
  // handle frame skipping if required
@@ -216,9 +215,9 @@ export function update(time, stage) {
216
215
 
217
216
  /**
218
217
  * draw the current scene/stage
219
- * @function me.game.draw
218
+ * @function game.draw
220
219
  * @ignore
221
- * @param {me.Stage} stage the current stage
220
+ * @param {Stage} stage the current stage
222
221
  */
223
222
  export function draw(stage) {
224
223
 
@@ -4,33 +4,27 @@ import pool from "./../system/pooling.js";
4
4
  /**
5
5
  * @classdesc
6
6
  * an ellipse Object
7
- * @class Ellipse
8
- * @augments me.Object
9
- * @memberof me
10
- * @param {number} x the center x coordinate of the ellipse
11
- * @param {number} y the center y coordinate of the ellipse
12
- * @param {number} w width (diameter) of the ellipse
13
- * @param {number} h height (diameter) of the ellipse
14
7
  */
15
-
16
8
  class Ellipse {
17
-
9
+ /**
10
+ * @param {number} x the center x coordinate of the ellipse
11
+ * @param {number} y the center y coordinate of the ellipse
12
+ * @param {number} w width (diameter) of the ellipse
13
+ * @param {number} h height (diameter) of the ellipse
14
+ */
18
15
  constructor(x, y, w, h) {
19
16
  /**
20
17
  * the center coordinates of the ellipse
21
18
  * @public
22
- * @type {me.Vector2d}
19
+ * @type {Vector2d}
23
20
  * @name pos
24
- * @memberof me.Ellipse#
21
+ * @memberof Ellipse#
25
22
  */
26
23
  this.pos = new Vector2d();
27
24
 
28
25
  /**
29
26
  * The bounding rectangle for this shape
30
27
  * @private
31
- * @type {me.Bounds}
32
- * @name _bounds
33
- * @memberof me.Ellipse#
34
28
  */
35
29
  this._bounds = undefined;
36
30
 
@@ -39,34 +33,34 @@ class Ellipse {
39
33
  * @public
40
34
  * @type {number}
41
35
  * @name radius
42
- * @memberof me.Ellipse
36
+ * @memberof Ellipse
43
37
  */
44
38
  this.radius = NaN;
45
39
 
46
40
  /**
47
41
  * Pre-scaled radius vector for ellipse
48
42
  * @public
49
- * @type {me.Vector2d}
43
+ * @type {Vector2d}
50
44
  * @name radiusV
51
- * @memberof me.Ellipse#
45
+ * @memberof Ellipse#
52
46
  */
53
47
  this.radiusV = new Vector2d();
54
48
 
55
49
  /**
56
50
  * Radius squared, for pythagorean theorom
57
51
  * @public
58
- * @type {me.Vector2d}
52
+ * @type {Vector2d}
59
53
  * @name radiusSq
60
- * @memberof me.Ellipse#
54
+ * @memberof Ellipse#
61
55
  */
62
56
  this.radiusSq = new Vector2d();
63
57
 
64
58
  /**
65
59
  * x/y scaling ratio for ellipse
66
60
  * @public
67
- * @type {me.Vector2d}
61
+ * @type {Vector2d}
68
62
  * @name ratio
69
- * @memberof me.Ellipse#
63
+ * @memberof Ellipse#
70
64
  */
71
65
  this.ratio = new Vector2d();
72
66
 
@@ -83,13 +77,13 @@ class Ellipse {
83
77
  /**
84
78
  * set new value to the Ellipse shape
85
79
  * @name setShape
86
- * @memberof me.Ellipse.prototype
80
+ * @memberof Ellipse.prototype
87
81
  * @function
88
82
  * @param {number} x the center x coordinate of the ellipse
89
83
  * @param {number} y the center y coordinate of the ellipse
90
84
  * @param {number} w width (diameter) of the ellipse
91
85
  * @param {number} h height (diameter) of the ellipse
92
- * @returns {me.Ellipse} this instance for objecf chaining
86
+ * @returns {Ellipse} this instance for objecf chaining
93
87
  */
94
88
  setShape(x, y, w, h) {
95
89
  var hW = w / 2;
@@ -113,11 +107,11 @@ class Ellipse {
113
107
  /**
114
108
  * Rotate this Ellipse (counter-clockwise) by the specified angle (in radians).
115
109
  * @name rotate
116
- * @memberof me.Ellipse.prototype
110
+ * @memberof Ellipse.prototype
117
111
  * @function
118
112
  * @param {number} angle The angle to rotate (in radians)
119
- * @param {me.Vector2d|me.ObservableVector2d} [v] an optional point to rotate around
120
- * @returns {me.Ellipse} Reference to this object for method chaining
113
+ * @param {Vector2d|ObservableVector2d} [v] an optional point to rotate around
114
+ * @returns {Ellipse} Reference to this object for method chaining
121
115
  */
122
116
  rotate(angle, v) {
123
117
  // TODO : only works for circle
@@ -130,11 +124,11 @@ class Ellipse {
130
124
  /**
131
125
  * Scale this Ellipse by the specified scalar.
132
126
  * @name scale
133
- * @memberof me.Ellipse.prototype
127
+ * @memberof Ellipse.prototype
134
128
  * @function
135
129
  * @param {number} x
136
130
  * @param {number} [y=x]
137
- * @returns {me.Ellipse} Reference to this object for method chaining
131
+ * @returns {Ellipse} Reference to this object for method chaining
138
132
  */
139
133
  scale(x, y) {
140
134
  y = typeof (y) !== "undefined" ? y : x;
@@ -149,10 +143,10 @@ class Ellipse {
149
143
  /**
150
144
  * Scale this Ellipse by the specified vector.
151
145
  * @name scale
152
- * @memberof me.Ellipse.prototype
146
+ * @memberof Ellipse.prototype
153
147
  * @function
154
- * @param {me.Vector2d} v
155
- * @returns {me.Ellipse} Reference to this object for method chaining
148
+ * @param {Vector2d} v
149
+ * @returns {Ellipse} Reference to this object for method chaining
156
150
  */
157
151
  scaleV(v) {
158
152
  return this.scale(v.x, v.y);
@@ -161,10 +155,10 @@ class Ellipse {
161
155
  /**
162
156
  * apply the given transformation matrix to this ellipse
163
157
  * @name transform
164
- * @memberof me.Ellipse.prototype
158
+ * @memberof Ellipse.prototype
165
159
  * @function
166
- * @param {me.Matrix2d} matrix the transformation matrix
167
- * @returns {me.Polygon} Reference to this object for method chaining
160
+ * @param {Matrix2d} matrix the transformation matrix
161
+ * @returns {Polygon} Reference to this object for method chaining
168
162
  */
169
163
  transform(/* m */) {
170
164
  // TODO
@@ -174,19 +168,19 @@ class Ellipse {
174
168
  /**
175
169
  * translate the circle/ellipse by the specified offset
176
170
  * @name translate
177
- * @memberof me.Ellipse.prototype
171
+ * @memberof Ellipse.prototype
178
172
  * @function
179
173
  * @param {number} x x offset
180
174
  * @param {number} y y offset
181
- * @returns {me.Ellipse} this ellipse
175
+ * @returns {Ellipse} this ellipse
182
176
  */
183
177
  /**
184
178
  * translate the circle/ellipse by the specified vector
185
179
  * @name translate
186
- * @memberof me.Ellipse.prototype
180
+ * @memberof Ellipse.prototype
187
181
  * @function
188
- * @param {me.Vector2d} v vector offset
189
- * @returns {me.Ellipse} this ellipse
182
+ * @param {Vector2d} v vector offset
183
+ * @returns {Ellipse} this ellipse
190
184
  */
191
185
  translate() {
192
186
  var _x, _y;
@@ -211,16 +205,16 @@ class Ellipse {
211
205
  /**
212
206
  * check if this circle/ellipse contains the specified point
213
207
  * @name contains
214
- * @memberof me.Ellipse.prototype
208
+ * @memberof Ellipse.prototype
215
209
  * @function
216
- * @param {me.Vector2d} point
210
+ * @param {Vector2d} point
217
211
  * @returns {boolean} true if contains
218
212
  */
219
213
 
220
214
  /**
221
215
  * check if this circle/ellipse contains the specified point
222
216
  * @name contains
223
- * @memberof me.Ellipse.prototype
217
+ * @memberof Ellipse.prototype
224
218
  * @function
225
219
  * @param {number} x x coordinate
226
220
  * @param {number} y y coordinate
@@ -252,9 +246,9 @@ class Ellipse {
252
246
  /**
253
247
  * returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
254
248
  * @name getBounds
255
- * @memberof me.Ellipse.prototype
249
+ * @memberof Ellipse.prototype
256
250
  * @function
257
- * @returns {me.Bounds} this shape bounding box Rectangle object
251
+ * @returns {Bounds} this shape bounding box Rectangle object
258
252
  */
259
253
  getBounds() {
260
254
  if (typeof this._bounds === "undefined") {
@@ -266,9 +260,9 @@ class Ellipse {
266
260
  /**
267
261
  * clone this Ellipse
268
262
  * @name clone
269
- * @memberof me.Ellipse.prototype
263
+ * @memberof Ellipse.prototype
270
264
  * @function
271
- * @returns {me.Ellipse} new Ellipse
265
+ * @returns {Ellipse} new Ellipse
272
266
  */
273
267
  clone() {
274
268
  return new Ellipse(
@@ -4,12 +4,10 @@ import Polygon from "./poly.js";
4
4
  /**
5
5
  * @classdesc
6
6
  * a line segment Object
7
- * @class Line
8
- * @augments me.Polygon
9
- * @memberof me
7
+ * @augments Polygon
10
8
  * @param {number} x origin point of the Line
11
9
  * @param {number} y origin point of the Line
12
- * @param {me.Vector2d[]} points array of vectors defining the Line
10
+ * @param {Vector2d[]} points array of vectors defining the Line
13
11
  */
14
12
 
15
13
  class Line extends Polygon {
@@ -17,16 +15,16 @@ class Line extends Polygon {
17
15
  /**
18
16
  * Returns true if the Line contains the given point
19
17
  * @name contains
20
- * @memberof me.Line.prototype
18
+ * @memberof Line.prototype
21
19
  * @function
22
- * @param {me.Vector2d} point
20
+ * @param {Vector2d} point
23
21
  * @returns {boolean} true if contains
24
22
  */
25
23
 
26
24
  /**
27
25
  * Returns true if the Line contains the given point
28
26
  * @name contains
29
- * @memberof me.Line.prototype
27
+ * @memberof Line.prototype
30
28
  * @function
31
29
  * @param {number} x x coordinate
32
30
  * @param {number} y y coordinate
@@ -60,9 +58,9 @@ class Line extends Polygon {
60
58
  * Computes the calculated collision edges and normals.
61
59
  * This **must** be called if the `points` array, `angle`, or `offset` is modified manually.
62
60
  * @name recalc
63
- * @memberof me.Line.prototype
61
+ * @memberof Line.prototype
64
62
  * @function
65
- * @returns {me.Line} this instance for objecf chaining
63
+ * @returns {Line} this instance for objecf chaining
66
64
  */
67
65
  recalc() {
68
66
  var edges = this.edges;
@@ -96,9 +94,9 @@ class Line extends Polygon {
96
94
  /**
97
95
  * clone this line segment
98
96
  * @name clone
99
- * @memberof me.Line.prototype
97
+ * @memberof Line.prototype
100
98
  * @function
101
- * @returns {me.Line} new Line
99
+ * @returns {Line} new Line
102
100
  */
103
101
  clone() {
104
102
  var copy = [];