@realsee/atom-panorama-tiles
v0.1.0
Published
Shared bounded equirectangular panorama loader for Workshop and NextVR. Uses the host Three.js r117 renderer and camera. No input handlers, business requests, server transforms, or animation loop are created by the package.
Keywords
Readme
@realsee/atom-panorama-tiles
Shared bounded equirectangular panorama loader for Workshop and NextVR. Uses the host Three.js r117 renderer and camera. No input handlers, business requests, server transforms, or animation loop are created by the package.
const tiles = new PanoramaTiles({ renderer, source: realseePanoramaSource(url, width, height), onChange: render })
scene.add(tiles.group)
await tiles.load()
// In the host render loop, after updating the camera:
tiles.update(camera, heightInCssPixels, renderer.getPixelRatio())
renderer.render(scene, camera)
// On unmount/source change:
scene.remove(tiles.group)
tiles.dispose()The base is capped at 1024px, refinement at 8192px. Requests have one texel overlap. Missing source dimensions intentionally show only the bounded base. Unsupported/signed image hosts reject instead of downloading an unbounded original. A custom URL provider can implement a different transform service.
maxTextureBytes defaults to 64MiB; use 32MiB for mobile. It bounds resident texture estimates (RGBA without mipmaps), not total process memory or transient network/decode buffers. Initial concurrency is four, retries are bounded at two attempts per tile. load() resolves after uploading the base; the host must render a frame before reporting first-frame readiness.
Build: npx vite build --config packages/panorama-tiles/vite.config.ts
Tests: npx vitest run --config packages/panorama-tiles/vite.config.ts
Install: npm install @realsee/[email protected]. Consumers must provide the compatible Three.js r117 peer dependency and should use a registry version rather than a local checkout or tarball.
