3#include "../Templates/ProtogenProjectTemplate.h"
4#include "../../Assets/Models/FBX/BetaFront3.h"
5#include "../../Assets/Models/FBX/BetaRear.h"
6#include "../../Assets/Models/FBX/Standby.h"
7#include "../../Assets/Models/OBJ/LEDStripBackground.h"
8#include "../../Assets/Models/FBX/NukudeFlat.h"
9#include "../../Assets/Models/OBJ/RectangularPrism.h"
10#include "../../Assets/Models/OBJ/Spyro.h"
12#include "../../Animation/KeyFrameTrack.h"
14#include "../../Camera/CameraManager/Implementations/WS35Beta.h"
15#include "../../Controller/WS35BetaController.h"
32 const __FlashStringHelper*
faceArray[15] = {F(
"DEFAULT"), F(
"SAD"), F(
"HEART"), F(
"DEAD"), F(
"ANGRY"), F(
"CRASH"), F(
"FRUSTRA"), F(
"DIZZY"), F(
"SHOCKED"), F(
"STANDBY"), F(
"GENTLE"), F(
"AUDIO1"), F(
"AUDIO2"), F(
"AUDIO3")};
44 AddParameter(BetaFront::BlushEye,
pM.GetMorphWeightReference(BetaFront::BlushEye), 40);
48 AddParameter(BetaFront::OwOMouth,
pM.GetMorphWeightReference(BetaFront::OwOMouth), 60);
52 AddParameter(BetaFront::FlatMouth,
pM.GetMorphWeightReference(BetaFront::FlatMouth), 50);
53 AddParameter(BetaFront::DeadEye,
pM.GetMorphWeightReference(BetaFront::DeadEye), 1);
54 AddParameter(BetaFront::HeartEye,
pM.GetMorphWeightReference(BetaFront::HeartEye), 30);
56 AddParameter(BetaFront::HideAll,
pM.GetMorphWeightReference(BetaFront::HideAll), 90);
57 AddParameter(BetaFront::AngryEyeMouth,
pM.GetMorphWeightReference(BetaFront::AngryEyeMouth), 30);
58 AddParameter(BetaFront::CrashEmoticon,
pM.GetMorphWeightReference(BetaFront::CrashEmoticon), 90);
59 AddParameter(BetaFront::FrustratedEye,
pM.GetMorphWeightReference(BetaFront::FrustratedEye), 40);
60 AddParameter(BetaFront::FrustratedMouth,
pM.GetMorphWeightReference(BetaFront::FrustratedMouth), 40);
61 AddParameter(BetaFront::DizzyEye,
pM.GetMorphWeightReference(BetaFront::DizzyEye), 60);
62 AddParameter(BetaFront::DizzyMouth,
pM.GetMorphWeightReference(BetaFront::DizzyMouth), 60);
63 AddParameter(BetaFront::ShockedEye,
pM.GetMorphWeightReference(BetaFront::ShockedEye), 20);
64 AddParameter(BetaFront::ShockedMouth2,
pM.GetMorphWeightReference(BetaFront::ShockedMouth), 20);
65 AddParameter(BetaFront::GentleEye,
pM.GetMorphWeightReference(BetaFront::GentleEye), 90);
66 AddParameter(BetaFront::GentleMouth,
pM.GetMorphWeightReference(BetaFront::GentleMouth), 90);
341 pM.GetObject()->GetTransform()->SetPosition(
GetWiggleOffset() +
Vector3D(-20.0f * *
pM.GetMorphWeightReference(BetaFront::CrashEmoticon), 0.0f, 0.0f));
342 pM.GetObject()->UpdateTransform();
345 standby.GetObject()->GetTransform()->SetScaleOffset(
standby.GetObject()->GetCenterOffset());
347 standby.GetObject()->GetTransform()->SetRotationOffset(
standby.GetObject()->GetCenterOffset());
349 standby.GetObject()->UpdateTransform();
354 rear.GetObject()->UpdateTransform();
367 case 1:
Sad();
break;
368 case 2:
Heart();
break;
369 case 3:
Dead();
break;
371 case 5:
Crash();
break;
373 case 7:
Dizzy();
break;
void SelectFace(uint8_t code)
SimpleMaterial greenMaterial
void LinkControlParameters() override
Links external or user-defined control parameters (pure virtual to be implemented).
KeyFrameTrack< 1, 10 > botFinLR2
void OscilloscopeCallback() override
Callback invoked when the Oscilloscope face is enabled/updated.
void UpdateKeyFrameTracks()
KeyFrameTrack< 1, 10 > botFinLR4
void SpectrumAnalyzerCallback() override
Callback invoked when the Spectrum Analyzer face is enabled/updated.
KeyFrameTrack< 1, 10 > botFinLR1
KeyFrameTrack< 1, 10 > botFinLR3
LEDStripBackground ledStripBackground
WS35BetaCameraManager cameras
WS35BetaController controller
void AddBotFinKeyFrames()
void Update(float ratio) override
Updates the project state based on the given ratio.
void UpdateKeyframeTracks()
KeyFrameTrack< 1, 10 > botFinLR5
void AudioReactiveGradientCallback() override
Callback invoked when the Audio Reactive Gradient face is enabled/updated.
const __FlashStringHelper * faceArray[15]
A class to generate various waveform functions with customizable parameters.
float Update()
Updates and calculates the next value of the waveform.
void SetFaceArray(const __FlashStringHelper **faceNames)
Sets the array of face names.
@ Cosine
Smooth cosine interpolation.
@ Cosine
Smooth cosine interpolation.
A template class for managing animations with multiple parameters and keyframes.
void AddParameter(float *parameter)
Adds a parameter to the track.
void AddKeyFrame(float time, float value)
Adds a keyframe to the track.
float Update()
Updates the animation track and computes the new parameter value.
Scene scene
The Scene object representing the rendered environment.
A default project template that includes functionality for an analog microphone, APDS9960 boop sensor...
void SetMenuWiggleSpeed(float multiplierX, float multiplierY, float multiplierR)
Adjusts the menu's wiggle speed along X, Y, and rotation.
Vector3D GetWiggleOffset()
Computes and returns a Vector3D offset for a "wiggle" effect using function generators.
void EnableBlinking()
Enables blinking (resets and plays the blink track).
void AudioReactiveGradientFace()
Enables the Audio Reactive Gradient on the face, updating offsets and calling callbacks.
void SetMenuOffset(Vector2D offset)
Sets the menu's position offset.
void SetMenuSize(Vector2D size)
Sets the menu's size.
void AddBackgroundMaterialFrame(Color color, float opacity=0.8f)
Adds a material frame to the background from a color enum.
void OscilloscopeFace()
Enables the Oscilloscope on the face, updating offsets and calling callbacks.
void AlignObjectRear(Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
Aligns a single Object3D to the rear camera bounds with scaling.
void SetWiggleSpeed(float multiplier)
Sets the overall wiggle speed for both X and Y function generators.
bool IsBooped()
Checks if the sensor has detected a boop.
void SpectrumAnalyzerFace()
Enables the Spectrum Analyzer on the face, updating offsets and calling callbacks.
void AddParameter(uint8_t index, float *parameter, uint16_t transitionFrames, IEasyEaseAnimator::InterpolationMethod interpolationMethod=IEasyEaseAnimator::InterpolationMethod::Overshoot, bool invertDirection=false)
Adds a parameter to the EasyEaseAnimator for interpolation.
void DisableBlinking()
Disables blinking (pauses and resets the blink track).
void AlignObjectFace(Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
Aligns a single Object3D to the "face" camera bounds with scaling.
void AddViseme(Viseme::MouthShape visemeName, float *parameter)
Adds a viseme parameter to the animator (for mouth shapes).
void SetCameraRear(Vector2D min, Vector2D max)
Sets the camera bounds for the rear view.
@ CRAINBOWNOISE
Flow noise (rainbow noise).
@ CHORIZONTALRAINBOW
Horizontal rainbow effect.
@ CRAINBOW
Rainbow spiral.
HeadsUpDisplay hud
Heads-up display (HUD) for the face overlay or additional data.
void AddMaterialFrame(Color color, float opacity=0.8f)
Adds a new material frame to the face's MaterialAnimator from a color enum.
void AddBlinkParameter(float *blinkParameter)
Adds a float parameter to the blink track for controlling blinking.
void AddParameterFrame(uint16_t ProjectIndex, float target)
Adds a frame target to a previously added parameter.
Material * GetFaceMaterial()
Retrieves the current face material animator.
Represents an RGB color and provides methods for manipulation.
void AddObject(Object3D *object)
Adds a 3D object to the scene.
A material that applies a single, solid RGB color to surfaces.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
@ ER
Mouth shape corresponding to the "ER" sound.
@ OO
Mouth shape corresponding to the "OO" sound.
@ AH
Mouth shape corresponding to the "AH" sound.
@ UH
Mouth shape corresponding to the "UH" sound.
@ AR
Mouth shape corresponding to the "AR" sound.
@ SS
Mouth shape corresponding to the "SS" sound (optional).
@ EE
Mouth shape corresponding to the "EE" sound.
Manages WS2812-based displays for the Beta Protogen head.
void SetAccentBrightness(uint8_t maxAccentBrightness) override
Sets the maximum accent brightness (not used for this controller).
void SetBrightness(uint8_t maxBrightness) override
Sets the maximum brightness for the displays.