Programming Guide
- Create a DIV with id
This is the canvas where 3D model displays. div id is used as div name when loading modelo API.
<div id="model-api"></div>
- Import API
Link modelo3d.js to HTML page. The recommended practice is put on the right before .
<script src="modelo3d.js"></script>
- Create a modelo engine object with 512 pixel width and 512 pixel height.
const modeloApi = new modelo3d('model-api', 512, 512, false);
- Load model.
modeloApi.loadModel(modelId);
- Update model element data.
modeloApi.updateElementProperty(elementID, 'status', 3).then(function() {
console.log('ok');
});
- Destroy the modelo3d engine object.