mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-16 19:17:57 +01:00
update config handling
This commit is contained in:
parent
ab3b241fcb
commit
1b6a5966ca
@ -1,9 +1,10 @@
|
||||
import THREE from 'three.js';
|
||||
import * as SLICER from 'src/index';
|
||||
|
||||
const settings = new SLICER.Settings();
|
||||
settings.updateConfig(SLICER.printerSettings['ultimaker2go']);
|
||||
settings.updateConfig(SLICER.userSettings);
|
||||
const settings = new SLICER.Settings({
|
||||
...SLICER.printerSettings['ultimaker2go'],
|
||||
...SLICER.userSettings
|
||||
});
|
||||
|
||||
const geometry = new THREE.TorusGeometry(20, 10, 30, 30);
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
export default class {
|
||||
constructor() {
|
||||
this.config = {};
|
||||
constructor(config = {}) {
|
||||
this.config = config;
|
||||
}
|
||||
updateConfig(config) {
|
||||
for (const i in config) {
|
||||
this.config[i] = config[i];
|
||||
}
|
||||
this.config = { ...this.config, ...config };
|
||||
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user