MCPcopy Create free account
hub / github.com/melonjs/melonJS / constructor

Method constructor

packages/melonjs/src/renderable/draggable.js:25–32  ·  view source on GitHub ↗

* @param {number} x - the x coordinates of the draggable object * @param {number} y - the y coordinates of the draggable object * @param {number} width - draggable object width * @param {number} height - draggable object height

(x, y, width, height)

Source from the content-addressed store, hash-verified

23 * @param {number} height - draggable object height
24 */
25 constructor(x, y, width, height) {
26 super(x, y, width, height);
27 this.isKinematic = false;
28 this.dragging = false;
29 this.dragId = null;
30 this.grabOffset = new Vector2d(0, 0);
31 this.initEvents();
32 }
33
34 /**
35 * Initializes the events the modules needs to listen to

Callers

nothing calls this directly

Calls 1

initEventsMethod · 0.95

Tested by

no test coverage detected