diff --git a/src/VCam.cs b/src/VCam.cs new file mode 100644 index 0000000..8036181 --- /dev/null +++ b/src/VCam.cs @@ -0,0 +1,42 @@ +using StereoKit; + +namespace snake; + +static class VCam +{ + // [!] clear directory before recording + // or better yet just overwrite and then delete anything that wasn't overwritten at the end + // [!] write documentation for making a video + // for example a kdenlive project file that is preconfigured for 60fps VP9 transparent webm etc + + public static float t = 0.0f; // use this to stage loops *start by rotating 360 degrees + public static int frame_index = 0; + public static bool recording = false; + public static Pose pose = new(0, 0, 0); + + public static void Init() + { + + } + + public static void Frame() + { + if (Input.Key(Key.N).IsJustActive()) + { + recording = !recording; + } + + pose.position = Input.Head.position; + pose.orientation = Input.Head.orientation; + if (recording) + { + frame_index++; + Renderer.Screenshot( + $"_frames/test_{frame_index:D4}.png", + pose, + 1280, + 720 + ); + } + } +} \ No newline at end of file