GithubHelp home page GithubHelp logo

spark3dp / print-web-sample Goto Github PK

View Code? Open in Web Editor NEW
4.0 16.0 6.0 278 KB

Demonstrates an end-to-end web-based 3D printing workflow using the Spark APIs

JavaScript 97.40% HTML 0.41% CSS 2.19%

print-web-sample's Introduction

print-web-sample

This sample web application demonstrates an end-to-end 3D printing workflow using the Spark APIs. It takes the user through the necessary steps required to import, heal, position, support, slice, export and print a 3D model.

Setup

It requires app credentials which you may obtain through the Spark Developer Portal.

You'll need Node.js and npm (node package manager) installed. This build has been tested with Node v0.12.7.

Next, you'll need bower (another package manager, for the front-end) and gulp (a task/build runner) installed globally. Depending on how your system is configured, the following commands might need to be run using sudo.

npm install -g bower
npm install -g gulp

Server

This sample requires authentication in order to perform API calls to Spark.

This Node.js server provides authentication. It is copied from the spark-js-sdk authentication_server sample.

This server implements the following Spark OAuth2.0 endpoints:

  • Access token callback endpoint - /access_token
  • Guest token callback endpoint - /guest_token
  • Refresh token callback endpoint - /refresh_token

####To run the server

$ cd server
$ npm install
$ node server.js

You now have a server running on your machine with the access, guest and refresh token endpoints.

Client

First copy the file src/scripts/config.example.js to src/scripts/config.js and enter your app key.

If you modified the server that comes with this repository, you have the option to change the AUTH_SERVER_URL_BASE to something different than localhost:3000.

Now, install the dependencies:

cd client
npm install

To build it execute gulp on the command-line (aliases are gulp build and gulp build:debug). To create a minified build use gulp dist or gulp build:release.

To debug the application, execute gulp serve on the command-line. This will open http://localhost.autodesk.com:8000 in your default browser. When you change source files, the application will be automatically rebuilt and reloaded in the browser.

To run a debug or release build after you've built it, you can do one of the following:

cd client/build
python -m SimpleHTTPServer

or

npm install -g http-server
cd client/build
http-server -p 8000 -d False

and go to http://localhost.autodesk.com:8000 in your browser.

The client uses ReactJS and RefluxJS. It uses Browserify to bundle dependencies. It uses Less and Bootstrap (including React-Bootstrap) for styling.

print-web-sample's People

Contributors

gregra81 avatar tgalon avatar

Stargazers

 avatar Villeneuve Figueiredo avatar Luke Bechtel avatar Galo Gimenez avatar

Watchers

Kai Backman avatar Tom Bielecki avatar Ronny Remesnik avatar  avatar James Cloos avatar  avatar  avatar Jason Lefley avatar Villeneuve Figueiredo avatar  avatar Forge developer avatar Jonathan Lowenstein avatar David Gartner avatar  avatar  avatar  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.