const useMakeupEngine = async (makeupEngine, loop) => {
    const interval = setInterval(() => {
        loop();
    }, 400);

    makeupEngine.onFrameRendered(() => {
        clearInterval(interval);
        makeupEngine.onFrameRendered(loop);
        loop();
    });

    const canvas = makeupEngine.GetView();
    canvas.style.width = "100%";
    canvas.style.height = "100%";
    canvas.style.objectFit = "cover";
    const container = document.getElementById("container");
    container.prepend(canvas);

    return { };
};

export default useMakeupEngine;