Strip out origin because it is suffering

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-30 08:20:14 -08:00
parent eb5dc92b5b
commit d4b08d7196

View File

@ -51,13 +51,7 @@ export class SpriteInstance {
this.frameCount = this.subset.frames.length
this.frame = this.subset.frames[this.frameIndex]
let s = new PIXI.Sprite(this.frame.texture)
let originX = this.frame.originX ?? this.frame.width/2
let originY = this.frame.originY ?? this.frame.height/2
s.x -= originX
s.y -= originY
this.container.addChild(s)
this.container.pivot.x = originX
this.container.pivot.y = originY
}
}