Commit Graph

315 Commits

Author SHA1 Message Date
izawartka
cdd1eb0a2f Added TOP signals extended renderer
+Added support for TOP signals in the SignalExtendedRenderer
2025-06-26 23:02:26 +02:00
izawartka
7b00881b06 Added remaining EHA/ERI extended parsers
+Added an extended parser for eha_top_r / eha_top_l signals
+Added an extended parser for v2 stanard EHA/ERI signals
2025-06-26 23:01:45 +02:00
izawartka
8f4b844f6a Double derailer fix
*Derailer prefabs containing _belka are now ignored to prevent doubled icons
*Removed outdated todo in the SceneryParser
2025-06-26 22:25:55 +02:00
izawartka
20c0cb092d Added extended signal rednerering
+Added basic SignalExtendedRenderer. It doesnt support TOPs, signs and overhead signals yet
+Added SignalElementsEnums.HeadPosition.NO_POLE (used by dwarf signals) and .OVERHEAD
*Empty extended signals signs entries are no more being stored in the array
2025-06-26 22:24:43 +02:00
izawartka
2c42291139 Extended signal rendering, minor tweaks
+Added extended signal rendering option (currently showing placeholder svg)
*Side menu CSS tweaks
*Track on-hover info is now enabled by default
2025-06-26 17:48:47 +02:00
izawartka
ac9e0493a1 Merge branch 'extended-signals' of https://github.com/izawartka/td2-visualizer into extended-signals 2025-06-26 17:24:27 +02:00
izawartka
c1342236f5 Extended parsing directory name change
*Changed directory name src/model/signal_elements signal-elements
2025-06-26 17:24:08 +02:00
izawartka
8f86e1b2b2 Double dwarfs extended parsing
+Added new SignalType.DWARF_DOUBLE
+Added extended parsing support for dwarf signals eha_ps_k and eri_ps_k
+Added simple extended parsing support for signals' signs
*Cutting off empty units at the end in SignalElementsParserCommon.getUnits now can be disabled with a param
2025-06-26 17:22:48 +02:00
Igor Zawartka
66b35d6536
Merge pull request #1 from izawartka/main
New switches defs
2025-06-26 16:57:31 +02:00
izawartka
e7073ffe62 New switches defs
+Added definitons for switches
    Rz 60E1-760-1_14 R / L
    Rlj 60E1-1200_300-1_7 R / L
