Strip out origin because it is suffering
This commit is contained in:
parent
eb5dc92b5b
commit
d4b08d7196
|
@ -51,13 +51,7 @@ export class SpriteInstance {
|
||||||
this.frameCount = this.subset.frames.length
|
this.frameCount = this.subset.frames.length
|
||||||
this.frame = this.subset.frames[this.frameIndex]
|
this.frame = this.subset.frames[this.frameIndex]
|
||||||
let s = new PIXI.Sprite(this.frame.texture)
|
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.addChild(s)
|
||||||
this.container.pivot.x = originX
|
|
||||||
this.container.pivot.y = originY
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user