nodeSnap: the new truck file editor

Max98

0
Old-timer
Hello everyone!
Approximately two months of total lock down and a lot of web development learning, experience and rigs of rods nostalgia, I decided to make a new project, both for learning purposes for me and for RoR.
I present you: nodeSnap.

1611380812960.png


1611380887874.png


Or...
1611482627432.png

Most the 777-300ER was actually done here

A few people including me don't like blender at all, and rorEditozer is unusable after a lot of updates to the game.
Plus, blender is not easy to learn so that may scare a lot of new comers to make content for the game.
This project is based on rorEditozer.

Features:

  • Parse truck file
  • Basic edit functions (new node, remove node, new group, remove group, rename group, add beam, remove beam)
  • Snap to grid nodes
  • N/b transform functions (scale/rotate/translate)
  • Render nodes id/names
  • View resizing
  • Super fast performance while editing complex n/bs
  • Duplicating functions (Flip mirroring and non-flip mirroring on selected axis, works only on groups)
  • Import blueprints and move/scale/rotate
  • Import mesh wire frame as reference for working on N/B and move/scale/rotate
  • Basic file sections editing like title/globals
  • Saved project preferences (Blueprint's positions, grid size, etc)
  • Backups system
  • Project watcher system: Edit your project on notepad and the editor will reload automatically

Currently working on:
  • Normal wheels section + preview
  • Nodes and beams parser with set_beam and set_nodes (~90%)
  • Undo/Redo system (~60%)
  • Truck file formatting on save

Todo features:
  • Mesh placement
  • parse nodes2
  • transform nodes in groups
  • Basic truck file sections like camera/cinecam/all engine types
  • Meshwheels sections + mesh preview, not wire frame
  • Submesh maker
  • Plugin system (useful for making tracked vehicles, self made wheels, etc etc)
  • Timed backups
  • bug fixing

My goal with this is to make truck files easier to work on, plus integrate a mesh placer, submesh maker...
In short note, reduce time spent on notepad or playing around with blender.

Controls
UI

Double click on view resizer => reset view resizer

Camera:
Right click + mouse move => move camera around
Left click + mouse move (Only on perspective view aka 3D view) => rotate on axis
Mouse wheel => Zoom

Editor:
CTRL + N => truck mode
CTRL + B => blueprint mode

Truck Mode
Mouse double left click => new node
Mouse double left click + CTRL => new node snapped on grid
Mouse click on a node + drag => Move node around
Mouse click on a node + drag + CTRL => Move node around with grid snapping to the preset value
CTRL + SHIFT + click node1 + click node2 => Creates a beam + shows a temporary blue line before you click on the second node

Blueprint Mode
Mouse + gizmo:
"S" => Scale
"R" => Rotate
"T" => translate


This is made using Electron, VueJS, Bootstrap , three.js and typescript (obviously Node.js).
This project is opensource and published on github.
Please use github for feature requests, etc..
Github:
 
Last edited:
Idea: Color code hitches, hydros, submesh, flares etc

Also add the ability to easily place and set hitches, hydros, submesh, flares etc
 
Wow, amazing! 😮 Welcome back. ;)
Thank you!

I just published the source code on github. Bear in mind, I just did so because i'm about to start refactoring and restructuring especially this file, and use the repo as a backup.

Controls:
Camera:
Right click + mouse move => move camera around
Left click + mouse move (Only on perspective view aka 3D view) => rotate on axis
Mouse wheel => Zoom

Editor:
*Mouse double left click => new node
*Mouse double left click + CTRL => new node snapped on grid
Mouse click on a node + drag => Move node around
Mouse click on a node + drag + CTRL => Move node around with grid snapping to the preset value
Mouse click on a node + drag + CTRL + ALT => Move node around with grid snapping 2 times smaller to the preset value
CTRL + SHIFT + click node1 + click node2 => Creates a beam + shows a temporary blue line before you click on the second node
CTRL + B + mouse drag on blueprint => reposition blueprints
 
Last edited:
It's actually easy to compile it.
You need to install node.js, download the source code and then run on the source directory:
Bash:
npm install
It doesn't work. I only get a "node_modules" folder that I can't seem to use. Where to go from here?
 
HELP IT'S BROKEN. I CAN'T DO ANYTHING! I can't zoom in, but I can add nodes, but this makes everything REALLY uncomfortable. Also where do my trucks save? I was working on a test when the program broke and didn't let me do anything.
 
Hello everybody! I'm about to release a version very soon, so I would like some "beta" testers to try and make some content using the editor to hunt bugs and get a usable version.
You can send me a PM on here for applications or you can contact me on discord: Max98#5519
 
Hello everyone,
I just wanted to ping this so yall know it's still alive, as for the editor itself, a lot of things have changed.
When I started writing the importer for jBeam files, I noticed a big limitation in the editor's way of dealing with n/bs, and it required some heavy changes to the architecture etc...

So, I decided to do some researching and dive back into the code.
But since IMO the last release was kind of buggy, I'm taking a lot of steps back and removing some features to actually fix the 'base' once and for all, and then I'll be putting the other features back, that just means the next release would be pretty basic compared to the one already released, but it will be much faster.

An other thing I have to say, when I started writing nodeSnap, I was too consumed to implement as much features to make Truck files editing easier, that entangled the editor to the truck format and caused some problems later on, now the editor has it's own format in JSON at the cost of just editing nodes and beams only, nothing more, nothing less. (You will have to set_beam_default by yourself)

Some major points to note here:
  • The way VueJS handled data and did things was a bottleneck and costed a lot of performance for this kind of application, so I switched to React JS, and gained a huge bump to performance and probably fixed the memory leak problem (not confirmed yet, but I've been using it, and I didn't notice this problem).
  • Switching from Electron to Tauri also fixed an other major problem: application size. With this, I managed to get down from 163 MB (60ish MB compressed) to just 8 MB uncompressed!
  • Tauri also provides native coding using Rust out of the box, I did not use this yet for performance gains, but I'm planning to profile the whole application and move some code from JS to Rust. (Rust is a language comparable to C++ in performance)
  • I have implemented a simple plugin system with plugins written in JavaScript (not typescript) that will allow manipulation of the loaded n/b and do some other stuff... currently still brainstorming about what we could do this with.
  • Implemented a selection box system that will allow you to select many nodes with the mouse and perform actions.. (move, delete, scale..?)
  • nodes2 supported out of the box
  • jBeam format will be supported of the box, conversion between truck format and jBeam possible in both ways (again, just n/b)
If you have any issues to report or suggestions, it's about time!
 
Back
Top