Created
April 6, 2017 22:27
-
-
Save benyanke/c576d8c7275e8db85737ce0d249a75f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The HTML5 Herald</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> | |
<link rel="stylesheet" href="css/styles.css?v=1.0"> | |
<!--[if lt IE 9]> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<script src="https://ex.surge.sh/exsurge.js"></script> | |
<script> | |
var ctxt = new exsurge.ChantContext(); | |
var gabc = "(f3) EC(ce!fg)CE(f) *(,) ad(fe~)vé(f!gwhf)nit(f) (,)" | |
var score = exsurge.Gabc.loadChantScore(ctxt, gabc, true); | |
// perform layout on the chant | |
score.performLayout(ctxt, function() { | |
score.layoutChantLines(ctxt, 1000, function() { | |
// render the score to svg code | |
var svgNode = document.createElement('div'); | |
var innerHtml = score.createDrawable(ctxt); | |
svgNode.innerHTML = innerHtml; | |
document.body.appendChild(svgNode); | |
}); | |
}); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment