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

Method getByIndex

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

* 根据索引获取元素 * * @param index 索引 * @returns 元素,如果索引无效则返回undefined

(index: number)

Source from the content-addressed store, hash-verified

113 * @returns 元素,如果索引无效则返回undefined
114 */
115 public getByIndex(index: number): T | undefined {
116 return this._dense[index];
117 }
118
119 /**
120 * 获取集合大小

Callers 1

SparseSet.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected