avoid boxing

This commit is contained in:
Schluffe
2026-03-08 14:17:09 +01:00
parent 2ba2fa3d32
commit 22f73e8d39
+2 -2
View File
@@ -124,14 +124,14 @@ const [loadScene, sceneCache] = useWithAsyncCache(async (name: string) => {
const entityProcess = entityProcessMap.get(entityData.name); const entityProcess = entityProcessMap.get(entityData.name);
if (entityProcess !== undefined) { if (entityProcess !== undefined) {
entityProcessMapProxy.map.set(id, box(entityProcess)); entityProcessMapProxy.map.set(id, box(entityProcess)); // TODO: avoid boxing
} }
for (const [key, value] of entityBlueprintMap for (const [key, value] of entityBlueprintMap
.get(entityData.name)! .get(entityData.name)!
.entries()) { .entries()) {
if (componentsMap.has(key)) { if (componentsMap.has(key)) {
componentsMap.get(key)?.map.set(id, box(structuredClone(value))); componentsMap.get(key)!.map.set(id, box(structuredClone(value)));
} else { } else {
componentsMap.set( componentsMap.set(
key, key,