Move all builder js files into their own folder (#208)

* Move all builder js files into their own folder

* Minify index.html

* Fix comment in atree constants readme

Co-authored-by: hppeng <hppeng>
This commit is contained in:
hppeng-wynn 2022-08-15 22:32:49 -07:00 committed by GitHub
parent 86b2a62b9a
commit 974b9ee0d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 27 additions and 1028 deletions

View file

@ -1305,7 +1305,6 @@
<script type="text/javascript" src="../js/powders.js"></script>
<script type="text/javascript" src="../js/skillpoints.js"></script>
<script type="text/javascript" src="../js/damage_calc.js"></script>
<script type="text/javascript" src="../js/atree_constants_min.js"></script>
<script type="text/javascript" src="../js/display_constants.js"></script>
<script type="text/javascript" src="../js/display.js"></script>
<script type="text/javascript" src="../js/load.js"></script>
@ -1313,13 +1312,14 @@
<script type="text/javascript" src="../js/load_tome.js"></script>
<script type="text/javascript" src="../js/custom.js"></script>
<script type="text/javascript" src="../js/craft.js"></script>
<script type="text/javascript" src="../js/build.js"></script>
<script type="text/javascript" src="../js/build_constants.js"></script>
<script type="text/javascript" src="../js/build_encode_decode.js"></script>
<script type="text/javascript" src="../js/atree.js"></script>
<script type="text/javascript" src="../js/builder.js"></script>
<script type="text/javascript" src="../js/builder_graph.js"></script>
<script type="text/javascript" src="../js/optimize.js"></script>
<script type="text/javascript" src="../js/builder/atree_constants_min.js"></script>
<script type="text/javascript" src="../js/builder/build.js"></script>
<script type="text/javascript" src="../js/builder/builder_constants.js"></script>
<script type="text/javascript" src="../js/builder/build_encode_decode.js"></script>
<script type="text/javascript" src="../js/builder/atree.js"></script>
<script type="text/javascript" src="../js/builder/builder.js"></script>
<script type="text/javascript" src="../js/builder/builder_graph.js"></script>
<!--script type="text/javascript" src="../js/builder/optimize.js"></script-->
<div id="graph_body" style="max-width: 100%; height: 100vh">
<button id="saveButton">JANKY Export SVG</button>

File diff suppressed because one or more lines are too long

View file

@ -1303,7 +1303,6 @@
<script type="text/javascript" src="../js/powders.js"></script>
<script type="text/javascript" src="../js/skillpoints.js"></script>
<script type="text/javascript" src="../js/damage_calc.js"></script>
<script type="text/javascript" src="../js/atree_constants_min.js"></script>
<script type="text/javascript" src="../js/display_constants.js"></script>
<script type="text/javascript" src="../js/display.js"></script>
<script type="text/javascript" src="../js/load.js"></script>
@ -1311,13 +1310,13 @@
<script type="text/javascript" src="../js/load_tome.js"></script>
<script type="text/javascript" src="../js/custom.js"></script>
<script type="text/javascript" src="../js/craft.js"></script>
<script type="text/javascript" src="../js/build.js"></script>
<script type="text/javascript" src="../js/build_constants.js"></script>
<script type="text/javascript" src="../js/build_encode_decode.js"></script>
<script type="text/javascript" src="../js/atree.js"></script>
<script type="text/javascript" src="../js/builder.js"></script>
<script type="text/javascript" src="../js/builder_graph.js"></script>
<script type="text/javascript" src="../js/optimize.js"></script>
<script type="text/javascript" src="../js/builder/atree_constants_min.js"></script>
<script type="text/javascript" src="../js/builder/build.js"></script>
<script type="text/javascript" src="../js/builder/builder_constants.js"></script>
<script type="text/javascript" src="../js/builder/build_encode_decode.js"></script>
<script type="text/javascript" src="../js/builder/atree.js"></script>
<script type="text/javascript" src="../js/builder/builder.js"></script>
<script type="text/javascript" src="../js/builder/builder_graph.js"></script>
<!--script type="text/javascript" src="../js/builder/optimize.js"></script-->
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,6 +0,0 @@
How to convert:
0. start in the `js` directory
1. edit `atree_constants.js`
2. run `python3 ../py_script/atree-generateID.py
3. check that the site still works

View file

@ -0,0 +1,6 @@
How to convert:
0. start in the `builder/js` directory
1. edit `atree_constants.js`
2. run `python3 ../../py_script/atree-generateID.py
3. check that the site still works

View file

@ -1078,7 +1078,7 @@ function builder_graph_init() {
// Phase 3/3: Set up atree stuff.
let class_node = new PlayerClassNode('builder-class').link_to(build_node);
// These two are defined in `atree.js`
// These two are defined in `builder/atree.js`
atree_node.link_to(class_node, 'player-class');
atree_merge.link_to(class_node, 'player-class');
pre_scale_agg_node.link_to(atree_raw_stats, 'atree-raw-stats');

View file

@ -188,7 +188,7 @@ function getCustomFromHash(hash) {
/** An object representing a Custom Item. Mostly for vanity purposes.
* @dep Requires the use of nonRolledIDs and rolledIDs from display_constants.js.
* @dep Requires the use of attackSpeeds from build.js.
* @dep Requires the use of attackSpeeds from `builder/build.js`.
*/
class Custom {
/**

View file

@ -72,7 +72,8 @@ function displayBuildStats(parent_id,build,command_group,stats){
let active_elem;
let elemental_format = false;
//TODO this is put here for readability, consolidate with definition in build.js
//TODO this is put here for readability, consolidate with definition in `builder/build.js`
// TODO amend: uuhhhhh these two constants have diverged too far...
let staticIDs = ["hp", "eDef", "tDef", "wDef", "fDef", "aDef"];
for (const command of display_commands) {