Skip to content

borellion/sdk

Repository files navigation

Borellion Ads SDK

Monetize your 3D and WebXR experiences with the Borellion Ads SDK. Display banner ads in virtual environments across multiple frameworks.

Documentation

Supported Platforms

Platform Package Install
A-Frame @borellion/aframe-sdk npm i @borellion/aframe-sdk
Babylon.js @borellion/babylonjs-sdk npm i @borellion/babylonjs-sdk
PlayCanvas @borellion/playcanvas-sdk npm i @borellion/playcanvas-sdk
React Three Fiber @borellion/r3f-sdk npm i @borellion/r3f-sdk
Three.js @borellion/threejs-sdk npm i @borellion/threejs-sdk
Web Components @borellion/web-sdk npm i @borellion/web-sdk
Wonderland Engine @borellion/wonderland-sdk npm i @borellion/wonderland-sdk
Unity com.borellion.unity-sdk See Unity README

Quick Start

  1. Create an ad unit at borellion.com to get your Ad Unit ID
  2. Install the SDK for your framework (see table above)
  3. Add a banner to your scene:
// React Three Fiber
import { Borellion } from '@borellion/r3f-sdk';

<Borellion
  adUnit="YOUR_AD_UNIT_ID"
  format="medium-rectangle"
  position={[0, 2, -3]}
/>
// Three.js
import Borellion from '@borellion/threejs-sdk';

const banner = new Borellion('YOUR_AD_UNIT_ID', 'medium-rectangle', 'standard', 3);
scene.add(banner);
<!-- A-Frame -->
<a-entity borellion="adUnit: YOUR_AD_UNIT_ID; format: medium-rectangle;" position="0 2 0"></a-entity>

Banner Formats

Format Dimensions Use Case
medium-rectangle 300 x 250 General purpose
billboard 970 x 250 Wide displays
mobile-phone-interstitial 750 x 1334 Tall/portrait displays

Testing Locally

Add ?debug=true to your URL to load sample ads during development:

http://localhost:3000/?debug=true

Documentation

Full integration guides for each platform: borellion.com/docs

Development

# Install dependencies
yarn

# Build all SDKs
scripts/build.sh

# Run tests
npm test