3#include "../Templates/ProtogenProjectTemplate.h"
4#include "../../Assets/Models/OBJ/DeltaDisplayBackground.h"
5#include "../../Assets/Models/FBX/Commissions/RoboEyes.h"
7#include "../../Scene/Materials/Animated/TVStatic.h"
9#include "../../Camera/CameraManager/Implementations/APA102CamerasV1.h"
10#include "../../Controller/APA102Controller.h"
21 const __FlashStringHelper*
faceArray[10] = {F(
"DEFAULT"), F(
"CLOSE"), F(
"DOT"), F(
"SAD"), F(
"QUESTION"), F(
"DISAPPOI"), F(
"ANGRY"), F(
"HEART"), F(
"AUDIO1"), F(
"AUDIO2")};
24 AddParameter(RoboEyes::Close,
pML.GetMorphWeightReference(RoboEyes::Close), 60);
27 AddParameter(RoboEyes::Question,
pML.GetMorphWeightReference(RoboEyes::Question), 120);
28 AddParameter(RoboEyes::Disappoint,
pML.GetMorphWeightReference(RoboEyes::Disappoint), 100);
30 AddParameter(RoboEyes::Heart,
pML.GetMorphWeightReference(RoboEyes::Heart), 120);
31 AddParameter(RoboEyes::MirrorQuestion,
pML.GetMorphWeightReference(RoboEyes::MirrorQuestion), 60);
33 AddParameter(RoboEyes::Close + 10,
pMR.GetMorphWeightReference(RoboEyes::Close), 60);
36 AddParameter(RoboEyes::Question + 10,
pMR.GetMorphWeightReference(RoboEyes::Question), 120);
37 AddParameter(RoboEyes::Disappoint + 10,
pMR.GetMorphWeightReference(RoboEyes::Disappoint), 100);
39 AddParameter(RoboEyes::Heart + 10,
pMR.GetMorphWeightReference(RoboEyes::Heart), 120);
40 AddParameter(RoboEyes::MirrorQuestion + 10,
pMR.GetMorphWeightReference(RoboEyes::MirrorQuestion), 60);
81 if(millis() % 2000 > 1000) {
156 pML.GetObject()->UpdateTransform();
158 pMR.GetObject()->GetTransform()->SetScale(
Vector3D(-1.0f, 1.0f, 1.0f));
159 pMR.GetObject()->GetTransform()->SetScaleOffset(
pMR.GetObject()->GetCenterOffset());
161 pMR.GetObject()->UpdateTransform();
167 case 1:
Close();
break;
168 case 2:
Dot();
break;
169 case 3:
Sad();
break;
172 case 6:
Angry();
break;
173 case 7:
Heart();
break;
Manages APA102 LED strips with camera integration.
void SetAccentBrightness(uint8_t maxAccentBrightness) override
Sets the maximum accent brightness of the LED strip.
void SetBrightness(uint8_t maxBrightness) override
Sets the maximum brightness of the LED strip.
void SelectFace(uint8_t code)
void LinkControlParameters() override
Links external or user-defined control parameters (pure virtual to be implemented).
const __FlashStringHelper * faceArray[10]
APA102Controller controller
void Update(float ratio) override
Updates the project state based on the given ratio.
void SetFaceArray(const __FlashStringHelper **faceNames)
Sets the array of face names.
@ Cosine
Smooth cosine interpolation.
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 SetMenuOffset(Vector2D offset)
Sets the menu's position offset.
void SetMenuSize(Vector2D size)
Sets the menu's size.
void OscilloscopeFace()
Enables the Oscilloscope on the face, updating offsets and calling callbacks.
void UpdateFace(float ratio)
Updates the face's rendered content, reading any user input and applying changes.
void SetWiggleSpeed(float multiplier)
Sets the overall wiggle speed for both X and Y function generators.
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 AddViseme(Viseme::MouthShape visemeName, float *parameter)
Adds a viseme parameter to the animator (for mouth shapes).
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.
void AlignObject(Vector2D min, Vector2D max, Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
Aligns a single Object3D within the given bounds, applying scaling.
void AddObject(Object3D *object)
Adds a 3D object to the scene.
Simulates a TV static effect with noise, scanlines, and color variations.
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.