Posted By

Bryan Huang
Bryan Huang is a Developer Advocate with Autodesk Developer Network and is a certified AWS/Azure Solutions Architect/Developer and VMware Practitioner
12 Feb 2020
Personally I’ve always felt that we have yet to harness the full power of modern browsers, especially with all the potential made possible by the advent of H5 and modern APIs. With this mind I"ve come up with this set of browser side tools to address common concerns like saving the derivatives (especially SVF), downloading and uploading objects in chunks and caching the models for offline view.
All tools are 100% JAMStack/Serverless, which means they can be deployed as static web pages w/o a service backend (while still being able to leverage essential Serverless capabilities - we will delve more into this topic in my upcoming articles soon, as I’ve promised a few times already ;p)! This approach does not only save us the precious compute/traffic resources, but also provides extra security for confidential data in transmission such as your app credentials and access tokens - none of your data would go past our backend as the browser client communicates directly with the target services so you can even safely use the tools (the Requester) to request access tokens. Having said this it’s still recommended to generate access tokens with your own client/tool of choice for security reasons.
The Tools
Now let’s quickly go through what’s included in this, namely, “curated collection of Forge tools with boilerplate code to build SSR Forge apps”:
You can use the Request tool to easily fetch access tokens, call translation jobs and since the app has no backend and runs completely in your browser it's almost equivalent to using other popular tools (Postman, cURL etc) for direct interaction with the Forge APIs - note a new, separate window tab will open to receive access tokens due to security limitations, see screencast here for instructions:
You can either download the derivatives directly with the Derivative Downloader tools - see screencast here:
Or save the SVFs as they load on Viewer - see screencast here (requires Service Worker support):
P.S.: Did you know you can also download the derivatives with the magic of Node.js Forge CLI tools by Petr? At the time of writing my derivative tweaks are yet to be published so feel free to hit the Github repo of the tools here directly to take advantage of it - See screencast here:
Head up to the PWA tool to cache and load models for offline view (requires Service Worker support) - see screencast here:
And simply add the Forge Tools site to your home screen on a compatible device (for iOS, iPadOS, Android etc, requires Service Worker support) - see screencast here:
For larger objects we might get timed out if our request takes too long so use the Downloader tool to fetch them in chunks - see screencast here:
P.S.: Currently on certain browsers you might need to manually input the content length of the object (by making a HEAD request to get its length) and this should get resolved soon once I work out an issue in our backend with the Engineering team. And did you know you can also download in chunks with the magic of Node.js Forge CLI tools by Petr?
Similarly you can upload large objects in chunks with the Uploader tool - see screencast here:
P.S.: Did you know you can also upload in chunks with the magic of Node.js Forge CLI tools by Petr?
You can easily use the Requester, Uploader and Downloader tools for other web/cloud services like AWS, Azure, GCD or even your own since the request headers and body can be customized at will - see here for detailed instructions …
Limitations