APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

ejs to ejss post and replies

Return to the ejs to ejss thread
Login to post to this thread

How to convert java to javascript simulation easy?
Mariusz Krasinski
17 Posts

Is there any easy way of coverting old ejs simulations (not 3D) to the new javascript format.
After opening old file in EJS 5 all html part is blank.

And additional question.
In javascript format the previeew screen is blank and No WebGl supported visible. Of course I can start simulation in html browser and all visible but is any chance to see objects on the screen during writing simulation like in the 4.x versions.


Replies to How to convert java to javascript simulation easy?

Re: How to convert java to javascript simulation easy? -
Francisco Esquembre
237 Posts

Mariusz,

No. There is no direct translation for the view, because of the different way Java Swing and HTML5 work.

The way I do it myself is to open the old simulation on one EJS and the new in another, side by side. I then create HTML view elements in the  new view that match (or closely resemble) what the Java view does.

Paco



Re: Re: How to convert java to javascript simulation easy? -
Mariusz Krasinski
17 Posts

I use this method as well but I hoped that maybe there is a simpler method for some objects.
Anyway, thank you for fast answer.

Thank You also for EJS. Very, very helpfull.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book