Skip to content

Commit 1b290ee

Browse files
committed
Improved NBS renderer visuals
1 parent 3af6a4d commit 1b290ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/net/raphimc/noteblocktool/frames/visualizer/DropRenderer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
import net.raphimc.noteblocktool.util.SoundSystemSongPlayer;
3232
import net.raphimc.thingl.ThinGL;
3333
import net.raphimc.thingl.renderer.impl.Renderer2D;
34-
import net.raphimc.thingl.renderer.text.Font;
3534
import net.raphimc.thingl.renderer.text.SDFTextRenderer;
3635
import net.raphimc.thingl.resource.texture.AbstractTexture;
3736
import net.raphimc.thingl.resource.texture.Texture2D;
3837
import net.raphimc.thingl.util.GlobalObjects;
38+
import net.raphimc.thingl.util.font.Font;
3939
import org.joml.Matrix4fStack;
4040
import org.lwjgl.opengl.GL11C;
4141

@@ -169,7 +169,7 @@ private void drawNotes(final Matrix4fStack positionMatrix) {
169169
final float whiteKeyWidth = (float) width / WHITE_PIANO_KEY_COUNT;
170170
final float blackKeyWidth = whiteKeyWidth * BLACK_KEY_WIDTH_RATIO;
171171
final float noteSize = 16 * Math.max(1, width / 960);
172-
final float noteSquishFactor = 1.5F;
172+
final float noteSquishFactor = 1F;
173173

174174
final Song song = this.songPlayer.getSong();
175175
final int tickWindow = MathUtils.ceilInt(height / (noteSize / noteSquishFactor));
@@ -242,13 +242,13 @@ private void drawPiano(final Matrix4fStack positionMatrix) {
242242
final float pressOffset = height / KEY_PRESS_DEPTH_RATIO - height / KEY_PRESS_DEPTH_RATIO * (progress < 0.5F ? 1F - progress : progress);
243243
final String noteName = this.getNoteName(nbsKey);
244244
if (!this.isBlackKey(nbsKey)) {
245-
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x, pressOffset, x + 1, height, Color.BLACK);
246-
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x + whiteKeyWidth - 1, pressOffset, x + whiteKeyWidth, height, Color.BLACK);
247245
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x + 1, pressOffset, x + whiteKeyWidth - 1, height, Color.WHITE);
248246
if (this.pianoKeyLastColors[nbsKey] != null) {
249247
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x + 1, pressOffset, x + whiteKeyWidth - 1, height, this.pianoKeyLastColors[nbsKey].withAlpha(Math.round(PRESSED_KEY_COLOR_ALPHA * (1 - colorProgress))));
250248
}
251249
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x, height - whiteKeyLineOffset + pressOffset, x + whiteKeyWidth, height - whiteKeyLineOffset - KEY_LINE_HEIGHT + pressOffset, Color.GRAY);
250+
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x, pressOffset, x + 1, height, Color.BLACK);
251+
Renderer2D.INSTANCE.filledRectangle(positionMatrix, x + whiteKeyWidth - 1, pressOffset, x + whiteKeyWidth, height, Color.BLACK);
252252

253253
this.textRenderer.setGlobalScale(ThinGL.getWindowFramebufferWidth() / 2745F); // 0,7
254254
final float nameWidth = this.textRenderer.calculateWidth(noteName);

0 commit comments

Comments
 (0)