blacktrigram 0.7.44 → 0.7.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/audio/AudioManager.d.ts +26 -0
- package/lib/audio/AudioManager.d.ts.map +1 -1
- package/lib/audio/AudioManager.js +26 -0
- package/lib/audio/AudioManager.js.map +1 -1
- package/lib/audio/index.d.ts.map +1 -1
- package/lib/audio/index.js.map +1 -1
- package/lib/audio/types.d.ts +18 -2
- package/lib/audio/types.d.ts.map +1 -1
- package/lib/audio/types.js +1 -0
- package/lib/audio/types.js.map +1 -1
- package/lib/components/effects/WindParticles3D.d.ts.map +1 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/screens/combat/CombatScreen3D.d.ts.map +1 -1
- package/lib/components/screens/combat/CombatScreen3D.js.map +1 -1
- package/lib/components/screens/combat/components/controls/KeyboardHints.d.ts +0 -1
- package/lib/components/screens/combat/components/controls/KeyboardHints.d.ts.map +1 -1
- package/lib/components/screens/combat/components/controls/KeyboardHints.js +0 -1
- package/lib/components/screens/combat/components/controls/KeyboardHints.js.map +1 -1
- package/lib/components/screens/combat/components/controls/PauseMenu.d.ts.map +1 -1
- package/lib/components/screens/combat/components/controls/PauseMenu.js.map +1 -1
- package/lib/components/screens/combat/components/effects/ArterialSpray3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodDecals3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodDecals3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodLossOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodLossOverlayHtml.js.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodParticles3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodParticles3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodViscosity3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/BloodViscosity3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/BoneCrackParticles3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/CombatParticleEffects3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/CombatParticleEffects3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/ConsciousnessBlur.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/ConsciousnessBlur.js.map +1 -1
- package/lib/components/screens/combat/components/effects/DustClouds3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/EarthCrackEffect3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/EarthHealingEffect3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/ImpactSparks3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/InternalDamage3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/InternalDamage3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/LiPrecisionTargetingOverlay.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/NerveStrikeParticles3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/PainVignette.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/PainVignette.js.map +1 -1
- package/lib/components/screens/combat/components/effects/ParticleAudio3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/ParticleAudio3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/TraumaOverlay3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/TraumaOverlay3D.js.map +1 -1
- package/lib/components/screens/combat/components/effects/WaterRipple3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/WaterWave3D.d.ts.map +1 -1
- package/lib/components/screens/combat/components/effects/index.d.ts.map +1 -1
- package/lib/components/screens/combat/components/feedback/MatchCountdown.d.ts.map +1 -1
- package/lib/components/screens/combat/components/feedback/MatchCountdown.js.map +1 -1
- package/lib/components/screens/combat/components/feedback/RoundAnnouncementOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/combat/components/feedback/RoundAnnouncementOverlayHtml.js.map +1 -1
- package/lib/components/screens/combat/components/feedback/RoundStartAnnouncementOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/combat/components/feedback/RoundStartAnnouncementOverlayHtml.js.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatBottomHUD.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatBottomHUD.js.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatLeftHUD.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatLeftHUD.js.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatPortraitStatusStrip.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatPortraitStatusStrip.js.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatRightHUD.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatRightHUD.js.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatTopHUD.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/CombatTopHUD.js.map +1 -1
- package/lib/components/screens/combat/components/hud/DifficultyIndicator.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/DifficultyIndicator.js.map +1 -1
- package/lib/components/screens/combat/components/hud/FPSMonitor.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/FPSMonitor.js.map +1 -1
- package/lib/components/screens/combat/components/hud/PlayerStateOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/combat/components/hud/PlayerStateOverlayHtml.js.map +1 -1
- package/lib/components/screens/combat/components/indicators/BalanceIndicator.d.ts.map +1 -1
- package/lib/components/screens/combat/components/indicators/BalanceIndicator.js.map +1 -1
- package/lib/components/screens/combat/components/indicators/InputBufferDisplay.d.ts +0 -1
- package/lib/components/screens/combat/components/indicators/InputBufferDisplay.d.ts.map +1 -1
- package/lib/components/screens/combat/components/indicators/InputBufferDisplay.js +0 -1
- package/lib/components/screens/combat/components/indicators/InputBufferDisplay.js.map +1 -1
- package/lib/components/screens/combat/components/indicators/StaminaWarning.d.ts.map +1 -1
- package/lib/components/screens/combat/components/indicators/StaminaWarning.js.map +1 -1
- package/lib/components/screens/combat/components/indicators/TechniqueNameDisplay.d.ts +0 -2
- package/lib/components/screens/combat/components/indicators/TechniqueNameDisplay.d.ts.map +1 -1
- package/lib/components/screens/combat/components/indicators/TechniqueNameDisplay.js +0 -1
- package/lib/components/screens/combat/components/indicators/TechniqueNameDisplay.js.map +1 -1
- package/lib/components/screens/combat/helpers/AnimationUpdater.d.ts.map +1 -1
- package/lib/components/screens/combat/helpers/AnimationUpdater.js.map +1 -1
- package/lib/components/screens/combat/helpers/combatHelpers.d.ts.map +1 -1
- package/lib/components/screens/combat/helpers/combatHelpers.js.map +1 -1
- package/lib/components/screens/combat/hooks/useAICombat.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useAICombat.js.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatActions.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatActions.js.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatAttackMovement.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatAttackMovement.js.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatAudio.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatAudio.js.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatLayout.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatLayout.js.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatState.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/useCombatState.js.map +1 -1
- package/lib/components/screens/combat/hooks/useGrapplingAudio.d.ts.map +1 -1
- package/lib/components/screens/combat/hooks/usePreloadCombatAudio.d.ts.map +1 -1
- package/lib/components/screens/controls/ControlsScreen3D.d.ts.map +1 -1
- package/lib/components/screens/controls/ControlsScreen3D.js.map +1 -1
- package/lib/components/screens/controls/components/ControlBindingsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/controls/components/ControlBindingsOverlayHtml.js.map +1 -1
- package/lib/components/screens/controls/components/GamepadVisualization3D.d.ts.map +1 -1
- package/lib/components/screens/controls/components/GamepadVisualization3D.js.map +1 -1
- package/lib/components/screens/controls/components/InteractiveControlDemoOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/controls/components/InteractiveControlDemoOverlayHtml.js.map +1 -1
- package/lib/components/screens/controls/components/Key3D.d.ts.map +1 -1
- package/lib/components/screens/controls/components/Key3D.js.map +1 -1
- package/lib/components/screens/controls/components/VisualKeyboard3D.d.ts.map +1 -1
- package/lib/components/screens/controls/components/VisualKeyboard3D.js.map +1 -1
- package/lib/components/screens/controls/constants/ControlsConstants.d.ts.map +1 -1
- package/lib/components/screens/controls/constants/ControlsConstants.js.map +1 -1
- package/lib/components/screens/controls/hooks/useControlsState.d.ts.map +1 -1
- package/lib/components/screens/controls/hooks/useControlsState.js.map +1 -1
- package/lib/components/screens/endscreen/EndScreen3D.d.ts.map +1 -1
- package/lib/components/screens/endscreen/EndScreen3D.js.map +1 -1
- package/lib/components/screens/endscreen/components/DefeatAnimation3D.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/DefeatAnimation3D.js.map +1 -1
- package/lib/components/screens/endscreen/components/NavigationButtonsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/NavigationButtonsOverlayHtml.js.map +1 -1
- package/lib/components/screens/endscreen/components/PerformanceBreakdownOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/PerformanceBreakdownOverlayHtml.js.map +1 -1
- package/lib/components/screens/endscreen/components/PerformanceRatingOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/PerformanceRatingOverlayHtml.js.map +1 -1
- package/lib/components/screens/endscreen/components/VictoryAnimation3D.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/VictoryAnimation3D.js.map +1 -1
- package/lib/components/screens/endscreen/components/WinnerDisplayOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/endscreen/components/WinnerDisplayOverlayHtml.js.map +1 -1
- package/lib/components/screens/endscreen/components/index.d.ts.map +1 -1
- package/lib/components/screens/endscreen/index.d.ts.map +1 -1
- package/lib/components/screens/intro/IntroScreen3D.d.ts.map +1 -1
- package/lib/components/screens/intro/IntroScreen3D.js +1 -1
- package/lib/components/screens/intro/IntroScreen3D.js.map +1 -1
- package/lib/components/screens/intro/components/AbilityListOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/AbilityListOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeCardGridOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeCardGridOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeCardOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeCardOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeDisplayOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/ArchetypeDisplayOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/EnhancedArchetypeDisplayOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/EnhancedArchetypeDisplayOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/MenuButtonsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/MenuButtonsOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/MenuSectionOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/MenuSectionOverlayHtml.js.map +1 -1
- package/lib/components/screens/intro/components/StatBarOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/intro/components/StatBarOverlayHtml.js.map +1 -1
- package/lib/components/screens/philosophy/PhilosophyScreen3D.d.ts.map +1 -1
- package/lib/components/screens/philosophy/PhilosophyScreen3D.js.map +1 -1
- package/lib/components/screens/philosophy/components/InteractiveTrigramGridOverlayHtml.d.ts +0 -1
- package/lib/components/screens/philosophy/components/InteractiveTrigramGridOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/philosophy/components/PhilosophyNavigationOverlayHtml.d.ts +0 -1
- package/lib/components/screens/philosophy/components/PhilosophyNavigationOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/philosophy/components/PhilosophySectionOverlayHtml.d.ts +0 -1
- package/lib/components/screens/philosophy/components/PhilosophySectionOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/philosophy/components/PhilosophyTextOverlayHtml.d.ts +0 -1
- package/lib/components/screens/philosophy/components/PhilosophyTextOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/philosophy/components/TrigramSymbol3D.d.ts +0 -1
- package/lib/components/screens/philosophy/components/TrigramSymbol3D.d.ts.map +1 -1
- package/lib/components/screens/philosophy/components/TrigramVisualization3D.d.ts +0 -1
- package/lib/components/screens/philosophy/components/TrigramVisualization3D.d.ts.map +1 -1
- package/lib/components/screens/philosophy/hooks/usePhilosophyState.d.ts +0 -1
- package/lib/components/screens/philosophy/hooks/usePhilosophyState.d.ts.map +1 -1
- package/lib/components/screens/training/TrainingScreen3D.d.ts.map +1 -1
- package/lib/components/screens/training/TrainingScreen3D.js.map +1 -1
- package/lib/components/screens/training/components/AnatomyControlsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/AnatomyControlsOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/AnatomyOverlay3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/AnatomyOverlay3D.js.map +1 -1
- package/lib/components/screens/training/components/DamageNumber3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/FootPlacementMarkers3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/FootPlacementMarkers3D.js.map +1 -1
- package/lib/components/screens/training/components/FootworkDrillsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/FootworkDrillsOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/HitFeedbackEffect3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/HitFeedbackEffect3D.js.map +1 -1
- package/lib/components/screens/training/components/TrainingAICharacter3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingArena3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingControlsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingControlsOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/TrainingDummy3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingDummy3D.js.map +1 -1
- package/lib/components/screens/training/components/TrainingFeedbackOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingFeedbackOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/TrainingHitEffects3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingModeSelectorOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingModeSelectorOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/TrainingStatsOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/TrainingStatsOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/VitalPointMarker3D.d.ts.map +1 -1
- package/lib/components/screens/training/components/VitalPointMarker3D.js.map +1 -1
- package/lib/components/screens/training/components/VitalPointTrainingOverlayHtml.d.ts.map +1 -1
- package/lib/components/screens/training/components/VitalPointTrainingOverlayHtml.js.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingBottomHUD.d.ts.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingBottomHUD.js.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingLeftHUD.d.ts.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingLeftHUD.js.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingRightHUD.d.ts.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingRightHUD.js.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingTopHUD.d.ts.map +1 -1
- package/lib/components/screens/training/components/hud/TrainingTopHUD.js.map +1 -1
- package/lib/components/screens/training/components/index.d.ts.map +1 -1
- package/lib/components/screens/training/hooks/useAttackMovement.d.ts.map +1 -1
- package/lib/components/screens/training/hooks/useAttackMovement.js.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingActions.d.ts.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingActions.js.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingLayout.d.ts.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingLayout.js.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingState.d.ts.map +1 -1
- package/lib/components/screens/training/hooks/useTrainingState.js.map +1 -1
- package/lib/components/shared/base/AccessibilityProvider.d.ts.map +1 -1
- package/lib/components/shared/base/BaseButton.d.ts.map +1 -1
- package/lib/components/shared/base/BaseButton.js.map +1 -1
- package/lib/components/shared/base/BaseButtonOverlayHtml.d.ts.map +1 -1
- package/lib/components/shared/base/BaseButtonOverlayHtml.js.map +1 -1
- package/lib/components/shared/base/BasePanel.d.ts.map +1 -1
- package/lib/components/shared/base/BasePanel.js.map +1 -1
- package/lib/components/shared/base/BaseText.d.ts.map +1 -1
- package/lib/components/shared/base/BaseText.js.map +1 -1
- package/lib/components/shared/base/ResponsiveContainer.d.ts.map +1 -1
- package/lib/components/shared/base/index.d.ts.map +1 -1
- package/lib/components/shared/base/useKoreanTheme.d.ts.map +1 -1
- package/lib/components/shared/base/useKoreanTheme.js.map +1 -1
- package/lib/components/shared/debug/PerformanceDebugOverlayHtml.d.ts.map +1 -1
- package/lib/components/shared/debug/PerformanceDebugOverlayHtml.js.map +1 -1
- package/lib/components/shared/effects/ScreenFlash.d.ts.map +1 -1
- package/lib/components/shared/mobile/ActionButtons.d.ts.map +1 -1
- package/lib/components/shared/mobile/ActionButtons.js +0 -1
- package/lib/components/shared/mobile/ActionButtons.js.map +1 -1
- package/lib/components/shared/mobile/GestureRecognizerPure.d.ts +0 -1
- package/lib/components/shared/mobile/GestureRecognizerPure.d.ts.map +1 -1
- package/lib/components/shared/mobile/GestureRecognizerPure.js +0 -1
- package/lib/components/shared/mobile/GestureRecognizerPure.js.map +1 -1
- package/lib/components/shared/mobile/HapticController.d.ts +0 -13
- package/lib/components/shared/mobile/HapticController.d.ts.map +1 -1
- package/lib/components/shared/mobile/HapticController.js +0 -10
- package/lib/components/shared/mobile/HapticController.js.map +1 -1
- package/lib/components/shared/mobile/MobileControlsPure.d.ts.map +1 -1
- package/lib/components/shared/mobile/MobileControlsPure.js.map +1 -1
- package/lib/components/shared/mobile/PerformanceMonitor.d.ts +0 -15
- package/lib/components/shared/mobile/PerformanceMonitor.d.ts.map +1 -1
- package/lib/components/shared/mobile/StanceWheelPure.d.ts +0 -1
- package/lib/components/shared/mobile/StanceWheelPure.d.ts.map +1 -1
- package/lib/components/shared/mobile/StanceWheelPure.js +0 -1
- package/lib/components/shared/mobile/StanceWheelPure.js.map +1 -1
- package/lib/components/shared/mobile/TouchOptimizer.d.ts +0 -4
- package/lib/components/shared/mobile/TouchOptimizer.d.ts.map +1 -1
- package/lib/components/shared/mobile/TouchOptimizer.js +0 -3
- package/lib/components/shared/mobile/TouchOptimizer.js.map +1 -1
- package/lib/components/shared/mobile/VirtualDPad.d.ts.map +1 -1
- package/lib/components/shared/mobile/VirtualDPad.js +0 -1
- package/lib/components/shared/mobile/VirtualDPad.js.map +1 -1
- package/lib/components/shared/mobile/index.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/BodySurface.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/BodySurface.js.map +1 -1
- package/lib/components/shared/three/anatomy/BoneAttachedMuscles.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/BoneAttachedMuscles.js.map +1 -1
- package/lib/components/shared/three/anatomy/BoneClothing.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/BoneClothing.js.map +1 -1
- package/lib/components/shared/three/anatomy/BoneRenderer.d.ts +0 -1
- package/lib/components/shared/three/anatomy/BoneRenderer.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/BoneRenderer.js.map +1 -1
- package/lib/components/shared/three/anatomy/Face3D.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/Face3D.js.map +1 -1
- package/lib/components/shared/three/anatomy/Foot3D.d.ts +0 -1
- package/lib/components/shared/three/anatomy/Foot3D.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/Foot3D.js.map +1 -1
- package/lib/components/shared/three/anatomy/Hand3D.d.ts +0 -1
- package/lib/components/shared/three/anatomy/Hand3D.d.ts.map +1 -1
- package/lib/components/shared/three/anatomy/Hand3D.js.map +1 -1
- package/lib/components/shared/three/effects/ActionFeedback.d.ts.map +1 -1
- package/lib/components/shared/three/effects/ActionFeedback.js.map +1 -1
- package/lib/components/shared/three/effects/DamageNumbers.d.ts.map +1 -1
- package/lib/components/shared/three/effects/DamageNumbers.js.map +1 -1
- package/lib/components/shared/three/effects/ExplosiveBurstEffect3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/GrapplingIndicator3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/HitEffects3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/HitEffects3D.js.map +1 -1
- package/lib/components/shared/three/effects/LimbExposureIndicator3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/NerveDisruptionEffect3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/PlayerStateIndicators.d.ts.map +1 -1
- package/lib/components/shared/three/effects/PlayerStateIndicators.js.map +1 -1
- package/lib/components/shared/three/effects/StanceSymbol3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/StanceSymbol3D.js.map +1 -1
- package/lib/components/shared/three/effects/StanceTransitionEffect.d.ts.map +1 -1
- package/lib/components/shared/three/effects/StanceTransitionEffect.js.map +1 -1
- package/lib/components/shared/three/effects/ThunderEffect3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/VitalPointMarkers3D.d.ts.map +1 -1
- package/lib/components/shared/three/effects/VitalPointMarkers3D.js.map +1 -1
- package/lib/components/shared/three/index.d.ts.map +1 -1
- package/lib/components/shared/three/indicators/ElementalColorSystem.d.ts +0 -6
- package/lib/components/shared/three/indicators/ElementalColorSystem.d.ts.map +1 -1
- package/lib/components/shared/three/indicators/ElementalColorSystem.js +0 -4
- package/lib/components/shared/three/indicators/ElementalColorSystem.js.map +1 -1
- package/lib/components/shared/three/indicators/GuardIndicator.d.ts +0 -1
- package/lib/components/shared/three/indicators/GuardIndicator.d.ts.map +1 -1
- package/lib/components/shared/three/indicators/GuardIndicator.js +0 -1
- package/lib/components/shared/three/indicators/GuardIndicator.js.map +1 -1
- package/lib/components/shared/three/indicators/HapticFeedback.d.ts +0 -7
- package/lib/components/shared/three/indicators/HapticFeedback.d.ts.map +1 -1
- package/lib/components/shared/three/indicators/HapticFeedback.js +0 -2
- package/lib/components/shared/three/indicators/HapticFeedback.js.map +1 -1
- package/lib/components/shared/three/indicators/StanceChangeIndicator.d.ts +0 -1
- package/lib/components/shared/three/indicators/StanceChangeIndicator.d.ts.map +1 -1
- package/lib/components/shared/three/indicators/StanceChangeIndicator.js +0 -1
- package/lib/components/shared/three/indicators/StanceChangeIndicator.js.map +1 -1
- package/lib/components/shared/three/indicators/TrigramSymbol3D.d.ts +0 -1
- package/lib/components/shared/three/indicators/TrigramSymbol3D.d.ts.map +1 -1
- package/lib/components/shared/three/models/Player3DWithTransitions.d.ts.map +1 -1
- package/lib/components/shared/three/models/Player3DWithTransitions.js.map +1 -1
- package/lib/components/shared/three/models/SkeletalPlayer3D.d.ts.map +1 -1
- package/lib/components/shared/three/models/SkeletalPlayer3D.js.map +1 -1
- package/lib/components/shared/three/optimization/AdaptiveQuality.d.ts.map +1 -1
- package/lib/components/shared/three/optimization/AdaptiveQuality.js.map +1 -1
- package/lib/components/shared/three/optimization/InstancedGeometry.d.ts.map +1 -1
- package/lib/components/shared/three/optimization/LODSystem.d.ts.map +1 -1
- package/lib/components/shared/three/scene/AtmosphericParticles3D.d.ts.map +1 -1
- package/lib/components/shared/three/scene/AtmosphericParticles3D.js.map +1 -1
- package/lib/components/shared/three/scene/BackgroundScene3D.d.ts.map +1 -1
- package/lib/components/shared/three/scene/BackgroundScene3D.js.map +1 -1
- package/lib/components/shared/three/scene/CombatArena3D.d.ts.map +1 -1
- package/lib/components/shared/three/scene/CombatArena3D.js.map +1 -1
- package/lib/components/shared/three/scene/DebugCollision.d.ts +0 -2
- package/lib/components/shared/three/scene/DebugCollision.d.ts.map +1 -1
- package/lib/components/shared/three/scene/KoreanSignage3D.d.ts.map +1 -1
- package/lib/components/shared/three/scene/KoreanSignage3D.js.map +1 -1
- package/lib/components/shared/three/ui/ArchetypeCard.d.ts.map +1 -1
- package/lib/components/shared/three/ui/ArchetypeCard.js.map +1 -1
- package/lib/components/shared/three/ui/BodyPartHealthDisplay.d.ts.map +1 -1
- package/lib/components/shared/three/ui/BodyPartHealthDisplay.js.map +1 -1
- package/lib/components/shared/three/ui/BreathingIndicator.d.ts.map +1 -1
- package/lib/components/shared/three/ui/BreathingIndicator2.js.map +1 -1
- package/lib/components/shared/three/ui/CombatReadinessBar.d.ts.map +1 -1
- package/lib/components/shared/three/ui/CombatReadinessBar.js.map +1 -1
- package/lib/components/shared/three/ui/ComboCounter.d.ts.map +1 -1
- package/lib/components/shared/three/ui/ComboCounter.js.map +1 -1
- package/lib/components/shared/three/ui/HealthBar.d.ts.map +1 -1
- package/lib/components/shared/three/ui/HealthBar.js.map +1 -1
- package/lib/components/shared/three/ui/KoreanButton.d.ts.map +1 -1
- package/lib/components/shared/three/ui/KoreanButton.js.map +1 -1
- package/lib/components/shared/three/ui/KoreanPanel.d.ts.map +1 -1
- package/lib/components/shared/three/ui/KoreanPanel.js.map +1 -1
- package/lib/components/shared/three/ui/KoreanText.d.ts.map +1 -1
- package/lib/components/shared/three/ui/KoreanText.js.map +1 -1
- package/lib/components/shared/three/ui/MenuList.d.ts.map +1 -1
- package/lib/components/shared/three/ui/MenuList.js.map +1 -1
- package/lib/components/shared/three/ui/PlayerHUD.d.ts.map +1 -1
- package/lib/components/shared/three/ui/PlayerHUD.js.map +1 -1
- package/lib/components/shared/three/ui/ProgressBar.d.ts.map +1 -1
- package/lib/components/shared/three/ui/ProgressBar.js.map +1 -1
- package/lib/components/shared/three/ui/SpeedIndicatorHUD.d.ts +0 -1
- package/lib/components/shared/three/ui/SpeedIndicatorHUD.d.ts.map +1 -1
- package/lib/components/shared/three/ui/SpeedIndicatorHUD.js +0 -1
- package/lib/components/shared/three/ui/SpeedIndicatorHUD.js.map +1 -1
- package/lib/components/shared/three/ui/StaminaBar.d.ts.map +1 -1
- package/lib/components/shared/three/ui/StaminaBar.js.map +1 -1
- package/lib/components/shared/three/ui/TechniqueBar.d.ts.map +1 -1
- package/lib/components/shared/three/ui/TechniqueBar.js.map +1 -1
- package/lib/components/shared/three/ui/TechniqueBarContainer.d.ts.map +1 -1
- package/lib/components/shared/three/ui/TechniqueCard.d.ts.map +1 -1
- package/lib/components/shared/three/ui/TechniqueCard.js.map +1 -1
- package/lib/components/shared/three/ui/VitalPointOverlayControlsHtml.d.ts.map +1 -1
- package/lib/components/shared/three/ui/VitalPointOverlayControlsHtml.js.map +1 -1
- package/lib/components/shared/three/ui/VulnerabilityWindowHUD.d.ts.map +1 -1
- package/lib/components/shared/ui/BaseHUDContainer.d.ts.map +1 -1
- package/lib/components/shared/ui/BaseHUDContainer.js.map +1 -1
- package/lib/components/shared/ui/CombatTimer.d.ts.map +1 -1
- package/lib/components/shared/ui/CombatTimer.js.map +1 -1
- package/lib/components/shared/ui/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/shared/ui/ErrorModal.d.ts.map +1 -1
- package/lib/components/shared/ui/ErrorModal.js.map +1 -1
- package/lib/components/shared/ui/HUDSection.d.ts.map +1 -1
- package/lib/components/shared/ui/LoadingState.d.ts.map +1 -1
- package/lib/components/shared/ui/LoadingState.js.map +1 -1
- package/lib/components/shared/ui/MobileHUDLayout.d.ts +0 -1
- package/lib/components/shared/ui/MobileHUDLayout.d.ts.map +1 -1
- package/lib/components/shared/ui/ResponsiveContainer.d.ts +0 -1
- package/lib/components/shared/ui/ResponsiveContainer.d.ts.map +1 -1
- package/lib/components/shared/ui/SplashScreen.d.ts.map +1 -1
- package/lib/components/shared/ui/SplashScreen.js +2 -2
- package/lib/components/shared/ui/SplashScreen.js.map +1 -1
- package/lib/components/shared/ui/StyledHUDPanel.d.ts.map +1 -1
- package/lib/components/shared/ui/VitalPointOverlayControlsPure.d.ts.map +1 -1
- package/lib/components/shared/ui/VitalPointOverlayControlsPure.js.map +1 -1
- package/lib/components/shared/ui/VolumeControl.d.ts.map +1 -1
- package/lib/components/shared/ui/VolumeControl.js.map +1 -1
- package/lib/components/shared/ui/shared/ConfirmDialog.d.ts.map +1 -1
- package/lib/components/shared/ui/shared/ConfirmDialog.js.map +1 -1
- package/lib/components/test/Hello3D.d.ts.map +1 -1
- package/lib/components/ui/combat/BalanceIndicatorOverlayHtml.d.ts.map +1 -1
- package/lib/components/ui/combat/BalanceIndicatorOverlayHtml.js.map +1 -1
- package/lib/components/ui/combat/ComboCounter.d.ts.map +1 -1
- package/lib/components/ui/combat/PressureMeter.d.ts.map +1 -1
- package/lib/systems/CombatSystem.d.ts +0 -6
- package/lib/systems/CombatSystem.d.ts.map +1 -1
- package/lib/systems/CombatSystem.js +0 -6
- package/lib/systems/CombatSystem.js.map +1 -1
- package/lib/systems/EffectCalculator.d.ts +0 -7
- package/lib/systems/EffectCalculator.d.ts.map +1 -1
- package/lib/systems/EffectCalculator.js +0 -4
- package/lib/systems/EffectCalculator.js.map +1 -1
- package/lib/systems/LayoutSystem.d.ts +0 -1
- package/lib/systems/LayoutSystem.d.ts.map +1 -1
- package/lib/systems/LayoutSystem.js +0 -1
- package/lib/systems/LayoutSystem.js.map +1 -1
- package/lib/systems/PlayerEffectManager.d.ts +0 -10
- package/lib/systems/PlayerEffectManager.d.ts.map +1 -1
- package/lib/systems/PlayerEffectManager.js +0 -3
- package/lib/systems/PlayerEffectManager.js.map +1 -1
- package/lib/systems/ResponsiveScaling.d.ts +0 -12
- package/lib/systems/ResponsiveScaling.d.ts.map +1 -1
- package/lib/systems/ResponsiveScaling.js +0 -12
- package/lib/systems/ResponsiveScaling.js.map +1 -1
- package/lib/systems/TrigramSystem.d.ts +0 -13
- package/lib/systems/TrigramSystem.d.ts.map +1 -1
- package/lib/systems/TrigramSystem.js +0 -13
- package/lib/systems/TrigramSystem.js.map +1 -1
- package/lib/systems/VitalPointSystem.d.ts +0 -10
- package/lib/systems/VitalPointSystem.d.ts.map +1 -1
- package/lib/systems/VitalPointSystem.js +0 -10
- package/lib/systems/VitalPointSystem.js.map +1 -1
- package/lib/systems/animation/builders/KeyframeInterpolation.d.ts +0 -4
- package/lib/systems/animation/builders/KeyframeInterpolation.d.ts.map +1 -1
- package/lib/systems/animation/builders/KeyframeInterpolation.js +0 -1
- package/lib/systems/animation/builders/KeyframeInterpolation.js.map +1 -1
- package/lib/systems/animation/builders/SkeletonRig.d.ts +0 -4
- package/lib/systems/animation/builders/SkeletonRig.d.ts.map +1 -1
- package/lib/systems/animation/builders/SkeletonRig.js +0 -3
- package/lib/systems/animation/builders/SkeletonRig.js.map +1 -1
- package/lib/systems/animation/catalogs/RecoveryAnimations.d.ts +0 -5
- package/lib/systems/animation/catalogs/RecoveryAnimations.d.ts.map +1 -1
- package/lib/systems/animation/catalogs/RecoveryAnimations.js +0 -5
- package/lib/systems/animation/catalogs/RecoveryAnimations.js.map +1 -1
- package/lib/systems/animation/core/AnimationHitTiming.d.ts +0 -6
- package/lib/systems/animation/core/AnimationHitTiming.d.ts.map +1 -1
- package/lib/systems/animation/core/AnimationHitTiming.js +0 -4
- package/lib/systems/animation/core/AnimationHitTiming.js.map +1 -1
- package/lib/systems/animation/core/AnimationTransitions.d.ts +0 -3
- package/lib/systems/animation/core/AnimationTransitions.d.ts.map +1 -1
- package/lib/systems/animation/core/AnimationTransitions.js.map +1 -1
- package/lib/systems/animation/core/LateralityTransform.d.ts +0 -3
- package/lib/systems/animation/core/LateralityTransform.d.ts.map +1 -1
- package/lib/systems/animation/core/LateralityTransform.js +0 -1
- package/lib/systems/animation/core/LateralityTransform.js.map +1 -1
- package/lib/systems/animation/core/RecoveryPhaseEnhancer.d.ts +0 -1
- package/lib/systems/animation/core/RecoveryPhaseEnhancer.d.ts.map +1 -1
- package/lib/systems/animation/core/RecoveryPhaseEnhancer.js.map +1 -1
- package/lib/systems/animation/core/TechniqueAnimationMapper.d.ts +0 -10
- package/lib/systems/animation/core/TechniqueAnimationMapper.d.ts.map +1 -1
- package/lib/systems/animation/core/TechniqueAnimationMapper.js +0 -8
- package/lib/systems/animation/core/TechniqueAnimationMapper.js.map +1 -1
- package/lib/systems/animation/core/TrigramAnimationMapping.d.ts +0 -10
- package/lib/systems/animation/core/TrigramAnimationMapping.d.ts.map +1 -1
- package/lib/systems/animation/core/TrigramStanceTransitions.d.ts +0 -2
- package/lib/systems/animation/core/TrigramStanceTransitions.d.ts.map +1 -1
- package/lib/systems/animation/core/types.d.ts +0 -39
- package/lib/systems/animation/core/types.d.ts.map +1 -1
- package/lib/systems/animation/core/types.js +0 -9
- package/lib/systems/animation/core/types.js.map +1 -1
- package/lib/systems/animation/systems/AdvancedJointMovements.d.ts +0 -27
- package/lib/systems/animation/systems/AdvancedJointMovements.d.ts.map +1 -1
- package/lib/systems/animation/systems/AdvancedJointMovements.js +0 -1
- package/lib/systems/animation/systems/AdvancedJointMovements.js.map +1 -1
- package/lib/systems/animation/systems/BodyFacingSystem.d.ts +0 -19
- package/lib/systems/animation/systems/BodyFacingSystem.d.ts.map +1 -1
- package/lib/systems/animation/systems/BodyFacingSystem.js +0 -14
- package/lib/systems/animation/systems/BodyFacingSystem.js.map +1 -1
- package/lib/systems/animation/systems/FacialExpressions.d.ts +0 -10
- package/lib/systems/animation/systems/FacialExpressions.d.ts.map +1 -1
- package/lib/systems/animation/systems/FacialExpressions.js +0 -2
- package/lib/systems/animation/systems/FacialExpressions.js.map +1 -1
- package/lib/systems/animation/systems/FallAnimations.d.ts +0 -4
- package/lib/systems/animation/systems/FallAnimations.d.ts.map +1 -1
- package/lib/systems/animation/systems/FallAnimations.js +0 -2
- package/lib/systems/animation/systems/FallAnimations.js.map +1 -1
- package/lib/systems/animation/systems/HeadMovements.d.ts +0 -10
- package/lib/systems/animation/systems/HeadMovements.d.ts.map +1 -1
- package/lib/systems/bodypart/BodyPartDamageIntegration.d.ts +0 -7
- package/lib/systems/bodypart/BodyPartDamageIntegration.d.ts.map +1 -1
- package/lib/systems/bodypart/BodyPartDamageIntegration.js +0 -7
- package/lib/systems/bodypart/BodyPartDamageIntegration.js.map +1 -1
- package/lib/systems/bodypart/BodyPartHealthSystem.d.ts +0 -13
- package/lib/systems/bodypart/BodyPartHealthSystem.d.ts.map +1 -1
- package/lib/systems/bodypart/BodyPartHealthSystem.js +0 -13
- package/lib/systems/bodypart/BodyPartHealthSystem.js.map +1 -1
- package/lib/systems/bodypart/BodyPartPositionMapping.d.ts +0 -6
- package/lib/systems/bodypart/BodyPartPositionMapping.d.ts.map +1 -1
- package/lib/systems/bodypart/BodyPartPositionMapping.js +0 -6
- package/lib/systems/bodypart/BodyPartPositionMapping.js.map +1 -1
- package/lib/systems/bodypart/CombatInjuryIntegration.d.ts +0 -10
- package/lib/systems/bodypart/CombatInjuryIntegration.d.ts.map +1 -1
- package/lib/systems/bodypart/CombatInjuryIntegration.js +0 -8
- package/lib/systems/bodypart/CombatInjuryIntegration.js.map +1 -1
- package/lib/systems/bodypart/InjuryIntegration.d.ts +0 -2
- package/lib/systems/bodypart/InjuryIntegration.d.ts.map +1 -1
- package/lib/systems/bodypart/InjuryIntegration.js +0 -2
- package/lib/systems/bodypart/InjuryIntegration.js.map +1 -1
- package/lib/systems/bodypart/InjuryTracker.d.ts +0 -14
- package/lib/systems/bodypart/InjuryTracker.d.ts.map +1 -1
- package/lib/systems/bodypart/InjuryTracker.js +0 -12
- package/lib/systems/bodypart/InjuryTracker.js.map +1 -1
- package/lib/systems/bodypart/MovementPenaltySystem.d.ts +0 -8
- package/lib/systems/bodypart/MovementPenaltySystem.d.ts.map +1 -1
- package/lib/systems/bodypart/MovementPenaltySystem.js +0 -8
- package/lib/systems/bodypart/MovementPenaltySystem.js.map +1 -1
- package/lib/systems/bodypart/PlayerInjuryTrackingManager.d.ts +0 -8
- package/lib/systems/bodypart/PlayerInjuryTrackingManager.d.ts.map +1 -1
- package/lib/systems/bodypart/PlayerInjuryTrackingManager.js +0 -8
- package/lib/systems/bodypart/PlayerInjuryTrackingManager.js.map +1 -1
- package/lib/systems/bodypart/types.d.ts +0 -13
- package/lib/systems/bodypart/types.d.ts.map +1 -1
- package/lib/systems/bodypart/types.js +0 -5
- package/lib/systems/bodypart/types.js.map +1 -1
- package/lib/systems/breathing/BreathingDisruptionSystem.d.ts +0 -3
- package/lib/systems/breathing/BreathingDisruptionSystem.d.ts.map +1 -1
- package/lib/systems/breathing/BreathingDisruptionSystem.js +0 -2
- package/lib/systems/breathing/BreathingDisruptionSystem.js.map +1 -1
- package/lib/systems/combat/BalanceSystem.d.ts +0 -25
- package/lib/systems/combat/BalanceSystem.d.ts.map +1 -1
- package/lib/systems/combat/BalanceSystem.js +0 -25
- package/lib/systems/combat/BalanceSystem.js.map +1 -1
- package/lib/systems/combat/BreakingStatusEffects.d.ts +0 -4
- package/lib/systems/combat/BreakingStatusEffects.d.ts.map +1 -1
- package/lib/systems/combat/BreakingStatusEffects.js +0 -3
- package/lib/systems/combat/BreakingStatusEffects.js.map +1 -1
- package/lib/systems/combat/CombatStateSystem.d.ts +0 -9
- package/lib/systems/combat/CombatStateSystem.d.ts.map +1 -1
- package/lib/systems/combat/CombatStateSystem.js +0 -9
- package/lib/systems/combat/CombatStateSystem.js.map +1 -1
- package/lib/systems/combat/ConsciousnessSystem.d.ts +0 -16
- package/lib/systems/combat/ConsciousnessSystem.d.ts.map +1 -1
- package/lib/systems/combat/ConsciousnessSystem.js +0 -16
- package/lib/systems/combat/ConsciousnessSystem.js.map +1 -1
- package/lib/systems/combat/FallIntegration.d.ts +0 -3
- package/lib/systems/combat/FallIntegration.d.ts.map +1 -1
- package/lib/systems/combat/FallIntegration.js +0 -3
- package/lib/systems/combat/FallIntegration.js.map +1 -1
- package/lib/systems/combat/GrappleSystem.d.ts +0 -2
- package/lib/systems/combat/GrappleSystem.d.ts.map +1 -1
- package/lib/systems/combat/GrappleSystem.js +0 -2
- package/lib/systems/combat/GrappleSystem.js.map +1 -1
- package/lib/systems/combat/LimbExposureSystem.d.ts +0 -7
- package/lib/systems/combat/LimbExposureSystem.d.ts.map +1 -1
- package/lib/systems/combat/LimbExposureSystem.js +0 -7
- package/lib/systems/combat/LimbExposureSystem.js.map +1 -1
- package/lib/systems/combat/PainResponseSystem.d.ts +0 -11
- package/lib/systems/combat/PainResponseSystem.d.ts.map +1 -1
- package/lib/systems/combat/PainResponseSystem.js +0 -11
- package/lib/systems/combat/PainResponseSystem.js.map +1 -1
- package/lib/systems/combat/painConsciousnessUtils.d.ts +0 -7
- package/lib/systems/combat/painConsciousnessUtils.d.ts.map +1 -1
- package/lib/systems/combat/painConsciousnessUtils.js +0 -7
- package/lib/systems/combat/painConsciousnessUtils.js.map +1 -1
- package/lib/systems/effects.d.ts +11 -0
- package/lib/systems/effects.d.ts.map +1 -1
- package/lib/systems/effects.js +10 -0
- package/lib/systems/effects.js.map +1 -1
- package/lib/systems/game.d.ts +16 -0
- package/lib/systems/game.d.ts.map +1 -1
- package/lib/systems/game.js +1 -0
- package/lib/systems/game.js.map +1 -1
- package/lib/systems/index.d.ts +5 -1
- package/lib/systems/index.d.ts.map +1 -1
- package/lib/systems/index.js.map +1 -1
- package/lib/systems/movement/InjuryMovementModifier.d.ts +0 -10
- package/lib/systems/movement/InjuryMovementModifier.d.ts.map +1 -1
- package/lib/systems/movement/InjuryMovementModifier.js +0 -7
- package/lib/systems/movement/InjuryMovementModifier.js.map +1 -1
- package/lib/systems/movement/integration.d.ts +0 -3
- package/lib/systems/movement/integration.d.ts.map +1 -1
- package/lib/systems/movement/integration.js +0 -3
- package/lib/systems/movement/integration.js.map +1 -1
- package/lib/systems/physics/AttackMovementPhysics.d.ts +0 -9
- package/lib/systems/physics/AttackMovementPhysics.d.ts.map +1 -1
- package/lib/systems/physics/AttackMovementPhysics.js +0 -7
- package/lib/systems/physics/AttackMovementPhysics.js.map +1 -1
- package/lib/systems/physics/CollisionDetection.d.ts +0 -6
- package/lib/systems/physics/CollisionDetection.d.ts.map +1 -1
- package/lib/systems/physics/CollisionDetection.js +0 -6
- package/lib/systems/physics/CollisionDetection.js.map +1 -1
- package/lib/systems/physics/CoordinateMapper.d.ts +0 -1
- package/lib/systems/physics/CoordinateMapper.d.ts.map +1 -1
- package/lib/systems/physics/CoordinateMapper.js +0 -1
- package/lib/systems/physics/CoordinateMapper.js.map +1 -1
- package/lib/systems/physics/KnockbackPhysics.d.ts +0 -11
- package/lib/systems/physics/KnockbackPhysics.d.ts.map +1 -1
- package/lib/systems/physics/KnockbackPhysics.js +0 -8
- package/lib/systems/physics/KnockbackPhysics.js.map +1 -1
- package/lib/systems/physics/MovementPhysics.d.ts +0 -10
- package/lib/systems/physics/MovementPhysics.d.ts.map +1 -1
- package/lib/systems/physics/MovementPhysics.js +0 -8
- package/lib/systems/physics/MovementPhysics.js.map +1 -1
- package/lib/systems/physics/PhysicalReachCalculator.d.ts +0 -6
- package/lib/systems/physics/PhysicalReachCalculator.d.ts.map +1 -1
- package/lib/systems/physics/PhysicalReachCalculator.js +0 -5
- package/lib/systems/physics/PhysicalReachCalculator.js.map +1 -1
- package/lib/systems/physics/SpeedModifierSystem.d.ts +0 -5
- package/lib/systems/physics/SpeedModifierSystem.d.ts.map +1 -1
- package/lib/systems/physics/SpeedModifierSystem.js +0 -4
- package/lib/systems/physics/SpeedModifierSystem.js.map +1 -1
- package/lib/systems/player.d.ts +0 -5
- package/lib/systems/player.d.ts.map +1 -1
- package/lib/systems/trigram/TrigramCalculator.d.ts +0 -1
- package/lib/systems/trigram/TrigramCalculator.d.ts.map +1 -1
- package/lib/systems/trigram/TrigramCalculator.js +0 -1
- package/lib/systems/trigram/TrigramCalculator.js.map +1 -1
- package/lib/systems/trigram/types.d.ts +0 -4
- package/lib/systems/trigram/types.d.ts.map +1 -1
- package/lib/systems/trigram/types.js +0 -2
- package/lib/systems/trigram/types.js.map +1 -1
- package/lib/systems/types.d.ts +7 -2
- package/lib/systems/types.d.ts.map +1 -1
- package/lib/systems/types.js.map +1 -1
- package/lib/systems/vitalpoint/DamageCalculator.d.ts +0 -3
- package/lib/systems/vitalpoint/DamageCalculator.d.ts.map +1 -1
- package/lib/systems/vitalpoint/DamageCalculator.js +0 -3
- package/lib/systems/vitalpoint/DamageCalculator.js.map +1 -1
- package/lib/systems/vitalpoint/KoreanVitalPoints.d.ts +0 -8
- package/lib/systems/vitalpoint/KoreanVitalPoints.d.ts.map +1 -1
- package/lib/systems/vitalpoint/KoreanVitalPoints.js +0 -8
- package/lib/systems/vitalpoint/KoreanVitalPoints.js.map +1 -1
- package/lib/systems/vitalpoint/VitalPointsData.d.ts +0 -3
- package/lib/systems/vitalpoint/VitalPointsData.d.ts.map +1 -1
- package/lib/systems/vitalpoint/VitalPointsData.js +0 -1
- package/lib/systems/vitalpoint/VitalPointsData.js.map +1 -1
- package/lib/types/PhysicsTypes.d.ts +21 -78
- package/lib/types/PhysicsTypes.d.ts.map +1 -1
- package/lib/types/PhysicsTypes.js +17 -63
- package/lib/types/PhysicsTypes.js.map +1 -1
- package/lib/types/clothing.d.ts +0 -9
- package/lib/types/clothing.d.ts.map +1 -1
- package/lib/types/constants/animations.d.ts +35 -1
- package/lib/types/constants/animations.d.ts.map +1 -1
- package/lib/types/constants/animations.js +12 -1
- package/lib/types/constants/animations.js.map +1 -1
- package/lib/types/constants/colors.d.ts +28 -2
- package/lib/types/constants/colors.d.ts.map +1 -1
- package/lib/types/constants/colors.js +30 -4
- package/lib/types/constants/colors.js.map +1 -1
- package/lib/types/constants/index.d.ts +5 -1
- package/lib/types/constants/index.d.ts.map +1 -1
- package/lib/types/constants/index.js.map +1 -1
- package/lib/types/constants/performance.d.ts +0 -2
- package/lib/types/constants/performance.d.ts.map +1 -1
- package/lib/types/constants/performance.js +0 -2
- package/lib/types/constants/performance.js.map +1 -1
- package/lib/types/constants/typography.d.ts +40 -2
- package/lib/types/constants/typography.d.ts.map +1 -1
- package/lib/types/constants/typography.js +40 -2
- package/lib/types/constants/typography.js.map +1 -1
- package/lib/types/constants/ui.d.ts +89 -1
- package/lib/types/constants/ui.d.ts.map +1 -1
- package/lib/types/constants/ui.js +33 -1
- package/lib/types/constants/ui.js.map +1 -1
- package/lib/types/facial.d.ts +0 -15
- package/lib/types/facial.d.ts.map +1 -1
- package/lib/types/facial.js +0 -8
- package/lib/types/facial.js.map +1 -1
- package/lib/types/hand-animation.d.ts +34 -147
- package/lib/types/hand-animation.d.ts.map +1 -1
- package/lib/types/hand-animation.js +0 -2
- package/lib/types/hand-animation.js.map +1 -1
- package/lib/types/injury.d.ts +0 -2
- package/lib/types/injury.d.ts.map +1 -1
- package/lib/types/injury.js +0 -1
- package/lib/types/injury.js.map +1 -1
- package/lib/types/physics.d.ts +0 -21
- package/lib/types/physics.d.ts.map +1 -1
- package/lib/types/physics.js +0 -6
- package/lib/types/physics.js.map +1 -1
- package/lib/types/physicsConstants.d.ts +0 -12
- package/lib/types/physicsConstants.d.ts.map +1 -1
- package/lib/types/physicsConstants.js +0 -12
- package/lib/types/physicsConstants.js.map +1 -1
- package/lib/types/player-visual.d.ts +45 -189
- package/lib/types/player-visual.d.ts.map +1 -1
- package/lib/types/technique.d.ts +1 -5
- package/lib/types/technique.d.ts.map +1 -1
- package/lib/types/techniqueId.d.ts +0 -1
- package/lib/types/techniqueId.d.ts.map +1 -1
- package/lib/types/techniqueId.js +0 -1
- package/lib/types/techniqueId.js.map +1 -1
- package/lib/utils/arenaWorldDimensions.d.ts +0 -11
- package/lib/utils/arenaWorldDimensions.d.ts.map +1 -1
- package/lib/utils/arenaWorldDimensions.js +0 -6
- package/lib/utils/arenaWorldDimensions.js.map +1 -1
- package/lib/utils/controlMapping.d.ts +3 -4
- package/lib/utils/controlMapping.d.ts.map +1 -1
- package/lib/utils/controlMapping.js +1 -2
- package/lib/utils/controlMapping.js.map +1 -1
- package/lib/utils/deviceDetection.d.ts +0 -5
- package/lib/utils/deviceDetection.d.ts.map +1 -1
- package/lib/utils/deviceDetection.js +0 -5
- package/lib/utils/deviceDetection.js.map +1 -1
- package/lib/utils/hapticFeedback.d.ts +23 -95
- package/lib/utils/hapticFeedback.d.ts.map +1 -1
- package/lib/utils/hapticFeedback.js +9 -39
- package/lib/utils/hapticFeedback.js.map +1 -1
- package/lib/utils/haptics.d.ts +0 -3
- package/lib/utils/haptics.d.ts.map +1 -1
- package/lib/utils/haptics.js +0 -1
- package/lib/utils/haptics.js.map +1 -1
- package/lib/utils/math.d.ts +0 -3
- package/lib/utils/math.d.ts.map +1 -1
- package/lib/utils/math.js +0 -2
- package/lib/utils/math.js.map +1 -1
- package/lib/utils/mobileLayoutHelpers.d.ts +0 -3
- package/lib/utils/mobileLayoutHelpers.d.ts.map +1 -1
- package/lib/utils/mobileLayoutHelpers.js +0 -1
- package/lib/utils/mobileLayoutHelpers.js.map +1 -1
- package/lib/utils/mobileUIUtils.d.ts +5 -100
- package/lib/utils/mobileUIUtils.d.ts.map +1 -1
- package/lib/utils/mobileUIUtils.js +0 -9
- package/lib/utils/mobileUIUtils.js.map +1 -1
- package/lib/utils/physicalAttributeValidation.d.ts.map +1 -1
- package/lib/utils/player3DHelpers.d.ts.map +1 -1
- package/lib/utils/player3DHelpers.js.map +1 -1
- package/lib/utils/responsiveLayoutHelpers.d.ts +0 -65
- package/lib/utils/responsiveLayoutHelpers.d.ts.map +1 -1
- package/lib/utils/responsiveLayoutHelpers.js +0 -65
- package/lib/utils/responsiveLayoutHelpers.js.map +1 -1
- package/lib/utils/responsiveOrientationConstants.d.ts +0 -7
- package/lib/utils/responsiveOrientationConstants.d.ts.map +1 -1
- package/lib/utils/responsiveOrientationConstants.js +0 -7
- package/lib/utils/responsiveOrientationConstants.js.map +1 -1
- package/lib/utils/safeAreaUtils.d.ts +0 -6
- package/lib/utils/safeAreaUtils.d.ts.map +1 -1
- package/lib/utils/safeAreaUtils.js +0 -2
- package/lib/utils/safeAreaUtils.js.map +1 -1
- package/lib/utils/sharedPhysicsConfig.d.ts +0 -4
- package/lib/utils/sharedPhysicsConfig.d.ts.map +1 -1
- package/lib/utils/sharedPhysicsConfig.js +0 -2
- package/lib/utils/sharedPhysicsConfig.js.map +1 -1
- package/lib/utils/skeletonScaling.d.ts +0 -9
- package/lib/utils/skeletonScaling.d.ts.map +1 -1
- package/lib/utils/skeletonScaling.js +0 -1
- package/lib/utils/skeletonScaling.js.map +1 -1
- package/package.json +7 -7
|
@@ -18,7 +18,6 @@ var HEAD_TRACKING_SMOOTHING = .1;
|
|
|
18
18
|
* normalizeAngle(-30); // Returns 330
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
|
-
* @public
|
|
22
21
|
* @korean 각도정규화
|
|
23
22
|
*/
|
|
24
23
|
function normalizeAngle(angle) {
|
|
@@ -43,7 +42,6 @@ function normalizeAngle(angle) {
|
|
|
43
42
|
* calculateAngleDifference(0, 180); // Returns 180
|
|
44
43
|
* ```
|
|
45
44
|
*
|
|
46
|
-
* @public
|
|
47
45
|
* @korean 각도차이계산
|
|
48
46
|
*/
|
|
49
47
|
function calculateAngleDifference(from, to) {
|
|
@@ -71,7 +69,6 @@ function calculateAngleDifference(from, to) {
|
|
|
71
69
|
* calculateAngleToTarget({ x: 0, y: 0 }, { x: 0, y: 1 }); // Returns 90° (down)
|
|
72
70
|
* ```
|
|
73
71
|
*
|
|
74
|
-
* @public
|
|
75
72
|
* @korean 목표각도계산
|
|
76
73
|
*/
|
|
77
74
|
function calculateAngleToTarget(from, to) {
|
|
@@ -99,7 +96,6 @@ function lerp(start, end, t) {
|
|
|
99
96
|
* @param initialAngle - Initial facing angle in degrees (default: 0)
|
|
100
97
|
* @returns Default BodyFacing state
|
|
101
98
|
*
|
|
102
|
-
* @public
|
|
103
99
|
* @korean 기본몸향하기생성
|
|
104
100
|
*/
|
|
105
101
|
function createDefaultBodyFacing(initialAngle = 0) {
|
|
@@ -138,7 +134,6 @@ function createDefaultBodyFacing(initialAngle = 0) {
|
|
|
138
134
|
* // Rotates ~0.72° toward 90° (45°/sec * 0.016s)
|
|
139
135
|
* ```
|
|
140
136
|
*
|
|
141
|
-
* @public
|
|
142
137
|
* @korean 몸향하기업데이트
|
|
143
138
|
*/
|
|
144
139
|
function updateBodyFacing(facing, targetAngle, deltaTime, currentTime) {
|
|
@@ -204,7 +199,6 @@ function updateBodyFacing(facing, targetAngle, deltaTime, currentTime) {
|
|
|
204
199
|
* // Faces toward opponent (pointing right in this case)
|
|
205
200
|
* ```
|
|
206
201
|
*
|
|
207
|
-
* @public
|
|
208
202
|
* @korean 상대방향하기업데이트
|
|
209
203
|
*/
|
|
210
204
|
function updateFacingTowardOpponent(facing, playerPosition, opponentPosition, deltaTime, currentTime) {
|
|
@@ -219,7 +213,6 @@ function updateFacingTowardOpponent(facing, playerPosition, opponentPosition, de
|
|
|
219
213
|
* @param facing - Current body facing state
|
|
220
214
|
* @returns Updated body facing state with lock enabled
|
|
221
215
|
*
|
|
222
|
-
* @public
|
|
223
216
|
* @korean 회전잠금
|
|
224
217
|
*/
|
|
225
218
|
function lockFacing(facing) {
|
|
@@ -236,7 +229,6 @@ function lockFacing(facing) {
|
|
|
236
229
|
* @param facing - Current body facing state
|
|
237
230
|
* @returns Updated body facing state with lock disabled
|
|
238
231
|
*
|
|
239
|
-
* @public
|
|
240
232
|
* @korean 회전잠금해제
|
|
241
233
|
*/
|
|
242
234
|
function unlockFacing(facing) {
|
|
@@ -252,7 +244,6 @@ function unlockFacing(facing) {
|
|
|
252
244
|
* @param facing - Current body facing state
|
|
253
245
|
* @returns Head rotation angle in radians
|
|
254
246
|
*
|
|
255
|
-
* @public
|
|
256
247
|
* @korean 머리각도라디안
|
|
257
248
|
*/
|
|
258
249
|
function getHeadAngleRadians(facing) {
|
|
@@ -263,7 +254,6 @@ function getHeadAngleRadians(facing) {
|
|
|
263
254
|
*
|
|
264
255
|
* Provides centralized system for body facing calculations and updates.
|
|
265
256
|
*
|
|
266
|
-
* @public
|
|
267
257
|
* @korean 몸향하기시스템
|
|
268
258
|
*/
|
|
269
259
|
var BodyFacingSystem = class {
|
|
@@ -273,7 +263,6 @@ var BodyFacingSystem = class {
|
|
|
273
263
|
* @param initialAngle - Initial facing angle in degrees
|
|
274
264
|
* @returns Default body facing state
|
|
275
265
|
*
|
|
276
|
-
* @public
|
|
277
266
|
* @korean 기본상태생성
|
|
278
267
|
*/
|
|
279
268
|
createDefaultState(initialAngle = 0) {
|
|
@@ -289,7 +278,6 @@ var BodyFacingSystem = class {
|
|
|
289
278
|
* @param currentTime - Current timestamp
|
|
290
279
|
* @returns Updated body facing state
|
|
291
280
|
*
|
|
292
|
-
* @public
|
|
293
281
|
* @korean 업데이트
|
|
294
282
|
*/
|
|
295
283
|
update(facing, playerPosition, opponentPosition, deltaTime, currentTime) {
|
|
@@ -301,7 +289,6 @@ var BodyFacingSystem = class {
|
|
|
301
289
|
* @param facing - Current body facing state
|
|
302
290
|
* @returns Updated state with lock
|
|
303
291
|
*
|
|
304
|
-
* @public
|
|
305
292
|
* @korean 잠금
|
|
306
293
|
*/
|
|
307
294
|
lock(facing) {
|
|
@@ -313,7 +300,6 @@ var BodyFacingSystem = class {
|
|
|
313
300
|
* @param facing - Current body facing state
|
|
314
301
|
* @returns Updated state without lock
|
|
315
302
|
*
|
|
316
|
-
* @public
|
|
317
303
|
* @korean 잠금해제
|
|
318
304
|
*/
|
|
319
305
|
unlock(facing) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BodyFacingSystem.js","names":[],"sources":["../../../../src/systems/animation/systems/BodyFacingSystem.ts"],"sourcesContent":["/**\n * Body Facing Direction System for Black Trigram\n *\n * Manages automatic character rotation to face opponent with:\n * - Smooth torso rotation at 45°/sec (±90° range)\n * - Independent head tracking (±45° range)\n * - 180° turn animations for repositioning\n * - Facing lock during attack/defend animations\n *\n * Korean terminology:\n * - 정면향하기 (Jeongmyeon Hyanghagi) - Face forward\n * - 몸회전 (Mom Hoejeon) - Body rotation\n * - 머리추적 (Meori Chujok) - Head tracking\n * - 180도회전 (180-do Hoejeon) - 180-degree turn\n *\n * @module systems/animation/BodyFacingSystem\n * @category Animation System\n * @korean 몸향하기시스템\n */\n\nimport { Position } from \"@/types\";\nimport type { BodyFacing } from \"../core/types\";\n\n/**\n * Default rotation speed in degrees per second\n * 45°/sec provides smooth, realistic rotation\n *\n * @korean 기본회전속도\n */\nexport const DEFAULT_ROTATION_SPEED = 45;\n\n/**\n * Maximum torso rotation range in degrees\n * Torso can rotate ±90° from facing direction\n *\n * @korean 최대몸통회전\n */\nexport const MAX_TORSO_ROTATION = 90;\n\n/**\n * Maximum head rotation offset in degrees\n * Head can track independently ±45° from torso\n *\n * @korean 최대머리회전\n */\nexport const MAX_HEAD_ROTATION = 45;\n\n/**\n * Threshold angle for triggering 180° turn animation\n * If angle difference exceeds this, play full turn animation\n *\n * @korean 180도회전기준각도\n */\nexport const TURN_THRESHOLD_ANGLE = 90;\n\n/**\n * Duration of 180° turn animation in milliseconds\n * 12 frames at 60fps = 200ms\n *\n * @korean 회전애니메이션시간\n */\nexport const TURN_ANIMATION_DURATION = 200;\n\n/**\n * Head tracking smoothing factor (0-1)\n * Lower values = smoother but slower head tracking\n * 0.1 = smooth, natural head movement\n *\n * @korean 머리추적부드러움\n */\nexport const HEAD_TRACKING_SMOOTHING = 0.1;\n\n/**\n * Normalizes an angle to 0-360 degree range\n *\n * @param angle - Angle in degrees\n * @returns Normalized angle in 0-360 range\n *\n * @example\n * ```typescript\n * normalizeAngle(370); // Returns 10\n * normalizeAngle(-30); // Returns 330\n * ```\n *\n * @public\n * @korean 각도정규화\n */\nexport function normalizeAngle(angle: number): number {\n let normalized = angle % 360;\n if (normalized < 0) {\n normalized += 360;\n }\n // Handle -0 edge case (JavaScript quirk)\n return normalized === 0 ? 0 : normalized;\n}\n\n/**\n * Calculates the shortest angular difference between two angles\n * Returns value in range [-180, 180]\n * - Positive = clockwise rotation\n * - Negative = counter-clockwise rotation\n *\n * @param from - Starting angle in degrees\n * @param to - Target angle in degrees\n * @returns Shortest angular difference in degrees\n *\n * @example\n * ```typescript\n * calculateAngleDifference(10, 350); // Returns -20 (turn left)\n * calculateAngleDifference(350, 10); // Returns 20 (turn right)\n * calculateAngleDifference(0, 180); // Returns 180\n * ```\n *\n * @public\n * @korean 각도차이계산\n */\nexport function calculateAngleDifference(from: number, to: number): number {\n const fromNorm = normalizeAngle(from);\n const toNorm = normalizeAngle(to);\n\n let diff = toNorm - fromNorm;\n\n // Find shortest path\n if (diff > 180) {\n diff -= 360;\n } else if (diff < -180) {\n diff += 360;\n }\n\n return diff;\n}\n\n/**\n * Calculates angle from one position to another\n * Returns angle in degrees (0-360)\n * - 0° = pointing right (+X)\n * - 90° = pointing down (+Z)\n * - 180° = pointing left (-X)\n * - 270° = pointing up (-Z)\n *\n * @param from - Starting position\n * @param to - Target position\n * @returns Angle in degrees\n *\n * @example\n * ```typescript\n * calculateAngleToTarget({ x: 0, y: 0 }, { x: 1, y: 0 }); // Returns 0° (right)\n * calculateAngleToTarget({ x: 0, y: 0 }, { x: 0, y: 1 }); // Returns 90° (down)\n * ```\n *\n * @public\n * @korean 목표각도계산\n */\nexport function calculateAngleToTarget(from: Position, to: Position): number {\n const dx = to.x - from.x;\n const dz = to.y - from.y; // Position.y is Z coordinate in 2D top-down\n\n // atan2 returns angle in radians, convert to degrees\n // atan2(y, x) where y is forward/back (Z), x is left/right (X)\n const angle = Math.atan2(dz, dx) * (180 / Math.PI);\n\n return normalizeAngle(angle);\n}\n\n/**\n * Linear interpolation between two values\n *\n * @param start - Start value\n * @param end - End value\n * @param t - Interpolation factor (0-1)\n * @returns Interpolated value\n *\n * @private\n * @korean 선형보간\n */\nfunction lerp(start: number, end: number, t: number): number {\n return start + (end - start) * t;\n}\n\n/**\n * Creates default body facing state\n *\n * @param initialAngle - Initial facing angle in degrees (default: 0)\n * @returns Default BodyFacing state\n *\n * @public\n * @korean 기본몸향하기생성\n */\nexport function createDefaultBodyFacing(initialAngle = 0): BodyFacing {\n const initialRadians = (initialAngle * Math.PI) / 180;\n return {\n currentAngle: normalizeAngle(initialAngle),\n targetAngle: normalizeAngle(initialAngle),\n rotationSpeed: DEFAULT_ROTATION_SPEED,\n headAngleOffset: 0,\n isLocked: false,\n isTurning: false,\n torsoRotation: 0, // No initial torso twist\n hipRotation: initialRadians, // Hips aligned with current angle\n };\n}\n\n/**\n * Updates body facing direction with smooth rotation\n *\n * Performs smooth rotation toward target angle at specified speed.\n * Handles:\n * - Rotation locking during attacks\n * - 180° turn animation triggering\n * - Head tracking with independent offset\n * - Smooth interpolation at 45°/sec\n *\n * @param facing - Current body facing state\n * @param targetAngle - Desired facing angle in degrees\n * @param deltaTime - Time elapsed since last update in seconds\n * @param currentTime - Current timestamp in milliseconds\n * @returns Updated body facing state\n *\n * @example\n * ```typescript\n * const facing = createDefaultBodyFacing(0);\n * const updated = updateBodyFacing(facing, 90, 0.016, Date.now());\n * // Rotates ~0.72° toward 90° (45°/sec * 0.016s)\n * ```\n *\n * @public\n * @korean 몸향하기업데이트\n */\nexport function updateBodyFacing(\n facing: BodyFacing,\n targetAngle: number,\n deltaTime: number,\n currentTime: number\n): BodyFacing {\n // If locked, no rotation allowed\n if (facing.isLocked) {\n return facing;\n }\n\n // Check if 180° turn animation is in progress\n if (facing.isTurning && facing.turnStartTime) {\n const elapsed = currentTime - facing.turnStartTime;\n\n if (elapsed >= TURN_ANIMATION_DURATION) {\n // Turn animation complete - snap to target angle\n return {\n ...facing,\n currentAngle: normalizeAngle(targetAngle),\n targetAngle: normalizeAngle(targetAngle),\n headAngleOffset: 0,\n isTurning: false,\n turnDirection: undefined,\n turnStartTime: undefined,\n };\n }\n\n // Still turning - don't update angle yet\n return {\n ...facing,\n targetAngle: normalizeAngle(targetAngle),\n };\n }\n\n // Calculate angle difference\n const angleDiff = calculateAngleDifference(facing.currentAngle, targetAngle);\n\n // Check if 180° turn is needed\n if (Math.abs(angleDiff) > TURN_THRESHOLD_ANGLE && !facing.isTurning) {\n // Trigger 180° turn animation\n return {\n ...facing,\n targetAngle: normalizeAngle(targetAngle),\n isTurning: true,\n turnDirection: angleDiff > 0 ? \"right\" : \"left\",\n turnStartTime: currentTime,\n };\n }\n\n // Calculate maximum rotation for this frame\n const maxRotation = facing.rotationSpeed * deltaTime;\n\n // Calculate actual rotation (limited by max rotation)\n const rotation =\n Math.sign(angleDiff) * Math.min(Math.abs(angleDiff), maxRotation);\n\n // Update current angle\n const newCurrentAngle = normalizeAngle(facing.currentAngle + rotation);\n\n // Update head tracking (±45° range independent of torso)\n // Head smoothly tracks toward target within allowed range\n const remainingDiff = calculateAngleDifference(newCurrentAngle, targetAngle);\n const targetHeadOffset = Math.max(\n -MAX_HEAD_ROTATION,\n Math.min(MAX_HEAD_ROTATION, remainingDiff)\n );\n\n const newHeadOffset = lerp(\n facing.headAngleOffset,\n targetHeadOffset,\n HEAD_TRACKING_SMOOTHING\n );\n\n return {\n ...facing,\n currentAngle: newCurrentAngle,\n targetAngle: normalizeAngle(targetAngle),\n headAngleOffset: newHeadOffset,\n };\n}\n\n/**\n * Updates facing direction to point toward opponent\n *\n * Calculates target angle based on opponent position and updates\n * body facing state with smooth rotation.\n *\n * @param facing - Current body facing state\n * @param playerPosition - Player's current position\n * @param opponentPosition - Opponent's current position\n * @param deltaTime - Time elapsed since last update in seconds\n * @param currentTime - Current timestamp in milliseconds\n * @returns Updated body facing state\n *\n * @example\n * ```typescript\n * const updated = updateFacingTowardOpponent(\n * facing,\n * { x: 100, y: 200 },\n * { x: 300, y: 200 },\n * 0.016,\n * Date.now()\n * );\n * // Faces toward opponent (pointing right in this case)\n * ```\n *\n * @public\n * @korean 상대방향하기업데이트\n */\nexport function updateFacingTowardOpponent(\n facing: BodyFacing,\n playerPosition: Position,\n opponentPosition: Position,\n deltaTime: number,\n currentTime: number\n): BodyFacing {\n const targetAngle = calculateAngleToTarget(playerPosition, opponentPosition);\n return updateBodyFacing(facing, targetAngle, deltaTime, currentTime);\n}\n\n/**\n * Locks facing direction (during attacks/defends)\n *\n * Prevents rotation while attack or defend animation is playing.\n * Maintains current facing angle.\n *\n * @param facing - Current body facing state\n * @returns Updated body facing state with lock enabled\n *\n * @public\n * @korean 회전잠금\n */\nexport function lockFacing(facing: BodyFacing): BodyFacing {\n return {\n ...facing,\n isLocked: true,\n };\n}\n\n/**\n * Unlocks facing direction (after attacks/defends complete)\n *\n * Allows rotation to resume after attack or defend animation completes.\n *\n * @param facing - Current body facing state\n * @returns Updated body facing state with lock disabled\n *\n * @public\n * @korean 회전잠금해제\n */\nexport function unlockFacing(facing: BodyFacing): BodyFacing {\n return {\n ...facing,\n isLocked: false,\n };\n}\n\n/**\n * Checks if character is currently turning (180° animation)\n *\n * @param facing - Current body facing state\n * @returns True if 180° turn animation is in progress\n *\n * @public\n * @korean 회전중확인\n */\nexport function isTurning(facing: BodyFacing): boolean {\n return facing.isTurning;\n}\n\n/**\n * Gets current facing angle in radians\n * Useful for Three.js rotation (expects radians)\n *\n * @param facing - Current body facing state\n * @returns Current facing angle in radians\n *\n * @public\n * @korean 라디안각도\n */\nexport function getFacingAngleRadians(facing: BodyFacing): number {\n return (facing.currentAngle * Math.PI) / 180;\n}\n\n/**\n * Gets head angle in radians including offset\n * Combines torso rotation with head tracking offset\n *\n * @param facing - Current body facing state\n * @returns Head rotation angle in radians\n *\n * @public\n * @korean 머리각도라디안\n */\nexport function getHeadAngleRadians(facing: BodyFacing): number {\n const totalAngle = facing.currentAngle + facing.headAngleOffset;\n return (totalAngle * Math.PI) / 180;\n}\n\n/**\n * Gets torso rotation in radians\n * Returns the torso rotation relative to hips\n *\n * @param facing - Current body facing state\n * @returns Torso rotation in radians (defaults to 0 if not set)\n *\n * @public\n * @korean 허리회전라디안\n */\nexport function getTorsoRotationRadians(facing: BodyFacing): number {\n return facing.torsoRotation ?? 0;\n}\n\n/**\n * Gets hip rotation in radians\n * Returns the hip/pelvis base rotation\n *\n * @param facing - Current body facing state\n * @returns Hip rotation in radians\n *\n * @public\n * @korean 골반회전라디안\n */\nexport function getHipRotationRadians(facing: BodyFacing): number {\n return facing.hipRotation ?? getFacingAngleRadians(facing);\n}\n\n/**\n * Body Facing System singleton for managing character rotation\n *\n * Provides centralized system for body facing calculations and updates.\n *\n * @public\n * @korean 몸향하기시스템\n */\nexport class BodyFacingSystem {\n /**\n * Creates default body facing state for a new player\n *\n * @param initialAngle - Initial facing angle in degrees\n * @returns Default body facing state\n *\n * @public\n * @korean 기본상태생성\n */\n createDefaultState(initialAngle = 0): BodyFacing {\n return createDefaultBodyFacing(initialAngle);\n }\n\n /**\n * Updates body facing with opponent tracking\n *\n * @param facing - Current body facing state\n * @param playerPosition - Player position\n * @param opponentPosition - Opponent position\n * @param deltaTime - Delta time in seconds\n * @param currentTime - Current timestamp\n * @returns Updated body facing state\n *\n * @public\n * @korean 업데이트\n */\n update(\n facing: BodyFacing,\n playerPosition: Position,\n opponentPosition: Position,\n deltaTime: number,\n currentTime: number\n ): BodyFacing {\n return updateFacingTowardOpponent(\n facing,\n playerPosition,\n opponentPosition,\n deltaTime,\n currentTime\n );\n }\n\n /**\n * Locks facing during attacks\n *\n * @param facing - Current body facing state\n * @returns Updated state with lock\n *\n * @public\n * @korean 잠금\n */\n lock(facing: BodyFacing): BodyFacing {\n return lockFacing(facing);\n }\n\n /**\n * Unlocks facing after attacks\n *\n * @param facing - Current body facing state\n * @returns Updated state without lock\n *\n * @public\n * @korean 잠금해제\n */\n unlock(facing: BodyFacing): BodyFacing {\n return unlockFacing(facing);\n }\n}\n\n/**\n * Default body facing system instance\n *\n * @public\n * @korean 기본몸향하기시스템\n */\nexport const bodyFacingSystem = new BodyFacingSystem();\n\nexport default bodyFacingSystem;\n"],"mappings":";;;;;;;AAsEA,IAAa,0BAA0B;;;;;;;;;;;;;;;;AAiBvC,SAAgB,eAAe,OAAuB;CACpD,IAAI,aAAa,QAAQ;CACzB,IAAI,aAAa,GACf,cAAc;CAGhB,OAAO,eAAe,IAAI,IAAI;;;;;;;;;;;;;;;;;;;;;;AAuBhC,SAAgB,yBAAyB,MAAc,IAAoB;CACzE,MAAM,WAAW,eAAe,KAAK;CAGrC,IAAI,OAFW,eAAe,GAEnB,GAAS;CAGpB,IAAI,OAAO,KACT,QAAQ;MACH,IAAI,OAAO,MAChB,QAAQ;CAGV,OAAO;;;;;;;;;;;;;;;;;;;;;;;AAwBT,SAAgB,uBAAuB,MAAgB,IAAsB;CAC3E,MAAM,KAAK,GAAG,IAAI,KAAK;CACvB,MAAM,KAAK,GAAG,IAAI,KAAK;CAMvB,OAAO,eAFO,KAAK,MAAM,IAAI,GAAG,IAAI,MAAM,KAAK,IAEnB;;;;;;;;;;;;;AAc9B,SAAS,KAAK,OAAe,KAAa,GAAmB;CAC3D,OAAO,SAAS,MAAM,SAAS;;;;;;;;;;;AAYjC,SAAgB,wBAAwB,eAAe,GAAe;CACpE,MAAM,iBAAkB,eAAe,KAAK,KAAM;CAClD,OAAO;EACL,cAAc,eAAe,aAAa;EAC1C,aAAa,eAAe,aAAa;EACzC,eAAA;EACA,iBAAiB;EACjB,UAAU;EACV,WAAW;EACX,eAAe;EACf,aAAa;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,SAAgB,iBACd,QACA,aACA,WACA,aACY;CAEZ,IAAI,OAAO,UACT,OAAO;CAIT,IAAI,OAAO,aAAa,OAAO,eAAe;EAG5C,IAFgB,cAAc,OAAO,iBAAA,KAInC,OAAO;GACL,GAAG;GACH,cAAc,eAAe,YAAY;GACzC,aAAa,eAAe,YAAY;GACxC,iBAAiB;GACjB,WAAW;GACX,eAAe,KAAA;GACf,eAAe,KAAA;GAChB;EAIH,OAAO;GACL,GAAG;GACH,aAAa,eAAe,YAAY;GACzC;;CAIH,MAAM,YAAY,yBAAyB,OAAO,cAAc,YAAY;CAG5E,IAAI,KAAK,IAAI,UAAU,GAAA,MAA2B,CAAC,OAAO,WAExD,OAAO;EACL,GAAG;EACH,aAAa,eAAe,YAAY;EACxC,WAAW;EACX,eAAe,YAAY,IAAI,UAAU;EACzC,eAAe;EAChB;CAIH,MAAM,cAAc,OAAO,gBAAgB;CAG3C,MAAM,WACJ,KAAK,KAAK,UAAU,GAAG,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE,YAAY;CAGnE,MAAM,kBAAkB,eAAe,OAAO,eAAe,SAAS;CAItE,MAAM,gBAAgB,yBAAyB,iBAAiB,YAAY;CAC5E,MAAM,mBAAmB,KAAK,IAC5B,KACA,KAAK,IAAA,IAAuB,cAAc,CAC3C;CAED,MAAM,gBAAgB,KACpB,OAAO,iBACP,kBACA,wBACD;CAED,OAAO;EACL,GAAG;EACH,cAAc;EACd,aAAa,eAAe,YAAY;EACxC,iBAAiB;EAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,SAAgB,2BACd,QACA,gBACA,kBACA,WACA,aACY;CAEZ,OAAO,iBAAiB,QADJ,uBAAuB,gBAAgB,iBAC3B,EAAa,WAAW,YAAY;;;;;;;;;;;;;;AAetE,SAAgB,WAAW,QAAgC;CACzD,OAAO;EACL,GAAG;EACH,UAAU;EACX;;;;;;;;;;;;;AAcH,SAAgB,aAAa,QAAgC;CAC3D,OAAO;EACL,GAAG;EACH,UAAU;EACX;;;;;;;;;;;;AAwCH,SAAgB,oBAAoB,QAA4B;CAE9D,QADmB,OAAO,eAAe,OAAO,mBAC3B,KAAK,KAAM;;;;;;;;;;AAuClC,IAAa,mBAAb,MAA8B;;;;;;;;;;CAU5B,mBAAmB,eAAe,GAAe;EAC/C,OAAO,wBAAwB,aAAa;;;;;;;;;;;;;;;CAgB9C,OACE,QACA,gBACA,kBACA,WACA,aACY;EACZ,OAAO,2BACL,QACA,gBACA,kBACA,WACA,YACD;;;;;;;;;;;CAYH,KAAK,QAAgC;EACnC,OAAO,WAAW,OAAO;;;;;;;;;;;CAY3B,OAAO,QAAgC;EACrC,OAAO,aAAa,OAAO;;;AAUC,IAAI,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"BodyFacingSystem.js","names":[],"sources":["../../../../src/systems/animation/systems/BodyFacingSystem.ts"],"sourcesContent":["/**\n * Body Facing Direction System for Black Trigram\n *\n * Manages automatic character rotation to face opponent with:\n * - Smooth torso rotation at 45°/sec (±90° range)\n * - Independent head tracking (±45° range)\n * - 180° turn animations for repositioning\n * - Facing lock during attack/defend animations\n *\n * Korean terminology:\n * - 정면향하기 (Jeongmyeon Hyanghagi) - Face forward\n * - 몸회전 (Mom Hoejeon) - Body rotation\n * - 머리추적 (Meori Chujok) - Head tracking\n * - 180도회전 (180-do Hoejeon) - 180-degree turn\n *\n * @module systems/animation/BodyFacingSystem\n * @category Animation System\n * @korean 몸향하기시스템\n */\n\nimport { Position } from \"@/types\";\nimport type { BodyFacing } from \"../core/types\";\n\n/**\n * Default rotation speed in degrees per second\n * 45°/sec provides smooth, realistic rotation\n *\n * @korean 기본회전속도\n */\nexport const DEFAULT_ROTATION_SPEED = 45;\n\n/**\n * Maximum torso rotation range in degrees\n * Torso can rotate ±90° from facing direction\n *\n * @korean 최대몸통회전\n */\nexport const MAX_TORSO_ROTATION = 90;\n\n/**\n * Maximum head rotation offset in degrees\n * Head can track independently ±45° from torso\n *\n * @korean 최대머리회전\n */\nexport const MAX_HEAD_ROTATION = 45;\n\n/**\n * Threshold angle for triggering 180° turn animation\n * If angle difference exceeds this, play full turn animation\n *\n * @korean 180도회전기준각도\n */\nexport const TURN_THRESHOLD_ANGLE = 90;\n\n/**\n * Duration of 180° turn animation in milliseconds\n * 12 frames at 60fps = 200ms\n *\n * @korean 회전애니메이션시간\n */\nexport const TURN_ANIMATION_DURATION = 200;\n\n/**\n * Head tracking smoothing factor (0-1)\n * Lower values = smoother but slower head tracking\n * 0.1 = smooth, natural head movement\n *\n * @korean 머리추적부드러움\n */\nexport const HEAD_TRACKING_SMOOTHING = 0.1;\n\n/**\n * Normalizes an angle to 0-360 degree range\n *\n * @param angle - Angle in degrees\n * @returns Normalized angle in 0-360 range\n *\n * @example\n * ```typescript\n * normalizeAngle(370); // Returns 10\n * normalizeAngle(-30); // Returns 330\n * ```\n *\n * @korean 각도정규화\n */\nexport function normalizeAngle(angle: number): number {\n let normalized = angle % 360;\n if (normalized < 0) {\n normalized += 360;\n }\n // Handle -0 edge case (JavaScript quirk)\n return normalized === 0 ? 0 : normalized;\n}\n\n/**\n * Calculates the shortest angular difference between two angles\n * Returns value in range [-180, 180]\n * - Positive = clockwise rotation\n * - Negative = counter-clockwise rotation\n *\n * @param from - Starting angle in degrees\n * @param to - Target angle in degrees\n * @returns Shortest angular difference in degrees\n *\n * @example\n * ```typescript\n * calculateAngleDifference(10, 350); // Returns -20 (turn left)\n * calculateAngleDifference(350, 10); // Returns 20 (turn right)\n * calculateAngleDifference(0, 180); // Returns 180\n * ```\n *\n * @korean 각도차이계산\n */\nexport function calculateAngleDifference(from: number, to: number): number {\n const fromNorm = normalizeAngle(from);\n const toNorm = normalizeAngle(to);\n\n let diff = toNorm - fromNorm;\n\n // Find shortest path\n if (diff > 180) {\n diff -= 360;\n } else if (diff < -180) {\n diff += 360;\n }\n\n return diff;\n}\n\n/**\n * Calculates angle from one position to another\n * Returns angle in degrees (0-360)\n * - 0° = pointing right (+X)\n * - 90° = pointing down (+Z)\n * - 180° = pointing left (-X)\n * - 270° = pointing up (-Z)\n *\n * @param from - Starting position\n * @param to - Target position\n * @returns Angle in degrees\n *\n * @example\n * ```typescript\n * calculateAngleToTarget({ x: 0, y: 0 }, { x: 1, y: 0 }); // Returns 0° (right)\n * calculateAngleToTarget({ x: 0, y: 0 }, { x: 0, y: 1 }); // Returns 90° (down)\n * ```\n *\n * @korean 목표각도계산\n */\nexport function calculateAngleToTarget(from: Position, to: Position): number {\n const dx = to.x - from.x;\n const dz = to.y - from.y; // Position.y is Z coordinate in 2D top-down\n\n // atan2 returns angle in radians, convert to degrees\n // atan2(y, x) where y is forward/back (Z), x is left/right (X)\n const angle = Math.atan2(dz, dx) * (180 / Math.PI);\n\n return normalizeAngle(angle);\n}\n\n/**\n * Linear interpolation between two values\n *\n * @param start - Start value\n * @param end - End value\n * @param t - Interpolation factor (0-1)\n * @returns Interpolated value\n *\n * @private\n * @korean 선형보간\n */\nfunction lerp(start: number, end: number, t: number): number {\n return start + (end - start) * t;\n}\n\n/**\n * Creates default body facing state\n *\n * @param initialAngle - Initial facing angle in degrees (default: 0)\n * @returns Default BodyFacing state\n *\n * @korean 기본몸향하기생성\n */\nexport function createDefaultBodyFacing(initialAngle = 0): BodyFacing {\n const initialRadians = (initialAngle * Math.PI) / 180;\n return {\n currentAngle: normalizeAngle(initialAngle),\n targetAngle: normalizeAngle(initialAngle),\n rotationSpeed: DEFAULT_ROTATION_SPEED,\n headAngleOffset: 0,\n isLocked: false,\n isTurning: false,\n torsoRotation: 0, // No initial torso twist\n hipRotation: initialRadians, // Hips aligned with current angle\n };\n}\n\n/**\n * Updates body facing direction with smooth rotation\n *\n * Performs smooth rotation toward target angle at specified speed.\n * Handles:\n * - Rotation locking during attacks\n * - 180° turn animation triggering\n * - Head tracking with independent offset\n * - Smooth interpolation at 45°/sec\n *\n * @param facing - Current body facing state\n * @param targetAngle - Desired facing angle in degrees\n * @param deltaTime - Time elapsed since last update in seconds\n * @param currentTime - Current timestamp in milliseconds\n * @returns Updated body facing state\n *\n * @example\n * ```typescript\n * const facing = createDefaultBodyFacing(0);\n * const updated = updateBodyFacing(facing, 90, 0.016, Date.now());\n * // Rotates ~0.72° toward 90° (45°/sec * 0.016s)\n * ```\n *\n * @korean 몸향하기업데이트\n */\nexport function updateBodyFacing(\n facing: BodyFacing,\n targetAngle: number,\n deltaTime: number,\n currentTime: number\n): BodyFacing {\n // If locked, no rotation allowed\n if (facing.isLocked) {\n return facing;\n }\n\n // Check if 180° turn animation is in progress\n if (facing.isTurning && facing.turnStartTime) {\n const elapsed = currentTime - facing.turnStartTime;\n\n if (elapsed >= TURN_ANIMATION_DURATION) {\n // Turn animation complete - snap to target angle\n return {\n ...facing,\n currentAngle: normalizeAngle(targetAngle),\n targetAngle: normalizeAngle(targetAngle),\n headAngleOffset: 0,\n isTurning: false,\n turnDirection: undefined,\n turnStartTime: undefined,\n };\n }\n\n // Still turning - don't update angle yet\n return {\n ...facing,\n targetAngle: normalizeAngle(targetAngle),\n };\n }\n\n // Calculate angle difference\n const angleDiff = calculateAngleDifference(facing.currentAngle, targetAngle);\n\n // Check if 180° turn is needed\n if (Math.abs(angleDiff) > TURN_THRESHOLD_ANGLE && !facing.isTurning) {\n // Trigger 180° turn animation\n return {\n ...facing,\n targetAngle: normalizeAngle(targetAngle),\n isTurning: true,\n turnDirection: angleDiff > 0 ? \"right\" : \"left\",\n turnStartTime: currentTime,\n };\n }\n\n // Calculate maximum rotation for this frame\n const maxRotation = facing.rotationSpeed * deltaTime;\n\n // Calculate actual rotation (limited by max rotation)\n const rotation =\n Math.sign(angleDiff) * Math.min(Math.abs(angleDiff), maxRotation);\n\n // Update current angle\n const newCurrentAngle = normalizeAngle(facing.currentAngle + rotation);\n\n // Update head tracking (±45° range independent of torso)\n // Head smoothly tracks toward target within allowed range\n const remainingDiff = calculateAngleDifference(newCurrentAngle, targetAngle);\n const targetHeadOffset = Math.max(\n -MAX_HEAD_ROTATION,\n Math.min(MAX_HEAD_ROTATION, remainingDiff)\n );\n\n const newHeadOffset = lerp(\n facing.headAngleOffset,\n targetHeadOffset,\n HEAD_TRACKING_SMOOTHING\n );\n\n return {\n ...facing,\n currentAngle: newCurrentAngle,\n targetAngle: normalizeAngle(targetAngle),\n headAngleOffset: newHeadOffset,\n };\n}\n\n/**\n * Updates facing direction to point toward opponent\n *\n * Calculates target angle based on opponent position and updates\n * body facing state with smooth rotation.\n *\n * @param facing - Current body facing state\n * @param playerPosition - Player's current position\n * @param opponentPosition - Opponent's current position\n * @param deltaTime - Time elapsed since last update in seconds\n * @param currentTime - Current timestamp in milliseconds\n * @returns Updated body facing state\n *\n * @example\n * ```typescript\n * const updated = updateFacingTowardOpponent(\n * facing,\n * { x: 100, y: 200 },\n * { x: 300, y: 200 },\n * 0.016,\n * Date.now()\n * );\n * // Faces toward opponent (pointing right in this case)\n * ```\n *\n * @korean 상대방향하기업데이트\n */\nexport function updateFacingTowardOpponent(\n facing: BodyFacing,\n playerPosition: Position,\n opponentPosition: Position,\n deltaTime: number,\n currentTime: number\n): BodyFacing {\n const targetAngle = calculateAngleToTarget(playerPosition, opponentPosition);\n return updateBodyFacing(facing, targetAngle, deltaTime, currentTime);\n}\n\n/**\n * Locks facing direction (during attacks/defends)\n *\n * Prevents rotation while attack or defend animation is playing.\n * Maintains current facing angle.\n *\n * @param facing - Current body facing state\n * @returns Updated body facing state with lock enabled\n *\n * @korean 회전잠금\n */\nexport function lockFacing(facing: BodyFacing): BodyFacing {\n return {\n ...facing,\n isLocked: true,\n };\n}\n\n/**\n * Unlocks facing direction (after attacks/defends complete)\n *\n * Allows rotation to resume after attack or defend animation completes.\n *\n * @param facing - Current body facing state\n * @returns Updated body facing state with lock disabled\n *\n * @korean 회전잠금해제\n */\nexport function unlockFacing(facing: BodyFacing): BodyFacing {\n return {\n ...facing,\n isLocked: false,\n };\n}\n\n/**\n * Checks if character is currently turning (180° animation)\n *\n * @param facing - Current body facing state\n * @returns True if 180° turn animation is in progress\n *\n * @korean 회전중확인\n */\nexport function isTurning(facing: BodyFacing): boolean {\n return facing.isTurning;\n}\n\n/**\n * Gets current facing angle in radians\n * Useful for Three.js rotation (expects radians)\n *\n * @param facing - Current body facing state\n * @returns Current facing angle in radians\n *\n * @korean 라디안각도\n */\nexport function getFacingAngleRadians(facing: BodyFacing): number {\n return (facing.currentAngle * Math.PI) / 180;\n}\n\n/**\n * Gets head angle in radians including offset\n * Combines torso rotation with head tracking offset\n *\n * @param facing - Current body facing state\n * @returns Head rotation angle in radians\n *\n * @korean 머리각도라디안\n */\nexport function getHeadAngleRadians(facing: BodyFacing): number {\n const totalAngle = facing.currentAngle + facing.headAngleOffset;\n return (totalAngle * Math.PI) / 180;\n}\n\n/**\n * Gets torso rotation in radians\n * Returns the torso rotation relative to hips\n *\n * @param facing - Current body facing state\n * @returns Torso rotation in radians (defaults to 0 if not set)\n *\n * @korean 허리회전라디안\n */\nexport function getTorsoRotationRadians(facing: BodyFacing): number {\n return facing.torsoRotation ?? 0;\n}\n\n/**\n * Gets hip rotation in radians\n * Returns the hip/pelvis base rotation\n *\n * @param facing - Current body facing state\n * @returns Hip rotation in radians\n *\n * @korean 골반회전라디안\n */\nexport function getHipRotationRadians(facing: BodyFacing): number {\n return facing.hipRotation ?? getFacingAngleRadians(facing);\n}\n\n/**\n * Body Facing System singleton for managing character rotation\n *\n * Provides centralized system for body facing calculations and updates.\n *\n * @korean 몸향하기시스템\n */\nexport class BodyFacingSystem {\n /**\n * Creates default body facing state for a new player\n *\n * @param initialAngle - Initial facing angle in degrees\n * @returns Default body facing state\n *\n * @korean 기본상태생성\n */\n createDefaultState(initialAngle = 0): BodyFacing {\n return createDefaultBodyFacing(initialAngle);\n }\n\n /**\n * Updates body facing with opponent tracking\n *\n * @param facing - Current body facing state\n * @param playerPosition - Player position\n * @param opponentPosition - Opponent position\n * @param deltaTime - Delta time in seconds\n * @param currentTime - Current timestamp\n * @returns Updated body facing state\n *\n * @korean 업데이트\n */\n update(\n facing: BodyFacing,\n playerPosition: Position,\n opponentPosition: Position,\n deltaTime: number,\n currentTime: number\n ): BodyFacing {\n return updateFacingTowardOpponent(\n facing,\n playerPosition,\n opponentPosition,\n deltaTime,\n currentTime\n );\n }\n\n /**\n * Locks facing during attacks\n *\n * @param facing - Current body facing state\n * @returns Updated state with lock\n *\n * @korean 잠금\n */\n lock(facing: BodyFacing): BodyFacing {\n return lockFacing(facing);\n }\n\n /**\n * Unlocks facing after attacks\n *\n * @param facing - Current body facing state\n * @returns Updated state without lock\n *\n * @korean 잠금해제\n */\n unlock(facing: BodyFacing): BodyFacing {\n return unlockFacing(facing);\n }\n}\n\n/**\n * Default body facing system instance\n *\n * @korean 기본몸향하기시스템\n */\nexport const bodyFacingSystem = new BodyFacingSystem();\n\nexport default bodyFacingSystem;\n"],"mappings":";;;;;;;AAsEA,IAAa,0BAA0B;;;;;;;;;;;;;;;AAgBvC,SAAgB,eAAe,OAAuB;CACpD,IAAI,aAAa,QAAQ;CACzB,IAAI,aAAa,GACf,cAAc;CAGhB,OAAO,eAAe,IAAI,IAAI;;;;;;;;;;;;;;;;;;;;;AAsBhC,SAAgB,yBAAyB,MAAc,IAAoB;CACzE,MAAM,WAAW,eAAe,KAAK;CAGrC,IAAI,OAFW,eAAe,GAEnB,GAAS;CAGpB,IAAI,OAAO,KACT,QAAQ;MACH,IAAI,OAAO,MAChB,QAAQ;CAGV,OAAO;;;;;;;;;;;;;;;;;;;;;;AAuBT,SAAgB,uBAAuB,MAAgB,IAAsB;CAC3E,MAAM,KAAK,GAAG,IAAI,KAAK;CACvB,MAAM,KAAK,GAAG,IAAI,KAAK;CAMvB,OAAO,eAFO,KAAK,MAAM,IAAI,GAAG,IAAI,MAAM,KAAK,IAEnB;;;;;;;;;;;;;AAc9B,SAAS,KAAK,OAAe,KAAa,GAAmB;CAC3D,OAAO,SAAS,MAAM,SAAS;;;;;;;;;;AAWjC,SAAgB,wBAAwB,eAAe,GAAe;CACpE,MAAM,iBAAkB,eAAe,KAAK,KAAM;CAClD,OAAO;EACL,cAAc,eAAe,aAAa;EAC1C,aAAa,eAAe,aAAa;EACzC,eAAA;EACA,iBAAiB;EACjB,UAAU;EACV,WAAW;EACX,eAAe;EACf,aAAa;EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,SAAgB,iBACd,QACA,aACA,WACA,aACY;CAEZ,IAAI,OAAO,UACT,OAAO;CAIT,IAAI,OAAO,aAAa,OAAO,eAAe;EAG5C,IAFgB,cAAc,OAAO,iBAAA,KAInC,OAAO;GACL,GAAG;GACH,cAAc,eAAe,YAAY;GACzC,aAAa,eAAe,YAAY;GACxC,iBAAiB;GACjB,WAAW;GACX,eAAe,KAAA;GACf,eAAe,KAAA;GAChB;EAIH,OAAO;GACL,GAAG;GACH,aAAa,eAAe,YAAY;GACzC;;CAIH,MAAM,YAAY,yBAAyB,OAAO,cAAc,YAAY;CAG5E,IAAI,KAAK,IAAI,UAAU,GAAA,MAA2B,CAAC,OAAO,WAExD,OAAO;EACL,GAAG;EACH,aAAa,eAAe,YAAY;EACxC,WAAW;EACX,eAAe,YAAY,IAAI,UAAU;EACzC,eAAe;EAChB;CAIH,MAAM,cAAc,OAAO,gBAAgB;CAG3C,MAAM,WACJ,KAAK,KAAK,UAAU,GAAG,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE,YAAY;CAGnE,MAAM,kBAAkB,eAAe,OAAO,eAAe,SAAS;CAItE,MAAM,gBAAgB,yBAAyB,iBAAiB,YAAY;CAC5E,MAAM,mBAAmB,KAAK,IAC5B,KACA,KAAK,IAAA,IAAuB,cAAc,CAC3C;CAED,MAAM,gBAAgB,KACpB,OAAO,iBACP,kBACA,wBACD;CAED,OAAO;EACL,GAAG;EACH,cAAc;EACd,aAAa,eAAe,YAAY;EACxC,iBAAiB;EAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,SAAgB,2BACd,QACA,gBACA,kBACA,WACA,aACY;CAEZ,OAAO,iBAAiB,QADJ,uBAAuB,gBAAgB,iBAC3B,EAAa,WAAW,YAAY;;;;;;;;;;;;;AActE,SAAgB,WAAW,QAAgC;CACzD,OAAO;EACL,GAAG;EACH,UAAU;EACX;;;;;;;;;;;;AAaH,SAAgB,aAAa,QAAgC;CAC3D,OAAO;EACL,GAAG;EACH,UAAU;EACX;;;;;;;;;;;AAqCH,SAAgB,oBAAoB,QAA4B;CAE9D,QADmB,OAAO,eAAe,OAAO,mBAC3B,KAAK,KAAM;;;;;;;;;AAoClC,IAAa,mBAAb,MAA8B;;;;;;;;;CAS5B,mBAAmB,eAAe,GAAe;EAC/C,OAAO,wBAAwB,aAAa;;;;;;;;;;;;;;CAe9C,OACE,QACA,gBACA,kBACA,WACA,aACY;EACZ,OAAO,2BACL,QACA,gBACA,kBACA,WACA,YACD;;;;;;;;;;CAWH,KAAK,QAAgC;EACnC,OAAO,WAAW,OAAO;;;;;;;;;;CAW3B,OAAO,QAAgC;EACrC,OAAO,aAAa,OAAO;;;AASC,IAAI,kBAAkB"}
|
|
@@ -14,7 +14,6 @@ import { FacialExpression, type ExpressionState, type FacialDamageState } from "
|
|
|
14
14
|
/**
|
|
15
15
|
* Expression transition configuration
|
|
16
16
|
*
|
|
17
|
-
* @public
|
|
18
17
|
* @korean 표정전환설정
|
|
19
18
|
*/
|
|
20
19
|
export interface ExpressionTransitionConfig {
|
|
@@ -28,7 +27,6 @@ export interface ExpressionTransitionConfig {
|
|
|
28
27
|
/**
|
|
29
28
|
* Default expression transition configuration
|
|
30
29
|
*
|
|
31
|
-
* @public
|
|
32
30
|
* @korean 기본표정전환설정
|
|
33
31
|
*/
|
|
34
32
|
export declare const DEFAULT_TRANSITION_CONFIG: ExpressionTransitionConfig;
|
|
@@ -67,7 +65,6 @@ export declare const DEFAULT_TRANSITION_CONFIG: ExpressionTransitionConfig;
|
|
|
67
65
|
* // Returns: FacialExpression.VICTORIOUS
|
|
68
66
|
* ```
|
|
69
67
|
*
|
|
70
|
-
* @public
|
|
71
68
|
* @korean 전투상태로부터표정가져오기
|
|
72
69
|
*/
|
|
73
70
|
export declare const getExpressionFromCombatState: (health: number, maxHealth: number, stamina: number, _pain: number, // Reserved for future intensity calculation
|
|
@@ -80,7 +77,6 @@ consciousness: number, justHit: boolean, justLanded: boolean) => FacialExpressio
|
|
|
80
77
|
* @param transitionTime - Time to transition (seconds)
|
|
81
78
|
* @returns New expression state with transition initialized
|
|
82
79
|
*
|
|
83
|
-
* @public
|
|
84
80
|
* @korean 새표정상태생성
|
|
85
81
|
*/
|
|
86
82
|
export declare const createExpressionTransition: (currentState: ExpressionState, newExpression: FacialExpression, transitionTime?: number) => ExpressionState;
|
|
@@ -91,7 +87,6 @@ export declare const createExpressionTransition: (currentState: ExpressionState,
|
|
|
91
87
|
* @param deltaTime - Time since last update (seconds)
|
|
92
88
|
* @returns Updated expression state with transition progress
|
|
93
89
|
*
|
|
94
|
-
* @public
|
|
95
90
|
* @korean 표정상태업데이트
|
|
96
91
|
*/
|
|
97
92
|
export declare const updateExpressionState: (state: ExpressionState, deltaTime: number) => ExpressionState;
|
|
@@ -116,7 +111,6 @@ export declare const updateExpressionState: (state: ExpressionState, deltaTime:
|
|
|
116
111
|
* // Returns damage state with left eye swelling increased
|
|
117
112
|
* ```
|
|
118
113
|
*
|
|
119
|
-
* @public
|
|
120
114
|
* @korean 얼굴손상계산
|
|
121
115
|
*/
|
|
122
116
|
export declare const calculateFacialDamage: (currentDamage: FacialDamageState, hitLocation: string, damageAmount: number) => FacialDamageState;
|
|
@@ -127,7 +121,6 @@ export declare const calculateFacialDamage: (currentDamage: FacialDamageState, h
|
|
|
127
121
|
* @param resetPercentage - Percentage to reduce damage (0-1)
|
|
128
122
|
* @returns Fresh facial damage state
|
|
129
123
|
*
|
|
130
|
-
* @public
|
|
131
124
|
* @korean 얼굴손상초기화
|
|
132
125
|
*/
|
|
133
126
|
export declare const resetFacialDamage: (currentDamage: FacialDamageState, partialReset?: boolean, resetPercentage?: number) => FacialDamageState;
|
|
@@ -142,7 +135,6 @@ export declare const resetFacialDamage: (currentDamage: FacialDamageState, parti
|
|
|
142
135
|
* @param stamina - Stamina level (0-100)
|
|
143
136
|
* @returns Expression intensity (0-1)
|
|
144
137
|
*
|
|
145
|
-
* @public
|
|
146
138
|
* @korean 표정강도가져오기
|
|
147
139
|
*/
|
|
148
140
|
export declare const getExpressionIntensity: (expression: FacialExpression, pain: number, stamina: number) => number;
|
|
@@ -151,7 +143,6 @@ export declare const getExpressionIntensity: (expression: FacialExpression, pain
|
|
|
151
143
|
*
|
|
152
144
|
* @returns Default neutral expression state
|
|
153
145
|
*
|
|
154
|
-
* @public
|
|
155
146
|
* @korean 기본표정상태생성
|
|
156
147
|
*/
|
|
157
148
|
export declare const createDefaultExpressionState: () => ExpressionState;
|
|
@@ -160,7 +151,6 @@ export declare const createDefaultExpressionState: () => ExpressionState;
|
|
|
160
151
|
*
|
|
161
152
|
* @returns Default facial damage state with no damage
|
|
162
153
|
*
|
|
163
|
-
* @public
|
|
164
154
|
* @korean 기본얼굴손상생성
|
|
165
155
|
*/
|
|
166
156
|
export declare const createDefaultFacialDamage: () => FacialDamageState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacialExpressions.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/FacialExpressions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAGvB,MAAM,gBAAgB,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"FacialExpressions.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/FacialExpressions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAGvB,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,yCAAyC;IACzC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC,oDAAoD;IACpD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAErC,+CAA+C;IAC/C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,0BAIvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,OAAO,MAAM,EAAE,4CAA4C;AAC3D,eAAe,MAAM,EACrB,SAAS,OAAO,EAChB,YAAY,OAAO,KAClB,gBA6BF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GACrC,cAAc,eAAe,EAC7B,eAAe,gBAAgB,EAC/B,iBAAiB,MAAM,KACtB,eAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,eAAe,EACtB,WAAW,MAAM,KAChB,eA0BF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,GAChC,eAAe,iBAAiB,EAChC,aAAa,MAAM,EACnB,cAAc,MAAM,KACnB,iBA2FF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,eAAe,iBAAiB,EAChC,sBAAoB,EACpB,wBAAqB,KACpB,iBAkBF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,GACjC,YAAY,gBAAgB,EAC5B,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,MA2BF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAO,eAE/C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,QAAO,iBAE5C,CAAC"}
|
|
@@ -47,7 +47,6 @@ import { DEFAULT_FACIAL_DAMAGE, FacialExpression } from "../../../types/facial.j
|
|
|
47
47
|
* // Returns: FacialExpression.VICTORIOUS
|
|
48
48
|
* ```
|
|
49
49
|
*
|
|
50
|
-
* @public
|
|
51
50
|
* @korean 전투상태로부터표정가져오기
|
|
52
51
|
*/
|
|
53
52
|
var getExpressionFromCombatState = (health, maxHealth, stamina, _pain, consciousness, justHit, justLanded) => {
|
|
@@ -64,7 +63,6 @@ var getExpressionFromCombatState = (health, maxHealth, stamina, _pain, conscious
|
|
|
64
63
|
*
|
|
65
64
|
* @returns Default facial damage state with no damage
|
|
66
65
|
*
|
|
67
|
-
* @public
|
|
68
66
|
* @korean 기본얼굴손상생성
|
|
69
67
|
*/
|
|
70
68
|
var createDefaultFacialDamage = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacialExpressions.js","names":[],"sources":["../../../../src/systems/animation/systems/FacialExpressions.ts"],"sourcesContent":["/**\n * Facial expression system for realistic combat emotion\n * \n * Manages facial expression state based on combat conditions:\n * - Health, stamina, pain, consciousness levels\n * - Recent combat events (hits taken/landed)\n * - Dynamic expression transitions\n * \n * @module systems/animation/FacialExpressions\n * @category Animation System\n * @korean 얼굴표정시스템\n */\n\nimport {\n FacialExpression,\n type ExpressionState,\n type FacialDamageState,\n DEFAULT_FACIAL_DAMAGE,\n DEFAULT_EXPRESSION_STATE,\n} from \"@/types/facial\";\n\n/**\n * Expression transition configuration\n * \n * @public\n * @korean 표정전환설정\n */\nexport interface ExpressionTransitionConfig {\n /** Default transition time in seconds */\n readonly defaultTransitionTime: number;\n \n /** Quick transition time for immediate reactions */\n readonly quickTransitionTime: number;\n \n /** Slow transition time for gradual changes */\n readonly slowTransitionTime: number;\n}\n\n/**\n * Default expression transition configuration\n * \n * @public\n * @korean 기본표정전환설정\n */\nexport const DEFAULT_TRANSITION_CONFIG: ExpressionTransitionConfig = {\n defaultTransitionTime: 0.2,\n quickTransitionTime: 0.1,\n slowTransitionTime: 0.5,\n};\n\n/**\n * Get facial expression based on current combat state\n * \n * Evaluates fighter's physical and mental state to determine appropriate\n * facial expression. Priority order:\n * 1. Defeated (unconscious)\n * 2. Pained (just hit)\n * 3. Exhausted (low stamina)\n * 4. Victorious (just landed hit)\n * 5. Focused (high resources)\n * 6. Neutral (default)\n * \n * @param health - Current health (0-100)\n * @param maxHealth - Maximum health\n * @param stamina - Current stamina (0-100)\n * @param pain - Pain level (0-100)\n * @param consciousness - Consciousness level (0-100)\n * @param justHit - Whether fighter was just hit\n * @param justLanded - Whether fighter just landed a hit\n * @returns Appropriate facial expression for combat state\n * \n * @example\n * ```typescript\n * const expression = getExpressionFromCombatState(\n * 85, // health\n * 100, // maxHealth\n * 60, // stamina\n * 20, // pain\n * 100, // consciousness\n * false, // justHit\n * true // justLanded\n * );\n * // Returns: FacialExpression.VICTORIOUS\n * ```\n * \n * @public\n * @korean 전투상태로부터표정가져오기\n */\nexport const getExpressionFromCombatState = (\n health: number,\n maxHealth: number,\n stamina: number,\n _pain: number, // Reserved for future intensity calculation\n consciousness: number,\n justHit: boolean,\n justLanded: boolean\n): FacialExpression => {\n // Knocked out\n if (consciousness < 20) {\n return FacialExpression.DEFEATED;\n }\n\n // Just got hit (always show immediate reaction; pain level can control intensity)\n if (justHit) {\n return FacialExpression.PAINED;\n }\n\n // Low stamina (exhausted)\n if (stamina < 30) {\n return FacialExpression.EXHAUSTED;\n }\n\n // Just landed a hit (brief satisfaction)\n if (justLanded) {\n return FacialExpression.VICTORIOUS;\n }\n\n // High focus (ready to fight)\n const healthPercentage = (health / maxHealth) * 100;\n if (stamina > 70 && healthPercentage > 60) {\n return FacialExpression.FOCUSED;\n }\n\n // Default calm state\n return FacialExpression.NEUTRAL;\n};\n\n/**\n * Create new expression state with transition\n * \n * @param currentState - Current expression state\n * @param newExpression - New expression to transition to\n * @param transitionTime - Time to transition (seconds)\n * @returns New expression state with transition initialized\n * \n * @public\n * @korean 새표정상태생성\n */\nexport const createExpressionTransition = (\n currentState: ExpressionState,\n newExpression: FacialExpression,\n transitionTime?: number\n): ExpressionState => {\n // No transition needed if same expression\n if (currentState.expression === newExpression) {\n return currentState;\n }\n\n return {\n expression: newExpression,\n intensity: 1.0,\n transitionTime: transitionTime ?? DEFAULT_TRANSITION_CONFIG.defaultTransitionTime,\n previousExpression: currentState.expression,\n transitionProgress: 0,\n };\n};\n\n/**\n * Update expression state during transition\n * \n * @param state - Current expression state\n * @param deltaTime - Time since last update (seconds)\n * @returns Updated expression state with transition progress\n * \n * @public\n * @korean 표정상태업데이트\n */\nexport const updateExpressionState = (\n state: ExpressionState,\n deltaTime: number\n): ExpressionState => {\n // No transition in progress\n if (state.transitionProgress === undefined || state.transitionProgress >= 1.0) {\n return state;\n }\n\n // Calculate new progress\n const progressIncrement = deltaTime / state.transitionTime;\n const newProgress = Math.min(state.transitionProgress + progressIncrement, 1.0);\n\n // Transition complete\n if (newProgress >= 1.0) {\n return {\n expression: state.expression,\n intensity: state.intensity,\n transitionTime: state.transitionTime,\n previousExpression: undefined,\n transitionProgress: undefined,\n };\n }\n\n // Transition in progress\n return {\n ...state,\n transitionProgress: newProgress,\n };\n};\n\n/**\n * Calculate facial damage from hit\n * \n * Updates facial damage state based on hit location and damage amount.\n * Different facial regions accumulate damage independently.\n * \n * @param currentDamage - Current facial damage state\n * @param hitLocation - Location of hit on face (\"left_eye\", \"right_eye\", \"mouth\", \"nose\", etc.)\n * @param damageAmount - Amount of damage dealt (0-100)\n * @returns Updated facial damage state\n * \n * @example\n * ```typescript\n * const damage = calculateFacialDamage(\n * DEFAULT_FACIAL_DAMAGE,\n * \"left_eye\",\n * 25\n * );\n * // Returns damage state with left eye swelling increased\n * ```\n * \n * @public\n * @korean 얼굴손상계산\n */\nexport const calculateFacialDamage = (\n currentDamage: FacialDamageState,\n hitLocation: string,\n damageAmount: number\n): FacialDamageState => {\n const damageIntensity = Math.min(damageAmount / 100, 1.0);\n const newDamage = { ...currentDamage };\n\n switch (hitLocation.toLowerCase()) {\n case \"left_eye\":\n case \"temple_left\":\n newDamage.leftEyeSwelling = Math.min(\n currentDamage.leftEyeSwelling + damageIntensity * 0.3,\n 1.0\n );\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.2,\n 1.0\n );\n break;\n\n case \"right_eye\":\n case \"temple_right\":\n newDamage.rightEyeSwelling = Math.min(\n currentDamage.rightEyeSwelling + damageIntensity * 0.3,\n 1.0\n );\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.2,\n 1.0\n );\n break;\n\n case \"mouth\":\n case \"jaw\":\n case \"chin\":\n newDamage.mouthBleeding = Math.min(\n currentDamage.mouthBleeding + damageIntensity * 0.4,\n 1.0\n );\n newDamage.jawBruise = Math.min(\n currentDamage.jawBruise + damageIntensity * 0.3,\n 1.0\n );\n break;\n\n case \"nose\":\n newDamage.noseBleeding = Math.min(\n currentDamage.noseBleeding + damageIntensity * 0.5,\n 1.0\n );\n break;\n\n case \"forehead\":\n case \"crown\":\n newDamage.foreheadBruise = Math.min(\n currentDamage.foreheadBruise + damageIntensity * 0.3,\n 1.0\n );\n break;\n\n case \"cheek_left\":\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.4,\n 1.0\n );\n break;\n\n case \"cheek_right\":\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.4,\n 1.0\n );\n break;\n\n default:\n // General facial hit - add minor bruising\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.1,\n 1.0\n );\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.1,\n 1.0\n );\n break;\n }\n\n // Update total facial damage\n newDamage.totalFacialDamage = Math.min(\n currentDamage.totalFacialDamage + damageAmount,\n 100\n );\n\n return newDamage;\n};\n\n/**\n * Reset facial damage (for new round or healing)\n * \n * @param partialReset - If true, only reduces damage by percentage (healing)\n * @param resetPercentage - Percentage to reduce damage (0-1)\n * @returns Fresh facial damage state\n * \n * @public\n * @korean 얼굴손상초기화\n */\nexport const resetFacialDamage = (\n currentDamage: FacialDamageState,\n partialReset = false,\n resetPercentage = 1.0\n): FacialDamageState => {\n if (!partialReset) {\n return DEFAULT_FACIAL_DAMAGE;\n }\n\n // Partial healing - reduce all damage values\n const healingFactor = 1.0 - resetPercentage;\n return {\n leftEyeSwelling: currentDamage.leftEyeSwelling * healingFactor,\n rightEyeSwelling: currentDamage.rightEyeSwelling * healingFactor,\n mouthBleeding: currentDamage.mouthBleeding * healingFactor,\n noseBleeding: currentDamage.noseBleeding * healingFactor,\n leftCheekBruise: currentDamage.leftCheekBruise * healingFactor,\n rightCheekBruise: currentDamage.rightCheekBruise * healingFactor,\n foreheadBruise: currentDamage.foreheadBruise * healingFactor,\n jawBruise: currentDamage.jawBruise * healingFactor,\n totalFacialDamage: currentDamage.totalFacialDamage * healingFactor,\n };\n};\n\n/**\n * Get expression intensity based on combat state\n * \n * Expression intensity affects degree of facial movement.\n * Higher pain/damage = more intense expressions.\n * \n * @param expression - Current facial expression\n * @param pain - Pain level (0-100)\n * @param stamina - Stamina level (0-100)\n * @returns Expression intensity (0-1)\n * \n * @public\n * @korean 표정강도가져오기\n */\nexport const getExpressionIntensity = (\n expression: FacialExpression,\n pain: number,\n stamina: number\n): number => {\n switch (expression) {\n case FacialExpression.PAINED:\n // Higher pain = more intense pained expression\n return Math.min(pain / 100, 1.0);\n\n case FacialExpression.EXHAUSTED:\n // Lower stamina = more intense exhaustion\n return Math.min(1.0 - stamina / 100, 1.0);\n\n case FacialExpression.FOCUSED:\n // High stamina = more intense focus\n return Math.min(stamina / 100, 1.0);\n\n case FacialExpression.VICTORIOUS:\n // Brief, moderate intensity\n return 0.7;\n\n case FacialExpression.DEFEATED:\n // Full intensity (unconscious)\n return 1.0;\n\n case FacialExpression.NEUTRAL:\n default:\n // Default intensity\n return 1.0;\n }\n};\n\n/**\n * Create default expression state\n * \n * @returns Default neutral expression state\n * \n * @public\n * @korean 기본표정상태생성\n */\nexport const createDefaultExpressionState = (): ExpressionState => {\n return { ...DEFAULT_EXPRESSION_STATE };\n};\n\n/**\n * Create default facial damage state\n * \n * @returns Default facial damage state with no damage\n * \n * @public\n * @korean 기본얼굴손상생성\n */\nexport const createDefaultFacialDamage = (): FacialDamageState => {\n return { ...DEFAULT_FACIAL_DAMAGE };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,IAAa,gCACX,QACA,WACA,SACA,OACA,eACA,SACA,eACqB;CAErB,IAAI,gBAAgB,IAClB,OAAO,iBAAiB;CAI1B,IAAI,SACF,OAAO,iBAAiB;CAI1B,IAAI,UAAU,IACZ,OAAO,iBAAiB;CAI1B,IAAI,YACF,OAAO,iBAAiB;CAI1B,MAAM,mBAAoB,SAAS,YAAa;CAChD,IAAI,UAAU,MAAM,mBAAmB,IACrC,OAAO,iBAAiB;CAI1B,OAAO,iBAAiB;;;;;;;;;;AAwS1B,IAAa,kCAAqD;CAChE,OAAO,EAAE,GAAG,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"FacialExpressions.js","names":[],"sources":["../../../../src/systems/animation/systems/FacialExpressions.ts"],"sourcesContent":["/**\n * Facial expression system for realistic combat emotion\n * \n * Manages facial expression state based on combat conditions:\n * - Health, stamina, pain, consciousness levels\n * - Recent combat events (hits taken/landed)\n * - Dynamic expression transitions\n * \n * @module systems/animation/FacialExpressions\n * @category Animation System\n * @korean 얼굴표정시스템\n */\n\nimport {\n FacialExpression,\n type ExpressionState,\n type FacialDamageState,\n DEFAULT_FACIAL_DAMAGE,\n DEFAULT_EXPRESSION_STATE,\n} from \"@/types/facial\";\n\n/**\n * Expression transition configuration\n * \n * @korean 표정전환설정\n */\nexport interface ExpressionTransitionConfig {\n /** Default transition time in seconds */\n readonly defaultTransitionTime: number;\n \n /** Quick transition time for immediate reactions */\n readonly quickTransitionTime: number;\n \n /** Slow transition time for gradual changes */\n readonly slowTransitionTime: number;\n}\n\n/**\n * Default expression transition configuration\n * \n * @korean 기본표정전환설정\n */\nexport const DEFAULT_TRANSITION_CONFIG: ExpressionTransitionConfig = {\n defaultTransitionTime: 0.2,\n quickTransitionTime: 0.1,\n slowTransitionTime: 0.5,\n};\n\n/**\n * Get facial expression based on current combat state\n * \n * Evaluates fighter's physical and mental state to determine appropriate\n * facial expression. Priority order:\n * 1. Defeated (unconscious)\n * 2. Pained (just hit)\n * 3. Exhausted (low stamina)\n * 4. Victorious (just landed hit)\n * 5. Focused (high resources)\n * 6. Neutral (default)\n * \n * @param health - Current health (0-100)\n * @param maxHealth - Maximum health\n * @param stamina - Current stamina (0-100)\n * @param pain - Pain level (0-100)\n * @param consciousness - Consciousness level (0-100)\n * @param justHit - Whether fighter was just hit\n * @param justLanded - Whether fighter just landed a hit\n * @returns Appropriate facial expression for combat state\n * \n * @example\n * ```typescript\n * const expression = getExpressionFromCombatState(\n * 85, // health\n * 100, // maxHealth\n * 60, // stamina\n * 20, // pain\n * 100, // consciousness\n * false, // justHit\n * true // justLanded\n * );\n * // Returns: FacialExpression.VICTORIOUS\n * ```\n * \n * @korean 전투상태로부터표정가져오기\n */\nexport const getExpressionFromCombatState = (\n health: number,\n maxHealth: number,\n stamina: number,\n _pain: number, // Reserved for future intensity calculation\n consciousness: number,\n justHit: boolean,\n justLanded: boolean\n): FacialExpression => {\n // Knocked out\n if (consciousness < 20) {\n return FacialExpression.DEFEATED;\n }\n\n // Just got hit (always show immediate reaction; pain level can control intensity)\n if (justHit) {\n return FacialExpression.PAINED;\n }\n\n // Low stamina (exhausted)\n if (stamina < 30) {\n return FacialExpression.EXHAUSTED;\n }\n\n // Just landed a hit (brief satisfaction)\n if (justLanded) {\n return FacialExpression.VICTORIOUS;\n }\n\n // High focus (ready to fight)\n const healthPercentage = (health / maxHealth) * 100;\n if (stamina > 70 && healthPercentage > 60) {\n return FacialExpression.FOCUSED;\n }\n\n // Default calm state\n return FacialExpression.NEUTRAL;\n};\n\n/**\n * Create new expression state with transition\n * \n * @param currentState - Current expression state\n * @param newExpression - New expression to transition to\n * @param transitionTime - Time to transition (seconds)\n * @returns New expression state with transition initialized\n * \n * @korean 새표정상태생성\n */\nexport const createExpressionTransition = (\n currentState: ExpressionState,\n newExpression: FacialExpression,\n transitionTime?: number\n): ExpressionState => {\n // No transition needed if same expression\n if (currentState.expression === newExpression) {\n return currentState;\n }\n\n return {\n expression: newExpression,\n intensity: 1.0,\n transitionTime: transitionTime ?? DEFAULT_TRANSITION_CONFIG.defaultTransitionTime,\n previousExpression: currentState.expression,\n transitionProgress: 0,\n };\n};\n\n/**\n * Update expression state during transition\n * \n * @param state - Current expression state\n * @param deltaTime - Time since last update (seconds)\n * @returns Updated expression state with transition progress\n * \n * @korean 표정상태업데이트\n */\nexport const updateExpressionState = (\n state: ExpressionState,\n deltaTime: number\n): ExpressionState => {\n // No transition in progress\n if (state.transitionProgress === undefined || state.transitionProgress >= 1.0) {\n return state;\n }\n\n // Calculate new progress\n const progressIncrement = deltaTime / state.transitionTime;\n const newProgress = Math.min(state.transitionProgress + progressIncrement, 1.0);\n\n // Transition complete\n if (newProgress >= 1.0) {\n return {\n expression: state.expression,\n intensity: state.intensity,\n transitionTime: state.transitionTime,\n previousExpression: undefined,\n transitionProgress: undefined,\n };\n }\n\n // Transition in progress\n return {\n ...state,\n transitionProgress: newProgress,\n };\n};\n\n/**\n * Calculate facial damage from hit\n * \n * Updates facial damage state based on hit location and damage amount.\n * Different facial regions accumulate damage independently.\n * \n * @param currentDamage - Current facial damage state\n * @param hitLocation - Location of hit on face (\"left_eye\", \"right_eye\", \"mouth\", \"nose\", etc.)\n * @param damageAmount - Amount of damage dealt (0-100)\n * @returns Updated facial damage state\n * \n * @example\n * ```typescript\n * const damage = calculateFacialDamage(\n * DEFAULT_FACIAL_DAMAGE,\n * \"left_eye\",\n * 25\n * );\n * // Returns damage state with left eye swelling increased\n * ```\n * \n * @korean 얼굴손상계산\n */\nexport const calculateFacialDamage = (\n currentDamage: FacialDamageState,\n hitLocation: string,\n damageAmount: number\n): FacialDamageState => {\n const damageIntensity = Math.min(damageAmount / 100, 1.0);\n const newDamage = { ...currentDamage };\n\n switch (hitLocation.toLowerCase()) {\n case \"left_eye\":\n case \"temple_left\":\n newDamage.leftEyeSwelling = Math.min(\n currentDamage.leftEyeSwelling + damageIntensity * 0.3,\n 1.0\n );\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.2,\n 1.0\n );\n break;\n\n case \"right_eye\":\n case \"temple_right\":\n newDamage.rightEyeSwelling = Math.min(\n currentDamage.rightEyeSwelling + damageIntensity * 0.3,\n 1.0\n );\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.2,\n 1.0\n );\n break;\n\n case \"mouth\":\n case \"jaw\":\n case \"chin\":\n newDamage.mouthBleeding = Math.min(\n currentDamage.mouthBleeding + damageIntensity * 0.4,\n 1.0\n );\n newDamage.jawBruise = Math.min(\n currentDamage.jawBruise + damageIntensity * 0.3,\n 1.0\n );\n break;\n\n case \"nose\":\n newDamage.noseBleeding = Math.min(\n currentDamage.noseBleeding + damageIntensity * 0.5,\n 1.0\n );\n break;\n\n case \"forehead\":\n case \"crown\":\n newDamage.foreheadBruise = Math.min(\n currentDamage.foreheadBruise + damageIntensity * 0.3,\n 1.0\n );\n break;\n\n case \"cheek_left\":\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.4,\n 1.0\n );\n break;\n\n case \"cheek_right\":\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.4,\n 1.0\n );\n break;\n\n default:\n // General facial hit - add minor bruising\n newDamage.leftCheekBruise = Math.min(\n currentDamage.leftCheekBruise + damageIntensity * 0.1,\n 1.0\n );\n newDamage.rightCheekBruise = Math.min(\n currentDamage.rightCheekBruise + damageIntensity * 0.1,\n 1.0\n );\n break;\n }\n\n // Update total facial damage\n newDamage.totalFacialDamage = Math.min(\n currentDamage.totalFacialDamage + damageAmount,\n 100\n );\n\n return newDamage;\n};\n\n/**\n * Reset facial damage (for new round or healing)\n * \n * @param partialReset - If true, only reduces damage by percentage (healing)\n * @param resetPercentage - Percentage to reduce damage (0-1)\n * @returns Fresh facial damage state\n * \n * @korean 얼굴손상초기화\n */\nexport const resetFacialDamage = (\n currentDamage: FacialDamageState,\n partialReset = false,\n resetPercentage = 1.0\n): FacialDamageState => {\n if (!partialReset) {\n return DEFAULT_FACIAL_DAMAGE;\n }\n\n // Partial healing - reduce all damage values\n const healingFactor = 1.0 - resetPercentage;\n return {\n leftEyeSwelling: currentDamage.leftEyeSwelling * healingFactor,\n rightEyeSwelling: currentDamage.rightEyeSwelling * healingFactor,\n mouthBleeding: currentDamage.mouthBleeding * healingFactor,\n noseBleeding: currentDamage.noseBleeding * healingFactor,\n leftCheekBruise: currentDamage.leftCheekBruise * healingFactor,\n rightCheekBruise: currentDamage.rightCheekBruise * healingFactor,\n foreheadBruise: currentDamage.foreheadBruise * healingFactor,\n jawBruise: currentDamage.jawBruise * healingFactor,\n totalFacialDamage: currentDamage.totalFacialDamage * healingFactor,\n };\n};\n\n/**\n * Get expression intensity based on combat state\n * \n * Expression intensity affects degree of facial movement.\n * Higher pain/damage = more intense expressions.\n * \n * @param expression - Current facial expression\n * @param pain - Pain level (0-100)\n * @param stamina - Stamina level (0-100)\n * @returns Expression intensity (0-1)\n * \n * @korean 표정강도가져오기\n */\nexport const getExpressionIntensity = (\n expression: FacialExpression,\n pain: number,\n stamina: number\n): number => {\n switch (expression) {\n case FacialExpression.PAINED:\n // Higher pain = more intense pained expression\n return Math.min(pain / 100, 1.0);\n\n case FacialExpression.EXHAUSTED:\n // Lower stamina = more intense exhaustion\n return Math.min(1.0 - stamina / 100, 1.0);\n\n case FacialExpression.FOCUSED:\n // High stamina = more intense focus\n return Math.min(stamina / 100, 1.0);\n\n case FacialExpression.VICTORIOUS:\n // Brief, moderate intensity\n return 0.7;\n\n case FacialExpression.DEFEATED:\n // Full intensity (unconscious)\n return 1.0;\n\n case FacialExpression.NEUTRAL:\n default:\n // Default intensity\n return 1.0;\n }\n};\n\n/**\n * Create default expression state\n * \n * @returns Default neutral expression state\n * \n * @korean 기본표정상태생성\n */\nexport const createDefaultExpressionState = (): ExpressionState => {\n return { ...DEFAULT_EXPRESSION_STATE };\n};\n\n/**\n * Create default facial damage state\n * \n * @returns Default facial damage state with no damage\n * \n * @korean 기본얼굴손상생성\n */\nexport const createDefaultFacialDamage = (): FacialDamageState => {\n return { ...DEFAULT_FACIAL_DAMAGE };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAa,gCACX,QACA,WACA,SACA,OACA,eACA,SACA,eACqB;CAErB,IAAI,gBAAgB,IAClB,OAAO,iBAAiB;CAI1B,IAAI,SACF,OAAO,iBAAiB;CAI1B,IAAI,UAAU,IACZ,OAAO,iBAAiB;CAI1B,IAAI,YACF,OAAO,iBAAiB;CAI1B,MAAM,mBAAoB,SAAS,YAAa;CAChD,IAAI,UAAU,MAAM,mBAAmB,IACrC,OAAO,iBAAiB;CAI1B,OAAO,iBAAiB;;;;;;;;;AAiS1B,IAAa,kCAAqD;CAChE,OAAO,EAAE,GAAG,uBAAuB"}
|
|
@@ -53,7 +53,6 @@ export declare const FALL_IMPACT_FRAMES: Record<FallType, number>;
|
|
|
53
53
|
* // Returns: 'side_left'
|
|
54
54
|
* ```
|
|
55
55
|
*
|
|
56
|
-
* @public
|
|
57
56
|
* @korean 낙법방향결정
|
|
58
57
|
*/
|
|
59
58
|
export declare function determineFallDirection(attackAngle: number, playerFacing: number, attackHeight?: "high" | "mid" | "low"): FallType;
|
|
@@ -77,7 +76,6 @@ export declare function determineFallDirection(attackAngle: number, playerFacing
|
|
|
77
76
|
* @param defaultFall - Default fall type if stance doesn't suggest direction
|
|
78
77
|
* @returns Likely fall direction for the stance
|
|
79
78
|
*
|
|
80
|
-
* @public
|
|
81
79
|
* @korean 자세낙법방향
|
|
82
80
|
*/
|
|
83
81
|
export declare function determineFallFromStance(stance: TrigramStance, defaultFall?: FallType): FallType;
|
|
@@ -157,7 +155,6 @@ export declare const FALL_SIDE_RIGHT_KEYFRAMES: readonly FallKeyframe[];
|
|
|
157
155
|
* @param fallType - Type of fall animation
|
|
158
156
|
* @returns Array of keyframes for that fall type
|
|
159
157
|
*
|
|
160
|
-
* @public
|
|
161
158
|
* @korean 낙법키프레임가져오기
|
|
162
159
|
*/
|
|
163
160
|
export declare function getFallKeyframes(fallType: FallType): readonly FallKeyframe[];
|
|
@@ -167,7 +164,6 @@ export declare function getFallKeyframes(fallType: FallType): readonly FallKeyfr
|
|
|
167
164
|
* @param fallType - Type of fall animation
|
|
168
165
|
* @returns Frame number when ground impact occurs
|
|
169
166
|
*
|
|
170
|
-
* @public
|
|
171
167
|
* @korean 충격프레임가져오기
|
|
172
168
|
*/
|
|
173
169
|
export declare function getImpactFrame(fallType: FallType): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FallAnimations.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/FallAnimations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAKvD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"FallAnimations.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/FallAnimations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAKvD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,YAAY,GAAE,MAAM,GAAG,KAAK,GAAG,KAAa,GAC3C,QAAQ,CAmDV;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,WAAW,GAAE,QAAqB,GACjC,QAAQ,CAaV;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,+BAA+B;IAC/B,QAAQ,CAAC,aAAa,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE5D,mEAAmE;IACnE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAEpC,mCAAmC;IACnC,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,YAAY,EA8ChD,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,YAAY,EA8CjD,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,YAAY,EA8C7C,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,YAAY,EA8CnD,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,YAAY,EAAE,CAa5E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEzD"}
|
|
@@ -44,7 +44,6 @@ import { TrigramStance } from "../../../types/common.js";
|
|
|
44
44
|
* // Returns: 'side_left'
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
-
* @public
|
|
48
47
|
* @korean 낙법방향결정
|
|
49
48
|
*/
|
|
50
49
|
function determineFallDirection(attackAngle, playerFacing, attackHeight = "mid") {
|
|
@@ -83,7 +82,6 @@ function determineFallDirection(attackAngle, playerFacing, attackHeight = "mid")
|
|
|
83
82
|
* @param defaultFall - Default fall type if stance doesn't suggest direction
|
|
84
83
|
* @returns Likely fall direction for the stance
|
|
85
84
|
*
|
|
86
|
-
* @public
|
|
87
85
|
* @korean 자세낙법방향
|
|
88
86
|
*/
|
|
89
87
|
function determineFallFromStance(stance, defaultFall = "backward") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FallAnimations.js","names":[],"sources":["../../../../src/systems/animation/systems/FallAnimations.ts"],"sourcesContent":["/**\n * Fall Animation System for Black Trigram\n *\n * Implements realistic fall down animations for knockdowns, leg sweeps,\n * and loss of consciousness events. Based on Korean martial arts falling\n * techniques (낙법 - Nakbeop).\n *\n * @module systems/animation/FallAnimations\n * @category Animation\n * @korean 낙법애니메이션\n */\n\nimport { TrigramStance } from \"@/types/common\";\nimport type { FallType } from \"../core/types\";\n\n/**\n * Fall animation impact frame numbers\n *\n * Defines which frame in each fall animation represents ground impact.\n * Used to trigger camera shake, audio, and particle effects.\n *\n * @korean 낙법충격프레임\n */\nexport const FALL_IMPACT_FRAMES: Record<FallType, number> = {\n forward: 18, // Frame 18 of 24 - hands hit ground\n backward: 22, // Frame 22 of 30 - back impacts\n side_left: 20, // Frame 20 of 27 - shoulder/side impacts\n side_right: 20, // Frame 20 of 27 - shoulder/side impacts\n};\n\n/**\n * Determines fall direction from attack vector and player facing\n *\n * Calculates which direction the player should fall based on:\n * - Attack vector (direction of incoming force)\n * - Player facing direction (from stance)\n * - Attack impact point (high/low)\n *\n * Korean terminology:\n * - 전방낙법 (Jeonbang Nakbeop): Forward fall from rear attacks\n * - 후방낙법 (Hubang Nakbeop): Backward fall from frontal attacks\n * - 측방낙법 (Cheukbang Nakbeop): Side fall from lateral attacks\n *\n * @param attackAngle - Angle of attack in radians (0 = from front)\n * @param playerFacing - Player facing angle in radians\n * @param attackHeight - Attack height: 'high', 'mid', or 'low'\n * @returns Fall type to use for animation\n *\n * @example\n * ```typescript\n * // Attack from behind while facing forward\n * const fallType = determineFallDirection(Math.PI, 0, 'mid');\n * // Returns: 'forward' (pushed forward)\n *\n * // Attack from front while facing forward\n * const fallType = determineFallDirection(0, 0, 'mid');\n * // Returns: 'backward' (pushed backward)\n *\n * // Attack from left side\n * const fallType = determineFallDirection(-Math.PI/2, 0, 'mid');\n * // Returns: 'side_left'\n * ```\n *\n * @public\n * @korean 낙법방향결정\n */\nexport function determineFallDirection(\n attackAngle: number,\n playerFacing: number,\n attackHeight: \"high\" | \"mid\" | \"low\" = \"mid\",\n): FallType {\n // Calculate relative attack angle (attack direction relative to player facing)\n let relativeAngle = attackAngle - playerFacing;\n\n // Normalize to -π to π range\n while (relativeAngle > Math.PI) relativeAngle -= 2 * Math.PI;\n while (relativeAngle < -Math.PI) relativeAngle += 2 * Math.PI;\n\n const absAngle = Math.abs(relativeAngle);\n\n // Leg sweeps always cause side falls (more realistic for sweeps)\n if (attackHeight === \"low\") {\n // Determine which side based on angle\n // Use a small threshold to avoid edge case at exactly 0\n // Threshold represents the angle within which we consider the sweep \"frontal\"\n // 0.01 radians ≈ 0.57 degrees - small enough to only catch near-perfect frontal sweeps\n // while still allowing accurate left/right determination for most angles\n const SWEEP_ANGLE_THRESHOLD = 0.01;\n if (Math.abs(relativeAngle) < SWEEP_ANGLE_THRESHOLD) {\n // For perfectly frontal sweeps, default to right side fall\n return \"side_right\";\n }\n if (relativeAngle < 0) {\n return \"side_left\";\n } else {\n return \"side_right\";\n }\n }\n\n // High attacks to head often cause backward falls\n if (attackHeight === \"high\" && absAngle < Math.PI / 3) {\n return \"backward\";\n }\n\n // Determine fall direction based on attack angle\n // Front quadrant (±45°): Backward fall\n if (absAngle < Math.PI / 4) {\n return \"backward\";\n }\n\n // Rear quadrant (±45° from back): Forward fall\n if (absAngle > (3 * Math.PI) / 4) {\n return \"forward\";\n }\n\n // Side quadrants: Side falls\n if (relativeAngle < 0) {\n return \"side_left\";\n } else {\n return \"side_right\";\n }\n}\n\n/**\n * Determines fall direction from current trigram stance\n *\n * Some stances have inherent instability in certain directions.\n * This function returns likely fall directions when balance is lost.\n *\n * Korean stances and fall tendencies:\n * - 건 (Heaven): Forward bias - aggressive stance\n * - 태 (Lake): Backward bias - fluid retreating\n * - 리 (Fire): Forward bias - aggressive advance\n * - 진 (Thunder): Backward bias - explosive preparation\n * - 손 (Wind): Side bias - lateral movement\n * - 감 (Water): Backward bias - defensive flow\n * - 간 (Mountain): Backward bias - solid defense\n * - 곤 (Earth): Forward bias - grounding takedowns\n *\n * @param stance - Current trigram stance\n * @param defaultFall - Default fall type if stance doesn't suggest direction\n * @returns Likely fall direction for the stance\n *\n * @public\n * @korean 자세낙법방향\n */\nexport function determineFallFromStance(\n stance: TrigramStance,\n defaultFall: FallType = \"backward\",\n): FallType {\n const stanceFallBias: Record<TrigramStance, FallType> = {\n [TrigramStance.GEON]: \"forward\", // Heaven - aggressive forward\n [TrigramStance.TAE]: \"backward\", // Lake - fluid retreat\n [TrigramStance.LI]: \"forward\", // Fire - aggressive strike\n [TrigramStance.JIN]: \"backward\", // Thunder - explosive back\n [TrigramStance.SON]: \"side_left\", // Wind - lateral pressure\n [TrigramStance.GAM]: \"backward\", // Water - flowing back\n [TrigramStance.GAN]: \"backward\", // Mountain - defensive back\n [TrigramStance.GON]: \"forward\", // Earth - forward throws\n };\n\n return stanceFallBias[stance] ?? defaultFall;\n}\n\n/**\n * Fall animation keyframe data structure\n *\n * Defines key poses during fall animations for skeletal rendering.\n * Each keyframe specifies body positions at critical moments.\n *\n * @korean 낙법키프레임\n */\nexport interface FallKeyframe {\n /** Frame number (0-indexed) */\n readonly frame: number;\n\n /** Torso rotation (radians) */\n readonly torsoRotation: { x: number; y: number; z: number };\n\n /** Center of mass vertical position (0-1, 1=standing, 0=ground) */\n readonly centerOfMassHeight: number;\n\n /** Description of this keyframe */\n readonly description: {\n readonly korean: string;\n readonly english: string;\n };\n}\n\n/**\n * Forward fall keyframes (전방낙법)\n *\n * 24 frames (400ms) sequence:\n * - Frames 0-8: Forward stumble, losing balance\n * - Frames 9-15: Knee collapse, forward momentum\n * - Frames 16-20: Hands extend to brace fall\n * - Frames 21-23: Impact and settle face-down\n *\n * @korean 전방낙법키프레임\n */\nexport const FALL_FORWARD_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 8,\n torsoRotation: { x: 0.3, y: 0, z: 0 }, // Leaning forward\n centerOfMassHeight: 0.75,\n description: {\n korean: \"전방으로 비틀거림\",\n english: \"Forward stumble\",\n },\n },\n {\n frame: 15,\n torsoRotation: { x: 0.7, y: 0, z: 0 }, // Falling forward\n centerOfMassHeight: 0.4,\n description: {\n korean: \"무릎 붕괴\",\n english: \"Knee collapse\",\n },\n },\n {\n frame: 18,\n torsoRotation: { x: 1.2, y: 0, z: 0 }, // Hands extending\n centerOfMassHeight: 0.15,\n description: {\n korean: \"손으로 지면 충격 완화\",\n english: \"Hands brace impact\",\n },\n },\n {\n frame: 23,\n torsoRotation: { x: 1.57, y: 0, z: 0 }, // Face down (90° forward)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"엎드려 정지\",\n english: \"Face-down prone\",\n },\n },\n] as const;\n\n/**\n * Backward fall keyframes (후방낙법)\n *\n * 30 frames (500ms) sequence:\n * - Frames 0-10: Backward stumble, balance loss\n * - Frames 11-18: Sitting motion begins\n * - Frames 19-25: Back impact preparation\n * - Frames 26-29: Full supine position\n *\n * @korean 후방낙법키프레임\n */\nexport const FALL_BACKWARD_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 10,\n torsoRotation: { x: -0.2, y: 0, z: 0 }, // Leaning back\n centerOfMassHeight: 0.8,\n description: {\n korean: \"후방으로 비틀거림\",\n english: \"Backward stumble\",\n },\n },\n {\n frame: 18,\n torsoRotation: { x: -0.6, y: 0, z: 0 }, // Sitting motion\n centerOfMassHeight: 0.45,\n description: {\n korean: \"앉는 동작\",\n english: \"Sitting motion\",\n },\n },\n {\n frame: 22,\n torsoRotation: { x: -1.2, y: 0, z: 0 }, // Back impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"등 충격\",\n english: \"Back impact\",\n },\n },\n {\n frame: 29,\n torsoRotation: { x: -1.57, y: 0, z: 0 }, // Face up (90° back)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"누워 정지\",\n english: \"Supine position\",\n },\n },\n] as const;\n\n/**\n * Side fall keyframes (측방낙법)\n *\n * 27 frames (450ms) sequence:\n * - Frames 0-9: Side rotation begins\n * - Frames 10-16: Shoulder roll motion\n * - Frames 17-22: Hip impact\n * - Frames 23-26: Side sprawl position\n *\n * @korean 측방낙법키프레임\n */\nexport const FALL_SIDE_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 9,\n torsoRotation: { x: 0, y: 0.3, z: 0.4 }, // Side rotation\n centerOfMassHeight: 0.7,\n description: {\n korean: \"측면 회전 시작\",\n english: \"Side rotation begins\",\n },\n },\n {\n frame: 16,\n torsoRotation: { x: 0.2, y: 0.8, z: 0.9 }, // Shoulder roll\n centerOfMassHeight: 0.4,\n description: {\n korean: \"어깨 구르기\",\n english: \"Shoulder roll\",\n },\n },\n {\n frame: 20,\n torsoRotation: { x: 0.3, y: 1.2, z: 1.3 }, // Hip impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"엉덩이 충격\",\n english: \"Hip impact\",\n },\n },\n {\n frame: 26,\n torsoRotation: { x: 0, y: 1.57, z: 1.57 }, // Side position (90° roll)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"측면 정지\",\n english: \"Side sprawl\",\n },\n },\n] as const;\n\n/**\n * Side fall keyframes - RIGHT side (우측 낙법)\n *\n * Mirrored version of FALL_SIDE_KEYFRAMES with negated Y and Z rotations\n * so the character falls to the opposite side.\n *\n * @korean 우측낙법키프레임\n */\nexport const FALL_SIDE_RIGHT_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 9,\n torsoRotation: { x: 0, y: -0.3, z: -0.4 }, // Opposite side rotation\n centerOfMassHeight: 0.7,\n description: {\n korean: \"우측 회전 시작\",\n english: \"Right side rotation begins\",\n },\n },\n {\n frame: 16,\n torsoRotation: { x: 0.2, y: -0.8, z: -0.9 }, // Opposite shoulder roll\n centerOfMassHeight: 0.4,\n description: {\n korean: \"우측 어깨 구르기\",\n english: \"Right shoulder roll\",\n },\n },\n {\n frame: 20,\n torsoRotation: { x: 0.3, y: -1.2, z: -1.3 }, // Opposite hip impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"우측 엉덩이 충격\",\n english: \"Right hip impact\",\n },\n },\n {\n frame: 26,\n torsoRotation: { x: 0, y: -1.57, z: -1.57 }, // Right side position (-90° roll)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"우측 정지\",\n english: \"Right side sprawl\",\n },\n },\n] as const;\n\n/**\n * Get keyframes for a specific fall type\n *\n * @param fallType - Type of fall animation\n * @returns Array of keyframes for that fall type\n *\n * @public\n * @korean 낙법키프레임가져오기\n */\nexport function getFallKeyframes(fallType: FallType): readonly FallKeyframe[] {\n switch (fallType) {\n case \"forward\":\n return FALL_FORWARD_KEYFRAMES;\n case \"backward\":\n return FALL_BACKWARD_KEYFRAMES;\n case \"side_left\":\n return FALL_SIDE_KEYFRAMES;\n case \"side_right\":\n return FALL_SIDE_RIGHT_KEYFRAMES;\n default:\n return FALL_BACKWARD_KEYFRAMES;\n }\n}\n\n/**\n * Get impact frame number for fall type\n *\n * @param fallType - Type of fall animation\n * @returns Frame number when ground impact occurs\n *\n * @public\n * @korean 충격프레임가져오기\n */\nexport function getImpactFrame(fallType: FallType): number {\n return FALL_IMPACT_FRAMES[fallType];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,SAAgB,uBACd,aACA,cACA,eAAuC,OAC7B;CAEV,IAAI,gBAAgB,cAAc;CAGlC,OAAO,gBAAgB,KAAK,IAAI,iBAAiB,IAAI,KAAK;CAC1D,OAAO,gBAAgB,CAAC,KAAK,IAAI,iBAAiB,IAAI,KAAK;CAE3D,MAAM,WAAW,KAAK,IAAI,cAAc;CAGxC,IAAI,iBAAiB,OAAO;EAO1B,IAAI,KAAK,IAAI,cAAc,GAAG,KAE5B,OAAO;EAET,IAAI,gBAAgB,GAClB,OAAO;OAEP,OAAO;;CAKX,IAAI,iBAAiB,UAAU,WAAW,KAAK,KAAK,GAClD,OAAO;CAKT,IAAI,WAAW,KAAK,KAAK,GACvB,OAAO;CAIT,IAAI,WAAY,IAAI,KAAK,KAAM,GAC7B,OAAO;CAIT,IAAI,gBAAgB,GAClB,OAAO;MAEP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;AA2BX,SAAgB,wBACd,QACA,cAAwB,YACd;CAYV,OAAO;GAVJ,cAAc,OAAO;GACrB,cAAc,MAAM;GACpB,cAAc,KAAK;GACnB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;EAGhB,CAAe,WAAW"}
|
|
1
|
+
{"version":3,"file":"FallAnimations.js","names":[],"sources":["../../../../src/systems/animation/systems/FallAnimations.ts"],"sourcesContent":["/**\n * Fall Animation System for Black Trigram\n *\n * Implements realistic fall down animations for knockdowns, leg sweeps,\n * and loss of consciousness events. Based on Korean martial arts falling\n * techniques (낙법 - Nakbeop).\n *\n * @module systems/animation/FallAnimations\n * @category Animation\n * @korean 낙법애니메이션\n */\n\nimport { TrigramStance } from \"@/types/common\";\nimport type { FallType } from \"../core/types\";\n\n/**\n * Fall animation impact frame numbers\n *\n * Defines which frame in each fall animation represents ground impact.\n * Used to trigger camera shake, audio, and particle effects.\n *\n * @korean 낙법충격프레임\n */\nexport const FALL_IMPACT_FRAMES: Record<FallType, number> = {\n forward: 18, // Frame 18 of 24 - hands hit ground\n backward: 22, // Frame 22 of 30 - back impacts\n side_left: 20, // Frame 20 of 27 - shoulder/side impacts\n side_right: 20, // Frame 20 of 27 - shoulder/side impacts\n};\n\n/**\n * Determines fall direction from attack vector and player facing\n *\n * Calculates which direction the player should fall based on:\n * - Attack vector (direction of incoming force)\n * - Player facing direction (from stance)\n * - Attack impact point (high/low)\n *\n * Korean terminology:\n * - 전방낙법 (Jeonbang Nakbeop): Forward fall from rear attacks\n * - 후방낙법 (Hubang Nakbeop): Backward fall from frontal attacks\n * - 측방낙법 (Cheukbang Nakbeop): Side fall from lateral attacks\n *\n * @param attackAngle - Angle of attack in radians (0 = from front)\n * @param playerFacing - Player facing angle in radians\n * @param attackHeight - Attack height: 'high', 'mid', or 'low'\n * @returns Fall type to use for animation\n *\n * @example\n * ```typescript\n * // Attack from behind while facing forward\n * const fallType = determineFallDirection(Math.PI, 0, 'mid');\n * // Returns: 'forward' (pushed forward)\n *\n * // Attack from front while facing forward\n * const fallType = determineFallDirection(0, 0, 'mid');\n * // Returns: 'backward' (pushed backward)\n *\n * // Attack from left side\n * const fallType = determineFallDirection(-Math.PI/2, 0, 'mid');\n * // Returns: 'side_left'\n * ```\n *\n * @korean 낙법방향결정\n */\nexport function determineFallDirection(\n attackAngle: number,\n playerFacing: number,\n attackHeight: \"high\" | \"mid\" | \"low\" = \"mid\",\n): FallType {\n // Calculate relative attack angle (attack direction relative to player facing)\n let relativeAngle = attackAngle - playerFacing;\n\n // Normalize to -π to π range\n while (relativeAngle > Math.PI) relativeAngle -= 2 * Math.PI;\n while (relativeAngle < -Math.PI) relativeAngle += 2 * Math.PI;\n\n const absAngle = Math.abs(relativeAngle);\n\n // Leg sweeps always cause side falls (more realistic for sweeps)\n if (attackHeight === \"low\") {\n // Determine which side based on angle\n // Use a small threshold to avoid edge case at exactly 0\n // Threshold represents the angle within which we consider the sweep \"frontal\"\n // 0.01 radians ≈ 0.57 degrees - small enough to only catch near-perfect frontal sweeps\n // while still allowing accurate left/right determination for most angles\n const SWEEP_ANGLE_THRESHOLD = 0.01;\n if (Math.abs(relativeAngle) < SWEEP_ANGLE_THRESHOLD) {\n // For perfectly frontal sweeps, default to right side fall\n return \"side_right\";\n }\n if (relativeAngle < 0) {\n return \"side_left\";\n } else {\n return \"side_right\";\n }\n }\n\n // High attacks to head often cause backward falls\n if (attackHeight === \"high\" && absAngle < Math.PI / 3) {\n return \"backward\";\n }\n\n // Determine fall direction based on attack angle\n // Front quadrant (±45°): Backward fall\n if (absAngle < Math.PI / 4) {\n return \"backward\";\n }\n\n // Rear quadrant (±45° from back): Forward fall\n if (absAngle > (3 * Math.PI) / 4) {\n return \"forward\";\n }\n\n // Side quadrants: Side falls\n if (relativeAngle < 0) {\n return \"side_left\";\n } else {\n return \"side_right\";\n }\n}\n\n/**\n * Determines fall direction from current trigram stance\n *\n * Some stances have inherent instability in certain directions.\n * This function returns likely fall directions when balance is lost.\n *\n * Korean stances and fall tendencies:\n * - 건 (Heaven): Forward bias - aggressive stance\n * - 태 (Lake): Backward bias - fluid retreating\n * - 리 (Fire): Forward bias - aggressive advance\n * - 진 (Thunder): Backward bias - explosive preparation\n * - 손 (Wind): Side bias - lateral movement\n * - 감 (Water): Backward bias - defensive flow\n * - 간 (Mountain): Backward bias - solid defense\n * - 곤 (Earth): Forward bias - grounding takedowns\n *\n * @param stance - Current trigram stance\n * @param defaultFall - Default fall type if stance doesn't suggest direction\n * @returns Likely fall direction for the stance\n *\n * @korean 자세낙법방향\n */\nexport function determineFallFromStance(\n stance: TrigramStance,\n defaultFall: FallType = \"backward\",\n): FallType {\n const stanceFallBias: Record<TrigramStance, FallType> = {\n [TrigramStance.GEON]: \"forward\", // Heaven - aggressive forward\n [TrigramStance.TAE]: \"backward\", // Lake - fluid retreat\n [TrigramStance.LI]: \"forward\", // Fire - aggressive strike\n [TrigramStance.JIN]: \"backward\", // Thunder - explosive back\n [TrigramStance.SON]: \"side_left\", // Wind - lateral pressure\n [TrigramStance.GAM]: \"backward\", // Water - flowing back\n [TrigramStance.GAN]: \"backward\", // Mountain - defensive back\n [TrigramStance.GON]: \"forward\", // Earth - forward throws\n };\n\n return stanceFallBias[stance] ?? defaultFall;\n}\n\n/**\n * Fall animation keyframe data structure\n *\n * Defines key poses during fall animations for skeletal rendering.\n * Each keyframe specifies body positions at critical moments.\n *\n * @korean 낙법키프레임\n */\nexport interface FallKeyframe {\n /** Frame number (0-indexed) */\n readonly frame: number;\n\n /** Torso rotation (radians) */\n readonly torsoRotation: { x: number; y: number; z: number };\n\n /** Center of mass vertical position (0-1, 1=standing, 0=ground) */\n readonly centerOfMassHeight: number;\n\n /** Description of this keyframe */\n readonly description: {\n readonly korean: string;\n readonly english: string;\n };\n}\n\n/**\n * Forward fall keyframes (전방낙법)\n *\n * 24 frames (400ms) sequence:\n * - Frames 0-8: Forward stumble, losing balance\n * - Frames 9-15: Knee collapse, forward momentum\n * - Frames 16-20: Hands extend to brace fall\n * - Frames 21-23: Impact and settle face-down\n *\n * @korean 전방낙법키프레임\n */\nexport const FALL_FORWARD_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 8,\n torsoRotation: { x: 0.3, y: 0, z: 0 }, // Leaning forward\n centerOfMassHeight: 0.75,\n description: {\n korean: \"전방으로 비틀거림\",\n english: \"Forward stumble\",\n },\n },\n {\n frame: 15,\n torsoRotation: { x: 0.7, y: 0, z: 0 }, // Falling forward\n centerOfMassHeight: 0.4,\n description: {\n korean: \"무릎 붕괴\",\n english: \"Knee collapse\",\n },\n },\n {\n frame: 18,\n torsoRotation: { x: 1.2, y: 0, z: 0 }, // Hands extending\n centerOfMassHeight: 0.15,\n description: {\n korean: \"손으로 지면 충격 완화\",\n english: \"Hands brace impact\",\n },\n },\n {\n frame: 23,\n torsoRotation: { x: 1.57, y: 0, z: 0 }, // Face down (90° forward)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"엎드려 정지\",\n english: \"Face-down prone\",\n },\n },\n] as const;\n\n/**\n * Backward fall keyframes (후방낙법)\n *\n * 30 frames (500ms) sequence:\n * - Frames 0-10: Backward stumble, balance loss\n * - Frames 11-18: Sitting motion begins\n * - Frames 19-25: Back impact preparation\n * - Frames 26-29: Full supine position\n *\n * @korean 후방낙법키프레임\n */\nexport const FALL_BACKWARD_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 10,\n torsoRotation: { x: -0.2, y: 0, z: 0 }, // Leaning back\n centerOfMassHeight: 0.8,\n description: {\n korean: \"후방으로 비틀거림\",\n english: \"Backward stumble\",\n },\n },\n {\n frame: 18,\n torsoRotation: { x: -0.6, y: 0, z: 0 }, // Sitting motion\n centerOfMassHeight: 0.45,\n description: {\n korean: \"앉는 동작\",\n english: \"Sitting motion\",\n },\n },\n {\n frame: 22,\n torsoRotation: { x: -1.2, y: 0, z: 0 }, // Back impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"등 충격\",\n english: \"Back impact\",\n },\n },\n {\n frame: 29,\n torsoRotation: { x: -1.57, y: 0, z: 0 }, // Face up (90° back)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"누워 정지\",\n english: \"Supine position\",\n },\n },\n] as const;\n\n/**\n * Side fall keyframes (측방낙법)\n *\n * 27 frames (450ms) sequence:\n * - Frames 0-9: Side rotation begins\n * - Frames 10-16: Shoulder roll motion\n * - Frames 17-22: Hip impact\n * - Frames 23-26: Side sprawl position\n *\n * @korean 측방낙법키프레임\n */\nexport const FALL_SIDE_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 9,\n torsoRotation: { x: 0, y: 0.3, z: 0.4 }, // Side rotation\n centerOfMassHeight: 0.7,\n description: {\n korean: \"측면 회전 시작\",\n english: \"Side rotation begins\",\n },\n },\n {\n frame: 16,\n torsoRotation: { x: 0.2, y: 0.8, z: 0.9 }, // Shoulder roll\n centerOfMassHeight: 0.4,\n description: {\n korean: \"어깨 구르기\",\n english: \"Shoulder roll\",\n },\n },\n {\n frame: 20,\n torsoRotation: { x: 0.3, y: 1.2, z: 1.3 }, // Hip impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"엉덩이 충격\",\n english: \"Hip impact\",\n },\n },\n {\n frame: 26,\n torsoRotation: { x: 0, y: 1.57, z: 1.57 }, // Side position (90° roll)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"측면 정지\",\n english: \"Side sprawl\",\n },\n },\n] as const;\n\n/**\n * Side fall keyframes - RIGHT side (우측 낙법)\n *\n * Mirrored version of FALL_SIDE_KEYFRAMES with negated Y and Z rotations\n * so the character falls to the opposite side.\n *\n * @korean 우측낙법키프레임\n */\nexport const FALL_SIDE_RIGHT_KEYFRAMES: readonly FallKeyframe[] = [\n {\n frame: 0,\n torsoRotation: { x: 0, y: 0, z: 0 },\n centerOfMassHeight: 0.9,\n description: {\n korean: \"초기 자세\",\n english: \"Initial stance\",\n },\n },\n {\n frame: 9,\n torsoRotation: { x: 0, y: -0.3, z: -0.4 }, // Opposite side rotation\n centerOfMassHeight: 0.7,\n description: {\n korean: \"우측 회전 시작\",\n english: \"Right side rotation begins\",\n },\n },\n {\n frame: 16,\n torsoRotation: { x: 0.2, y: -0.8, z: -0.9 }, // Opposite shoulder roll\n centerOfMassHeight: 0.4,\n description: {\n korean: \"우측 어깨 구르기\",\n english: \"Right shoulder roll\",\n },\n },\n {\n frame: 20,\n torsoRotation: { x: 0.3, y: -1.2, z: -1.3 }, // Opposite hip impact\n centerOfMassHeight: 0.2,\n description: {\n korean: \"우측 엉덩이 충격\",\n english: \"Right hip impact\",\n },\n },\n {\n frame: 26,\n torsoRotation: { x: 0, y: -1.57, z: -1.57 }, // Right side position (-90° roll)\n centerOfMassHeight: 0.05,\n description: {\n korean: \"우측 정지\",\n english: \"Right side sprawl\",\n },\n },\n] as const;\n\n/**\n * Get keyframes for a specific fall type\n *\n * @param fallType - Type of fall animation\n * @returns Array of keyframes for that fall type\n *\n * @korean 낙법키프레임가져오기\n */\nexport function getFallKeyframes(fallType: FallType): readonly FallKeyframe[] {\n switch (fallType) {\n case \"forward\":\n return FALL_FORWARD_KEYFRAMES;\n case \"backward\":\n return FALL_BACKWARD_KEYFRAMES;\n case \"side_left\":\n return FALL_SIDE_KEYFRAMES;\n case \"side_right\":\n return FALL_SIDE_RIGHT_KEYFRAMES;\n default:\n return FALL_BACKWARD_KEYFRAMES;\n }\n}\n\n/**\n * Get impact frame number for fall type\n *\n * @param fallType - Type of fall animation\n * @returns Frame number when ground impact occurs\n *\n * @korean 충격프레임가져오기\n */\nexport function getImpactFrame(fallType: FallType): number {\n return FALL_IMPACT_FRAMES[fallType];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,SAAgB,uBACd,aACA,cACA,eAAuC,OAC7B;CAEV,IAAI,gBAAgB,cAAc;CAGlC,OAAO,gBAAgB,KAAK,IAAI,iBAAiB,IAAI,KAAK;CAC1D,OAAO,gBAAgB,CAAC,KAAK,IAAI,iBAAiB,IAAI,KAAK;CAE3D,MAAM,WAAW,KAAK,IAAI,cAAc;CAGxC,IAAI,iBAAiB,OAAO;EAO1B,IAAI,KAAK,IAAI,cAAc,GAAG,KAE5B,OAAO;EAET,IAAI,gBAAgB,GAClB,OAAO;OAEP,OAAO;;CAKX,IAAI,iBAAiB,UAAU,WAAW,KAAK,KAAK,GAClD,OAAO;CAKT,IAAI,WAAW,KAAK,KAAK,GACvB,OAAO;CAIT,IAAI,WAAY,IAAI,KAAK,KAAM,GAC7B,OAAO;CAIT,IAAI,gBAAgB,GAClB,OAAO;MAEP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;AA0BX,SAAgB,wBACd,QACA,cAAwB,YACd;CAYV,OAAO;GAVJ,cAAc,OAAO;GACrB,cAAc,MAAM;GACpB,cAAc,KAAK;GACnB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;GACpB,cAAc,MAAM;EAGhB,CAAe,WAAW"}
|
|
@@ -30,7 +30,6 @@ import { HeadMovementType, type HeadMovementKeyframes } from "../../../types/fac
|
|
|
30
30
|
* // Creates strong recoil animation to the right
|
|
31
31
|
* ```
|
|
32
32
|
*
|
|
33
|
-
* @public
|
|
34
33
|
* @korean 머리반동애니메이션생성
|
|
35
34
|
*/
|
|
36
35
|
export declare const createHeadRecoilAnimation: (hitStrength: number, hitDirection?: THREE.Vector3) => HeadMovementKeyframes;
|
|
@@ -43,7 +42,6 @@ export declare const createHeadRecoilAnimation: (hitStrength: number, hitDirecti
|
|
|
43
42
|
* @param intensity - Nod intensity (0-1)
|
|
44
43
|
* @returns Head movement keyframes for nod animation
|
|
45
44
|
*
|
|
46
|
-
* @public
|
|
47
45
|
* @korean 머리끄덕임애니메이션생성
|
|
48
46
|
*/
|
|
49
47
|
export declare const createHeadNodAnimation: (intensity?: number) => HeadMovementKeyframes;
|
|
@@ -55,7 +53,6 @@ export declare const createHeadNodAnimation: (intensity?: number) => HeadMovemen
|
|
|
55
53
|
* @param intensity - Shake intensity (0-1)
|
|
56
54
|
* @returns Head movement keyframes for shake animation
|
|
57
55
|
*
|
|
58
|
-
* @public
|
|
59
56
|
* @korean 머리흔들기애니메이션생성
|
|
60
57
|
*/
|
|
61
58
|
export declare const createHeadShakeAnimation: (intensity?: number) => HeadMovementKeyframes;
|
|
@@ -68,7 +65,6 @@ export declare const createHeadShakeAnimation: (intensity?: number) => HeadMovem
|
|
|
68
65
|
* @param intensity - Tilt intensity (0-1)
|
|
69
66
|
* @returns Head movement keyframes for tilt animation
|
|
70
67
|
*
|
|
71
|
-
* @public
|
|
72
68
|
* @korean 머리기울임애니메이션생성
|
|
73
69
|
*/
|
|
74
70
|
export declare const createHeadTiltAnimation: (direction: "left" | "right", intensity?: number) => HeadMovementKeyframes;
|
|
@@ -81,7 +77,6 @@ export declare const createHeadTiltAnimation: (direction: "left" | "right", inte
|
|
|
81
77
|
* @param currentAngle - Current yaw angle in radians
|
|
82
78
|
* @returns Head movement keyframes for turn animation
|
|
83
79
|
*
|
|
84
|
-
* @public
|
|
85
80
|
* @korean 머리돌리기애니메이션생성
|
|
86
81
|
*/
|
|
87
82
|
export declare const createHeadTurnAnimation: (targetAngle: number, currentAngle?: number) => HeadMovementKeyframes;
|
|
@@ -92,7 +87,6 @@ export declare const createHeadTurnAnimation: (targetAngle: number, currentAngle
|
|
|
92
87
|
*
|
|
93
88
|
* @returns Head movement keyframes for drop animation
|
|
94
89
|
*
|
|
95
|
-
* @public
|
|
96
90
|
* @korean 머리떨어짐애니메이션생성
|
|
97
91
|
*/
|
|
98
92
|
export declare const createHeadDropAnimation: () => HeadMovementKeyframes;
|
|
@@ -108,7 +102,6 @@ export declare const createHeadDropAnimation: () => HeadMovementKeyframes;
|
|
|
108
102
|
* @param smoothing - Smoothing factor (0-1, lower = smoother)
|
|
109
103
|
* @returns New head rotation
|
|
110
104
|
*
|
|
111
|
-
* @public
|
|
112
105
|
* @korean 부드러운머리회전계산
|
|
113
106
|
*/
|
|
114
107
|
export declare const calculateSmoothHeadRotation: (currentRotation: THREE.Euler, targetPosition: THREE.Vector3, headPosition: THREE.Vector3, smoothing?: number) => THREE.Euler;
|
|
@@ -121,7 +114,6 @@ export declare const calculateSmoothHeadRotation: (currentRotation: THREE.Euler,
|
|
|
121
114
|
* @param currentTime - Current animation time (seconds)
|
|
122
115
|
* @returns Interpolated head rotation
|
|
123
116
|
*
|
|
124
|
-
* @public
|
|
125
117
|
* @korean 머리움직임키프레임적용
|
|
126
118
|
*/
|
|
127
119
|
export declare const applyHeadMovementKeyframe: (animation: HeadMovementKeyframes, currentTime: number) => THREE.Euler;
|
|
@@ -132,7 +124,6 @@ export declare const applyHeadMovementKeyframe: (animation: HeadMovementKeyframe
|
|
|
132
124
|
* @param currentTime - Current animation time (seconds)
|
|
133
125
|
* @returns True if animation is complete
|
|
134
126
|
*
|
|
135
|
-
* @public
|
|
136
127
|
* @korean 머리움직임완료확인
|
|
137
128
|
*/
|
|
138
129
|
export declare const isHeadMovementComplete: (animation: HeadMovementKeyframes, currentTime: number) => boolean;
|
|
@@ -145,7 +136,6 @@ export declare const isHeadMovementComplete: (animation: HeadMovementKeyframes,
|
|
|
145
136
|
* @param intensity - Animation intensity (0-1)
|
|
146
137
|
* @returns Head movement keyframes
|
|
147
138
|
*
|
|
148
|
-
* @public
|
|
149
139
|
* @korean 타입별머리움직임가져오기
|
|
150
140
|
*/
|
|
151
141
|
export declare const getHeadMovementByType: (type: HeadMovementType, intensity?: number) => HeadMovementKeyframes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadMovements.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/HeadMovements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"HeadMovements.d.ts","sourceRoot":"","sources":["../../../../src/systems/animation/systems/HeadMovements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,yBAAyB,GACpC,aAAa,MAAM,EACnB,eAAe,KAAK,CAAC,OAAO,KAC3B,qBA2BF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GACjC,kBAAe,KACd,qBAiBF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACnC,kBAAe,KACd,qBAqBF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,GAClC,WAAW,MAAM,GAAG,OAAO,EAC3B,kBAAe,KACd,qBAiBF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,EACnB,qBAAgB,KACf,qBAyBF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,QAAO,qBAiB1C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,GACtC,iBAAiB,KAAK,CAAC,KAAK,EAC5B,gBAAgB,KAAK,CAAC,OAAO,EAC7B,cAAc,KAAK,CAAC,OAAO,EAC3B,kBAAe,KACd,KAAK,CAAC,KAyBR,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GACpC,WAAW,qBAAqB,EAChC,aAAa,MAAM,KAClB,KAAK,CAAC,KAsCR,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GACjC,WAAW,qBAAqB,EAChC,aAAa,MAAM,KAClB,OAEF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,gBAAgB,EACtB,kBAAe,KACd,qBAiBF,CAAC"}
|
|
@@ -33,7 +33,6 @@ export interface BodyPartDamageTarget {
|
|
|
33
33
|
* @param vitalPoint - Vital point that was struck
|
|
34
34
|
* @returns Corresponding body region
|
|
35
35
|
*
|
|
36
|
-
* @public
|
|
37
36
|
*/
|
|
38
37
|
export declare function getBodyRegionFromVitalPoint(vitalPoint: VitalPoint): BodyRegion;
|
|
39
38
|
/**
|
|
@@ -53,7 +52,6 @@ export declare function getBodyRegionFromVitalPoint(vitalPoint: VitalPoint): Bod
|
|
|
53
52
|
* @param bodyRegion - Body region that was hit
|
|
54
53
|
* @returns Updated player state with body part damage applied
|
|
55
54
|
*
|
|
56
|
-
* @public
|
|
57
55
|
*/
|
|
58
56
|
export declare function applyDamageToBodyParts<T extends BodyPartDamageTarget>(player: T, totalDamage: number, bodyRegion: BodyRegion): T;
|
|
59
57
|
/**
|
|
@@ -69,7 +67,6 @@ export declare function applyDamageToBodyParts<T extends BodyPartDamageTarget>(p
|
|
|
69
67
|
* @param vitalPoint - Vital point that was struck
|
|
70
68
|
* @returns Updated player state with vital point damage applied
|
|
71
69
|
*
|
|
72
|
-
* @public
|
|
73
70
|
*/
|
|
74
71
|
export declare function applyVitalPointDamageToBodyParts<T extends BodyPartDamageTarget>(player: T, totalDamage: number, vitalPoint: VitalPoint): T;
|
|
75
72
|
/**
|
|
@@ -96,7 +93,6 @@ export declare function applyVitalPointDamageToBodyParts<T extends BodyPartDamag
|
|
|
96
93
|
* const actualSpeed = baseSpeed * effects.movementSpeedModifier;
|
|
97
94
|
* ```
|
|
98
95
|
*
|
|
99
|
-
* @public
|
|
100
96
|
*/
|
|
101
97
|
export declare function getBodyPartCombatEffects(player: BodyPartDamageTarget): import("./types").BodyPartEffects;
|
|
102
98
|
/**
|
|
@@ -113,7 +109,6 @@ export declare function getBodyPartCombatEffects(player: BodyPartDamageTarget):
|
|
|
113
109
|
* @param player - Player state to check
|
|
114
110
|
* @returns Whether player is incapacitated
|
|
115
111
|
*
|
|
116
|
-
* @public
|
|
117
112
|
*/
|
|
118
113
|
export declare function isPlayerIncapacitatedByBodyDamage(player: BodyPartDamageTarget): boolean;
|
|
119
114
|
/**
|
|
@@ -128,7 +123,6 @@ export declare function isPlayerIncapacitatedByBodyDamage(player: BodyPartDamage
|
|
|
128
123
|
* @param maxHealthPerPart - Optional custom max health per part
|
|
129
124
|
* @returns Player state with body part health initialized
|
|
130
125
|
*
|
|
131
|
-
* @public
|
|
132
126
|
*/
|
|
133
127
|
export declare function initializeBodyPartHealthForPlayer<T extends BodyPartDamageTarget>(player: T, maxHealthPerPart?: number): T;
|
|
134
128
|
/**
|
|
@@ -143,7 +137,6 @@ export declare function initializeBodyPartHealthForPlayer<T extends BodyPartDama
|
|
|
143
137
|
* @param totalHealAmount - Total healing to distribute
|
|
144
138
|
* @returns Updated player state with healing applied
|
|
145
139
|
*
|
|
146
|
-
* @public
|
|
147
140
|
*/
|
|
148
141
|
export declare function healBodyPartsProportionally<T extends BodyPartDamageTarget>(player: T, totalHealAmount: number): T;
|
|
149
142
|
//# sourceMappingURL=BodyPartDamageIntegration.d.ts.map
|