56 {
57 using FP = fl::s16x16;
58
59 auto *e = ctx.mEngine.get();
60 e->get_ready();
63 const fl::u8 *perm = PERLIN_NOISE;
64
65 e->timings.master_speed = 0.02;
66 e->timings.ratio[0] = 0.0025;
67 e->timings.ratio[1] = 0.0027;
68 e->timings.ratio[2] = 0.029;
69 e->timings.ratio[3] = 0.033;
70
71 e->calculate_oscillators(e->timings);
72
73 const int total_pixels =
mState.count;
74
75
76 constexpr fl::i32
FP_ONE =
static_cast<fl::i32
>(1) << FP::FRAC_BITS;
77 constexpr fl::i32 scale_xy_raw =
FP(0.1f).
raw();
78 const fl::i32 cx_raw =
FP(e->animation.center_x).
raw();
79 const fl::i32 cy_raw =
FP(e->animation.center_y).
raw();
80
81
82
83 const fl::i32 dist_offset_raw =
FP(16.0f + e->move.directional[0] * 16.0f).
raw();
84
85
86
87 const fl::i32 angle_offset_raw =
FP(e->move.noise_angle[0] + e->move.noise_angle[1]).
raw();
88
89 render_parameters_fp p = {};
90 p.scale_x_raw = scale_xy_raw;
91 p.scale_y_raw = scale_xy_raw;
92 p.scale_z_raw = 0;
93 p.offset_x_raw =
FP(10.0f).
raw();
94 p.offset_y_raw =
FP(20.0f * e->move.linear[2]).
raw();
95 p.offset_z_raw =
FP(-10.0f).
raw();
96 p.z_raw =
FP(5.0f).
raw();
97 p.center_x_raw = cx_raw;
98 p.center_y_raw = cy_raw;
99 p.low_limit_raw = 0;
100 p.high_limit_raw =
FP_ONE;
101
102 fl::span<CRGB>
leds = e->mCtx->leds;
103
104 for (int i = 0; i < total_pixels; i++) {
105
106 p.dist_raw =
mState.distance_raw[i] - dist_offset_raw;
107 p.angle_raw = angle_offset_raw +
mState.polar_theta_raw[i];
108
110
111 fl::i32 r = show1;
112 fl::i32
g = show1 - 80;
113 fl::i32 b = show1 - 150;
115
120 }
121}
constexpr i32 raw() const FL_NO_EXCEPT
T * assume_aligned(T *ptr) FL_NO_EXCEPT
FASTLED_FORCE_INLINE fl::i32 render_value_fp(const render_parameters_fp &p, const fl::i32 *fade_lut, const fl::u8 *perm) FL_NO_EXCEPT
FASTLED_FORCE_INLINE void rgb_sanity_check_fp(fl::i32 &r, fl::i32 &g, fl::i32 &b) FL_NO_EXCEPT
static constexpr i32 FP_ONE