@@ -6,7 +6,7 @@ import Stats from 'three/examples/jsm/libs/stats.module.js';
66
77import { DevGUI , DevModeOptions } from './dev-gui' ;
88import { Interpreter } from './interpreter' ;
9- import { Machine } from './machine ' ;
9+ import { Job } from './job ' ;
1010
1111import {
1212 AmbientLight ,
@@ -97,7 +97,7 @@ export class WebGLPreview {
9797 private animationFrameId ?: number ;
9898 private _geometries : Record < number , BufferGeometry [ ] > = { } ;
9999 interpreter : Interpreter = new Interpreter ( ) ;
100- virtualMachine : Machine = new Machine ( ) ;
100+ job : Job = new Job ( ) ;
101101
102102 // colors
103103 private _backgroundColor = new Color ( 0xe0e0e0 ) ;
@@ -237,7 +237,7 @@ export class WebGLPreview {
237237
238238 processGCode ( gcode : string | string [ ] ) : void {
239239 const { commands } = this . parser . parseGCode ( gcode ) ;
240- this . interpreter . execute ( commands , this . virtualMachine ) ;
240+ this . interpreter . execute ( commands , this . job ) ;
241241 this . render ( ) ;
242242 }
243243
@@ -313,7 +313,7 @@ export class WebGLPreview {
313313 clear ( ) : void {
314314 this . resetState ( ) ;
315315 this . parser = new Parser ( ) ;
316- this . virtualMachine = new Machine ( ) ;
316+ this . job = new Job ( ) ;
317317 }
318318
319319 // reset processing state
@@ -353,7 +353,7 @@ export class WebGLPreview {
353353 const material = new LineBasicMaterial ( { color : this . _travelColor , linewidth : this . lineWidth } ) ;
354354 this . disposables . push ( material ) ;
355355
356- this . virtualMachine . travels ( ) . forEach ( ( path ) => {
356+ this . job . travels ( ) . forEach ( ( path ) => {
357357 const geometry = path . line ( ) ;
358358 const line = new LineSegments ( geometry , material ) ;
359359 this . group ?. add ( line ) ;
@@ -374,7 +374,7 @@ export class WebGLPreview {
374374 } ) ;
375375 }
376376
377- this . virtualMachine . extrusions ( ) . forEach ( ( path ) => {
377+ this . job . extrusions ( ) . forEach ( ( path ) => {
378378 const geometry = path . line ( ) ;
379379 const line = new LineSegments ( geometry , lineMaterials [ path . tool ] ) ;
380380 this . group ?. add ( line ) ;
@@ -386,7 +386,7 @@ export class WebGLPreview {
386386 this . _geometries = { } ;
387387 if ( Object . keys ( this . _geometries ) . length === 0 && this . renderTubes ) {
388388 let color : number ;
389- this . virtualMachine . extrusions ( ) . forEach ( ( path ) => {
389+ this . job . extrusions ( ) . forEach ( ( path ) => {
390390 if ( Array . isArray ( this . _extrusionColor ) ) {
391391 color = this . _extrusionColor [ path . tool ] . getHex ( ) ;
392392 } else {
0 commit comments