Webaverse

Webaverse

    ›XRPackage

    Webaverse

    • Overview
    • SILK
    • NFTs
    • Avatars
    • Parcels
    • Seasons
    • Discord Bot
    • Twitter Bot
    • Guides

      • Getting Started In Webaverse

    Market

    • How To Get SILK
    • How To Buy And Sell NFTs
    • How To Trade

    Create

    • Overview
    • How To Mint NFTs
    • How To Mint NFTs in Discord
    • Season 0: Genesis

      • Submission Guide

      Avatars

      • Import From VRoid Studio

      3D Models

      • Import From Blender
      • Bake Physics For 3D Model
      • Export Multiple Animations

      Voxels

      • Import From MagicaVoxel

      XRPackage

      • What is XRPackage?
      • Create An XRPackage
      • Design Guidelines
      • Add Monetization
      • Examples

      API

      • Runtime API
      • Manifest API
      • Monetization API

    What is XRPackage?

    XRPackage turns 3D apps into a file you can load anywhere.

    It uses standards like WebGL, WebXR, GLTF, and WebBundle to package an app into a .wbn file.

    What's in a package?

    An XRPackage is a bundle of files. The entry point is a manifest.json (following the Web App Manifest standard). The rest of the files in the bundle are the source files for the app.

    $ cat manifest.json
    {
      "name": "cube",
      "description": "Cube XRPackage",
      "start_url": "index.js"
    }
    

    The start_url field depends on the type of package:

    1. Asset packages

      For the following types of packages, the start_url references the single static asset file to be loaded:

      • glb@0.0.1
      • vrm@0.0.1
      • vox@0.0.1
    1. WebXR packages

      For WebXR packages, the start_url references the index.js entry point for the app. index.js should have any assets referenced using relative paths.

    Package configuration

    The package manifest contains fields to describe aspects of your XRPackage such as name, description, etc.

    See Manifest API for more details on these properties.

    Building a package

    Regardless of package type, packages are built with the xrpk tool which you can get on npm:

    $ npm install -g xrpk
    

    To build a package with manifest.json in the current directory:

    $ xrpk build .
    cube.wbn
    

    The resulting package is cube.wbn.

    See Create An XRPackage for how to create an XRPackage.

    Design Guidelines:

    • Use transparent skyboxes to make it easier to compose multiple apps together.
    • Be mindful of size to improve loading speeds, keep packages under 100mb.

    See Design Guidelines for more.

    Last updated on 12/17/2020
    ← Import From MagicaVoxelCreate An XRPackage →
    • What's in a package?
    • Package configuration
    • Building a package
    • Design Guidelines:
    Docs
    OverviewCreate Overview
    Community
    DiscordTwitter
    More
    WebaverseGitHub
    © 2021 Webaverse