Multipart configurator¶
Open the example · JavaScript source
This example loads a small base scene and assembles the selected product from independent .webex files. A stable part ID identifies the slot; merging the same ID replaces it atomically.
await viewer.load(new URL('./scenes/base.webex', location.href).href);
await viewer.mergePart('ring-band', new URL('./scenes/parts/ring-band.webex', location.href).href, {
format: 'webex'
});
await viewer.mergePart('head', new URL('./scenes/parts/head-08.webex', location.href).href, {
format: 'webex'
});
await viewer.removePart('ring-band');
The returned promises settle only when the engine reports completion, so the example can disable controls while a transaction is running and restore the previous selection on an error. Keep IDs stable and pass absolute URLs so the license check can verify their host.
