Compare commits

..

No commits in common. "7bfa3e0db37f35c2733c01379eb28b0b219ebaa5" and "62666ff97490ba3cd90bb492e2abd302db9f39b1" have entirely different histories.

3 changed files with 10 additions and 46 deletions

View file

@ -1,3 +1,4 @@
- [lynx r1 resource](https://github.com/technobaboo/stereokit_lynx_dotnet_template)
- [fb passthrough resource](https://www.aesiio.com/blog/passthrough-dot-net-core) - [fb passthrough resource](https://www.aesiio.com/blog/passthrough-dot-net-core)
- [fb passthrough tool source](https://github.com/StereoKit/StereoKit/blob/master/Examples/StereoKitTest/Tools/PassthroughFBExt.cs) - [fb passthrough tool source](https://github.com/StereoKit/StereoKit/blob/master/Examples/StereoKitTest/Tools/PassthroughFBExt.cs)
@ -57,14 +58,6 @@ todo
revolver revolver
flick reload flick reload
enemy design
dmg
spd def
3 single types *fodder
dmg, spd, def
3 double types *competent
dmg+spd, spd+def, def+dmg
bug(s) bug(s)
... ...

View file

@ -13,11 +13,8 @@ static class Arts
static Material mat_backface = new Material("backface.hlsl"); static Material mat_backface = new Material("backface.hlsl");
static Material mat_justcolor = new Material("justcolor.hlsl"); static Material mat_justcolor = new Material("justcolor.hlsl");
static Material mat_slash = new Material("unlit.hlsl");
public static Vec3 shake = new(0, 0, 0); public static Vec3 shake = new(0, 0, 0);
// static Quat spin_ori = Quat.Identity; // static Quat spin_ori = Quat.Identity;
public static Vec3 last_tip_pos = new(0, 0, 0);
static TextStyle text_style; static TextStyle text_style;
@ -43,47 +40,27 @@ static class Arts
mat_backface.DepthWrite = false; mat_backface.DepthWrite = false;
mat_both.Chain = mat_backface; mat_both.Chain = mat_backface;
mat_slash.FaceCull = Cull.None;
} }
public static void Frame() public static void Frame()
{ {
// Input.HandVisible(Handed.Max, false); bool vr = Device.DisplayBlend == DisplayBlend.Opaque;
// render hands if not in mixed reality
// world Input.HandVisible(Handed.Max, false);
Matrix m4_world = Mono.world_pose.ToMatrix(); if (vr)
Hierarchy.Push(m4_world); {
// background standin if no passthrough
}
meshes["Food"].Draw( meshes["Food"].Draw(
mat_mono, mat_mono,
Matrix.TRS( Matrix.TRS(
V.XYZ(0, 0, -1), Vec3.Zero,
Quat.Identity, Quat.Identity,
0.1f 1.0f
) )
); );
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 tip_pos = hand_pos + hand_rot * V.XYZ(0, 1, 0);
mesh.SetData(
new Vertex[] {
new( hand_pos, V.XYZ(0,0,1)),
new( tip_pos, V.XYZ(0,0,1)),
new(last_tip_pos, V.XYZ(0,0,1))
},
new uint[] {
0, 1, 2
}
);
mesh.Draw(
mat_slash,
Matrix.T(0, -1.0f, -1)
);
last_tip_pos = Vec3.Lerp(last_tip_pos, tip_pos, Time.Stepf / 0.1f);
// particles // particles
Particle[] particles = VFX.particles; Particle[] particles = VFX.particles;
for (int i = 0; i < particles.Length; i++) for (int i = 0; i < particles.Length; i++)
@ -99,9 +76,6 @@ static class Arts
); );
} }
Hierarchy.Pop();
// menu // menu
Matrix m4_menu = Mono.menu_pose.ToMatrix(Mono.menu_scale); Matrix m4_menu = Mono.menu_pose.ToMatrix(Mono.menu_scale);
Hierarchy.Push(m4_menu); Hierarchy.Push(m4_menu);

View file

@ -9,8 +9,6 @@ static class Mono
public static int score; public static int score;
public static Pose world_pose;
public static DeltaBool menu; public static DeltaBool menu;
public static Pose menu_pose; public static Pose menu_pose;
public static float menu_scale; public static float menu_scale;
@ -26,7 +24,6 @@ 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);
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;