added pattern transition speed to the settings file

This commit is contained in:
PS 2021-04-08 15:11:39 -10:00
parent 232180299f
commit b952b3abad
2 changed files with 8 additions and 2 deletions

View File

@ -380,7 +380,7 @@ BlumenLumen_CustomInit(app_state* State, context Context)
BLState->ModeAnimations[BlumenPattern_VoiceCommand] = LoadAllAnimationsInDir(VoicePatternFolder, BLState, State, Context); BLState->ModeAnimations[BlumenPattern_VoiceCommand] = LoadAllAnimationsInDir(VoicePatternFolder, BLState, State, Context);
AnimationSystem_LoadAnimationFromFile(&State->AnimationSystem, State->Patterns, Context, ConstString("data/blumen_animations/anim_demo.foldanim")); AnimationSystem_LoadAnimationFromFile(&State->AnimationSystem, State->Patterns, Context, ConstString("data/blumen_animations/anim_demo.foldanim"));
BlumenLumen_SetPatternMode(BlumenPattern_Standard, 5, &State->AnimationSystem, BLState); BlumenLumen_SetPatternMode(BlumenPattern_Standard, GlobalAnimTransitionSpeed, &State->AnimationSystem, BLState);
#endif #endif
State->AnimationSystem.TimelineShouldAdvance = true; State->AnimationSystem.TimelineShouldAdvance = true;
@ -497,7 +497,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
BLState->LastAssemblyColorSet = (BLState->LastAssemblyColorSet + 1) % 3; BLState->LastAssemblyColorSet = (BLState->LastAssemblyColorSet + 1) % 3;
} }
BlumenLumen_SetPatternMode(BlumenPattern_VoiceCommand, 5, &State->AnimationSystem, BLState); BlumenLumen_SetPatternMode(BlumenPattern_VoiceCommand, GlobalAnimTransitionSpeed, &State->AnimationSystem, BLState);
BLState->TimeLastSetToVoiceMode = Context->SystemTime_Current; BLState->TimeLastSetToVoiceMode = Context->SystemTime_Current;
BLState->LastHuePhrase = NewHue; BLState->LastHuePhrase = NewHue;
BLState->ShouldUpdateLog = true; BLState->ShouldUpdateLog = true;

View File

@ -99,6 +99,12 @@ r32 FullBrightnessPercent = 1.0f;
// 2 is 2x as fast. // 2 is 2x as fast.
r32 GlobalAnimSpeed = 1.0f; r32 GlobalAnimSpeed = 1.0f;
// How long it takes to fade from one animation to the next.
// This is used both for transitioning between animation files
// as well as transitioning from Standard pattern mode to voice
// activated mode
r32 GlobalAnimTransitionSpeed = 5.0f;
r64 PhrasePriorityMessageGroupingTime = 1.0f; r64 PhrasePriorityMessageGroupingTime = 1.0f;
// How often should Lumenarium send its status to the python server? // How often should Lumenarium send its status to the python server?