I did a quick translation of your example. It appears as a new "Particles" screen in PhET's example-sim, see
https://github.com/phetsims/example-sim. The code for this screen is in
https://github.com/phetsims/example-sim/js/particles. It's 5 .js files, so it should be relatively simple to compare to your example. Sorry that it's not an exact port of your example. I couldn't resist fixing/improving a few things, since this will hopefully be useful to the PhET community.
My general strategy in doing this translation was to separate things into model and view classes, following the general principles of the MVC (Model View Controller) design pattern. In a PhET sim, the model is typically classes containing one or more Property instances. The view is typically a scenery Node that observes the model Properties, and changes the view to match the state of the model.
I'm going to be unavailable to answer questions for the remainder of June. But if you have specific questions, post them here, and hopefully someone from the PhET community will respond.
Chris Malley
PixelZoom, Inc.