loadData in playgroundjs
HTML
<script src="https://raw.githubusercontent.com/rezoner/playground/master/build/playground.js"></script>
<div id="Container"></div>
CSS
body {
background-color: lightblue;
}
#Container {
width: 300px;
height: 300px;
margin: 15px;
}
JavaScript
var app = new PLAYGROUND.Application({
background: "none",
paths: {
data: "https://dl.dropboxusercontent.com/u/6253419/"
},
container:"#Container",
create: function() {
/* things to preload */
this.loadData("myFile");
},
render: function() {
this.layer
.clear("#555555")
.font("14px Arial")
.fillStyle('white')
.fillText(this.data.myFile.value, 5,18)
}
});
/* myFile.json
{"value": "Hello"}
*/