mirror of
https://github.com/goodpuppies/petplay.git
synced 2026-10-19 08:00:41 +02:00
29 lines
815 B
TypeScript
29 lines
815 B
TypeScript
import { OVRInterface } from "../helper/helpermodules/OVRInterface.ts";
|
|
|
|
|
|
async function spawn() {
|
|
const overlayId = "Overlay1";
|
|
const executablePath = "c:/GIT/petplay/OVRINTERFACE/out/build/user/Debug/ovrinput.exe";
|
|
const OVR = new OVRInterface(overlayId, executablePath);
|
|
await OVR.connect();
|
|
|
|
const functionData = "CreateBasicOverlay";
|
|
const overlayName = "exampleOverlay";
|
|
const pathToTexture = "c:/GIT/petplay/denoApp/resources/P1.png";
|
|
|
|
// Construct the message as a single string
|
|
const message = `${functionData};${overlayName};${pathToTexture};`
|
|
|
|
await OVR.send(message);
|
|
|
|
await OVR.receive();
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 12000))
|
|
|
|
await OVR.disconnect();
|
|
}
|
|
|
|
if (import.meta.main) {
|
|
console.log("Running main");
|
|
spawn();
|
|
} |