-
Notifications
You must be signed in to change notification settings - Fork 4
Folder: models
##What does it do?
This contains all the model.js
script files.
##What is model.js
for?
model.js
is used for one very important thing: scale speed. This can't be included in any other file because you might have the same decoder, but a different model, thus different gearing, and a different requirement for scale speed.
###Functions:
#####locoSpeedCrunch(mph)
This function accepts a speed in mph (as a number) and should return a speed for your locomotive AS A PERCENT, NOT A DCC SPEED-STEP VALUE! It is also important to remember that this function should not actually send any commands your locomotive, it should only take in a number and spit out another number.
When you select a model.js
script from the UI, /models
is automatically added to the beginning of your file path. This means that all model.js
scripts must be inside this folder or they will not load properly.
An interesting thing to consider is that you can create folders inside this folder and the scripts will work fine.
####Acknowledgements:
- ZephyrCab's UI would not be possible without MaterializeCSS
-
Physics Engine
- Mr. Bruce Kingsley of BruceKModelTrains.com was unbelievably helpful with the physics engine. Without him it would not have been possible (at least not for MANY more years).
- Mr. Chris Jakeman of the Open Rails Dev Team was also very helpful with the physics engine.
###Support the project: "Support the project", says the wiki page. Those words are somewhat misleading. God has blessed me with resources and time to work on this project, so I have decided I do not need donations for myself. It would be amazing if you would donate to Blood:Water Mission instead though! They help give clean water to people in third-world countries. Trust me, these folks need the money more than I do!