Japanese Patterns

Japanese Patterns

DIY Portfolio

Round images


「えんとつ町のプペル」作者ー西野 亮廣

「感情に支配されず、常識に支配されず、お金に支配されず、時代の変化を冷静に見極め、受け止め、常に半歩だけ先回りをすることが大切だ。船底に穴が開き、沈んでいく船の、『まだマシな部屋』を探してはいけない。最後に水に浸かる部屋を奪い合ってはいけない。今の状況を正確に捉え、生き延びることが大切だ」、「キミの人生の決定を、他人や環境や時代に委ねるな。キミの人生はキミが決定しろ。常識に屈するな。屈しないだけの裏付けを持て。それは行動力だ。それは情報量だ」という「えんとつ町のプペル」作者の西野 亮廣の檄。

ART299: How to set up a local server on Mac to test for develop p5.js on local computer. & DC2

There are lot of ways to develop using Processing. Using Processing language and create pde file, using p5.js locally or editing online.

1) Today I used Processing language using P3 sketch, which is different from p5.js. For example, setting the canvas size is “size(600, 400);” whereas p5.js is “createCanvas(600, 400);”. P3 creates pde file and play button generate visuals. However, Processing is written in Java and it creates applets, which often crashes systems according to Daniel Shiffman.

2) I also used p5.js by downloading p5.js library and folder set up.

3) I can also use p5 editor at https://alpha.editor.p5js.org/
You can view the visual by open the index.html file, which opens sketch.js to show the visual.

But it is better to set up an local host in your development computer, the instruction are at https://github.com/processing/p5.js/wiki/Local-server.
In case of Mac, run terminal to run Python local server by entering:
“python -m SimpleHTTPServer”.

It will set up local IP address on port:8000.

Then go to browser to enter:
http://localhost:8000” then go to the folder where index.html and sketch.js resides.
It will open the http://localhost:8000/p5/empty-example/ to show the visual.

In case of browser p5.js editor, you can save code if you have an account.