Closed kxcrl closed 10 months ago
Tile every sprite at its current Y position across the X axis to create an animation.
const frameCount = 0; function animateSprites(sceneSprites) { sceneSprites.forEach((sprite) { if (spriteSheetWidth == 100px) { return; } if (atEdgeOfSpriteSheet(sprite)) { sprite.tilePosition.x = 0; } else { sprite.tilePosition.x += 100; } }) } canvas.app.ticker.add(() => { if (frameCount % FRAME_RATE == 0) { animateSprites(sceneSprites); } })
Tile every sprite at its current Y position across the X axis to create an animation.