151128-processing 與 p5.js的區別

weixin_33861800發表於2015-11-28

因為你可能把你的素描不單單當作繪圖的畫布,故size()方法已經被createcanvas()方法取代,以此說明還可以建立其他元素。P5.js通過將畫布從一個單一的桌面應用擴充套件到瀏覽器的方式,開啟了Processing的強大能力。




http://www.sitepoint.com/processing-js-vs-p5-js-whats-difference/?utm_source=tuicool

1-Processing is an environment/programming language that is meant to make visual, interactive applications extremely easy to write. It can be used for everything from teaching children how to code to visualizing scientific data.


2-p5 is made to make coding accessible for artists, designers, educators, and beginners, and reinterprets this for today’s web

P5 is a direct JS port of the Processing language. Processing.js is a converter which interprets pure Processing code into JS on the fly. The latter requires you to learn Processing, but not JS, and vice versa.


P5js is a young and ambitious project that aims to bring visual programming to the masses in a manner more approachable than Processing was until now. While it is currently being forced to be dumbed down somewhat feature-wise, the team is hard at work porting the rest of the Processing language to this JS counterpart.

The advantages of using P5 over Processing.js are:

Writing JS code you’re probably already familiar with

Officially supported by the Processing Foundation

HTML DOM manipulation with the DOM library addon – adding common HTML elements to your P5 sketches and more

Lighter on the resources when not drawing

The advantage of using Processing.js:

You learn Processing and can use it in environments where it’s faster and more portable to non-web environments

Seems to have a steadier frame rate and performs better in both demos we tried