three-gcode-loader

1.0.7 • Public • Published

three-gcode-loader

THREE.GCodeLoader from the official repo examples repackaged as a node module, with request header and credentials support

Install

npm i --save three

npm i --save three-gcode-loader

Usage

Returns an array layer vertices and an array of indices which indicate layer boundaries.

 
import * as THREE from 'three';
import GCodeLoader from 'three-gcode-loader';
 
var loader = new GCodeLoader()
 
loader.setRequestHeader({ Authorization: 'Bearer token' });
loader.setWithCredentials(true);
 
loader.load('https://secured-api/path/to/file.gcode', function (data) {
  var layers = data[0];
  var layerIndices = data[1];
});
 

Package Sidebar

Install

npm i three-gcode-loader

Weekly Downloads

4

Version

1.0.7

License

MIT

Unpacked Size

7.63 kB

Total Files

5

Last publish

Collaborators

  • nckpnny