Pregunta

I write a processing(2.1.1) project in java and now I want to export it as javascript.but there is a problem,I use the peasycam library,it is a third-party library and offer only jar file(peasycam.jar) and no js file(no peasycam.js).I read something about this in the official website of Processing,it seems to have no solution unless peasycam offer a peasycam.js.

¿Fue útil?

Solución

Peasycam does not have a library for Processing.js. There's not much that can be done about that unless the original author or someone else (hint: you) wants to write one.

You have the option of using ArcBall which has a JS version that you can include with your projects.

You can see an example of how it works here: http://www.math.tamu.edu/~romwell/arcball_js/index.html

And see the ArcBall.pde here: https://github.com/motionbank/deborah-hay-processing/blob/master/marker-analysis/scene-probability/backbone_01/arcball.pde

If you don't want to worry about ArcBall then I suggest you learn about Quaternions and write your own code to handle 3D scenes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top