Enhance removeInvalidatedInteractionLinks function

This commit is contained in:
2026-04-14 01:35:52 +02:00
parent 6d9bcb0880
commit 21b8ac1f50

View File

@@ -20,6 +20,23 @@ function removeInvalidatedInteractionLinks(
case "playSound":
case "stopSound":
return silencedSoundEmitterIds.has(link.action.targetSoundEmitterId);
case "control":
switch (link.action.effect.type) {
case "playModelAnimation":
case "stopModelAnimation":
return removedModelInstanceIds.has(
link.action.effect.target.modelInstanceId
);
case "playSound":
case "stopSound":
return silencedSoundEmitterIds.has(
link.action.effect.target.entityId
);
case "setInteractionEnabled":
case "setLightEnabled":
case "setLightIntensity":
return false;
}
default:
return false;
}
@@ -172,4 +189,4 @@ export function deleteProjectAssetFromProjectDocument(
assets: nextAssets,
scenes: didChangeScenes ? nextScenes : projectDocument.scenes
};
}
}