Sfoglia il codice sorgente

Add hydrogen atoms and protons

tags/v0.1.0
Fen Dweller 6 anni fa
parent
commit
cf4aede869
1 ha cambiato i file con 32 aggiunte e 0 eliminazioni
  1. +32
    -0
      presets/objects.js

+ 32
- 0
presets/objects.js Vedi File

@@ -1,3 +1,12 @@
math.createUnit("dalton", {
definition: "1.66e-27 kg",
prefixes: "long"
});
math.createUnit("daltons", {
definition: "1.66e-27 kg",
prefixes: "long"
});

function makeObject(name, viewInfo) {
views = {};

@@ -303,6 +312,29 @@ function makeObjects() {
}
)
});

results.push({
name: "Molecular",
constructor: () => makeObject(
"Molecular",
{
hydrogen: {
height: math.unit(1.06e-10, "mm"),
mass: math.unit(1, "dalton"),
image: { source: "./media/objects/circle.svg" },
name: "Hydrogen atom",
rename: true
},
proton: {
height: math.unit(1e-15, "mm"),
mass: math.unit(1, "dalton"),
image: { source: "./media/objects/circle.svg" },
name: "Proton",
rename: true
},
}
)
});
results.sort((b1, b2) => {
e1 = b1.constructor();


Loading…
Annulla
Salva