Showing 360 Views with a Sky BallΒΆ

This example requires a equirectangular image (show below), which is then mapped to a sphere as a texture.

equirectangular image

Place the [farm_house.jpg](figures/farm_house.jpg) in the path pointed to by the static_root argument of the Vuer class. The vuer front end will try to load from the url http://localhost:8012/static/farm_house.jpg.

Here is the expected result: marker light

from asyncio import sleep
import numpy as np

from vuer import Vuer, VuerSession
from vuer.schemas import DefaultScene, Arrow, Sphere

app = Vuer(static_root="figures")

n = 10
N = 1000

sphere = Sphere(
    args=[1, 32, 32],
    materialType="standard",
    material={"map": "http://localhost:8012/static/farm_house.jpg", "side": 1},
    position=[0, 0, 0],
    rotation=[0.5 * np.pi, 0, 0],
)


@app.spawn(start=True)
async def main(proxy: VuerSession):
    proxy.set @ DefaultScene(sphere)

    # keep the main session alive.
    while True:
        await sleep(10)