1. 28 Aug, 2017 2 commits
    • Fixed some bugs and updated dependencies. · 8f90ebf4
      Stefan Glaser authored
      * Adapted the joint order of the nao model to match the current replay specification. Adapted fallback parser logic to rearrange the joint angles in old 3D replay files.
      * Added foul flags to 3D environment.
      * Fixed a bug in the assignment of new parameters in world class.
      * Adapted to threejs updates (MultiMaterial is now a simple array and XHRLoader is now called FileLoader).
    • Refactored replay parser and added player types. · 24fe7821
      Stefan Glaser authored
      * Adapted replay parser to new preliminary replay file format.
      * Replaced string based robot model specifications in agent description with player type parameter maps. The different robot models in 3D are now part of the player type parameter maps. Similar to 2D, the different robot models of the connected agents are now indexed as player types.
      * Added ParameterMap wrapper class for accessing typed parameter values of arbitrary json objects.
      * Adapted world loader and robot model factories to handle the new player types instead of model names.
      * Forwarded environment and player parameters to robot model factories on model creation. In 2D simulation, the maximum stamina is now read from the environment parameters, fixing the issue that stamina color interpolation war wrong for some older 2D games.
      * Refactored domain specifications for 2D and 3D. Added player type parameter specifications to 2D and 3D domain. Added environment parameters for 3D. Moved creation of default parameter and types to respective domain specification.
      * Refactored game log class. Removed most constructor arguments and create a default set of teams, environment/player parameter and player types.
      * Moved all parsing relevant information into a LogParserStorage class. This simplifies parsing and keeps the models clean.
      * Replaced ReplayDataIterator and ULGDataIterator with general DataIterator class. Refactored iterator logic in new DataIterator class to use sequential data splitting. This prepares the DataIterator class for use with incremental data (encountered in a stream or incremental file reads).
      * Introduced DataExtent definition. Currently supported are complete (the data is fully loaded), partial (the data grows in size, like during the progress of an xhr-response) or incremental (subsequent data chunks, e.g. blocks of 4KB).
      * Improved PartialWorldState helper class to provide a more consistent interface and simpler handling.
      * Fixed some numerical calculation issues when calculating times with small increments. Appart from some visual bugs, this also had various effects on the player controls.
      * Removed playerNo attribute from agent state class, reducing overall memory usage. Together with some tweaks in the DataIterator class, this seems to reduce the memory consumption by another... let's say... 20 percent? ;)
  2. 22 May, 2017 1 commit
    • Major update in preparation for version 0.3. · 04befc3d
      Stefan Glaser authored
      New features:
      * JaSMIn is now able to handle playlists! Playlists are simple json files, listing game logs (title and url). At the moment I simply use the .json ending for playlist files, but probably change to .gll (game log list) or similar in the future to prevent confusion and simplify internal parser selection. You can use the "list" query parameter, e.g. "?list=path/to/list.json", for direct linking to a specific playlist.
      
      Structural changes:
      * Introduced model package for holding all data-model related classes.
      
      Changes:
      * Fixed the second major memory leak related to gpu memory. All field objects are now created via a WorldModelFactory class, which is buffering field related geometries and textures. All geometries and textures are now reused as much as possible when creating a new world representation. The result is overall less memory usage, no memory leaking and faster switch between world representations.
      * Made World and Field classes reusable.
      * Refactored creation of field objects. The goals skeletons and field lines are now a single geometry, all 2D planes use the same geometry, etc. This slightly reduces rendering calls.
      
      * Extracted 2D and 3D related definitions into own namespaces (JaSMIn.D2 and JaSMIn.D3).
      * Introduced data models for the general monitor as well as the log player component. This drastically improves on ui inter-dependency and simplifies ui updating procedures.
      * Refactored handling and storing of user preferences. Preferences are now serialized JSON objects. Still missing the option to enable/disable remember settings, but they will follow once a general configuration panel is available.
      * Created ParserException class for better handling of parsing exceptions and proper error propagation to the ui.
      * Added playlist model and the corresponding playlist loader.
      * Added GameLogInfo class, extracting the data/time, left/right team name and score from the name of the game log file.
      * Added MonitorParameter class for simple parameter access.
      
      * Refactored ui components to use the new model classes.
      * Replaced old Monitor class with GLPanel class. The GLPanel is a general util class, only focusing on handling the webgl rendering.
      * Renamed MonitorAPI to Monitor, representing the external interface.
      * Improved info overlay.
      * Renamed about overlay to help overlay (not used at the moment).
      * Improved error handling. You shold get more informative error messages now. However, detecting invalid CORS requests is still a challenge, since the browser doesn't provide an unique error status on CORS errors.
      * Added playlist overlay for displaying the active playlist.
      
      * Added listing of playlists to archive.php and ArchiveExplorer component.
      * Allow Drag & Drop and opening of multiple files. Opening multiple game log files now results in a playlist.
      
      * Added playlist file example.
      
      * Added list and playlist icons to icons.svg.
  3. 11 May, 2017 1 commit
    • Added options to allow listing of gzipped files. · 39c09ce8
      Stefan Glaser authored
      * Added listing of gzip compressed game log files to archive.php. This feature can be enabled/disabled via a global variable. Default is "false", since no webserver by default specifies the necessary mime type and content encoding for gzip compressed files.
      * Added check for gzipped file versions to JaSMIn.isReplay and JaSMIn.isSServerLog functions.
      * Improved some poor english writing in readme file.
      * Allow loading of gzip compressed files via XMLHttpRequest from remote locations (but not for local files via FileReader).
  4. 09 May, 2017 7 commits
    • Improved readme. · acb91ebc
      Stefan Glaser authored
    • Renamed address line parameter to match new game log analogy. · 1c091e35
      Stefan Glaser authored
      * MonitorUI & MonitorAPI: Renamed loadReplay function to loadGameLog.
      * Changed address line parameter expectation from "?replay=/path/to/file" to "?gamelog=/path/to/file". For now, if no "gamelog" parameter is specified, "replay" is checked as a fallback option.
    • Some minor cleanup. · b06eaa53
      Stefan Glaser authored
    • Added listing of .rcg files in archive explorer. · 45bd95b0
      Stefan Glaser authored
      * Added list of sserverlog files to archive listing in archive.php.
      * Added listing of sserverlog files to archive explorer component.
      * Use FileReader.readAsText instead of FileReader.readAsBinaryString for reading local files in GameLogLoader class. No clue what's the actual difference but readAsBinaryString seems to be non-standard...
    • Added parsing of server- and player-params in UGLParser. · aa52059d
      Stefan Glaser authored
      * Added index enums for 2D environment-parameter (server-params) and player-parameter.
      * Added ParameterType enum, providing a choice for possible parameter types.
      * Added playerParams attribute to GameLog class.
      * ULGParser: Parse server-params and player-params into environement-parameter and player-parameter arrays of game log (SServerLog) instance.
      
      All possible 191 server parameter and 29 player parameter of a 2D log file are now accessible via the environmentParams and playerParams arrays of the game log. The corresponding indices are provided by the EnvironmentParams2D and PlayerParams2D enums. They are not used yet, but will eventually replace some static definitions used during the construction of the 3D world representation. Player types are still not parsed yet.
  5. 08 May, 2017 1 commit
    • Added parser for ULGv4/5 files. · eae7fa08
      Stefan Glaser authored
      With this commit, JaSMIn is able to parse text based .rcg log files directly. Similar to replay files, rcg log files are parsed into an internal GameLog instance (or its derivatives), which allows flexible handling within the monitor. Until now, only the most essential parts of the rcg log file are converted (the playmode, team and show lines). Further parts like server_params, player_params and player_types will follow soon.
      
      * Renamed src/js/model to src/js/gamelog
      * Added ULGDataIterator class for iterating ulg data.
      * Added ULGParser class for parsing ulg data.
      * Added SServerLog class representing a ulg log file.
      * Added SymbolTreeParser and corresponding SymbolNode classes for parsing and holding symbol tree data.
      * Added central GameLogLoader class for loading replay and rcg log files.
      * Added GameLogParser interface and made ReplayParser and ULGParser classes, which implementing the GameLogParser interface.
      * Extended PartialWorldState functionality for better handling in ULGParser.
      * Fixed potential bug in ReplayDataIterator, causing it to parse a partial line during loading a remote replay file.
      * Added use of JaSMIn.TeamSide enum where possible.
      * Removed some obsolete dependencies from LoadingBar.
      * Replaced previously ReplayLoader instance with GameLogLoader instance in UI components (MonitorUI and explorer components).
      * Renamed penalty attributes in GameScore class to their actual meaning.
      * Fixed some uses of string.startsWith() calls in main.js and robot model factories.
      * Fixed bug in SoccerBot2D model, causing all models to use the same stamina material.
      * Use AgentData2D enum in SoccerBot2D model to update stamina material instead of static indices.
  6. 07 May, 2017 1 commit
    • Extracted game log base class from replay class. · fa513f6f
      Stefan Glaser authored
      This is done as preparation for parsing different log/replay file formats into a common internal data structure. Instead of replays, game-logs are now the central data structure. The interface is very similar to the old replay class, improving here and there a bit for more generality. The new game log definition should be able to hold 2D and 3D replay files, as well as 2D sserver logs (and maybe converted 3D logs at some time as well).
      
      * Extracted a game log base class from replay class.
      * Added GameState class for holding a time and playmode string.
      * Added GameScore class for holding a time and score combination.
      * Replaced list of game state changes in replay/game log with a list of the new game state objects.
      * Added a list of game score objects to the game log class.
      * Replaced environment specific parameter attributed in replay/game log class with dynamic environementParameter array.
      * Added/extended enums in main.js for better indexing in world state arrays (also renamed JaSMIn.ReplayTypes to JaSMIn.GameType).
      * Added some support for neutral sides (still needs to be double checked).
      * Added flags bitfield to AgentState class for holding the (2D) agent-state (stand, kick, kick_fault, goalie, etc.) or some state related flags
      * Used new flag bildfield in ReplayParser to store the goalie information of 2D replay files.
      * Adapted ReplayParser, ReplayLoader, Player and UI components to new data structures.
  7. 03 May, 2017 1 commit
    • Major update to version 0.2 · 4715029b
      Stefan Glaser authored
      The player now provides two modi: Standalone and Embedded.
      The Standalone mode relates more towards a traditional monitor ui additional browsing/explorer options, open file dialogs, etc.
      The Embedded mode simply follows its name and is supposed to be embedded somewhere (e.g. via an iframe) and plays a specific replay file.
      In either mode, the player instance can be fully controlled from other components outside the player.
      
      In order to demonstrate the two new modi, you'll find two major html landing-pages in the examples (respectively build) directory:
      - Standalone player: player.html
      - Embedded player: embedded.html (forwarding to embedded-player.html)
      All of the above landing-pages accept a "replay=<path>" replay path parameter (e.g. player.html?replay=replays/2D Simulation/test2d.replay), which will be automatically loaded by the player if autoplay is enabled.
      
      Structural changes:
      * Moved all web-gl related javascript classes into own gl-subfolder.
      * Moved replay- and world-loader components into replay and world subfolders.
      * Moved src/js/utils/threejs to src/js/gl/utils.
      
      Changes:
      * Fixed a major memory leak in replay parser. Modern browsers do not actually copy any memory when using string.slice() or string.substring(). Instead, they create a string decorator, which only presents a window of the original string. This way, even if only a very small fraction of the original string is relevant and referenced by the application itself, the garbage collector is not able to free the original string, since it's still referenced indirectly. Parsing a replay file is one of this bad scenarios where most of the original string is parsed into numbers and only a couple of very small substrings is needed in the resulting replay instance. I do not have a great solution to this problem yet. For now, JSON.stringify() seems to allocate new memory on all browsers that I have tested so far. As a result, we now get roughly 90/170 MB memory usage when playing 2D/3D replays.
      * Refactored ReplayDataIterator class. Replaced more complex iteration logic with simple split-array logic. There is no performance benefit in modern browsers when using a more complex split logic due to massive optimizations within the javascript runtimes. The new split logic is able to handle different line endings (CRLF, CR, LF).
      * Added FullScreenManager class for handling fullscreen actions across multiple components.
      * Added DnDHandler class for handling drag & drop events.
      * Added TabedPane class providing a tab pane logic.
      * Replaced OverlayManager with PanelGroup. A PanelGroup is a group of panels of which at most one is visible at the same time.
      * Added WelcomePane - a welcome panel with drag & drop functionality.
      * Added ArchiveExplorer component. This component allows browsing remote archive locations for replay files.
      * Added ResourceExplorer component. A the moment it only features the ArchiveExplorer and a local file chooser dialog but there is more to come.
      * Introduced robot specific model factories to better handle and reuse web-gl objects.
      * Always show general player buttons (info, settings, fullscreen).
      * Added drag & drop functionality to InputController. You can now drag & drop a file onto the player while it is running to load a new replay file.
  8. 23 Nov, 2016 1 commit
    • Fixed a state assignment bug in replay parser. · 4982dc6a
      Stefan Glaser authored
      The agent state arrays within a world state are maps with the player number as keys. I accidently used the push method of the Array class to add newly parsed agent states, which breaks the agent to state assignment during state updates.
  9. 17 Nov, 2016 2 commits
    • Prevent scrolling on space. · d4142787
      Stefan Glaser authored
    • Start replay parsing while loading the replay file. · 0d6a153b
      Stefan Glaser authored
      * Refactored ReplayLoader to start parsing a replay file while it is still loaded. Furthermore, the ReplayLoader is now directly using a XMLHttpRequest object instead of the THREE.XHRLoader. This makes handling the actual request much simpler, providing the option to abort a running request.
      * Refactored ReplayParser logic. The Replay class itself now holds a PartialWorldState during parsing, which allows buffering the current state of the parser while waiting for new data. With the new parsing logic, the order of the ball and agent states after a game state line is now irrelevant.
      * Added PartialWorldState for holding partial state information while parsing.
      * Adapted ReplayDataIterator for better usability with stream data.
      * Allowed settings overlay to fill up to 50% of the monitor frame width instead of 30%.
      
      I'm pretty happy with the new loading mechanism. Rendering of the replay now usually starts as soon as the first chunk of data arrived from the server. You'll feel the difference ;)
  10. 10 Nov, 2016 1 commit
    • Added some further html examples. · cb7f339a
      Stefan Glaser authored
      * Added an example html page which tries to read the replay file path from the window.location.search string.
      * Added example for an embedded html version of the player.
  11. 09 Nov, 2016 3 commits
    • Added proper handling of shadows. · 05ecf71b
      Stefan Glaser authored
      * Shadows are now properly shown and hidden based on the monitor setting.
      * Fixed some polygon offset values.
    • Added 2D replay test file. · c290f84b
      Stefan Glaser authored
      * Added replay test file for 2D.
      * Fixed soccer bot 2D model.
      * Added parameter to test.html file which allows switching between the two test log files via "test.html?type=2D".
    • Added Settings overlay and some more. · 0452a898
      Stefan Glaser authored
      * Added monitor settings overlay to configure shadows, state interpolation, team colors, etc.
      * Renamed MonitorInfoBoard to MonitorSettingsBoard.
      * Moved averlay definition and all overlays into own sub directory.
      * Added info overlay (currently a copy of the about overlay) which should provide help about how to use the monitor.
      * Added OverlayManager class to handle all available overlays.
      * Added some further create element methods to JaSMIn.UI:
       ** createUL() for creating an ul element
       ** createLI() for creating a li element
       ** createSingleChoiceForm() for creating a form element containing radio buttons
       ** createColorChooser() for creating a color chooser input element
      * Refactored createButton() factory method in JaSMIn.UI to also handle button events.
      * Added SingleChoiceItem class, representing an li item containing a label and a single choice form
      * Added ToggleItem class, which inherits from SingleChoiceItem and restricts the choices to two options: true or false
      * PlayerBar: Removed replay download link and added toggle info button.
      * Added play/pause action via middle mouse button click and fullscreen action via ctrl+ENTER to input controller.
  12. 08 Nov, 2016 1 commit
  13. 07 Nov, 2016 3 commits
    • Made questionmark icon a pixel smaller. · c7e3b967
      Stefan Glaser authored
    • Added questionmark icon. · 772d66d5
      Stefan Glaser authored
    • Refactored mouse and keyboard input handling. · 3b4740d2
      Stefan Glaser authored
      * Split previous CameraController class into InputController for dispatching user events and into UniversalCameraController for handling higher level actions. The CameraController class itself is now an interface. The new version of the input controller provides much better handling of mouse events even outside the player canvas. Furthermore, it is now able to control some aspects of the player via the input controller. For example play/pause via the p-key and step forward/back via the +/- keys.
      * Reactivated object tracking in universal camera controller.
      * Added first prototype of selection highlighting to movable objects class. Try 0-key for selecting the ball (leftclick somewhere on the monitor for deselecting).
      * Added Overlay class representing an overlay panel that disappears again when clicked outside the overlay.
      * Made about/monitor info panel an overlay.
      * Disabled settings button in player bar for now.
      * Enabled monitor info panel by default.
      * Fixed handling of listener references when using member functions with bind(this).
      * Distributed core components in own subfolders.
      * Some minor fixes (set parse delay to zero again, added forwarding of player actions in api, added some further externs, etc.)
      * SCSS:
       ** Removed fixed positioning of root pane to allow free placing of monitor element.
       ** Replaced camera controller pane with input pane
       ** Added definition for overlay pane
  14. 06 Nov, 2016 2 commits
  15. 20 Oct, 2016 3 commits