v2.7.0
Changes:
- (experimental) Add drag 'n drop support
- (experimental) Stream support (for both Fetch and drag n drop )
- Naming & cleanup:
- preview.parser.parseGCode iso now deprecated parseGcode
- The
targetId
param is deprecated in favor ofcanvas
- the deprecated versions remain working for now
- DEMO:
- Store build volume dimensions in localStorage
- Make loading of large files faster by increasing the chunk size
- Added examples using Fetch API
- Updated to Three.js r144
- three-orbitcontrols or OrbitControls.js no longer necessary
The deprecated module three-orbitcontrols was removed as a dependency in favor of the official jsm version inside the three package. The official jsm module of OrbitControls is now bundled with gcode-preview. This was necessary or order to update to the latest threejs. It also ensures compatibility between threejs/OrbitControls going forward and reduces complexity in the build process.
The dist version of gcode-preview will be slightly larger due to OrbitControls being bundled with it. But the resulting size of any application using gcode-preview should be about the same because OrbitControls still only exists once in the final application bundle.
This also means that the UDM version that can be used in the browser no longer requires OrbitControl.js to be included separately. To update existing html pages that include gcode-preview via a script tag, you can remove the script tag that includes OrbitControls.js
<script src="three.min.js"></script>
<script src="OrbitControls.js"></script>
<script src="dist/gcode-preview.js"></script>