mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
Screen Tiling Bug Fix + Filter Slots (#584)
* fixed weird bug * slots for filters
This commit is contained in:
parent
9b236cfdd0
commit
2a4a5b9f8f
3 changed files with 4 additions and 8 deletions
|
@ -119,13 +119,13 @@ namespace HeavenStudio.Games.Global
|
||||||
{
|
{
|
||||||
if (e.beat > songPosBeat) continue;
|
if (e.beat > songPosBeat) continue;
|
||||||
var func = Util.EasingFunction.GetEasingFunction((Util.EasingFunction.Ease)e["ease"]);
|
var func = Util.EasingFunction.GetEasingFunction((Util.EasingFunction.Ease)e["ease"]);
|
||||||
int track = (int)e["track"];
|
int slot = e["slot"];
|
||||||
float normalizedBeat = Mathf.Clamp01(Conductor.instance.GetPositionFromBeat(e.beat, e.length));
|
float normalizedBeat = Mathf.Clamp01(Conductor.instance.GetPositionFromBeat(e.beat, e.length));
|
||||||
|
|
||||||
float intensity = func(1 - e["start"], 1 - e["end"], normalizedBeat);
|
float intensity = func(1 - e["start"], 1 - e["end"], normalizedBeat);
|
||||||
|
|
||||||
amplifies[track - 1].LutTexture = amplifyTextures[(int)e["filter"]];
|
amplifies[slot - 1].LutTexture = amplifyTextures[(int)e["filter"]];
|
||||||
amplifies[track - 1].BlendAmount = intensity;
|
amplifies[slot - 1].BlendAmount = intensity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -791,7 +791,7 @@ namespace HeavenStudio
|
||||||
new Param("fadeout", new EntityTypes.Float(0, 100, 0), "Fade Out")*/
|
new Param("fadeout", new EntityTypes.Float(0, 100, 0), "Fade Out")*/
|
||||||
|
|
||||||
// new
|
// new
|
||||||
|
new Param("slot", new EntityTypes.Integer(1, 10, 1), "Slot", "Slot 1 is activated first and slot 10 last."),
|
||||||
new Param("start", new EntityTypes.Float(0, 1, 1), "Start Intensity"),
|
new Param("start", new EntityTypes.Float(0, 1, 1), "Start Intensity"),
|
||||||
new Param("end", new EntityTypes.Float(0, 1, 1), "End Intensity"),
|
new Param("end", new EntityTypes.Float(0, 1, 1), "End Intensity"),
|
||||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "", new()
|
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "", new()
|
||||||
|
|
|
@ -9,14 +9,12 @@ namespace HeavenStudio
|
||||||
public class ScreenTiling : MonoBehaviour
|
public class ScreenTiling : MonoBehaviour
|
||||||
{
|
{
|
||||||
private RawImage _image;
|
private RawImage _image;
|
||||||
private RectTransform _rectTransform;
|
|
||||||
|
|
||||||
private List<RiqEntity> _events = new();
|
private List<RiqEntity> _events = new();
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_image = GetComponent<RawImage>();
|
_image = GetComponent<RawImage>();
|
||||||
_rectTransform = GetComponent<RectTransform>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
@ -48,14 +46,12 @@ namespace HeavenStudio
|
||||||
float newYScroll = func(e["yScrollStart"], e["yScrollEnd"], clampNormal);
|
float newYScroll = func(e["yScrollStart"], e["yScrollEnd"], clampNormal);
|
||||||
|
|
||||||
_image.uvRect = new Rect(newXScroll, newYScroll, newXTiles, newYTiles);
|
_image.uvRect = new Rect(newXScroll, newYScroll, newXTiles, newYTiles);
|
||||||
_rectTransform.localScale = new Vector3(1 / newXTiles, 1 / newYTiles);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetUVRect()
|
public void ResetUVRect()
|
||||||
{
|
{
|
||||||
_image.uvRect = new Rect(0, 0, 1, 1);
|
_image.uvRect = new Rect(0, 0, 1, 1);
|
||||||
_rectTransform.localScale = Vector3.one;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue