##################################################
Viewing and Interrogating 3D Models in the Browser
##################################################

Advanced Publishing can be used to view and interrogate 3D models in a browser using standard web technologies without the help of any plug-ins.

This section addresses how to use the StreamCache file format to view files in a browser.

.. _toc_monolithic_file:

Monolithic File
================================

Advanced Publishing can also be used to generate a monolithic HTML file. In this mode, the 3D web viewer, JavaScript libraries, 3D models, and CSS files are all embedded in one HTML file.

One of the primary advantages of the monolithic file is that it can be used to share data without having to use an HTTP server. The downside is that much of the data embedded in the HTML file has to be sent for each 3D model to share. Also, this mode does not leverage the cache mechanism from the server.

The Monolithic HTML export works like any export functionality:

.. code-block:: c

  // specify output file
  A3DExport sExport(OUT_FILE_HTML);
  sExport.m_sExportHtmlData.m_bIncludeMeasurementInformation = false;
  sExport.m_sExportHtmlData.m_pcHtmlTemplateName = IN_FILE_HTMLTEMPLATE;
  // conversion is performed
  iRet = sHoopsExchangeLoader.Convert(sImport, sExport);


``A3DRWParamsExportHtmlData`` can be used to include information that will be used with the measurement tool in the web viewer.

A default template is included in the Advanced Publishing package to export 3d model: *samples\\data\\html\\export3dtohtml_template.html*. It can be used and referenced by the  ``A3DRWParamsExportHtmlData`` structure.

You can use this HTML page to customize your own page - for instance, you can embed your own content, objects, logo, etc.

If you need more advanced customization of the 3D viewer component, you might consider using HOOPS Visualize Web. Please :doc:`contact us </contact_us>` to learn more about these products.

Another template file (*samples\\data\\html\\export3dtohtml_template_custom.html*) is given as an example of customization. If you wish to customize the 3D export to HTML, you could draw your inspiration from it.

