$("#demo").spritespin({
source: "https://www.jurassicworldevolution.com/files/360-sprites/ankylosaurus_spritesheet_0.jpg",
// Define the size of the display.
width: 640,
height: 360,
// The total number of frames to show. Here it is 34 although
// 36 images might fit into the sprite. But the last two are
// missing as you can see in the image
frames: 180,
// The number of frames in one row of the sprite sheet
// This can often be omitted. Spritespin might calculate the right number by its own.
// Interaction sensitivity and direction
framesX: 14,
frameTime: 33.333,
loop: true,
sense: -1,
responsive: false,
reverse: false,
sizeMode: 'fit',
mods: ['drag', '360'],
canvasRatio: 1
})
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.