forked from RnD/rotatingMachine
bug fixes
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
startup: { value: 0 },
|
||||
warmup: { value: 0 },
|
||||
shutdown: { value: 0 },
|
||||
cooldown: { value: 0 },
|
||||
machineCurve : { value: {}},
|
||||
|
||||
//define asset properties
|
||||
@@ -77,10 +78,13 @@
|
||||
if (window.EVOLV?.nodes?.rotatingMachine?.positionMenu?.saveEditor) {
|
||||
window.EVOLV.nodes.rotatingMachine.positionMenu.saveEditor(this);
|
||||
}
|
||||
// …plus any custom saves for speed, startup, etc.
|
||||
["speed", "startup", "warmup", "shutdown", "cooldown"].forEach(
|
||||
(field) => (node[field] = parseFloat(document.getElementById(`node-input-${field}`).value) || 0)
|
||||
);
|
||||
|
||||
["speed", "startup", "warmup", "shutdown", "cooldown"].forEach((field) => {
|
||||
const element = document.getElementById(`node-input-${field}`);
|
||||
const value = parseFloat(element?.value) || 0;
|
||||
console.log(`----------------> Saving ${field}: ${value}`);
|
||||
node[field] = value;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user