FastLED 3.9.15
Loading...
Searching...
No Matches
core_types.h
Go to the documentation of this file.
1#pragma once
2
3// Core data structures for Animartrix2
4// Extracted from animartrix_detail.hpp to enable standalone operation
5
6// Use macro for num_oscillators to match original animartrix convention
7// and avoid conflicts when both headers are included
8#ifndef num_oscillators
9#define num_oscillators 10
10#endif
11
12namespace fl {
13
15 float center_x = (999 / 2) - 0.5; // center of the matrix
16 float center_y = (999 / 2) - 0.5;
17 float dist = 0.0f;
18 float angle = 0.0f;
19 float scale_x = 0.1; // smaller values = zoom in
20 float scale_y = 0.1;
21 float scale_z = 0.1;
22 float offset_x = 0.0f;
23 float offset_y = 0.0f;
24 float offset_z = 0.0f;
25 float z = 0.0f;
26 float low_limit = 0; // getting contrast by highering the black point
27 float high_limit = 1;
28};
29
31 float master_speed = 0.0f; // global transition speed
32 float offset[num_oscillators] = {}; // oscillators can be shifted by a time offset
33 float ratio[num_oscillators] = {}; // speed ratios for the individual oscillators
34};
35
36struct modulators {
37 float linear[num_oscillators] = {}; // returns 0 to FLT_MAX
38 float radial[num_oscillators] = {}; // returns 0 to 2*PI
39 float directional[num_oscillators] = {}; // returns -1 to 1
40 float noise_angle[num_oscillators] = {}; // returns 0 to 2*PI
41};
42
43struct rgb {
44 float red = 0.0f;
45 float green = 0.0f;
46 float blue = 0.0f;
47};
48
49} // namespace fl
#define num_oscillators
Definition core_types.h:9
Base definition for an LED controller.
Definition crgb.hpp:179
float linear[num_oscillators]
Definition core_types.h:37
float offset[num_oscillators]
Definition core_types.h:32
float directional[num_oscillators]
Definition core_types.h:39
float noise_angle[num_oscillators]
Definition core_types.h:40
float green
Definition core_types.h:45
float ratio[num_oscillators]
Definition core_types.h:33
float red
Definition core_types.h:44
float radial[num_oscillators]
Definition core_types.h:38
float blue
Definition core_types.h:46