ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Function parseIIIFManifest

    • Converts a IIIF Presentation API 4 manifest (containing a Scene) into a ThreePresenter SceneDescription.

      Supported IIIF features:

      • type: "Model" painting annotations → ModelDefinition
      • PointSelector on the annotation target → position
      • RotateTransform on a SpecificResource body → rotation (degrees)
      • ScaleTransformscale
      • TranslateTransform → added to position
      • backgroundColor on the Scene → environment.background
      • label on the Manifest or Model body → title

      Non-Model body types (Lights, Cameras, Audio) are silently skipped — ThreePresenter will supply its own defaults.

      Parameters

      • manifest: unknown

        Parsed JSON object of a IIIF Manifest

      Returns SceneDescription

      A SceneDescription ready to pass to presenter.loadScene()

      If the manifest is not a valid IIIF Manifest with at least one Scene

      const res = await fetch('https://example.org/manifest.json');
      const scene = parseIIIFManifest(await res.json());
      await presenter.loadScene(scene);