Sha256: 7e19da5cfa25b49a51b3aa8f71193bd3cf7cfba5e8ec417b3bd0835d497e061c
Contents?: true
Size: 924 Bytes
Versions: 60
Compression:
Stored size: 924 Bytes
Contents
mumuki.load(() => { let characters = mumuki.characters || {}; muvment.loadCharacters(characters, '/character/animations.json').then((characterFinishedLoadingPromises) => { Promise.all(characterFinishedLoadingPromises).then((characterIds) => { mumuki.presenterCharacter = characters[atRandom(characterIds)]; placeKidsAnimations(); }); }); function placeKidsAnimations() { placeAnimation('.mu-kids-character-result-aborted', 'failure'); placeAnimation('.mu-kids-character-animation', 'blink'); placeAnimation('.mu-kids-character-context', 'context'); placeAnimation('.mu-kids-character-result', 'blink'); } function placeAnimation(selector, clip) { let canvas = $(selector); mumuki.presenterCharacter.playAnimation(clip, canvas); } function atRandom(array) { return array[Math.floor(Math.random() * array.length)]; } mumuki.characters = characters; });
Version data entries
60 entries across 60 versions & 1 rubygems