You are browsing as a guest. Sign up (or log in) to start making projects!

3h 32m 2s logged

DEVLOG #3

No major UI changes apart from using placeholders instead of labels in the input boxes to make them a bit smaller. This change will make it look a bit nicer and less clunky when I add more graphics and components.


I’ve mainly been doing backend work. I’ve learnt how to import and export functions between JavaScript files and have used that to organize things better.
I created separate files for collecting inputs, doing the necessary calculations and outputting the results. Although this hasn’t changed anything on the frontend, it will be massively helpful when I scale up and add more features.

However, these changes absolutely nuked the live update bit of the website which was something I really wanted to focus on because of how interactive it made the site feel.

I had to completely rework how that feature worked which is now a lot more complex than it was before. I also had to edit and debug a ~150 line IF Statement almost 6 separate times due to changes in how the live update worked making the calcSuvat() function be used in completely different ways.


The new file architecture will work by having two main files (main.js and input.js) and two folders (“topics” and “graphics”).

input.js will collect the inputs and configure them e.g. resolving forces and converting from radians to degrees. Afterwards, it will send the configured inputs to the files in the “topics” and “graphics” folders.

main.js will output the results given from the “topics” and “graphics” folders as the inputs are updated.

The “topics” folder will contain all the math needed to answer the questions e.g. the SUVAT calculator and then sends all the answer’s to main.js

The “graphics” folder will contain all of the graphical components that will be used to depict the diagrams of each question. These will also be updated as the inputs change and will be sent to main.js.

Next, I will either start on the making some of the graphics or add more variables to input to fully flesh out the maths portion of the projectile motion calculations.

0
17

Comments 0

No comments yet. Be the first!