palette test

This commit is contained in:
ethan merchant 2024-12-03 01:33:45 -05:00
parent 7bfa3e0db3
commit f5cbacd62e
4 changed files with 31 additions and 9 deletions

View file

@ -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(); Mesh mesh = new();
Quat hand_rot = Quat.FromAngles(0, 0, SKMath.Sin(Time.Totalf * 6f) * 30f); 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); Vec3 tip_pos = hand_pos + hand_rot * V.XYZ(0, 1, 0);
mesh.SetData( mesh.SetData(
new Vertex[] { new Vertex[] {
@ -80,7 +95,8 @@ static class Arts
); );
mesh.Draw( mesh.Draw(
mat_slash, 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); 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]; Particle particle = particles[i];
meshes["FoodParticle"].Draw( meshes["FoodParticle"].Draw(
mat_mono, mat_unlit,
Matrix.TRS( Matrix.TRS(
particle.pos, particle.pos,
particle.ori, particle.ori,
particle.scl particle.scl
) ),
Color.Hex(0xC75A09FF).ToLinear()
); );
} }

View file

@ -26,7 +26,7 @@ static class Mono
public static void Init() public static void Init()
{ {
game_time = 0.0; game_time = 0.0;
world_pose = new(0, 0, 0); world_pose = new(0, -1, -2);
menu = new(true); menu = new(true);
menu_pose = new(0, 0, 0); menu_pose = new(0, 0, 0);
menu_scale = 1 * U.cm; menu_scale = 1 * U.cm;
@ -64,6 +64,11 @@ static class Mono
// orbital_view // orbital_view
// box_pose.position = Input.Head.position + Input.Head.orientation * V.XYZ(0, -0 * U.cm, -10 * U.cm); // 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 else
{ {

View file

@ -31,7 +31,7 @@ class Program
World.OcclusionEnabled = true; World.OcclusionEnabled = true;
Device.DisplayBlend = DisplayBlend.AnyTransparent; Device.DisplayBlend = DisplayBlend.AnyTransparent;
Renderer.EnableSky = false; 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(); Rig.Init();
Mono.Init(); Mono.Init();

View file

@ -39,9 +39,9 @@ static class VFX
particle.pos += particle.vel * Time.Stepf; particle.pos += particle.vel * Time.Stepf;
float scl_rad = particle.scl * 0.5f * 0.333f; float scl_rad = particle.scl * 0.5f * 0.333f;
Vec3 next_pos = V.XYZ( Vec3 next_pos = V.XYZ(
Maths.s_clamp(particle.pos.x, 1 - 0.5f - scl_rad), Maths.s_clamp(particle.pos.x, 2 - scl_rad),
Maths.s_clamp(particle.pos.y, 1 - 0.5f - scl_rad), Maths.s_clamp(particle.pos.y, 2 - scl_rad),
Maths.s_clamp(particle.pos.z, 1 - 0.5f - 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) if (next_pos.x != particle.pos.x || next_pos.y != particle.pos.y || next_pos.z != particle.pos.z)
{ {