MCPcopy Create free account
hub / github.com/esengine/esengine / every

Method every

packages/core/src/ECS/Utils/SparseSet.ts:213–220  ·  view source on GitHub ↗

* 检查是否所有元素都满足条件 * * @param predicate 检查条件 * @returns 是否所有元素都满足条件

(predicate: (item: T, index: number) => boolean)

Source from the content-addressed store, hash-verified

211 * @returns 是否所有元素都满足条件
212 */
213 public every(predicate: (item: T, index: number) => boolean): boolean {
214 for (let i = 0; i < this._dense.length; i++) {
215 if (!predicate(this._dense[i]!, i)) {
216 return false;
217 }
218 }
219 return true;
220 }
221
222 /**
223 * 获取密集数组的只读副本

Callers 13

generateRectMethod · 0.45
generateRectOutlineMethod · 0.45
renderMethod · 0.45
isComponentArrayFunction · 0.45
hasComponentsFunction · 0.45
hasNoneMethod · 0.45
isZeroMethod · 0.45
SparseSet.test.tsFile · 0.45
evaluateMethod · 0.45
_updateModuleStatesMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected