Skip to content

Instantly share code, notes, and snippets.

@neenhouse
Created September 1, 2017 15:11
Show Gist options
  • Save neenhouse/d0491c25d5cf1664fb192f3d6ffd5865 to your computer and use it in GitHub Desktop.
Save neenhouse/d0491c25d5cf1664fb192f3d6ffd5865 to your computer and use it in GitHub Desktop.
Ponies
(function(){
var basePonyConfig = document.createElement('script');
basePonyConfig.setAttribute('src','https://panzi.github.io/Browser-Ponies/browserponies.js');
basePonyConfig.setAttribute('id','browser-ponies-script');
document.head.appendChild(basePonyConfig);
var ponyScript = document.createElement('script');
ponyScript.setAttribute('src','https://panzi.github.io/Browser-Ponies/basecfg.js');
ponyScript.setAttribute('id','browser-ponies-script');
document.head.appendChild(ponyScript);
function init(){
if(window.BrowserPonies && window.BrowserPoniesBaseConfig) {
document.head.appendChild(ponyScript);
BrowserPonies.setBaseUrl('https://panzi.github.io/Browser-Ponies/');
BrowserPonies.loadConfig(BrowserPoniesBaseConfig);
BrowserPonies.loadConfig({
'baseurl':'https://panzi.github.io/Browser-Ponies/',
'fadeDuration':500,
'volume':1,'fps':25,'speed':3,'audioEnabled':false,'showFps':false,'showLoadProgress':true,
'speakProbability':0.1,
'spawn':{'applejack':1,'fluttershy':1,'pinkie pie':1,'rainbow dash':1,'rarity':1,'twilight sparkle':1},
'autostart':true
});
BrowserPonies.start();
} else {
setTimeout(init, 500);
}
}
init();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment