3#include "../Animation.h"
4#include "../KeyFrameTrack.h"
5#include "../EasyEaseAnimator.h"
6#include "../../Morph/ProtoArtleckMorph.h"
7#include "../../Render/Scene.h"
8#include "../../Materials/GradientMaterial.h"
9#include "../../Materials/SimplexNoise.h"
10#include "../../Signals/FunctionGenerator.h"
11#include "../../Sensors/MicrophoneSimple_MAX9814.h"
12#include "../../Sensors/ButtonHandler.h"
13#include "../../Sensors/BoopSensor.h"
14#include "../../Materials/NormalMaterial.h"
16#include "../../Materials/CombineMaterial.h"
26 RGBColor noiseSpectrum[4] = {
RGBColor(0, 255, 0),
RGBColor(255, 0, 0),
RGBColor(0, 255, 0),
RGBColor(0, 0, 255)};
56 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::Anger), ProtoArtleck::Anger, 30, 0.0f, 1.0f);
57 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::Sadness), ProtoArtleck::Sadness, 30, 0.0f, 1.0f);
58 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::Surprised), ProtoArtleck::Surprised, 30, 0.0f, 1.0f);
59 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::Doubt), ProtoArtleck::Doubt, 30, 0.0f, 1.0f);
60 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::Frown), ProtoArtleck::Frown, 30, 0.0f, 1.0f);
61 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::LookUp), ProtoArtleck::LookUp, 30, 0.0f, 1.0f);
62 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::LookDown), ProtoArtleck::LookDown, 30, 0.0f, 1.0f);
64 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::vrc_v_ou), ProtoArtleck::vrc_v_ou, 30, 0.0f, 1.0f);
65 eEA.
AddParameter(
pM.GetMorphWeightReference(ProtoArtleck::vrc_v_aa), ProtoArtleck::vrc_v_aa, 30, 0.0f, 1.0f);
103 scene->AddObject(
pM.GetObject());
209 return pM.GetObject();
215 bool isBooped =
boop.isBooped();
226 else if (mode == 2)
Doubt();
227 else if (mode == 3)
Frown();
228 else if (mode == 4)
LookUp();
229 else if (mode == 5)
Angry();
240 float x = sinf(ratio * 3.14159f / 180.0f * 360.0f * 2.0f) * 2.25f;
241 float y = cosf(ratio * 3.14159f / 180.0f * 360.0f * 3.0f) * 2.25f;
243 float linSweep = ratio > 0.5f ? 1.0f - ratio : ratio;
244 float sShift = linSweep * 0.002f + 0.005f;
255 pM.GetObject()->GetTransform()->SetRotation(
Vector3D(0.0f, 0.0f, 0.0f + 15.0f));
256 pM.GetObject()->GetTransform()->SetPosition(
Vector3D(x + 90.0f, y + 115.0f, 600.0f));
258 pM.GetObject()->GetTransform()->SetScale(
Vector3D(-0.85f, -0.65f, 0.5f));
260 pM.GetObject()->UpdateTransform();
Combines multiple materials with specified blending methods and opacities.
A template class for implementing advanced animation easing.
void AddParameterFrame(uint16_t dictionaryValue, float value) override
Adds a single frame value for a parameter.
void Update() override
Updates the animator, advancing all animations.
void SetInterpolationMethod(uint16_t dictionaryValue, InterpolationMethod interpMethod) override
Sets the interpolation method for a specific parameter.
void AddParameter(float *parameter, uint16_t dictionaryValue, uint16_t frames, float basis, float goal) override
Adds a parameter to the animator.
A class to generate various waveform functions with customizable parameters.
Creates a customizable gradient material for rendering.
void HueShift(float hueDeg)
Shifts the hue of the gradient by a specified degree.
void SetGradientPeriod(float gradientPeriod)
Sets the gradient's period of repetition.
@ 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 Play()
Resumes the animation.
void AddKeyFrame(float time, float value)
Adds a keyframe to the track.
float Update()
Updates the animation track and computes the new parameter value.
Abstract base class for rendering materials.
@ Lighten
Chooses the lighter color.
@ Replace
Replaces the base color.
A simple class for processing microphone signals.
float Update()
Updates the microphone reading and processes the signal.
Represents a 3D object with geometry, material, and transformation data.
EasyEaseAnimator< 20 > eEA
SimpleMaterial redMaterial
void UpdateKeyFrameTracks()
CombineMaterial noiseMaterial
void ChangeInterpolationMethods()
FunctionGenerator fGenMatPos
FunctionGenerator fGenScale
RGBColor noiseSpectrum[4]
FunctionGenerator fGenRotation
void FadeIn(float stepRatio) override
GradientMaterial gradientMat
void FadeOut(float stepRatio) override
void Update(float ratio) override
Material * faceMaterials[2]
GradientMaterial gNoiseMat
ProtogenArtleckAnimation()
RGBColor gradientSpectrum[2]
CombineMaterial faceMaterial
Material * noiseMaterials[2]
Represents an RGB color and provides methods for manipulation.
A material that applies a single, solid RGB color to surfaces.
A material class for rendering Simplex Noise.
void SetScale(Vector3D noiseScale)
Sets the scale for noise generation.
void SetZPosition(float zPosition)
Sets the Z-position for 3D noise generation.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.