Closed zekeatchan closed 2 months ago
I looked at this the other day while going through the docs because there are several duplicated functions between these two mixins. This can't become one single component. What it could maybe do is become 'Crop', and then you add a second component for the 'Texture' side of it. Which is still two components, but it would eliminate a little bit of duplicate code.
Given the restructure we'll do for Phaser v4 I don't think it's worth changing this at this late stage.
Currently these 2 components exist:
Phaser.GameObjects.Components.TextureCrop
(for texture based objects ie. Sprite, Image, Particle, Video)Phaser.GameObjects.Components.Crop
(for non texture objects ie. Text and TileSprite)Both components have identical functions with
TextureCrop
having additionalsetTexture
andsetFrame
methods.Do we still need to have separate components or can it be merged into a single component in future releases?