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

Method setEntities

packages/core/src/ECS/Core/QuerySystem.ts:90–95  ·  view source on GitHub ↗

* 设置实体列表并重建索引 * * 当实体集合发生大规模变化时调用此方法。 * 系统将重新构建所有索引以确保查询性能。 * * @param entities 新的实体列表

(entities: Entity[])

Source from the content-addressed store, hash-verified

88 * @param entities 新的实体列表
89 */
90 public setEntities(entities: Entity[]): void {
91 this._entities = entities;
92 this.clearQueryCache();
93 this.clearReactiveQueries();
94 this.rebuildIndexes();
95 }
96
97 /**
98 * 添加单个实体到查询系统

Callers 4

endMethod · 0.45
destroyAllEntitiesMethod · 0.45
enterPrefabEditModeMethod · 0.45

Calls 3

clearQueryCacheMethod · 0.95
clearReactiveQueriesMethod · 0.95
rebuildIndexesMethod · 0.95

Tested by

no test coverage detected