Commit Graph

327 Commits

Author SHA1 Message Date
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
izawartka
886da1be1a Adjusted for production build
*Fixed assets paths not taking %PUBLIC_URL% into account
*Updated README.md
-Removed redundant leaflet leftovers in index.html
2025-06-17 12:15:44 +02:00
izawartka
5012de4d74 Added distance meter
+Added a distance measurement tool
2025-06-17 11:30:54 +02:00
izawartka
ee511c3160 Sign defs tweaks, improved signs recognition
+Added new aliases for signs W27a, W11p, W11a and W11
*Improved the regex used to determine whether a given TrackObject is a sign
2025-06-17 11:27:59 +02:00
izawartka
1474d749e9 ZoomPanWrapper rect and viewBox hooks
+Added getCurrentViewBox() and getCurrentClientRect() to useZoomPubSub.js
2025-06-17 11:24:33 +02:00
izawartka
d09a152315 Parser and signs bugfixes
+Added an option to rotate the sign's icon in its definiton
*Fixed track objects not searching their tracks by aliases
*Fixed useless parser warnings related to "Empty" objects
*Fixed W32_L sign not having its definition
*Fixed W32 and W32_L signs being rotated 10 degrees
2025-06-16 15:29:00 +02:00
izawartka
7598a3e1be Moved scenery parsing logic to another class
*Moved scenery parsing logic from the Scenery class to SceneryParser
2025-06-16 12:37:13 +02:00
izawartka
b48366c969 LocList css tweak
*Restricted locations list's max width to 100em
2025-06-16 12:31:23 +02:00
izawartka
43651b2d69 New sign definitions
+Added definitions and icons for sign prefabs: W12, W9a, W9b
2025-06-16 12:30:49 +02:00
izawartka
e26a5a8791 Moved the signalbox icons
*Moved the signalbox icons to /public/assets/signalboxes/
2025-06-16 12:07:37 +02:00
izawartka
b70716e09e Scenery and Sign bugfixes
*Fixed <> and [ ] tags appearing in sign texts
*Reduced the number of useless parser warnings by adding TerrainGroup, EndTerrainGroup and all objects with "Forest" in their name to the ignore list
2025-06-13 20:00:07 +02:00
izawartka
4f931418b6 New sign definitions & aliases
+Added definitions and icons for signs: W32, W16, D1
+Added aliases for sign prefabs: sign_latarnia_z1, sign_latarnia_w4, w14 (to w9) d6 (to w8)
*Fixed some sign definitions still having "sign_" prefix
2025-06-13 18:32:09 +02:00
izawartka
99bf1356cc Sign data retrieval and def matching improvements
+Added Sign.getPrintableSignData() which will return sign's data after the last '_' char (if exists)
+Added option to create aliases for sign definitions
*Improved sign recognition to i.e. avoid treating undefined signs like W1X as W1
2025-06-13 18:30:11 +02:00
izawartka
ab426ae9bc Signs tweaks and support improvement
+Added support for signs that do not follow the "sign_wX" naming convention, with prefab names simply being "wX"
*Fixed the offset of the W15 sign
*Changed the text of the w8_0 sign to "X"
2025-06-12 13:47:02 +02:00
izawartka
3e82d1627b New sign definitions
+Added definitions and icons for signs: W1, W13, W13a, W15, W17, W28
*Fixed text retrieval for older types of W27 and W8 signs, where the speed limit is specified in the prefab name instead of the data field
2025-06-12 13:16:53 +02:00
izawartka
871505568d SignRenderer improvements
+Added support for specifying multiple text sources for SignRenderer (in the sign definition)
+Added the ability to retrieve sign text using a function ("text": "fun" in the sign definition)
*Moved text retrieval logic to a separate function outside the SignRenderer component
2025-06-12 13:11:40 +02:00
izawartka
02ed110b4f New signal box def
+Added a definition for the signal box prefab "SignalBoxOzorkow"
2025-06-11 19:04:59 +02:00
izawartka
667190b404 A lot of new sign definitions
+Added definitions and icons for signs: W11, W11a, W11p, W27, W4, W6, W7, W8, W9, Z1
2025-06-11 19:04:04 +02:00
izawartka
ab53a57572 Added SignTextRenderer and sign data pasing
+Added SignTextRenderer, which can display additional text on signs, such as speed limit values
+The last value of a sign entry is stored as data and, depending on the entry in DefinedSigns, it can be used to determine the text shown by the SignTextRenderer
2025-06-11 19:02:53 +02:00
izawartka
4c5f3f3839 Switch invalid radius fix
*Fixed switch model "Rz 60E1-500-1_12 R" definition having inverted radius
2025-06-11 11:06:19 +02:00
izawartka
e023d6c9ff Added track max speed color mode
+Added an option to color the tracks based on their max speed
2025-06-11 11:05:39 +02:00
izawartka
2e38241fb3 Added W6 signs defs
+Added definitions and icons for signs: W6, W6a, W6b
+Added an option to use non-square sign icons
*Imrpoved W5 sign icon
2025-06-11 10:55:07 +02:00
izawartka
65601978e4 Minor code bugfixes and tweaks
+Added option to disable loging the scenery model after parsing is finished
*Fixed missing def field declarations in SignalBox and Switch classes
*Fixed found switch def not being saved in the Switch object
2025-06-10 22:37:49 +02:00
izawartka
95317798e5 Added signs layer
+Added SignRenderer and sign parsing. For now only the W5 sign is defined
2025-06-10 22:35:46 +02:00
izawartka
2408fda0c9 Added scenery info dialog
+Added "Scenery info" dialog
*Fixed parsed scenery info not being assigned to the scenery object
2025-06-10 19:07:46 +02:00
izawartka
b37937c658 New signal boxes defs
+Added definitions for signal boxes SignalBoxZdroje and SignalBoxRegalica
2025-06-09 22:39:43 +02:00
izawartka
c56f471d65 Added scenery loaded dialog
+Added a dialog shown after scenery parsing is complete, displaying whether any warnings/errors occurred and, if so, showing the parser logs
*Improved parser's error handling
*Fixed a typo in the switch parsing related warning
2025-06-09 22:38:49 +02:00
izawartka
9419f613be Made some more sc entry types ignored
*Made some more scenery entry types ignored so they dont throw useless warnings
2025-06-09 22:32:35 +02:00
izawartka
bf897ba49f Tweaked localization list style
*Tweaked localization list style
2025-06-09 22:28:44 +02:00
izawartka
cddc76bc1d Added dialogs support
+Added DialogManager and dialogService, which make it easy to display even complex message boxes and dialogs
2025-06-09 15:45:02 +02:00
izawartka
51693b7e0e Style improvements vol2
*Tweaked some more CSS to match the style with the Sceneriomat project
2025-06-09 15:41:18 +02:00
izawartka
a5c74a15cc Improved styling
+Added an icon for the side menu toggle
+Added side menu opening animation
*Refreshed some CSS
2025-06-09 14:53:51 +02:00
izawartka
6ba732b304 Added SceneryInfo parsing
+Added scv (SceneryInfo) block parser and scenery format version check. If the block is invalid, an error is thrown, if the version is not 29, a warning is logged
+Added errors to SceneryParserLog
2025-06-09 14:32:38 +02:00
izawartka
6a9cba7630 More switches and signal boxes defs
+Added new signal boxes definitions:
    SignalBoxJaworzno
    SignalBox01
    SignalBox01_e
    SignalBoxGdanskG
    SignalBoxSwKatarzyna
    SignalBoxPrzyworyOpolskie2
    SignalBox_lka_nastawnia_leczyca
