diff --git a/src/Arts.cs b/src/Arts.cs index 52d7c5d..8389899 100644 --- a/src/Arts.cs +++ b/src/Arts.cs @@ -21,11 +21,6 @@ static class Arts static TextStyle text_style; - // slash tip pos frame circle buffer - static int tip_index = 0; - static int tip_count = 12; - static Vec3[] tip_buffer = new Vec3[tip_count]; - public static void Init() { foreach (ModelNode node in assets_model.Nodes) @@ -76,6 +71,11 @@ static class Arts mat_slash.FaceCull = Cull.None; } + // slash tip pos frame circle buffer [!] move out of render class + static int tip_index = 0; + static int tip_count = 24; // [!] this needs to be scaled with headset framerate + static Vec3[] tip_buffer = new Vec3[tip_count]; + // [!] hacky offset stepper for noise public static int offset = 0; static int offstep() => offset += 100; @@ -248,14 +248,17 @@ static class Arts tip_index = (tip_index + 1) % tip_count; tip_buffer[tip_index] = tip_pos; Vec3 oldest_tip = tip_buffer[(tip_index + 1) % tip_count]; + Vec3 mid_tip = tip_buffer[(tip_index + (tip_count / 3) * 2) % tip_count]; mesh.SetData( new Vertex[] { - new( blade_pos, V.XYZ(0,0,1)), - new( tip_pos, V.XYZ(0,0,1)), - new(oldest_tip, V.XYZ(0,0,1)) + new( blade_pos, V.XYZ(0,0,1)), + new( tip_pos, V.XYZ(0,0,1)), + new( mid_tip, V.XYZ(0,0,1)), + new(oldest_tip, V.XYZ(0,0,1)), }, new uint[] { - 0, 1, 2 + 0, 1, 2, + 0, 2, 3, } ); mesh.Draw(