In my commentary on Lee Stemkoski, I noted that sprite sheets containing more than one row do not work the same when using the newer THREE.TextureLoader() .
I use the following 4x4 sprite image in my tests.

Without changing Lee Stemkoski's TextureAnimator , TextureAnimator , provided that you have a complete sprite table of 16 tiles.
var texture = new THREE.TextureLoader().load('grid-sprite.jpg'); var annie = new TextureAnimator(texture, 4, 4, 16, 150);
Animated texture works in the opposite direction. Codepen demo

So I made my own, which I call πππ THREE.SpriteSheetTexture πππ
THREE.SpriteSheetTexture = function(imageURL, framesX, framesY, frameDelay, _endFrame) { var timer, frameWidth, frameHeight, x = 0, y = 0, count = 0, startFrame = 0, endFrame = _endFrame || framesX * framesY, CORSProxy = 'https://cors-anywhere.herokuapp.com/', canvas = document.createElement('canvas'), ctx = canvas.getContext('2d'), canvasTexture = new THREE.CanvasTexture(canvas), img = new Image(); img.crossOrigin = "Anonymous" img.onload = function(){ canvas.width = frameWidth = img.width / framesX; canvas.height = frameHeight = img.height / framesY; timer = setInterval(nextFrame, frameDelay); } img.src = CORSProxy + imageURL; function nextFrame() { count++; if(count >= endFrame ) { count = 0; }; x = (count % framesX) * frameWidth; y = ((count / framesX)|0) * frameHeight; ctx.clearRect(0, 0, frameWidth, frameHeight); ctx.drawImage(img, x, y, frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); canvasTexture.needsUpdate = true; } return canvasTexture; }
And what you need to know about this imageURL is the URL of your spritesheet framesX , how many frames fit along the x-axis (left and right) framesY , how many frames fit along the y-axis (up and down) delay , how long the texture expects to move to the next frame . _endFrame is optional. - How many frames exist (if the full line is not used)
It all looks something like this
texture = new THREE.SpriteSheetTexture('https://s3-us-west-2.amazonaws.com/s.cdpn.io/68819/grid-sprite.jpg', 4, 4, 100, 16); var material = new THREE.MeshBasicMaterial({ map: texture }); geometry = new THREE.BoxGeometry( 200, 200, 200 ); mesh = new THREE.Mesh( geometry, material ); scene.add( mesh );
And there was a lot of joy !!! Codepen Demo Here