-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
85 lines (75 loc) · 2.39 KB
/
Copy pathindex.html
File metadata and controls
85 lines (75 loc) · 2.39 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FFXIV Static Solver</title>
</head>
<body>
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
<p>
<h2>Definitions</h2>
<textarea spellcheck="false" id="definitions" rows=12 cols=80>
{
"ranged dps": ["BRD", "MCH", "DNC", "BLM", "RDM", "SMN"],
"melee dps": ["DRG", "MNK", "SAM", "NIN", "RPR"],
"tank": ["GNB", "PLD", "WAR", "DRK"],
"healer": ["WHM", "SCH", "AST", "SGE"],
"barrier healer": ["SCH", "SGE"],
"pure healer": ["WHM", "AST"],
"mage": ["BLM", "RDM", "SMN"],
"ranged physical": ["DNC", "BRD", "MCH"]
}
</textarea>
</p>
<p>
<h2>Desired Composition</h2>
<textarea spellcheck="false" id="desired_composition" rows=8 cols=80>
{
"ranged dps": 2,
"melee dps": 2,
"tank": 2,
"barrier healer": 1,
"pure healer": 1
}
</textarea>
</p>
<p>
<h2>Job Preferences</h2>
<textarea spellcheck="false" id="job_preferences" rows=12 cols=80>
{
"Yorvo Hawke": ["DRG", "GNB"],
"Squidgy Bunny": ["NIN", "SMN", "WHM", "PLD"],
"Renfleur Orinoux": ["DRK", "SAM"],
"Zelle Tamjin": ["PLD", "BLM"],
"Era Dere": ["WHM", "SCH", "DNC"],
"Brando Id": ["AST"],
"Alleriana Valyrian": ["RDM", "BLM"],
"Reye Fenris": ["BRD", "DRG"]
}
</textarea>
</p>
<button disabled="true" id="activate">Initializing worker...</button>
<pre id="results">
</pre>
<script src="./ffxiv-static-solver/client.js"></script>
<script>
const initialize = async () => {
const solve = await ffxiv_static_solver.initialize()
const dispatch = async () => {
const definitions = document.getElementById("definitions").value
const job_preferences = document.getElementById("job_preferences").value
const desired_composition = document.getElementById("desired_composition").value
const results = await solve(definitions, desired_composition, job_preferences)
document.getElementById("results").innerText = results
}
const button = document.getElementById("activate")
button.innerHTML = "Solve!"
button.disabled = false
button.addEventListener("click", dispatch, false)
}
document.addEventListener("DOMContentLoaded", () => {
initialize()
});
</script>
</body>
</html>