一个简单的工具,允许对使用p5.js的python代码进行转换。
pyp5js的Python项目详细描述
pyp5js:python到p5.js转录器
Processing ideas and Python 3 together with P5.js in the browser, using Transcrypt.
下面是一个使用p5.js api的有效python代码示例:
frompyp5jsimport*defsetup():createCanvas(200,200)background(160)defdraw():fill('blue')background(200)r=sin(frameCount/60)*50+50ellipse(100,100,r,r)