SDK Web Viewer migration (2026.1.0)

In SpinFire 2026.1.0, the SDK’s bundled SpinFire Web viewer has been rebuilt on top of the HOOPS Web Viewer ESM module (HOOPS Web Viewer 2026.2.0), produced by SpinFireWeb’s Angular workspace. This replaces the previously vendored set of JavaScript files.

If you embed SpinFire Web in your own application via the SDK, you must update your integration when upgrading to 2026.1.0. AngularJS-only consumers that use the Actify.SpinFireWeb module and the <ac-spinfireweb> directive only need to update their script/style includes — the directive contract is unchanged.

What changed

  • The SpinFireWeb/hoops/ directory no longer exists. All HOOPS viewer scripts are now bundled inside SpinFireWeb’s Angular build output (SpinFireWeb/main.js).

  • SpinFireWeb/js/SpinFireWeb.js, PreviewService.js, Utils.js, and ac3dPreview.js are now bundled inside main.js and must no longer be included individually.

  • The deprecated HWF format is no longer supported. Use SCS.

  • A new global, window.SFW_ENGINE_DIR, must be set before the viewer scripts are loaded so the WebAssembly engine can be located.

  • The HOOPS viewer JavaScript API has changed: viewer.getView() (method) is now viewer.view (property).

  • A new MIME mapping for *.wasm is required on the web server. The *.hwf MIME mapping can be removed.

  • The CSS, localization, fonts, and HTML template assets shipped with SpinFireWeb are unchanged.

Migration steps

  1. Set the engine directory and replace your viewer <script> includes.

    Replace any <script> includes for SpinFireWeb/hoops/*.js and SpinFireWeb/js/*.js with:

    <script>window.SFW_ENGINE_DIR = 'SpinFireWeb/assets';</script>
    <script src="SpinFireWeb/runtime.js"></script>
    <script src="SpinFireWeb/polyfills.js"></script>
    <script src="SpinFireWeb/main.js"></script>
    

    Adjust the path passed to SFW_ENGINE_DIR to match where SpinFireWeb/assets is served from your application. In an ASP.NET MVC view, for example:

    <script>window.SFW_ENGINE_DIR = '@Url.Content("~/SpinFireWeb/assets")';</script>
    
  2. Update the SpinFireWeb stylesheet bundle.

    Add SpinFireWeb/styles.css to your CSS bundle (the existing files under SpinFireWeb/css/ are still required):

    SpinFireWeb/styles.css
    SpinFireWeb/css/actify-glyphs.css
    SpinFireWeb/css/base.css
    SpinFireWeb/css/hoops.css
    SpinFireWeb/css/preview.css
    

    For an ASP.NET MVC BundleConfig.cs example, see ASP.NET MVC BundleConfig.cs example below.

  3. Update web server MIME mappings.

    Ensure *.scs, *.json and *.wasm are served. Remove any *.hwf mapping. *.scs is the model format, *.json is used for translation files, and *.wasm is the WebAssembly engine used by the viewer.

  4. Switch any HWF resources to SCS.

    Anywhere your application references format="HWF" (for example on the <ac-spinfireweb> directive), switch to format="SCS" and re-publish the model in SCS format.

  5. If you call the HOOPS viewer API directly, replace viewer.getView() with viewer.view (now a property, not a method).

The Actify.SpinFireWeb AngularJS module and the <ac-spinfireweb> directive continue to work as before — they are auto-registered when main.js loads.

ASP.NET MVC BundleConfig.cs example

The bundled SDK ASP.NET MVC5 example has been updated as follows. Use it as a reference for your own integration:

// SpinFireWeb's Angular build provides:
// - window.Communicator
// - Actify.SpinFireWeb AngularJS module
bundles.Add(new ScriptBundle("~/bundles/scripts/SpinFireWeb")
    .Include(
        "~/SpinFireWeb/jquery.minicolors/jquery.minicolors.min.js",
        "~/SpinFireWeb/KitKat.Common.Localization/module.js",
        "~/SpinFireWeb/KitKat.Common.Localization/Translation.js",
        "~/SpinFireWeb/runtime.js",
        "~/SpinFireWeb/polyfills.js",
        "~/SpinFireWeb/main.js"
    ));

// Bundled SpinFireWeb CSS stylesheets.
bundles.Add(new StyleBundle("~/bundles/styles/SpinFireWeb").Include(
    "~/SpinFireWeb/styles.css",
    "~/SpinFireWeb/css/actify-glyphs.css",
    "~/SpinFireWeb/css/base.css",
    "~/SpinFireWeb/css/hoops.css",
    "~/SpinFireWeb/css/preview.css"
));

In the layout view, set window.SFW_ENGINE_DIR before the bundle is rendered:

<!-- SpinFireWeb pre-requisites -->
<script>window.SFW_ENGINE_DIR = '@Url.Content("~/SpinFireWeb/assets")';</script>

Static website example

For a plain HTML hosting scenario, the minimum integration is:

<script>window.SFW_ENGINE_DIR = 'SpinFireWeb/assets';</script>
<script src="SpinFireWeb/runtime.js"></script>
<script src="SpinFireWeb/polyfills.js"></script>
<script src="SpinFireWeb/main.js"></script>

Make sure the site is served over HTTP/HTTPS (file:// URLs cannot load the viewer assets), and that the web server is configured to serve *.scs, *.json and *.wasm.

Reference

These changes are tracked in the SDK changelog (SDK/changelog.md) under the 2026.1.0 entry, and in the updated SDK examples shipped in the SDK package (ASP.NET MVC5 Example, WebSiteExample).