mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Apply hosted formatting for the brush regression
This commit is contained in:
1 parent
0e2e4a2983
commit
3efe4a26bf
2 files changed
+3
-9
No files matched your search
@@ -18,12 +18,7 @@ fn dabs(brush: &BrushSettings) -> Vec<Dab> {
|
||||
let mut out = Vec::new();
|
||||
for step in 0..64_u16 {
|
||||
builder.build(
|
||||
&StepInput {
|
||||
point: StrokePoint::new(f64::from(step) * 80.0, 40.0, 1.0),
|
||||
direction: 0.0,
|
||||
initial_direction: 0.0,
|
||||
step: u64::from(step),
|
||||
},
|
||||
&StepInput { point: StrokePoint::new(f64::from(step) * 80.0, 40.0, 1.0), direction: 0.0, initial_direction: 0.0, step: u64::from(step) },
|
||||
&mut out,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -660,9 +660,8 @@ impl DabBuilder {
|
||||
angle +=
|
||||
control_angle(sd.angle.control, sd.angle.fade_steps, s) + rand_signed(seed, i, stream::ANGLE) * sd.angle.jitter.clamp(0.0, 1.0) * 180.0;
|
||||
// Jitter alone keeps a quarter of the base tip; unmeasured controllers keep their existing range.
|
||||
roundness = (roundness
|
||||
* scalar(&sd.roundness, s, r(stream::ROUNDNESS) * if sd.roundness.control == Control::Off { 0.75 } else { 1.0 }))
|
||||
.clamp(0.01, 1.0);
|
||||
roundness = (roundness * scalar(&sd.roundness, s, r(stream::ROUNDNESS) * if sd.roundness.control == Control::Off { 0.75 } else { 1.0 }))
|
||||
.clamp(0.01, 1.0);
|
||||
if sd.flip_x_jitter && r(stream::FLIP_X) < 0.5 {
|
||||
fx = !fx;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user