Introducing the Enhanced Export3DToHtml Sample for HOOPS Publish

Introducing the Enhanced Export3DToHtml Sample for HOOPS Publish

I’d like to share an enhanced version of the Export3DToHtml sample that extends the capabilities of the standard example provided with the HOOPS Publish SDK. This project aims to offer a more flexible and customizable base for generating standalone, monolithic HTML 3D viewers.

GitHub Repository:


What’s New?

This sample builds upon the original by introducing:

  • Toggle controls for UI components: model tree, toolbar, axis triad, and navigation cube
  • Injection points for custom JavaScript, UI elements, and CSS styles

Side-by-side comparison:

Original Sample Enhanced Version
Sample HTML viewer Modular, toggleable UI and custom extensibility
Static layout Fragments-based HTML template assembly

Sample HTML viewer

Enhanced Version

Template Architecture

At the core is a new HtmlTemplateBuilder class, which assembles the monolithic HTML by combining fragment files located in the template/ folder. These are modular pieces of the HTML (scripts, styles, UI blocks), and users can selectively enable features using bitwise option flags (e.g., 0011111).

Each bit controls a specific UI module or extension point—such as custom JavaScript callbacks that run before the viewer initializes.

Example: 0011111 disables standard UI except the Axis Triad and Nav Cube but injects custom styles, scripts, and body UI.


Use Case Highlight

A key target for this project is exporting animated content built with the Animation Creator. With this enhanced sample, the animation logic can be embedded directly into a distributable HTML file—perfect for sharing:

  • Assembly or maintenance procedures
  • Simulation sequences
  • Dynamic product presentations

Live Demo (Animation Creator Export Example):

This live demo showcases how animation results can be exported and viewed in a standalone, interactive monolithic HTML file using the enhanced Export3DToHtml pipeline.

GitHub Repository:
https://github.com/toshi-bata/animation_creator

2 Likes