"""Example for using a reverse proxy."""

from pathlib import Path

from voraus_3d_visu import Visu

visu = Visu("http://voraus-3d-visu/", clear_all=True)
model = Path(__file__).parent / "box.glb"


if __name__ == "__main__":
    with visu.connection():
        box = visu.add_model(model, position=[0, 0, 0])
        # Move and rotate the box
        input("Press enter to move and rotate the box.")
        visu.update(
            box.position.x(0.3),
            box.rotation.z(1.57),
        )
        # Exit the program
        input("Press enter to exit the program.")
