Skip to content

Instantly share code, notes, and snippets.

View henningit's full-sized avatar

Henning D. henningit

  • Heidelberg, Germany
  • 09:17 (UTC +02:00)
View GitHub Profile
@henningit
henningit / animate.js
Last active July 26, 2020 08:45 — forked from jjcf89/snippet-oracle.js
Javascript to draw lines in Yucata's Oracle of Delphi
(function () {
$.extend(y$.game, {
animate: function (idx, action) {
function addAnimationOfOracleResourceCleanup() {
if (y$.game.isOracleDiceActionResource(y$.gameState.GameData.OracleActionResource)) {
aSequence.push(y$.game.getAnimateOracleDieToCenterFunction(plrIdx));
} else if (y$.game.isOracleCardActionResource(y$.gameState.GameData.OracleActionResource)) {
aSequence.push(y$.game.getAnimateOracleCardOutOfCircleFunction(plrIdx));
}
}
@henningit
henningit / svg-classes.js
Created July 11, 2016 11:28 — forked from branneman/svg-classes.js
SVG — hasClass, addClass, removeClass, toggleClass
//
// SVG — hasClass, addClass, removeClass, toggleClass
// Source:
// https://gist.github.com/branneman/8436956
// Taken and adapted from:
// http://toddmotto.com/hacking-svg-traversing-with-ease-addclass-removeclass-toggleclass-functions/
//
if (SVGElement && SVGElement.prototype) {