$ uname -r
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 IMAGE_MIME_REGEX = /^image\/(p?jpeg|gif|png)$/i; | |
| var loadImage = function (file) { | |
| var reader = new FileReader(); | |
| reader.onload = function(e){ | |
| var img = document.createElement('img'); | |
| img.src = e.target.result; | |
| var range = window.getSelection().getRangeAt(0); | |
| range.deleteContents(); |
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
| Convert code from using array syntax to object property syntax. | |
| Find: | |
| \$(\w+)\['([^']+)'\] | |
| Replace: | |
| \$$1->$2 | |
| Modified from https://edmondscommerce.github.io/php/phpstorm-regex-convert-array-to-object-syntax.html |
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> | |
| <meta charset="utf-8" /> | |
| <title>STL File Viewer</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js" | |
| ></script> | |
| <script src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js" | |
| ></script> | |
| <script src="loader.js"></script> |