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