Using the Viewer without custom elements
You can create a viewer instance using the traditional Babylon.js approach while still accessing the additional features of the A3dViewer API, such as support for multiple models.
Example
You can find a more complete example on Github : https://git.corp.adobe.com/clockwork/a3d-viewer/tree/develop/examples/src/examples/createViewerForCanvas
How to implement
Using npm :
npm install @a3d-viewer/viewer
Importing :
import { CreateViewerForCanvas } from '@a3d-viewer/viewer'
Similar to the standard Babylon.js Viewer, you can create the viewer from a canvas element:
import { A3dViewer, CreateViewerForCanvas } from '@a3d-viewer/viewer'
const viewer = CreateViewerForCanvas(canvas, { viewerClass: A3dViewer })
Last updated on