     var lastSystemTime: TimeInterval
     var textureCache: NSCache<NSString, SKTexture>
     let textureLoader: TextureLoader?
-    let textureAtlases: [SKTextureAtlas]?
+    var textureAtlases: [SKTextureAtlas]?
     
-    public init(animationData: ModelData, textureLoader: TextureLoader?) {
+    public init(animationData: ModelData, textureLoader: TextureLoader?, entityName: String? = nil) {
         self.animationData = animationData
         self.textureLoader = textureLoader
         
-        if let atlasNames = self.animationData.atlasNames {
+        self.textureCache = NSCache()
+        self.lastSystemTime = 0
+        
+        let delegateAtlases = textureLoader?.textureAtlases(animationManager: self)
+        if let delegateAtlases = delegateAtlases {
+            textureAtlases = delegateAtlases
+        } else  if let atlasNames = self.animationData.atlasNames {
             var atlases = [SKTextureAtlas]()
             for atlasName in atlasNames {
                 let atlas = SKTextureAtlas(named: atlasName)

            textureAtlases = nil
        }
        
        self.textureCache = NSCache()
        
        self.lastSystemTime = 0
    }
    
    public func update(_ currentTime: TimeInterval) {


public protocol TextureLoader {
    func textureNamed(_ textureName: String, path: String?) -> SKTexture?
    func textureAtlases(animationManager: AnimationManager) -> [SKTextureAtlas]?
}

public extension TextureLoader {
    func textureAtlases(animationManager: AnimationManager) -> [SKTextureAtlas]? {
        return nil
    }
}

public class AnimationManager {
