- Äɲ䵤줿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
- ºï½ü¤µ¤ì¤¿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
[[Programing]] > p5.play.js
[[Programing]] > [[p5.js]] > p5.play.js
#title("¤Ï¤¸¤á¤è¤¦¡¢p5.play.js")
p5.play.js¤Ï¡¢p5.jsÍѤΥ²¡¼¥à¥é¥¤¥Ö¥é¥ê¤Ç¡¢¥¹¥×¥é¥¤¥È¤ä¾×ÆÍȽÄê¤Ê¤É¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤è¤ê¥·¥ó¥×¥ë¤µ¤òÍ¥À褷¤Æºî¤é¤ì¤Æ¤ª¤ê¡¢3D¤äʪÍý¥¨¥ó¥¸¥ó¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¡£
#contents
* ¸ø¼°¥µ¥¤¥È [#g9f5dd1a]
-[[p5.play - a game library for p5.js:http://p5play.molleindustria.org/]]
-[[Example:http://p5play.molleindustria.org/examples/index.html]]
-[[¥ê¥Õ¥¡¥ì¥ó¥¹:http://p5play.molleindustria.org/docs/index.html]]
* ¤Ï¤¸¤áÊý [#gfbe93cb]
+ ¥Æ¥¥¹¥È¥¨¥Ç¥£¥¿¤òÍÑ°Õ¤¹¤ë
+ p5.js¤ò[[¥À¥¦¥ó¥í¡¼¥É:http://p5js.org/download/]]¤¹¤ë
+ p5.play.js¤â[[¥À¥¦¥ó¥í¡¼¥É:http://p5play.molleindustria.org/]]¤¹¤ë
+ p5.js¤Èp5.play.js¤Ï¡¢lib¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¤ª¤¯
+ ¤³¤ó¤ÊHTML¥Õ¥¡¥¤¥ë¤òÍÑ°Õ¤¹¤ë
<!DOCTYPE html>
<html>
<head>
<title>p5.play Example</title>
<script src="lib/p5.js" type="text/javascript"></script>
<script src="lib/p5.play.js" type="text/javascript"></script>
<script src="sketch.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
+ sketch.js¤òºî¤Ã¤Æ¡¢¤³¤ó¤Ê¥³¡¼¥É¤òµ½Ò¤¹¤ë¡£¤³¤ì¤Ï¡¢HTML¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¥Õ¥©¥ë¥À¤ËÃÖ¤¯
function setup() {
createCanvas(800,400);
createSprite(400, 200, 50, 50);
}
function draw() {
background(255,255,255);
drawSprites();
}
+ HTML¥Õ¥¡¥¤¥ë¤ò³«¤¯
* ¥µ¥ó¥×¥ë [#r0294f9d]
¤¤¤¯¤Ä¤«¤ä¤Ã¤Æ¤ß¤¿¡£sketch.js¤Ë¡¢¤³¤ì¤òµ½Ò¤¹¤ë¡£
** ¥Þ¥¦¥¹¤ÇÉÁ¤¯ [#dc5b7510]
¥Þ¥¦¥¹¤Î°ÌÃ֤ˡ¢¥¹¥×¥é¥¤¥È¤Ç»Í³Ñ¤òÉÁ¤¯¡£
var img;
setup = function() {
createCanvas(800,400);
background(200);
img = createSprite(400, 200, 50, 50);
}
draw = function() {
img.position.x = mouseX;
img.position.y = mouseY;
drawSprites();
}
** ¥¤¥ó¥¹¥¿¥ó¥¹¥â¡¼¥É¤Î¥µ¥ó¥×¥ë [#g5653ab8]
P5.PLAY.JS¤¬¡¢¥¤¥ó¥¹¥¿¥ó¥¹¥â¡¼¥É¤ÇÆ°¤¯¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤¿¡ª
// instance mode example
var s = function(p) {
var img;
p.setup = function() {
p.createCanvas(800,400);
p.background(200);
img = p.createSprite(400, 200, 50, 50);
}
p.draw = function() {
img.position.x = p.mouseX;
img.position.y = p.mouseY;
p.drawSprites();
}
}
var myp5 = new p5(s);
* »²¹Í¤Ë¤Ê¤ë [#m62add73]
-[[Space invaders game made with p5.js and the p5.play library - YouTube:https://www.youtube.com/watch?v=XHAsp17oyP0]] ¥¤¥ó¥Ù¡¼¥À¡¼¤È¤¤¤¦¤è¤ê¥¢¥¹¥Æ¥í¥¤¥É
-[[p5.js¤Çºî¤ë¥²¡¼¥à³«È¯Ä¶ÆþÌ硪100¹Ô°ÊÆâ¤Ç¡Ö¥Ö¥í¥Ã¥¯Êø¤·¡×¤ËÄ©À路¤Æ¤ß¤ë¡ª : ¤¦¤¨¤Ö¤Ï¤Ã¤¯:http://webhacck.net/archives/896790.html]]
* ´ØÏ¢¥Ú¡¼¥¸ [#g3b86914]
-[[p5.js]] ´Êñ¤ÊÀâÌÀ
-[[p5.turtle.js:http://ycatch.github.io/p5.turtle.js/index.ja.html]] p5.js¤Î¤¿¤á¤Î¥¿¡¼¥È¥ë¥°¥é¥Õ¥£¥Ã¥¯¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤ß¤¿