static void Main(string[] args) { SteamVR_WebKit.SteamVR_WebKit.UseExperimentalOGL = true; SteamVR_WebKit.SteamVR_WebKit.DefaultFragmentShaderPath = Environment.CurrentDirectory + "\\Resources\\fragShader.frag"; CefSharp.CefSharpSettings.FocusedNodeChangedEnabled = true; SteamVR_WebKit.SteamVR_WebKit.Init(new CefSettings() { WindowlessRenderingEnabled = true, }); SteamVR_WebKit.SteamVR_WebKit.FPS = 30; SteamVR_WebKit.SteamVR_WebKit.LogEvent += SteamVR_WebKit_LogEvent; //Notifications.RegisterIcon("default", new Bitmap(Environment.CurrentDirectory + "\\Resources\\alert.png")); basicOverlay = new WebKitOverlay(new Uri("https://whyyouare.web.app"), 1280, 800, "webkitTest", "WebKit", OverlayType.Dashboard); basicOverlay.DashboardOverlay.Width = 3.0f; basicOverlay.DashboardOverlay.SetThumbnail("Resources/webkit-logo.png"); basicOverlay.BrowserPreInit += Overlay_BrowserPreInit; basicOverlay.BrowserReady += Overlay_BrowserReady; basicOverlay.StartBrowser(); basicOverlay.EnableKeyboard = true; basicOverlay.MessageHandler.DebugMode = true; basicOverlay.MouseDeltaTolerance = 20; //basicOverlay.AlphaMask = new Bitmap(Environment.CurrentDirectory + "\\Resources\\alphamap.png"); SteamVR_WebKit.SteamVR_WebKit.TraceLevel = true; videoOverlay = new WebKitOverlay(new Uri("https://www.youtube.com/embed/d7Co9PyueSk"), 1920, 1080, "videoTest", "Video", OverlayType.Both); videoOverlay.InGameOverlay.SetAttachment(AttachmentType.Overlay, new Vector3(2.5f, 0.6f, 1.5f), new Vector3(0, 45f, -35f), "system.vrdashboard"); videoOverlay.EnableNonDashboardInput = true; videoOverlay.InGameOverlay.Width = 3f; videoOverlay.BrowserPreInit += VideoOverlay_BrowserPreInit; videoOverlay.BrowserReady += VideoOverlay_BrowserReady; videoOverlay.DashboardOverlay.Width = 3.0f; videoOverlay.StartBrowser(); //videoOverlay.AlphaMask = new Bitmap(Environment.CurrentDirectory + "\\Resources\\alphamap.png"); videoOverlay.UpdateEveryFrame = true; /*applicationsOverlay = new WebKitOverlay(new Uri("file://" + Environment.CurrentDirectory + "/Resources/applications.html"), 1024, 1024, "webkitTestApps", "WebKit-Apps", OverlayType.Dashboard); * applicationsOverlay.DashboardOverlay.Width = 2.0f; * applicationsOverlay.DashboardOverlay.SetThumbnail("Resources/webkit-logo.png"); * applicationsOverlay.BrowserPreInit += ApplicationsOverlay_BrowserPreInit; * applicationsOverlay.BrowserReady += ApplicationsOverlay_BrowserReady; * applicationsOverlay.StartBrowser();*/ controllerOverlay = new WebKitOverlay(new Uri("https://www.youtube.com/embed/XOn5ckvIF3U?autoplay=1&start=27"), 550, 250, "controllerTest", "controllerVideo", OverlayType.InGame); controllerOverlay.InGameOverlay.SetDeviceAttachment(AttachmentType.RightController, new Vector3(0.0f, 0.0f, -0.1f), new Vector3(0.0f, 0.0f, 1.35f)); controllerOverlay.InGameOverlay.Width = .25f; controllerOverlay.BrowserPreInit += ControllerOverlay_BrowserPreInit; controllerOverlay.BrowserReady += ControllerOverlay_BrowserReady; controllerOverlay.StartBrowser(true); //SteamVR_Application application = new SteamVR_Application(); //application.InstallManifest(true); //application.SetAutoStartEnabled(false); //application.RemoveManifest(); SteamVR_WebKit.SteamVR_WebKit.RunOverlays(); // Runs update/draw calls for all active overlays. And yes, it's blocking. }
static void Main(string[] args) { SteamVR_WebKit.SteamVR_WebKit.Init(); SteamVR_WebKit.SteamVR_WebKit.FPS = 30; //Notifications.RegisterIcon("default", new Bitmap(Environment.CurrentDirectory + "\\Resources\\alert.png")); basicOverlay = new WebKitOverlay(new Uri("file://" + Environment.CurrentDirectory + "/Resources/index.html"), 1024, 1024, "webkitTest", "WebKit-Core", OverlayType.Dashboard); //overlay = new WebKitOverlay(new Uri("https://codepen.io/AtomicNoggin/full/yqwsG/"), 1024, 1024, "webkitTest", "WebKit", OverlayType.Dashboard); basicOverlay.DashboardOverlay.Width = 2.0f; basicOverlay.DashboardOverlay.SetThumbnail("Resources/webkit-logo.png"); basicOverlay.BrowserPreInit += Overlay_BrowserPreInit; basicOverlay.BrowserReady += Overlay_BrowserReady; basicOverlay.StartBrowser(); //videoOverlay = new WebKitOverlay(new Uri("https://www.youtube.com/embed/d7Co9PyueSk"), 1920, 1080, "videoTest", "Video", OverlayType.Both); //videoOverlay.InGameOverlay.SetDeviceAttachment(AttachmentType.Absolute, new Vector3(0f, 1.0f, -1f), Quaternion.FromEulerAngles(0f, 45f, 0f)); //videoOverlay.InGameOverlay.Width = 0.5f; //videoOverlay.BrowserPreInit += VideoOverlay_BrowserPreInit; //videoOverlay.BrowserReady += VideoOverlay_BrowserReady; //videoOverlay.DashboardOverlay.Width = 2.0f; //videoOverlay.StartBrowser(); //applicationsOverlay = new WebKitOverlay(new Uri("file://" + Environment.CurrentDirectory + "/Resources/applications.html"), 1024, 1024, "webkitTestApps", "WebKit-Apps", OverlayType.Dashboard); //applicationsOverlay.DashboardOverlay.Width = 2.0f; //applicationsOverlay.DashboardOverlay.SetThumbnail("Resources/webkit-logo.png"); //applicationsOverlay.BrowserPreInit += ApplicationsOverlay_BrowserPreInit; //applicationsOverlay.BrowserReady += ApplicationsOverlay_BrowserReady; //applicationsOverlay.StartBrowser(); //controllerOverlay = new WebKitOverlay(new Uri("https://www.youtube.com/embed/XOn5ckvIF3U?autoplay=1&start=27"), 550, 250, "controllerTest", "controllerVideo", OverlayType.InGame); //controllerOverlay.InGameOverlay.SetDeviceAttachment(AttachmentType.RightController, new Vector3(0.0f, 0.0f, -0.1f), Quaternion.FromEulerAngles(0.0f, 0.0f, 1.35f)); //controllerOverlay.InGameOverlay.Width = .25f; //controllerOverlay.BrowserPreInit += ControllerOverlay_BrowserPreInit; //controllerOverlay.BrowserReady += ControllerOverlay_BrowserReady; //controllerOverlay.StartBrowser(true); SteamVR_Application application = new SteamVR_Application(); application.InstallManifest(true); //application.SetAutoStartEnabled(false); application.RemoveManifest(); SteamVR_WebKit.SteamVR_WebKit.RunOverlays(); // Runs update/draw calls for all active overlays. And yes, it's blocking. }
static void Main(string[] args) { SteamVR_WebKit.SteamVR_WebKit.Init(new CefSharp.CefSettings() { PersistSessionCookies = true, CachePath = "chrome-cache" }); SteamVR_WebKit.SteamVR_WebKit.FPS = 30; script = File.ReadAllText("Resources/Script.js"); current_artist = ""; current_song = ""; //SteamVR_WebKit.JsInterop.Notifications.RegisterIcon("default", new Bitmap(Environment.CurrentDirectory + "\\Resources\\spotify-logo-small.png")); -- leads to exception overlay = new WebKitOverlay(new Uri("https://open.spotify.com"), 1024, 1024, "spotify", "Spotify", OverlayType.Dashboard); overlay.CachePath = "chrome-cache"; overlay.DashboardOverlay.Width = 2.0f; overlay.DashboardOverlay.SetThumbnail("Resources/spotify-logo-small.png"); overlay.BrowserPreInit += Overlay_BrowserPreInit; if (args.Length > 0 && args[0] == "--debug") { overlay.BrowserReady += Overlay_BrowserReady; } overlay.StartBrowser(); EventHandler <CefSharp.LoadingStateChangedEventArgs> handler = PageReady; overlay.Browser.LoadingStateChanged += handler; SteamVR_Application application = new SteamVR_Application(); application.InstallManifest(true); if (args.Length > 0 && args[0] == "--debug") { application.RemoveManifest(); } SteamVR_WebKit.SteamVR_WebKit.RunOverlays(); // Runs update/draw calls for all active overlays. And yes, it's blocking. }
public void Start() { _wkOverlay.StartBrowser(); }