Bryan Huang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Meet the Forge Tools Hub - JAMStack/Serverless Tools to Download Derivatives (SVF) and View Models Offline (PWA) [![Build Status](https://flint-prodcms-forge.s3.amazonaws.com/prod/s3fs-public/2020-02/ezgif-7-126ea6987c7a.gif)](https://forge.autodesk.com/blog/meet-forge-tools-hub-jamstackserverless-tools-download-derivatives-svf-and-view-models-offline) 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 (espeically SVF), downloading and uploading objects in chunks and caching the models for offline view. # The Whereabouts - Production: https://forge-tools-hub.now.sh/ - Playground: https://codesandbox.io/s/github/dukedhx/forge-tools-hub/tree/master - Code: https://github.com/dukedhx/forge-tools-hub/ # The Gospels 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": - SVF Saver: Download SVF files for an extracted model from Forge with Service Worker capturing the derivatives as Viewer renders the model- Downloader: Download a derivative or any web resource in chunks (so the request won't get timed out) and in parallel for better efficiency- HTTP Requester: Effortlessly make any (browser supported) HTTP requests to execute simple tasks like access tokens, model translation etc - Derivative Downloader: Parse a derivative manifest for an extracted model on Forge and download selected derivatives (SVF or other supported formats) - PWA: Cache and view models offline - PWA ready - Uploader: Upload an object in paralleled chunks - requires the recipient service to explicitly expose forbidden headers if needed - Viewer Options Generator: Generate all possibile Viewer init/load options such as transform metrics easily ... - Tutorial/Playground: Curated collection of interactive Forge tutorials & playgrounds # Demo ## Requesting Forge Access Tokens and Translation Jobs etc. 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](https://www.screencast.com/t/bORg4D5G) for instructions: <!-- copy and paste. Modify height and width if desired. --> <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/609ca653-c4bc-4368-9f10-0d6932df2989/embed" height="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> ## Saving Derivatives (SVF etc.) You can either download the derivatives directly with the Derivative Downloader tools - see screencast [here](https://www.screencast.com/t/Ds2vZ1hh): <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/e66bb62b-1a8f-4c4d-8a7f-dad8cd82b3d7/embed" height="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> Or save the SVFs as they load on Viewer - see screencast [here](https://www.screencast.com/t/KkxfyKFCAim) (requires Service Worker support): <!-- copy and paste. Modify height and width if desired. --> <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/0f4431bd-a9c2-42a8-b7ff-241cad687e81/embed" hheight="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> P.S.: Did you know you can also download the derivatives with the magic of [Node.js Forge CLI tools](https://www.npmjs.com/package/forge-cli-utils) 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](https://github.com/petrbroz/forge-cli-utils) directly to take advantage of it! ## Viewing Models Offline Head up to the PWA tool to cache and load models for offline view (requires Service Worker support) - see screencast [here](https://www.screencast.com/t/7PtEevQgou): <!-- copy and paste. Modify height and width if desired. --> <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/598475d5-278e-46c6-a765-a8bda62b950d/embed" height="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 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](https://www.screencast.com/t/7PtEevQgou): <!-- copy and paste. Modify height and width if desired. --> <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/598475d5-278e-46c6-a765-a8bda62b950d/embed" height="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> ## Downloading Large Objects in Chunks 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](https://www.screencast.com/t/jw5FNX3ni): <!-- copy and paste. Modify height and width if desired. --> <iframe class="embeddedObject shadow resizable" name="embedded_content" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="https://www.screencast.com/users/dukedhx/folders/Default/media/a7c6e900-9ad5-4c0d-98f6-1a458a99cf7d/embed" height="auto" width="100%" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> P.S.: Currently we'd 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 So Much More! 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](https://hackmd.io/@RXhmeebQS7OsPaoAEdnP5Q/SkbznYWQ8) for detailed instructions ... # Limitations - Currently both the Uploader and Downloader tools are impacted by the lack of access to the "Content-Length" header, which brings us back to the long standing showstopper when it comes to uploading objects directly from browser clients - I am working with our Engineering to resolve this and I will come back with updates soon. - Degraded UX experience is to be expected with small form devices like phones - will address this when my schedule decompress hopefully soon ;p. - Compatibility of PWA and SVF Saver tools is limited to modern browsers with full support for Service Worker, Cache and LocalStorage APIs.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully