Unfolding for processing 2.1 fails in JavaScript mode

拥有回忆 提交于 2019-12-13 04:36:06

问题


I downloaded the just released Unfolding Maps for Processing 2.1 and the examples work fine in Java mode but fail to run in the JavaScript mode. Is there anything which can be done to make them JavaScript mode compatible?

The error I'm getting is uncaught exception: Processing.js: Unable to execute pjs sketch: ReferenceError: UnfoldingMap is not defined


回答1:


The technology behind Processing and Processingjs is completely different. A library for Processing/Java will not work with Processingjs/Javascript. Processingjs is still very young, so there aren't many supporting libraries yet.

However, you could make a Java applet. Open the Processing IDE and go to Tools > Add Tool... and install the AppletMaker tool. An Applet is basically a small java program embedded on a web page that runs within a browser. In this way you could still use Unfolding Maps in your project.

Disclosure: I've never used the Processing Applet Export and Signer tool before, so check whether it is a feasible solution or not to your problem.




回答2:


No, unfortunately not. (Unfolding developer, here)

Unfolding does not support Processing.js, due to the reasons described by @user2468700



来源:https://stackoverflow.com/questions/21586554/unfolding-for-processing-2-1-fails-in-javascript-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!