-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreset-models.js
94 lines (76 loc) · 1.7 KB
/
preset-models.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
var presetModels = {
"Social Trinity #1":
`object God
object Father
object Son
object HolySpirit
relationType object hasComponent object
God hasComponent Father
God hasComponent Son
God hasComponent HolySpirit
`,
"Social Trinity #2":
`property God
object Father
object Son
object HolySpirit
Father hasProperty God
Son hasProperty God
HolySpirit hasProperty God
`,
"Naive Modalism":
`object God
alias Father
alias Son
alias HolySpirit
property Fatherness
property Sonness
property HolySpiritness
God hasAlias Father
God hasAlias Son
God hasAlias HolySpirit
God hasProperty Fatherness
God hasProperty Sonness
God hasProperty HolySpiritness
`,
"Nicene Creed":
`# I believe in one God, Father Almighty
object God
alias Father
God hasAlias Father
# And in one Lord Jesus Christ
object JesusChrist
property Lord
alias Son
JesusChrist hasAlias Son
JesusChrist hasProperty Lord
# ...the only-begotten Son of God
relationType object begets object
God begets JesusChrist
# ...true God of true God
property TrueGod
God hasProperty TrueGod
JesusChrist hasProperty TrueGod
# ...one essence with the Father
property Ousia
Father hasProperty Ousia
JesusChrist hasProperty Ousia
`,
"Empty":
``,
};
var sel = document.getElementById('models');
for (const [key, value] of Object.entries(presetModels)) {
var opt = document.createElement('option');
opt.appendChild( document.createTextNode(key) );
opt.value = value;
sel.appendChild(opt);
}
function applySelection() {
editor.getDoc().setValue(sel.options[sel.selectedIndex].value);
updateGraph();
}
sel.addEventListener("change", function(){
applySelection();
});
applySelection();