Clock Home

Sprite animator.

spriteanimator.js
let editSprite = new Sprite({ el: 'canvas1', cols: 16, rows: 16 }); let editor = new SpriteEditor({ sprite: editSprite, persistenceId: 'examples.spriteAnimator.editor' }); let animatedSprites = []; for( var i = 1; i < 10; i++ ) { let animatedSprite = new Sprite({ el: 'anim' + i, cols: 16, rows: 16 }); animatedSprites.push( animatedSprite ); } let spriteAnimator = new SpriteAnimator({ editor: editor, el: 'animatordiv', animatedSprites: animatedSprites, count: 16, persistenceId: 'examples.spriteAnimator' }); new ColorPicker({ el: 'colorPicker', imageUrl: 'images/pexels-photo-220320.jpeg', historySize: 16, maxWidth: 200, maxHeight: 150, persistenceId: 'examples.colorPicker', onSelect: function( hex ) { editor.setColor( hex ); } });