From f5cbacd62e743862c73255cfd5e1b70f5e191466 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Tue, 3 Dec 2024 01:33:45 -0500 Subject: [PATCH] palette test --- src/Arts.cs | 25 +++++++++++++++++++++---- src/Mono.cs | 7 ++++++- src/Program.cs | 2 +- src/VFX.cs | 6 +++--- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/Arts.cs b/src/Arts.cs index 83225f8..ad96368 100644 --- a/src/Arts.cs +++ b/src/Arts.cs @@ -64,9 +64,24 @@ static class Arts ) ); + Mesh.Cube.Draw( + mat_unlit, + Matrix.TS( + V.XYZ(0, 1, -2), + V.XYZ(0.1f, 2, 0.1f) + ), + Color.Hex(0xB9E7AFFF) + ); + + Mesh.Cube.Draw( + mat_unlit, + Matrix.Identity, + Color.Hex(0x13180AFF).ToLinear() + ); + Mesh mesh = new(); Quat hand_rot = Quat.FromAngles(0, 0, SKMath.Sin(Time.Totalf * 6f) * 30f); - Vec3 hand_pos = V.XYZ(SKMath.Sin(Time.Totalf * 1f) * 0.1f, 0, 0); + Vec3 hand_pos = V.XYZ(SKMath.Sin(Time.Totalf * 1f) * 0.1f, 0.5f, 1.0f); Vec3 tip_pos = hand_pos + hand_rot * V.XYZ(0, 1, 0); mesh.SetData( new Vertex[] { @@ -80,7 +95,8 @@ static class Arts ); mesh.Draw( mat_slash, - Matrix.T(0, -1.0f, -1) + Matrix.Identity, + Color.Hex(0xF9BF05FF).ToLinear() ); last_tip_pos = Vec3.Lerp(last_tip_pos, tip_pos, Time.Stepf / 0.1f); @@ -90,12 +106,13 @@ static class Arts { Particle particle = particles[i]; meshes["FoodParticle"].Draw( - mat_mono, + mat_unlit, Matrix.TRS( particle.pos, particle.ori, particle.scl - ) + ), + Color.Hex(0xC75A09FF).ToLinear() ); } diff --git a/src/Mono.cs b/src/Mono.cs index fd61364..847f9a8 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -26,7 +26,7 @@ static class Mono public static void Init() { game_time = 0.0; - world_pose = new(0, 0, 0); + world_pose = new(0, -1, -2); menu = new(true); menu_pose = new(0, 0, 0); menu_scale = 1 * U.cm; @@ -64,6 +64,11 @@ static class Mono // orbital_view // box_pose.position = Input.Head.position + Input.Head.orientation * V.XYZ(0, -0 * U.cm, -10 * U.cm); } + + if (Rig.btn_select.delta == +1) + { + VFX.Play(new XYZi(0, 1, 1)); + } } else { diff --git a/src/Program.cs b/src/Program.cs index 1d2b923..50d4beb 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -31,7 +31,7 @@ class Program World.OcclusionEnabled = true; Device.DisplayBlend = DisplayBlend.AnyTransparent; Renderer.EnableSky = false; - Renderer.ClearColor = new Color(0.0f, 0.0f, 0.0f, 0.0f); + Renderer.ClearColor = Color.Hex(0x42A590FF).ToLinear();// new Color(0.0f, 0.0f, 0.0f, 0.0f); Rig.Init(); Mono.Init(); diff --git a/src/VFX.cs b/src/VFX.cs index 5af7118..5e65c8a 100644 --- a/src/VFX.cs +++ b/src/VFX.cs @@ -39,9 +39,9 @@ static class VFX particle.pos += particle.vel * Time.Stepf; float scl_rad = particle.scl * 0.5f * 0.333f; Vec3 next_pos = V.XYZ( - Maths.s_clamp(particle.pos.x, 1 - 0.5f - scl_rad), - Maths.s_clamp(particle.pos.y, 1 - 0.5f - scl_rad), - Maths.s_clamp(particle.pos.z, 1 - 0.5f - scl_rad) + Maths.s_clamp(particle.pos.x, 2 - scl_rad), + Maths.s_clamp(particle.pos.y, 2 - scl_rad), + Maths.s_clamp(particle.pos.z, 2 - scl_rad) ); if (next_pos.x != particle.pos.x || next_pos.y != particle.pos.y || next_pos.z != particle.pos.z) {