+Added new switches definitions
    Rkp 60E1-190-1_9 ba
    Rld 60E1-2500_1200-1_22 R / L
    Rld 60E1-600_300-1_9 R R / L
    Rz 60E1-205-1_9 R / L
    Rld 60E1-1200_600-1_15 R / L
2025-06-09 01:06:58 +02:00
izawartka
18e3056c45 Signalboxes and signals recognition bugfix
*Fixed scp.py removing signal boxes with no name
*Fixed the parser skipping mechanical signals
*Improved loading speed of unoptimized .sc files by throwing less unknownObjectType warnings
2025-06-09 01:04:38 +02:00
izawartka
0aafbe6960 Added new auto switches logging
+Added an option in the Constants to log new automatically resolved switch definitions
2025-06-08 23:01:20 +02:00
izawartka
606f4a3a5f New switches and signal boxes defs
+Added definitions for switches:
    Rld 60E1-700_300-1_10 R / L
    Rlj 60E1-650_190-1_20 R / L
+Added definitions for signal boxes:
    SignalBox_lka_nastawnia_zgierz
    SignalBox_lka_nastawnia_zgierz_Zg1
2025-06-08 22:59:17 +02:00
izawartka
ea23a691bf Made tracks more visible at smaller scales
*Made all tracks at least 1px wide, even at small scales, which improves their visibility
2025-06-08 13:34:40 +02:00
izawartka
c6d4629a34 Fixed skp signal box icon priority
*Fixed skp signal box icon having higher priority over empty
*Moved signal box icon choice to other function
2025-06-08 13:00:24 +02:00