Commit Graph

91 Commits

Author SHA1 Message Date
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
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