Explorar o código

commenting and temporarily removing info on page for blind review paper

laira %!s(int64=3) %!d(string=hai) anos
pai
achega
e363b3d4e6
Modificáronse 3 ficheiros con 26 adicións e 9 borrados
  1. 2 2
      index.html
  2. 8 4
      js/gameMechanics.js
  3. 16 3
      js/globals.js

+ 2 - 2
index.html

@@ -9,7 +9,7 @@
   <meta name="description" content="Educational game for teaching fractions" />
   <meta name="keywords" content="ifractions, fraction, game, private data" />
   <link rel="shortcut icon" href="assets/img/scene/flag.png">
-  <title> iFractions by LInE</title>
+  <title> iFractions</title>
   <link rel="stylesheet" href="css/bootstrap.min.css">
 
   <style>
@@ -110,7 +110,7 @@
 
     <div class="panel panel-primary">
 
-      <div class="panel-heading">iFractions game :: by LInE</div>
+      <div class="panel-heading">iFractions game</div>
 
       <div class="panel-body">
 

+ 8 - 4
js/gameMechanics.js

@@ -115,7 +115,8 @@ const game = {
    */
   load: {
     /**
-     * Loads language dictionary into the object game.lang using Fetch API.
+     * Loads language file to cache using Fetch API and 
+     * saves its content as dictionary on game.lang.
      * 
      * @param {string} url url for the selected language
      */
@@ -141,7 +142,8 @@ const game = {
         });
     },
     /**
-     * Caches audio files using Fetch API.
+     * Loads audio files to cache using Fetch API
+     * saves references in game.audio.
      * 
      * @param {string[]} urls audio urls for the current state
      */
@@ -165,7 +167,8 @@ const game = {
       }
     },
     /**
-     * Caches image files using HTMLImageElement.
+     * Loads image files to cache using HTMLImageElement
+     * saves references in game.image.
      * 
      * @param {string[]} urls image urls for the current state
      */
@@ -188,7 +191,8 @@ const game = {
       }
     },
     /**
-     * Caches spritesheets using HTMLImageElement.
+     * Loads image files that contains spritesheets to cache using HTMLImageElement
+     * saves references in game.sprite.
      * 
      * @param {string[]} urls spritesheet urls for the current state
      */

+ 16 - 3
js/globals.js

@@ -287,13 +287,26 @@ const textStyles = {
 };
 
 /**
- * List of URL for all media in the game.<br>
- * Divided: 1st by the state that loads the media / 2nd by the media type.
+ * List of URL for all media in the game
+ * divided 1st by the 'state' that loads the media 
+ * and 2nd by the 'media type' for that state.
+ * 
  * @type {object}
  */
 const url = {
-  //src: 'assets/img/', // Base directory for media
+  /** 
+   * url.<state> 
+   * where <state> can be: boot, menu, squareOne, squareTwo, circleOne. 
+  */
   boot: {
+    /**
+     * url.<state>.<media type> 
+     * where <media type> can be: image, sprite, audio <br><br>
+     * 
+     * image: [ [name, source], ... ] <br>
+     * sprite: [ [name, source, number of frames], ... ] <br>
+     * audio: [ [name, [source, alternative source] ], ... ]
+     */
     image: [
       // Scene
       ['bgimage', medSrc + 'scene/bg.jpg'],