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();
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()
);
}

View file

@ -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
{

View file

@ -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();

View file

@ -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)
{