Skip to main content

a7n_platform/feedback/
parameters.rs

1// SPDX-License-Identifier: GPL-3.0-or-later
2
3//! Shared bounds and HTML defaults for config validation and the design sliders.
4
5#[derive(Debug, Clone, Copy)]
6pub struct Parameter {
7    pub key: &'static str,
8    pub min: f32,
9    pub max: f32,
10    pub default: f32,
11    pub step: f64,
12}
13
14pub const DEPTH: Parameter = Parameter {
15    key: "feedback.depth",
16    min: 20.0,
17    max: 160.0,
18    default: 60.0,
19    step: 1.0,
20};
21pub const RADIUS: Parameter = Parameter {
22    key: "feedback.radius",
23    min: 60.0,
24    max: 360.0,
25    default: 160.0,
26    step: 1.0,
27};
28pub const SPEED: Parameter = Parameter {
29    key: "feedback.speed",
30    min: 0.2,
31    max: 3.5,
32    default: 1.3,
33    step: 0.1,
34};
35pub const FREQUENCY: Parameter = Parameter {
36    key: "feedback.frequency",
37    min: 0.4,
38    max: 2.5,
39    default: 1.0,
40    step: 0.1,
41};
42pub const INTENSITY: Parameter = Parameter {
43    key: "feedback.intensity",
44    min: 0.4,
45    max: 2.2,
46    default: 1.2,
47    step: 0.1,
48};
49pub const ALL: [Parameter; 5] = [DEPTH, RADIUS, SPEED, FREQUENCY, INTENSITY];