Installation

You can use this library by downloading a standalone zip containing the necessary files or by installing from NPM for use in a webpack project.

You can find the respective download links and installation instructions here.

Standalone Download

Unzip into your web project and reference from your HTML like this:

<script src="zappar-babylon.js"></script>

CDN

Reference the zappar.js library from your HTML like this:

<script src="https://libs.zappar.com/zappar-babylon/*/zappar-babylon.js"></script>

* Latest version number can be found on here.

NPM Webpack Package

Run the following NPM command inside your project directory:

npm install --save @zappar/zappar-babylonjs

We also expose a beta version of this package that contains recent tweaks and updates. To install, run the following NPM command inside your project directory:

npm install --save @zappar/zappar-babylonjs@beta

The beta version of the package is not recommended for live projects. We regularly update it which can lead to bugs. Please rigorously test across multiple devices and browsers if you are using this version of the package.

Then import the library into your JavaScript or TypeScript files:

import * as ZapparBabylon from "@zappar/zappar-babylonjs";

The final step is to add this necessary entry to your webpack rules:

module.exports = {
  //...
  module: {
    rules: [
      //...
      {
        test: /zcv\.wasm$/,
        type: "javascript/auto",
        loader: "file-loader"
      }
      //...
    ]
  }
};
zapcode branded_zapcode i