XSpriteManager.js 966 B

123456789101112131415161718192021222324252627
  1. let log$A = new Logger$1("subSequence")
  2. , DEFAULT_FRAME_RATE = 30
  3. , ROOT_MESH_ANIM_PROPERTY = ["scaling", "position", "rotation"]
  4. , MESH_TAG = "XSubSequence";
  5. class XSpriteManager extends SpriteManager {
  6. constructor(e, t, r, n, o) {
  7. super(e, t, r, n, o);
  8. E(this, "originalPositions");
  9. this.originalPositions = new Array,
  10. this.sprites.forEach(a=>{
  11. this.originalPositions.push(a.position)
  12. }
  13. )
  14. }
  15. static Parse(e, t, r) {
  16. const n = new XSpriteManager(e.name,"",e.capacity,{
  17. width: e.cellWidth,
  18. height: e.cellHeight
  19. },t);
  20. e.texture ? n.texture = Texture.Parse(e.texture, t, r) : e.textureName && (n.texture = new Texture(r + e.textureUrl,t,!0,e.invertY !== void 0 ? e.invertY : !0));
  21. for (const o of e.sprites) {
  22. const a = Sprite.Parse(o, n);
  23. n.originalPositions.push(a.position)
  24. }
  25. return n
  26. }
  27. }