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

Method getChildAt

packages/melonjs/src/renderable/container.js:558–564  ·  view source on GitHub ↗

* Returns the Child at the specified index * @param {number} index - The index of the child * @returns {Renderable} the child at the specified index

(index)

Source from the content-addressed store, hash-verified

556 * @returns {Renderable} the child at the specified index
557 */
558 getChildAt(index) {
559 if (index >= 0 && index < this.getChildren().length) {
560 return this.getChildren()[index];
561 } else {
562 throw new Error("Index (" + index + ") Out Of Bounds for getChildAt()");
563 }
564 }
565
566 /**
567 * Returns the index of the given Child

Callers 4

getNextChildMethod · 0.95
moveUpMethod · 0.95
moveDownMethod · 0.95
container.spec.jsFile · 0.80

Calls 1

getChildrenMethod · 0.95

Tested by

no test coverage detected