Skip to content

Instantly share code, notes, and snippets.

@christiannolles
Last active July 31, 2017 00:09
Show Gist options
  • Save christiannolles/4ec87aac4303e2c5fefed51b362529d3 to your computer and use it in GitHub Desktop.
Save christiannolles/4ec87aac4303e2c5fefed51b362529d3 to your computer and use it in GitHub Desktop.
<html>
<head>
<script defer src=http://CDN.JSDelivr.net/npm/p5></script>
<script defer src=http://CDN.JSDelivr.net/npm/p5/lib/addons/p5.dom.min.js></script>
<script defer src=sketch.js></script>
</head>
<body><p>Text before</p>
<div id="p5Container"></div>
<p>Text after.</p> </body>
</html>
var data;
function preload() {
data = loadJSON("http://www.dagelijkseoverdenkingen.nl/json/");
}
function setup() {
noCanvas();
// var overdenking = data.Articles[1].Title;
var overdenking = data.Articles;
for (var i = 0; i < overdenking.length; i++){
createElement('h1', overdenking[i].Title).parent(p5Container);
createElement('p', overdenking[i].Date).parent(p5Container);
}
// createP(overdenking);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment