Snippet Information
Version: 21 (see latest version)
Author: jeff
Language: php
Licensed under MIT
Other versions
Snippets included by
processing_test_2 v.21
Snippets that include
processing_test_2 v.21
None
"processing_test_2" v.21 (see latest version)
Description
Testing processing again
Run
| View code [+] |
Create a snippet based on this »
<?php include_snippet(1,"make_pretty"); ?>
<?php include_snippet(1,"processing_init"); ?>
<?php include_snippet(1,"twitter_trends_php"); ?>
<h1>Processing Test</h1>
<script type="application/processing">
size(760,400);
stroke(#550000,220);
<?php
$pos = 0;
foreach(terms() as $key => $value) {
$pos += 1;
?>
fill(#990000,160);
ellipse(<?php echo 70*$pos; ?>,200,<?php echo 10*$value; ?>,<?php echo 10*$value; ?>);
<?php
}
$pos = 0;
foreach(terms() as $key => $value) {
$pos += 1;
?>
fill(#ffffff);
text("<?php echo $key; ?>",<?php echo 70*$pos; ?>,200);
<?php
}
?>
</script><canvas></canvas>
</body>
</html>

Comments (0) | View comments for all versions (0)
Log in if you have a Kogbox account.