Commit Graph

333 Commits

Author SHA1 Message Date
Igor Zawartka
12773a83ad
Merge pull request #2 from izawartka/extended-signals
Extended signals parsing and rendering
2025-07-03 17:07:12 +02:00
izawartka
fc498681b4 1.2.0 Release tweaks
*Tweaked buildVersion constant to 1.2.0
*Disabled attached signs logging
*Updated README.md
2025-07-03 17:05:15 +02:00
izawartka
96e8cd1eef Extended signal label position tweak
*Overhead signals in Extended signal rendering mode have now, just like standard signals, their labels rendered "below" them
*Cleaned up SignalExtendedRenderer's code a bit
2025-07-03 16:57:10 +02:00
izawartka
b54ce79888 Extended signal renderer and parser bugfixes
*Fixed mechanical distant signals not having the W1 sign
*Fixed useless ";" appearing in the SVG code of signal signs
*Fixed signal signs overlapping with mechanical signals' arms
2025-07-03 16:31:05 +02:00
izawartka
d5ff1a61e7 Added W21 signal sign def
+Added definitions and icons for two variants of the W21 signal sign: standard and LED
2025-07-03 16:29:28 +02:00
izawartka
920de35b60 Added extended signal signs text option
+Extended signal renderering: Signs mounted on signals can now have displayed text over them (i.e. W21 sign). During the parsing, the text string is extracted from the sign name using regex from the sign's def
2025-07-03 16:27:25 +02:00
izawartka
ce375cb7e2 Extended signals bugfixes
*Fixed double dwarf signals not being parsed correctly
*Flipped no signal unit icon in horizontal axis
2025-07-01 21:20:16 +02:00
izawartka
6fb032a70f Mechanical signals rendering
+Added support for mechanical signals in extended signals rendering mode
2025-07-01 21:18:37 +02:00
izawartka
e0149037cf Mechanical signals extended parser
+Added extended parser for mechanical signals
+Added SinalElementsEnums.Type.Mechanical
+Added SignalElements.mechType field and SignalElementsEnums.MechType enum
+Added SignalElements.isMechanical()
2025-07-01 21:17:16 +02:00
izawartka
b72dbe8f9a Signal signs rendering order and custom height
*Signal signs can now have custom height and will still be rendered with proper spacing
*Order of signs rendered on signal's pole is now defined by the order in the DefinedSignalSigns dictionary
2025-06-30 21:11:41 +02:00
izawartka
8f297df233 Attached signs rendering
+Added rendering of signs attached to signals. If a sign is attached to a signal, attachedAs is set in the sign's def and signal has SignalElements, the sign is no longer rendered on the Signs layer but appears on the signal pole (ifextended signal rendering is enabled)
+Added definitions and icons for signal signs W1 and W18
*Extracted sign attaching logic into attachSign function
2025-06-30 21:09:16 +02:00
izawartka
02a9a11dba Extended signal signs parsing and rendering
+Added signs support in the extended signals parser
+Added signal signs rendering in SignalExtendedRenderer
+Added definitions and icons for W19, W20 and W24 signal signs
*Replaced getPoleLength function of SignalExtendedRenderer with getPolePoints which gives y offsets for all major points of the pole
2025-06-30 20:13:42 +02:00
izawartka
d991cddf97 Fixed dawrf signals extended rendering
+Added SignalElements.isDwarf()
*Fixed dwarf signals being rendered as standard signals
2025-06-29 21:33:50 +02:00
izawartka
6bae0a31ea Overhead extended signals support
+Added overhead extended signals parsing and rendering
*Cleaned up SignalExtendedRenderer
*Dwarf signals now use SignalElementEnums.HeadPosition.DWARF instead of NO_POLE
*Minor bugfixes and tweaks related to extended signals
2025-06-29 21:29:58 +02:00
izawartka
fd1f3107ee Fixed signs attachment grid
*Fixed neighbouring grid cells occupation in attachSign not depending on Constants.parser.attachSignsMaxDistanceX
2025-06-28 13:12:13 +02:00
izawartka
7bf3f24fe3 Added signal bars extended renderer
+ExtendedSignalRenderer now also draws signal bars
+ExtendedSignalRenderer  automatically adjusts pole height based on the number of bars and head offset
*Tweaked pole rendering in the ExtendedSignalRenderer
*Signals are now back higher in the rendering queue than signs
*Extended signals no longer have transparent backgrounds
*Fixed missing constants related to signs attaching
2025-06-27 18:17:47 +02:00
izawartka
2d655676c9 Added signs attaching
+Added an attachSigns function that will attach signs near signals to these signals so in the future their icons can be rendered without overlapping
+Added Vector3.distanceSqExcludeY, .toLocal and .negate
*Fixed SceneryObject not returning valid render bounds
2025-06-27 17:40:56 +02:00
izawartka
05bacafb67 Added extended SK signals parsing
+Added extended signal parsers for all SK type signal prefabs
2025-06-27 16:22:33 +02:00
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