2025-06-26 16:55:53 +02:00
izawartka
422c038cfa Added a frame for extended signals parsing
+Added SignalElements class parsing and storing extended information about signals
+Added support for standard and dwarf EHA/ERI signals extended parsing (excluding eha_top_l, eha_top_r, eha_ps_k and eri_ps_k prefabs) (signs are not being parsed yet)
+Added SignalElementsEnums const that will help to translate different signal types into one unified structure
2025-06-26 16:55:06 +02:00
izawartka
480d838e61 Model directory cleanup
*Structurized the src/model/ directory into subdirectories
2025-06-25 16:52:52 +02:00
izawartka
8336e63b9b New sign and switches, render queue tweak
+Added definitions for switches Rld 60E1-650_450-1_15 R / L
+Added a definition and an icon for the W31 sign
*Moved signs in the rendering queue to be after nevps and signals
2025-06-25 15:27:18 +02:00
izawartka
4729aaf998 Added LayerOptionsMenu component
+Added LayerOptionsMenu component in the side menu which holds all layer-specific options together
2025-06-25 15:24:57 +02:00
izawartka
9b9262973f Optimized track slope gradients
*Slope track color mode now doesn't use gradients unless the slope is different on both track ends
2025-06-25 14:31:16 +02:00
izawartka
f3564c8c07 Red switches bugfix
*Fixed switches sometimes being shown as derail tracks in the max speed color mode
2025-06-24 21:24:12 +02:00
izawartka
4c344b7a1b Minor bugfixes and tweaks
*Tweaked track color mode legend labels
*Tweaked SideMenu.css
*Track color mode select and legend is now hidden if the tracks layer is not active
*Track hover info checkbox is now hidden if the tracks layer is not active
2025-06-24 21:16:39 +02:00
izawartka
2c904664e6 Added an option to disable track hover info
*Added an option to disable track hover info in the side menu
2025-06-24 21:10:44 +02:00
izawartka
66eae33e80 Added track hover info
+Added a popup showing hovered track's info
2025-06-24 21:09:43 +02:00
izawartka
715a8ffc7c Added track color mode legend
+Added track color mode legend
*Refactored track color mode resolving
*Renamed SelTrackColorMode to TrackColorModeSelect and moved it to a separate directory
2025-06-24 18:03:16 +02:00
izawartka
52566cb05d Sceneries list disable option, side menu css fix
+Added an option to disable fetching of the sceneries list (enabled by default in the repo version)
*Fixed side menu being too high
*Sped up side menu transition
2025-06-24 15:47:49 +02:00
izawartka
f7c7c07a73 Added info footer, tweaked side menu CSS
+Added InfoFooter with current build version and sceneries list version date
*Fixed side menu overflowing
2025-06-24 15:41:53 +02:00
izawartka
73682551a3 Improved SceneryFilesHelper error handling
*Improved SceneryFilesHelper error handling with proper pop-up messages and cleaner console output
2025-06-24 15:40:14 +02:00
izawartka
dd9a14169b Added sceneries list version date service
+Added sceneriesListService.js to manage the version date of the built-in sceneries
*Built-in sceneries info json file is now expected to have .list block and .info block with .versionDate property
2025-06-24 15:38:53 +02:00
izawartka
af631bc4e5 Added sceneries list
+Added built-in sceneries list (sceneries are not provided with the repo due to copyright reasons)
*Renamed FileSelect to CustomFileSelect
*Updated README.md
2025-06-23 11:19:28 +02:00
izawartka
3137a46e32 Added SceneryFilesHelper
+Added SceneryFilesHelper class and moved scenery file loading logic to it
2025-06-22 23:24:08 +02:00
izawartka
f50e1547c0 Tweaked Derailer name offset
*Tweaked Derailer icon name offset
2025-06-22 16:30:41 +02:00
izawartka
38ecdbc2e3 Added SpawnPoints
+Added SpawnPoint object parser, layer and icon
*Renamed Scenery.addSpawnSignal to .addSpawnPoint
*Renamed Scenery.spawnSignals to .spawnPoints
*Minor name changes
2025-06-22 16:30:17 +02:00
izawartka
197cb2dcde New signs definitions
+Added definitions and icons for signs: W19, W20
2025-06-22 12:19:37 +02:00
izawartka
aefb5cf43a New signalboxes and switches defs
+Added definitions for the Crossing switch
+Added definitions for all signalboxes from the game
2025-06-22 11:40:43 +02:00
izawartka
8604e87edc Various bugfixes
*Removed unnecessary spaces in SVG transforms of some map elements
*Changed the loading indicator text color
*Fixed an issue where the W28 sign sometimes had no text
*Scenery objects without a type name are now ignored
*Improved detection of signs (D0, D1, Z1 were sometimes not recognized)
*Improved detection of mechanical signals
*Improved automatic detection of radii for Rlds-type switches
2025-06-22 11:33:40 +02:00
izawartka
2464599bb6 Added derailers parsing & layer
+Added Derailer TrackObject parsing
+Added a map layer and icon for derailers
2025-06-22 11:26:56 +02:00
izawartka
aaac9dbbd4 Added electrification status popup
+Added a popup shown when the user selects the electrification view mode, if warnings or errors occurred during its resolution
2025-06-21 14:57:59 +02:00
izawartka
0666ee7c60 Electrification resolver improvements
+Added an option to disable electrification resolution in Constants
+Scenery class now has an electrificationResolved field, set by the resolver
*Improved error and warning handling during electrification resolution
*ElectrificationStatus is no longer the default export of its file
*Renamed ElectrificationStatus.ERROR to .CONFLICT
2025-06-21 14:56:29 +02:00
izawartka
adbe465b46 Dialog options support, atBack
+Added a way to include extra options to shown dialogs
+Added the atBack option to dialogs, enabling the dialog to appear at the back of the stack instead of the top
2025-06-21 14:47:57 +02:00
izawartka
bc808068a7 Added additional layer components support
+Added an option to add additional components to layers, independent of the layer's objects
2025-06-21 14:45:29 +02:00
izawartka
c6d0bc4e41 Added electrification resolution
+Added tracks electrification resolution (EXPERIMENTAL)
+Added Vector3.mannhattanDistance()
+Added Route.points (connection points for the route tracks)
*Fixed Route.track_offset sometimes being NaN
2025-06-21 12:27:27 +02:00
izawartka
58e75ed730 Various small bugfixes and tweaks
*Changed the map background color
*Tweaked CSS for the side menu
*Fixed an issue where JS errors occurring during the parsing of sceneries were not logged to the console
*Fixed missing error message for an invalid scene header when the first line of the file was empty
*Fixed connections for the Crossing4.444 crossing
2025-06-21 12:22:00 +02:00
izawartka
c91aff5157 Added NEVPs layer
+Added No Electric Vehicles points parsing and rendering layer
2025-06-21 12:15:02 +02:00
izawartka
3bc94ce3cf Tracks connection test improvements
*Cleaned up tracks connection test code
*Fixed tracks connection test throwing useless warnings with switch tracks (it now may not show some actual warnings but that's not a big case)
2025-06-20 22:18:52 +02:00
izawartka
3be5cd0291 TracksConnectionTest and tracks bugfixes
+Added a debug option called trackConnectionsTest. It will check if all tracks are connected properly
+Added Track.switch field
+Added Track.aliases field managed by Scenery.addTrackAlias()
+Added Vector3.toString()
*Switch._createSwitchTrackFromDef() now also add the track to the scenery
*Fixed track connections in switches
2025-06-19 00:12:38 +02:00
izawartka
636d1144f8 Constant key typo fix
*Fixed a typo in the forcePointerEvents option in Constants
2025-06-18 21:55:02 +02:00
izawartka
b9c6b2722a W18 sign
+Added definition and icon for the W18 sign
2025-06-18 21:49:18 +02:00
izawartka
56ffe221c0 SignalBox centering, debug pointerEvents toggle
+After loading a scenery, the view is now centered on its first SignalBox
+Added an option in Constants to forcibly enable pointerEvents on all map layers
2025-06-18 21:48:28 +02:00
izawartka
89b747f1b1 SpecialObject parsing abstraction
+Added parsing for CameraHome and MainCamera
*Special objects (scenery info related entries occuring only once) now have a separate category in the Scenery.objects dictionary
*SceneryInfo is now inheriting from SpecialObject and is no longer stored in scenery.sceneryInfo
*Objects with no category are now saved as 'unk' instead of 'misc' to not collide with the existing 'misc' category
2025-06-18 21:46:16 +02:00
izawartka
c29208b217 Track max speed tweaks
*In the "Max speed" track coloring mode, tracks with a maximum speed or derail speed of 0 are now displayed in red
*Fixed an issue where max_speed and derailspeed of Track objects could sometimes be NaN
2025-06-18 21:44:57 +02:00
izawartka
ba0440862a Added new signs
+Added definitons and icons for signs: W11b, D0
2025-06-18 20:43:48 +02:00
izawartka
d2fc76679a Fixed tracks fill
*Fixed tracks not having transparent fill
2025-06-17 14:08:56 +02:00
izawartka
096e03fee6 Pointer events optimization
*Pointer events are now disabled by default for all map layers, except for those where the corresponding field is set to true
2025-06-17 13:58:22 +02:00
izawartka
32aa92aac0 ZoomPanWrapper optimization
*Optimized ZoomPanWrapper to refresh only when new animaftion frame is requested, not on every mouse event
2025-06-17 13:49:38 +02:00