MCPcopy Index your code
hub / github.com/KilledByAPixel/LittleJS / engineObjectsCallback

Function engineObjectsCallback

src/engine.js:554–555  ·  view source on GitHub ↗

Triggers a callback for each object within a given area * @param {Vector2} [pos] - Center of test area, or undefined for all objects * @param {Vector2|number} [size] - Radius of circle if float, rectangle size if Vector2 * @param {ObjectCallbackFunction} [callbackFunction] - Calls this functio

(pos, size, callbackFunction, objects=engineObjects)

Source from the content-addressed store, hash-verified

552 * @param {Array<EngineObject>} [objects=engineObjects] - List of objects to check
553 * @memberof Engine */
554function engineObjectsCallback(pos, size, callbackFunction, objects=engineObjects)
555{ engineObjectsCollect(pos, size, objects).forEach(o => callbackFunction(o)); }
556
557/** Return a list of objects intersecting a ray
558 * @param {Vector2} start

Callers

nothing calls this directly

Calls 1

engineObjectsCollectFunction · 0.85

Tested by

no test coverage detected