diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-11-05 23:25:05 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-11-05 23:25:05 +0100 |
commit | 6b7ec62b964b6331b64a8564478409ece285027d (patch) | |
tree | de83542ed5cdd9ed5a34f8044b3bdde0bb95c11a | |
parent | 5ee983188de97ae027f9b9c1443438063f708a7e (diff) | |
download | redot-engine-6b7ec62b964b6331b64a8564478409ece285027d.tar.gz |
Tweak FastNoiseLite property hints for better slider usability
- Mark Frequency as exponential to make low frequency values easier
to control when dragging the slider. The default now
conveniently appears halfway in the middle.
- Reduce range hint for Offset to make "absolute"
slider dragging more controllable, but allow lower/greater
values to be entered manually.
-rw-r--r-- | modules/noise/fastnoise_lite.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/noise/fastnoise_lite.cpp b/modules/noise/fastnoise_lite.cpp index 4aea98c4de..1b0ef6506b 100644 --- a/modules/noise/fastnoise_lite.cpp +++ b/modules/noise/fastnoise_lite.cpp @@ -416,8 +416,8 @@ void FastNoiseLite::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "noise_type", PROPERTY_HINT_ENUM, "Simplex,Simplex Smooth,Cellular,Perlin,Value Cubic,Value"), "set_noise_type", "get_noise_type"); ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "frequency", PROPERTY_HINT_RANGE, ".0001,1,.0001"), "set_frequency", "get_frequency"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "offset", PROPERTY_HINT_RANGE, "-999999999,999999999,0.01"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "frequency", PROPERTY_HINT_RANGE, ".0001,1,.0001,exp"), "set_frequency", "get_frequency"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "offset", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_less,or_greater"), "set_offset", "get_offset"); ADD_GROUP("Fractal", "fractal_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "fractal_type", PROPERTY_HINT_ENUM, "None,FBM,Ridged,Ping-Pong"), "set_fractal_type", "get_fractal_type"); |