dsh-plugin-vrmpet3d 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/desktop/main.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // Everything here was measured before it was written (see HANDOFF §12): a transparent
9
9
  // always-on-top window renders WebGL with a real alpha channel, can be resized to the whole
10
10
  // screen, and `capturePage()` returns pixels that are mostly fully transparent.
11
- const { app, BrowserWindow, dialog, ipcMain, screen } = require('electron');
11
+ const { app, BrowserWindow, dialog, ipcMain, screen, shell } = require('electron');
12
12
  const fs = require('node:fs');
13
13
  const path = require('node:path');
14
14
 
@@ -604,6 +604,7 @@ app.whenReady().then(async () => {
604
604
  if (!probing) sendCursor(lastCursor);
605
605
  };
606
606
 
607
+ ipcMain.on('vrmpet3d:focus-host', () => { shell.openExternal('dsh://open').catch(() => {}); });
607
608
  ipcMain.handle('vrmpet3d:config', () => ({
608
609
  modelId: options.modelId,
609
610
  assetBase: '/vrmpet3d/asset',
@@ -13,6 +13,7 @@ contextBridge.exposeInMainWorld('vrmpet3dDesktop', {
13
13
  * Sent as an invoke so the page can await it before mounting anything.
14
14
  */
15
15
  config: () => ipcRenderer.invoke('vrmpet3d:config'),
16
+ focusHost: () => ipcRenderer.send('vrmpet3d:focus-host'),
16
17
 
17
18
  /** The global cursor position, pushed by the main process at frame rate. */
18
19
  onCursor: (callback) => {