You are here

Using “3D Viewer URL” publish option

This article describes how to use the “3D Viewer URL” publish option to push the files of 3D Viewer components to a web server.

The article is applicable to RapidAuthor version 12 and above.

 

Procedure

  1. Publish the demo project of RapidCatalog or RapidManual to any empty folder with the default publish options (“Use Browser Plugins” = “No”, “3D Viewer URL” = <empty>);
  2. When using custom specifications, publish one project for each custom specification to the same folder with the options specified as “Use Browser Plugins” = “No”, “3D Viewer URL” = <empty>;
  3. Place the content of the “res” subfolder (Publication folder) to a web server for public access. For example, http://shared.customer.com/res.
  4. Apply the recommended web server settings (CORS and MIME types);
  5. When further working with RapidAuthor, set the “3D Viewer URL” publish option to “3D Viewer URL” = “http://shared.customer.com/res/”.

 

NOTE 1. The path specified in the “3D Viewer URL” publish option should end with a forward slash “/”.

NOTE 2.  The “3D Viewer URL” publish option is ignored in the RapidAuthor preview mode.

 

Web server setting
 

CORS Configuration

It is required to configure the Cross-Origin Resource Sharing (CORS) for the files *.js, *.js.mem, *.json and *.data from http://shared.customer.com/res.

 

.htaccess

<IfModule mod_headers.c>

    <FilesMatch "\.(json|data|js|js\.mem)$">

           Header set Access-Control-Allow-Origin "*"

    </FilesMatch>

</IfModule>

 

web.config

<configuration>

    <system.webServer>

        <httpProtocol>

            <customHeaders>

                <add name="Access-Control-Allow-Origin" value="*" />

            </customHeaders>

        </httpProtocol>

    </system.webServer>

</configuration>

 

MIME Types Configuration

The MIME type application/octet-stream should be used for the files *.js.mem and *.data.

If the content is used as cortona3d multimedia bundle, the MIME type should be additionally configured for the *.cortona3d files.

 

mime.types

application/octet-stream            .mem

application/octet-stream            .data

application/x-zip-compressed        .cortona3d

 

web.config

<configuration>

    <system.webServer>

        <staticContent>

            <mimeMap fileExtension=".mem" mimeType="application/octet-stream" />

            <mimeMap fileExtension=".cortona3d" mimeType="application/x-zip-compressed" />

            <mimeMap fileExtension=".data" mimeType="application/octet-stream" />

        </staticContent>

    </system.webServer>

</configuration>