This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function RoomShaderExtension(viewer, options) { | |
| // base constructor | |
| Autodesk.Viewing.Extension.call(this, viewer, options); | |
| var _viewer = viewer; | |
| //check all rooms of specific floor in this model | |
| var _specificFloorName = '02 - Floor'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import adsk.core, adsk.fusion, adsk.cam, traceback | |
| import json | |
| # global set of event handlers to keep them referenced for the duration of the command | |
| handlers = [] | |
| _app = adsk.core.Application.cast(None) | |
| _ui = adsk.core.UserInterface.cast(None) | |
| num = 0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //compress source image blob | |
| //from http://www.programering.com/a/MDOxAzMwATY.html | |
| var jic = { | |
| compress: function(source_img_obj, quality, output_format){ | |
| var mime_type = "image/jpeg"; | |
| if(output_format!=undefined && output_format=="png"){ | |
| mime_type = "image/png"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div> | |
| <input type="file" id = "mobilephoto" accept="image/*" capture="camera" > | |
| <img class = "mythumbnail" id="outImage"/> | |
| </div> | |
| <div> | |
| <input type="button" id="btnSubmit" class="btn btn-primary" value="Submit" /> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ********************** | |
| // Extension for displaying temporary triangle face for the primitives of viewer face. | |
| // ********************** | |
| function SelectFaceExtension(viewer, options) { | |
| Autodesk.Viewing.Extension.call(this, viewer, options); | |
| // viewer object | |
| var _viewer = viewer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var socket = io('http://mydummy.com');; | |
| $(document).ready(function () { | |
| canvas = document.getElementById("canDrag"); | |
| canvas.addEventListener("touchstart", onTouchStart); | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var socket = io('http://mydummp.com'); | |
| //tick / untick to nable or diable gyro sensor monitor | |
| $('#EmmitGyroData').click(function (evt) { | |
| if($(this)[0].checked) | |
| { | |
| //Monitor Device Orientation | |
| if(window.DeviceOrientationEvent){ | |
| window.addEventListener("deviceorientation", orientation, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function screenshot_with_property_panel() { | |
| //get viewer object | |
| var _viewer = viewerApp.getCurrentViewer(); | |
| //get screenshot blob of the viewer container | |
| var ViewerBlobURL = _viewer.getScreenShot(); | |
| //get element of property panel | |
| var propertyPanel = document.getElementById('ViewerPropertyPanel'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| url = BASE_URL + 'viewingservice/v1/thumbnails' | |
| url = url + '/' + urn | |
| headers = { | |
| 'Authorization' : 'Bearer ' + access_token | |
| } | |
| print url | |
| print headers |