Skip to content

Instantly share code, notes, and snippets.

@nightson
nightson / index.html
Created June 3, 2013 13:12
A CodePen by nightson.
<canvas id="sakura"></canvas>
<div class="btnbg">
<button type="button" onclick="toggleAnimation(this)">Stop</button>
</div>
<!-- sakura shader -->
<script id="sakura_point_vsh" type="x-shader/x_vertex">
uniform mat4 uProjection;
uniform mat4 uModelview;
uniform vec3 uResolution;
function addButton(toolbarId, buttonId, label, iconPath, firstRun) {
var toolbar = document.getElementById(toolbarId);
var toolbarButton = document.createElement("toolbarbutton");
toolbarButton.setAttribute("id", buttonId);
toolbarButton.setAttribute("type", "button");
toolbarButton.setAttribute("removable", "true");
toolbarButton.setAttribute("class",
"toolbarbutton-1 chromeclass-toolbar-additional");
toolbarButton.setAttribute("label", label);
toolbarButton.style.listStyleImage = "url(" + iconPath + ")";