2017-06-16 2nd Sakizushi.Su Follow 2017-06-16 08:25:01 License: MIT License Fork0 Fav0 View173 Play Stop Reload Fullscreen Smart Phone Readme JavaScript 14 lines HTML 13 lines CSS 10 lines 2017-06-16 2nd Processing.js v1.4.0 // example from: http://d.hatena.ne.jp/amachang/20080509/1210355674 thanks to amachang // canvas 要素 var canvas = document.getElementsByTagName('canvas')[0]; // Processing のソースコードが書かれた script 要素 var codeElm = document.getElementById('processing-code'); // 要素の内容を取得する var code = codeElm.textContent || codeElm.innerText; // Processing 関数を呼び出す Processing(canvas, code); <canvas id='world' width="465" height="465"></canvas> <script id="processing-code" type="application/processing"> // ここに Processing のソースコードが書ける size(400, 400); noStroke(); fill(255, 0, 0, 255 * 0.5); ellipse(200, 150, 200, 200); fill(0, 255, 0, 255 * 0.5); ellipse(250, 250, 200, 200); fill(0, 0, 155, 255 * 0.5); ellipse(150, 250, 200, 200); </script> 2017-06-16 2nd * { margin: 0; padding: 0; border: 0; } body { background: #dff; font: 30px sans-serif; } // example from: http://d.hatena.ne.jp/amachang/20080509/1210355674 thanks to amachang // canvas 要素 var canvas = document.getElementsByTagName('canvas')[0]; // Processing のソースコードが書かれた script 要素 var codeElm = document.getElementById('processing-code'); // 要素の内容を取得する var code = codeElm.textContent || codeElm.innerText; // Processing 関数を呼び出す Processing(canvas, code); <canvas id='world' width="465" height="465"></canvas> <script id="processing-code" type="application/processing"> // ここに Processing のソースコードが書ける size(400, 400); noStroke(); fill(255, 0, 0, 255 * 0.5); ellipse(200, 150, 200, 200); fill(0, 255, 0, 255 * 0.5); ellipse(250, 250, 200, 200); fill(0, 0, 155, 255 * 0.5); ellipse(150, 250, 200, 200); </script> * { margin: 0; padding: 0; border: 0; } body { background: #dff; font: 30px sans-serif; } use an iframe compat browser, deer Play on jsdo.it games Author Share ブログに埋め込む QR Tag Download Complete! Description What kind of game? Control Device Smartphone Controllerjsdo.it WebSocket Controller» Mouse Keyboard Touch Device Fullscreen Activated Inactivated jsdo.it games から削除する Submit Author Sakizushi.Suto Tweet Default Panel Auto play Screenshot Readme JavaScript HTML CSS Size Width: px Height: px code <script type="text/javascript" src="http://jsdo.it/blogparts/8zmf/js"></script> art&design Discussion Questions on this code? Tags art&design