Code Monkey home page Code Monkey logo

models.autodesk.io's Introduction

models.autodesk.io sample

Node.js Platforms License

Forge API: oAuth2 Data-Management OSS Model-Derivative Viewer

Note: For hosting this sample, you do not need any credentials. But anyone using the sample will need valid credentials for the upload /translation process. Visit the Forge WEB site for instructions to get on-board.

Live demo at

https://models.autodesk.io/

Thumbnail

thumbnail

Description

This sample exercises and demonstrates the Autodesk Forge API authorization, and translation process mentioned in the Quick Start guide. It provides you a quick way to get file ready for viewing on your own account without programming.

Dependencies

This sample is dependent of Node.js and few Node.js extensions which would update/install automatically via 'npm'.

  1. Node.js - built on Chrome's JavaScript runtime for easily building fast, scalable network applications. You can get Node.js from here

This sample is also dependent on the client side on couple of javascript library which are installed along this sample:

  1. filedrop.js - A Self-contained cross-browser HTML5, legacy, AJAX, drag & drop JavaScript file upload, available here.

  2. flipclock.js - A flip clock javascript library, available here.

  3. zeroclipboard.js - A library which provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface, available here.

Setup/Usage Instructions

The sample was created using Node.js and javascript.

Deploy on Heroku

Deploy

Setup

  1. Download and install Node.js (that will install npm as well)
  2. Download this repo anywhere you want (the server will need to write files, so make sure you install in a location where you have write permission, at least the 'uploads' folder)
  3. Execute 'npm install', this command will download and install the required node modules automatically for you.
    npm install
    
  4. You are done for the setup, launch the node server using the command '[sudo] node start.js'. sudo is required only on OSX and Linux.
    • Windows
    [set PORT=<port>]
    node start.js
    
    • OSX/Linux
    sudo [PORT=<port>] node start.js
    

    Note: the port argument can be omitted and default to port 3000. If port 3000 is already in use by another application, you can use any other free port. But in the next section you would need to specify the port to use, i.e. http://localhost[:port]/

Use of the sample

Translating files

  1. Start your favorite browser supporting HTML5 and WEBGL and browse to http://localhost:3000/.
    Note: In case you use a different port above do not forget to include it in the URL. I.e. http://localhost:8000/.
  2. Drag'n Drop your files into the 'Drop area' or browse for individual files, That's it.
    Or choose one of the proposed sample from the Dropbox and click on teh the 'Translate this one for me'.
  3. After the translation completed successfully, you can copy the encoded urn string that you can use to view the results, in a html page which supports the Autodesk viewer.
  4. You are done with translation.

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Cyrille Fauvel
Forge Partner Development
http://developer.autodesk.com/
http://around-the-corner.typepad.com

models.autodesk.io's People

Contributors

cyrillef avatar anilpai avatar augustogoncalves avatar autodesk-adn avatar jaylimboonkiat avatar kimekeunkyung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.