import { setTimeout } from "timers/promises";
import { CameraType, changeResolutionOfVirturalCamera, createVirturalCamera, pushDataToVirturalCamera } from "../lib";
import { Frame } from 'frame';
import { resolve } from "path";

createVirturalCamera(CameraType.RGBA, 1076, 747);
const frame = Frame.createFromPath(resolve(__dirname, './test.png'));
const buf = frame.getRawData();
(async () => {
    // changeResolutionOfVirturalCamera(720, 480);
    while (1) {
        await setTimeout(100);
        pushDataToVirturalCamera(buf, 1076, 747);
    }
})()