@three-ws/avatar SDK
The npm SDK bundle loaded from /avatar-sdk/dist/index.mjs
(what consumers would get from npm install @three-ws/avatar
once it's published). On mount it registers <agent-3d>
as a custom element. The Creator section opens the iframe modal that
resolves with a GLB Blob — the same flow third-party sites would use.
1. Drop-in web component
<script type="module" src="/avatar-sdk/dist/index.mjs"></script> <agent-3d src="/avatars/default.glb"></agent-3d>
waiting for SDK to register the custom element…
2. Programmatic Creator
import { AvatarCreator } from '/avatar-sdk/src/creator.js';
const creator = new AvatarCreator({
onExport: (glbBlob) => { /* save it */ },
});
creator.open();
click to open the modal.