Take a look at the file https://fc.jenika.com/code/current/viewer .
Inside is:
document.addEventListener("DOMContentLoaded",function() {
var url = new URLSearchParams(window.location.search);
var page=new FamilyCircles.canvas({url:url.get('data'),
data : report,
target: document.getElementById("fc")});
});
function report() {
console.log(this.toString());
};
The above is not the cleanest example.
But it highlights three things:
-
target - what you want to render the model in defaults to the document body if not specified.
-
url - specify any url that will return Family Circles JSON.
-
data - this can either be a Family Circles JSON or it can be a function call that will return a Family Circles JSON.
If you link to my site for the scripts I’m fine with that. A copyright will get included in the fc-min.js it self soon.