File returned from Expertsys are one gltf file + one bin file + one json file + several image files. These files constitute a scene.
<script src="jquery.js"></script>
<script src="babylon.js"></script>
<script src="babylonjs.loaders.js"></script>
<script src="pep.js"></script>
<script src="app.viewer.js"></script>
babylon.js, babylon.loader.js, pep.js must be version 3
jquery.js must be version 3
<div id="viewer" style="position:absolute;top:0px;bottom:0px;left:0px;right:0px;">
<canvas id="renderCanvas" touch-action="none" style="width:100%;height:100%;"></canvas>
</div>
Here the viewer has fixed bounds (position:absolute), but you can make it variable if you prefer.
<script>
var viewer = new Viewer(document.getElementById('renderCanvas'));
viewer.load("url/To/Directory/With/SceneFiles", "sceneFile.gltf", function() {
// 3d is loaded and scene is ready to be manipulated
})
</script>
"url/To/Directory/With/SceneFiles" can be replaced with url to directory with scene files
"sceneFile.gltf" can be replaced with scene file name.
dds: image/vnd-ms.dd
gltf: application/json
bin: application/octet-stream
If you have further questions, feel free to contact us by email.