Skip to main content

How to integrate Avaturn into Three.JS app

You can use Avaturn as an avatar platform in your three.js app. Avaturn opens as an iframe and sends an avatar GLB to the three.js app, where the avatar is loaded via GLTFLoader.

DOWNLOAD

Please find an example project here: github.com/avaturn/avaturn-threejs-example.

Please check function openIframe and change demo domain with your own created at developer.avaturn.me.

function openIframe() {
// Replace it with your own subdomain
let subdomain = "demo";
if (frame.src == "") {
frame.src = `https://${subdomain}.avaturn.dev`;
}
frame.hidden = false;
}‚Äč