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 +2 -1
- package/desktop/preload.js +1 -0
- package/lib/client.core.js +279 -41
- package/lib/client.js +114 -16
- package/lib/client.menu.js +14 -4
- package/lib/client.scene.js +134 -7
- package/lib/config-page.html +11 -0
- package/lib/config-page.js +153 -25
- package/lib/core.js +279 -41
- package/lib/desktop-page.js +158 -40
- package/lib/desktop.js +18 -1
- package/lib/global-page.html +34 -4
- package/lib/index.js +46 -25
- package/lib/menu.js +14 -4
- package/lib/scene.js +134 -7
- package/lib/vrm-info.js +16 -1
- package/package.json +1 -1
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',
|
package/desktop/preload.js
CHANGED
|
@@ -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) => {
|