3.4 What is a view folder?
Once you've successfully started your first simulation, you should be
able to find the folder for this new project in the phetsims directory.
In our case, it is called newton-raphson
But wait, I smell another very important question in the air
Question: What even is a view folder? What is it all about?
Answer: A view folder contains all the JavaScript files that represent
the visual components that are going to end up on the simulation
webpage. When you first start a new simulation all you will have are the
default files and so the only file present inside the view folder at
this time would be NewtonRaphsonScreenView.js
. This file is
responsible for putting all the components together to make the
simulation work the way you want it to. (To learn more about how to work
with this file, See Working with ScreenView to put all the components
together)
Question: Where can I find it?
Answer: The pathing for finding the view folder should be as
follows: phetsims/newton-raphson/js/newton-raphson/view
. This is the
folder you're looking for to start developing.
Once we're done with this tutorial, the view folder would look
something like this with all the files: