Javascript 3D Model Viewer

Sample 01
Grid

var modelPlayer = this.Js3dModelViewer
var viewerElement = document.getElementById('viewer')
var opts = {
  grid: true,
  background: 'rgb(80, 80, 80)'
}
var scene = modelPlayer.prepareScene(viewerElement, opts)
modelPlayer.loadObject(scene, './assets/sample.obj')
// or modelPlayer.loadGlb(scene, './assets/avocado.glb')

var fullScreenButton = document.getElementById('fullscreen-button')
fullScreenButton.addEventListener('click', function () {
  modelPlayer.goFullScreen(viewerElement)
})