This commit is contained in:
33333-33333 2026-07-01 14:41:05 +09:00
commit 4d3fc2cd47
84 changed files with 3429 additions and 3480 deletions

View file

@ -96,6 +96,19 @@
if (worldRef) worldRef.drawListDirty = true;
return anchor;
}
function resetLooseState(item) {
if (!item) return item;
item.pinState = "loose";
item.pinTargetId = "";
item.pinAttachAngle = 0;
item.pinAttachDistance = 0;
item.pinOffsetY = 0;
item.pinDamageTick = 0;
item.pinFallCheckTimer = 0;
item.pinLogAt = -999;
return item;
}
function isAttachedToEntity(pin, entity) {
if (!pin || !entity || !isPin(pin)) return false;
if (entity.type === "ball") return pin.pinState === "ball_lodged" && pin.pinBallId === entity.id;
@ -120,6 +133,7 @@
tarinaiAnchor,
applyTarinaiPose,
applyBallPose,
resetLooseState,
drawAttachedForEntity,
});
})(typeof window !== "undefined" ? window : globalThis);