On Github jaimerosales / responsive-web-meetup
Jaime Rosales
Developer Evangelist at Autodesk
@AfroJmePhotoshop/Illustrator for visual designers
AutoCAD for interior designers
Rhino/Solidworks/Fusion for industrial designer
Revit for architects
The designer makes up a design
they send it over to their client
client needs to download a software to view the file
Universal formats out there
JavaScript API that lets browsers render 3D
It's not a W3C standard...
but every browser supports it
It's a difficult technology to master
Upload your CAD file
REST API
View on a browser
JavaScript API
It's free!
Would you rather see this on your e-commerce website..
or this?
ipt, neu, stla, stl, xlsx, jt, jpg, skp, prt, dwf, xls, png, sldasm, step, dwg, zip, nwc, model, sim, stp, ste, f3d, pdf, iges, dwt, catproduct, csv, igs, sldprt, cgr, 3dm, sab, obj, pptx, cam360, jpeg, bmp, gbxml, exp, ppt, doc, wire, ige, rcp, txt, dae, x_b, 3ds, rtf, rvt, g, sim360, iam, asm, dlv3, x_t, pps, session, xas, xpr, docx, catpart, stlb, tiff, nwd, sat, fbx, smb, smt, ifc, dwfx, tif
developer.autodesk.com
Tweet me @AfroJme
Reference the following JavaScript Libraries:
<link rel="stylesheet" href="https://viewing.api.autodesk.com/viewingservice/v1/viewers/style.css" type="text/css"> <script src="https://viewing.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js"></script>
Create a div with id "viewer"
<div id="viewer"></div>
Initialize with JavaScript
function initialize() { var options = { 'document' : 'urn:(Your own URN)', 'env':'AutodeskProduction', 'getAccessToken': getToken, 'refreshToken': getToken, }; var viewerElement = document. getElementById('viewer'); var viewer = new Autodesk. Viewing.Viewer3D(viewerElement, {}); Autodesk.Viewing.Initializer(options,function() { viewer.initialize(); loadDocument(viewer, options.document); }); }
function getToken() { return "GX6OONHlQ9qoVaCSmBqJvqPFUT5i"; }
You should write your own token service.
function loadDocument(viewer, documentId) { // Find the first 3d geometry and load that. Autodesk.Viewing.Document.load(documentId, function(doc) { var geometryItems = []; geometryItems = Autodesk.Viewing.Document. getSubItemsWithProperties(doc.getRootItem(), { 'type' : 'geometry', 'role' : '3d' }, true); if (geometryItems.length > 0) { viewer.load(doc. getViewablePath(geometryItems[0])); } }, function(errorMsg) {// onErrorCallback alert("Load Error: " + errorMsg); }); }