Capítulo 168 de 859
A loader for the GCode format.
GCode files are usually used for 3D printing or CNC applications.
const loader = new GCodeLoader();
const object = await loader.loadAsync( 'models/gcode/benchy.gcode' );
scene.add( object );
Constructor
| Signature |
|---|
new GCodeLoader( manager : LoadingManager ) |
Properties
| Property | Description |
|---|---|
.splitLayer : boolean | Whether to split layers or not. |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) | Starts loading from the given URL and passes the loaded GCode asset to the onLoad() callback. |
.parse( data : string ) : Group | Parses the given GCode data and returns a group with lines. |