From 1d31bd0b3e2e6d31c7c6107329f81852ae426b4b Mon Sep 17 00:00:00 2001 From: hppeng Date: Fri, 29 Jul 2022 10:37:09 -0700 Subject: [PATCH] Add some comments to top of builder .js files --- js/build_utils.js | 4 ++++ js/builder.js | 3 +++ js/builder_graph.js | 4 ++++ js/display.js | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/js/build_utils.js b/js/build_utils.js index 48103ff..7cb86db 100644 --- a/js/build_utils.js +++ b/js/build_utils.js @@ -1,3 +1,7 @@ +/** + * File containing utility functions that are useful for the builder page. + */ + /*Turns the input amount of skill points into a float precision percentage. * @param skp - the integer skillpoint count to be converted */ diff --git a/js/builder.js b/js/builder.js index e24b31a..e0ca120 100644 --- a/js/builder.js +++ b/js/builder.js @@ -1,3 +1,6 @@ +/** + * File containing utility functions relevant to the builder page, as well as the setup code (at the very bottom). + */ function populateBuildList() { const buildList = document.getElementById("build-choice"); diff --git a/js/builder_graph.js b/js/builder_graph.js index 22b0a60..fe18f2a 100644 --- a/js/builder_graph.js +++ b/js/builder_graph.js @@ -1,3 +1,7 @@ +/** + * File containing compute graph structure of the builder page. + */ + let armor_powder_node = new (class extends ComputeNode { constructor() { super('builder-armor-powder-input'); } diff --git a/js/display.js b/js/display.js index 6314589..d1576e0 100644 --- a/js/display.js +++ b/js/display.js @@ -1,3 +1,8 @@ +/** + * File containing generic display code, ex. for displaying items and spell damage. + * TODO: split this file into separate parts for each "component". + */ + const itemBGPositions = {"bow": "0 0", "spear": "9.090909090909088% 0", "wand": "18.181818181818183% 0", "dagger": "27.27272727272727% 0", "relik": "36.36363636363637% 0", "helmet": "45.45454545454546% 0", "chestplate": "54.54545454545454% 0", "leggings": "63.63636363636363% 0", "boots": "72.72727272727272% 0", "ring": "81.81818181818181% 0", "bracelet": "90.90909090909092% 0", "necklace": "100% 0",