MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / createPrefabRegistry

Function createPrefabRegistry

src/world/prefab.ts:52–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52export function createPrefabRegistry(): PrefabRegistry {
53 const byId = new Map<string, PrefabData>();
54 return {
55 byId: byId,
56 getPrefab: function(id: string): PrefabData | null {
57 const found = byId.get(id);
58 return found ? found : null;
59 },
60 };
61}
62
63// Register a prefab in the registry. Overwrites any existing entry with the
64// same id (hot-reload friendly).

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected