Skip to content

Commit 01ca429

Browse files
committed
Fix missing _crop property
Fixes phaserjs#5211
1 parent 000beb2 commit 01ca429

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/physics/matter-js/MatterImage.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ var MatterImage = new Class({
8686
{
8787
GameObject.call(this, world.scene, 'Image');
8888

89+
/**
90+
* The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.
91+
*
92+
* @name Phaser.Physics.Matter.Image#_crop
93+
* @type {object}
94+
* @private
95+
* @since 3.24.0
96+
*/
97+
this._crop = this.resetCropObject();
98+
8999
this.setTexture(texture, frame);
90100
this.setSizeToFrame();
91101
this.setOrigin();

src/physics/matter-js/MatterSprite.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ var MatterSprite = new Class({
9090
{
9191
GameObject.call(this, world.scene, 'Sprite');
9292

93+
/**
94+
* The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.
95+
*
96+
* @name Phaser.Physics.Matter.Sprite#_crop
97+
* @type {object}
98+
* @private
99+
* @since 3.24.0
100+
*/
101+
this._crop = this.resetCropObject();
102+
93103
this.anims = new AnimationComponent(this);
94104

95105
this.setTexture(texture, frame);

0 commit comments

Comments
 (0)