catch.jp-wiki
¥×¥í¥°¥é¥ß¥ó¥°
±Ñ¸ì³Ø½¬
ÍúÎò
¸¡º÷
Dropdown
°ìÍ÷
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.molle...
-[[Example:http://p5play.molleindustria.org/examples/inde...
-[[¥ê¥Õ¥¡¥ì¥ó¥¹:http://p5play.molleindustria.org/docs/ind...
* ¤Ï¤¸¤áÊý [#gfbe93cb]
+ ¥Æ¥¥¹¥È¥¨¥Ç¥£¥¿¤òÍÑ°Õ¤¹¤ë
+ p5.js¤ò[[¥À¥¦¥ó¥í¡¼¥É:http://p5js.org/download/]]¤¹¤ë
+ p5.play.js¤â[[¥À¥¦¥ó¥í¡¼¥É:http://p5play.molleindustria...
+ p5.js¤Èp5.play.js¤Ï¡¢lib¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¤ª¤¯
+ ¤³¤ó¤ÊHTML¥Õ¥¡¥¤¥ë¤òÍÑ°Õ¤¹¤ë
<!DOCTYPE html>
<html>
<head>
<title>p5.play Example</title>
<script src="lib/p5.js" type="text/javascript"></scr...
<script src="lib/p5.play.js" type="text/javascript">...
<script src="sketch.js" type="text/javascript"></scr...
</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 li...
-[[p5.js¤Çºî¤ë¥²¡¼¥à³«È¯Ä¶ÆþÌ硪100¹Ô°ÊÆâ¤Ç¡Ö¥Ö¥í¥Ã¥¯Êø¤·...
* ´ØÏ¢¥Ú¡¼¥¸ [#g3b86914]
-[[p5.js]] ´Êñ¤ÊÀâÌÀ
-[[p5.turtle.js:http://ycatch.github.io/p5.turtle.js/inde...
½ªÎ»¹Ô:
[[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.molle...
-[[Example:http://p5play.molleindustria.org/examples/inde...
-[[¥ê¥Õ¥¡¥ì¥ó¥¹:http://p5play.molleindustria.org/docs/ind...
* ¤Ï¤¸¤áÊý [#gfbe93cb]
+ ¥Æ¥¥¹¥È¥¨¥Ç¥£¥¿¤òÍÑ°Õ¤¹¤ë
+ p5.js¤ò[[¥À¥¦¥ó¥í¡¼¥É:http://p5js.org/download/]]¤¹¤ë
+ p5.play.js¤â[[¥À¥¦¥ó¥í¡¼¥É:http://p5play.molleindustria...
+ p5.js¤Èp5.play.js¤Ï¡¢lib¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¤ª¤¯
+ ¤³¤ó¤ÊHTML¥Õ¥¡¥¤¥ë¤òÍÑ°Õ¤¹¤ë
<!DOCTYPE html>
<html>
<head>
<title>p5.play Example</title>
<script src="lib/p5.js" type="text/javascript"></scr...
<script src="lib/p5.play.js" type="text/javascript">...
<script src="sketch.js" type="text/javascript"></scr...
</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 li...
-[[p5.js¤Çºî¤ë¥²¡¼¥à³«È¯Ä¶ÆþÌ硪100¹Ô°ÊÆâ¤Ç¡Ö¥Ö¥í¥Ã¥¯Êø¤·...
* ´ØÏ¢¥Ú¡¼¥¸ [#g3b86914]
-[[p5.js]] ´Êñ¤ÊÀâÌÀ
-[[p5.turtle.js:http://ycatch.github.io/p5.turtle.js/inde...
¥Ú¡¼¥¸Ì¾: