3D Viewer
Read a project’s embed configuration, and persist a configuration of your own between sessions.
What these methods are (and are not)
getViewerEmbedConfig reads the project’s saved camera, lighting and AR settings. getViewerState / setViewerState are a per-project scratchpad you write and read yourself — useful for saving a configuration across sessions or devices. Nothing populates it automatically, so a get before your first set returns an empty default. The SDK does not render, drive or screenshot a running viewer; a live configurator is embedded as a share URL and observed through its viewer events.
Get Embed Config
const config = await client.getViewerEmbedConfig('proj_123');
console.log('Camera:', config.cameraPosition);
console.log('Environment:', config.environmentPreset);
console.log('AR enabled:', config.enableAR);Get Viewer State
// Returns exactly what you last stored with setViewerState().
const state = await client.getViewerState('proj_123');
console.log(state.selections);
// Never stored anything yet? You get the empty default:
// { loaded: false, selections: {}, visibleBlocks: [],
// cameraPosition: [0, 2, 5], cameraTarget: [0, 0, 0] }Set Viewer State
const newState = await client.setViewerState('proj_123', {
loaded: true,
selections: {
dropdownSelections: { 'blk_frame': 'silver' },
selectMaterialSelections: {},
checkboxSelections: {},
toggleSwitchSelections: {},
carouselSelections: {}
},
visibleBlocks: ['blk_001', 'blk_002'],
cameraPosition: [3, 2, 5],
cameraTarget: [0, 0.5, 0]
});Continue reading
Headless RendererRender a project with your own UI using @simplio3d/viewer — a headless-UI 3D viewer with no swatches, sidebar, price, or form.AnimationsCreate and play animation blocks: move, rotate, float, scale-pulse, swing, and orbit.Project SettingsRead and update the 140+ project settings covering display, branding, AR, e-commerce, email, and PDF.AssetsUpload, list, update, and delete 3D model, texture, and image assets.
