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

Method getComponent

packages/core/src/ECS/Core/SoAStorage.ts:382–390  ·  view source on GitHub ↗
(entityId: number)

Source from the content-addressed store, hash-verified

380
381
382 public getComponent(entityId: number): T | null {
383 const index = this.entityToIndex.get(entityId);
384 if (index === undefined) {
385 return null;
386 }
387
388 // 返回 Proxy,直接操作底层 TypedArray
389 return this.createProxyView(entityId, index);
390 }
391
392 /**
393 * 创建组件的 Proxy 视图

Callers 15

removeComponentMethod · 0.95
queryChangedSinceMethod · 0.45
configureMethod · 0.45
forEachMethod · 0.45
forEachChangedMethod · 0.45
firstMethod · 0.45
findMethod · 0.45
setParentMethod · 0.45
insertChildAtMethod · 0.45
removeChildMethod · 0.45
removeAllChildrenMethod · 0.45
getParentMethod · 0.45

Calls 2

createProxyViewMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected