A Viewer3D object takes in an HTML5 DOM and draw 3D models over this DOM. It captures the input methods, e.g., mouse, keyboard whenever they are enabled, and other browser events, e.g., resize and take correspoinding actions.
Signature:
export default class Viewer3D extends Viewer3DBase
Extends: Viewer3DBase
// Create a default model viewer.
var modelViewer = new Modelo.View.Viewer3D("model");
// Create a model viewer that has transparent background (the DOM behind the canvas can pass through).
var modelViewer = new Modelo.View.Viewer3D("model", {transparent: true\});
// Create a model viewer on mobile platform.
var modelViewer = new Modelo.View.Viewer3D("model", {isMobile: true\});
Method | Description |
---|---|
loadModel(modelId, configOrOnProgress, changeCamera, islocal, path) | Load a model into current viewer. |