MCPcopy Index your code
hub / github.com/NikLever/ThreeJS-PathEditor / newPath

Method newPath

index.js:440–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438 }
439
440 newPath(){
441 const names = this.store.getPathNames();
442 const name = this.store.nextPathName;
443 names.push( name );
444
445 this.nameCtrl = this.nameCtrl.options( names );
446 this.nameCtrl.onChange( ( value ) => {
447 this.loadPath( value );
448 });
449
450 this.config.yAxis = 0.5;
451 this.config.xAxis = 0.5;
452 this.config.xMax = 2;
453 this.config.snap = false;
454 this.config.name = name;
455 this.config.tool = 'select';
456 this.config.depth = 0.2;
457
458 this.gui.controllers.forEach( controller => controller.updateDisplay() );
459 //this.nameCtrl.updateDisplay();
460
461 this.activeNode = null;
462 this.nodes = [];
463
464 this.activePath = name;
465
466 this.render(true);
467 this.updatePathNamesGUI();
468 }
469
470 copyPath(){
471 const name = this.store.copy();

Callers 1

constructorMethod · 0.95

Calls 4

loadPathMethod · 0.95
renderMethod · 0.95
updatePathNamesGUIMethod · 0.95
getPathNamesMethod · 0.80

Tested by

no test coverage detected