Fix missing _crop property

Fixes #5211
This commit is contained in:
samme 2020-07-08 12:04:23 -07:00
parent 000beb2bd0
commit 01ca4293e4
2 changed files with 20 additions and 0 deletions

View file

@ -86,6 +86,16 @@ var MatterImage = new Class({
{ {
GameObject.call(this, world.scene, 'Image'); GameObject.call(this, world.scene, 'Image');
/**
* The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.
*
* @name Phaser.Physics.Matter.Image#_crop
* @type {object}
* @private
* @since 3.24.0
*/
this._crop = this.resetCropObject();
this.setTexture(texture, frame); this.setTexture(texture, frame);
this.setSizeToFrame(); this.setSizeToFrame();
this.setOrigin(); this.setOrigin();

View file

@ -90,6 +90,16 @@ var MatterSprite = new Class({
{ {
GameObject.call(this, world.scene, 'Sprite'); GameObject.call(this, world.scene, 'Sprite');
/**
* The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.
*
* @name Phaser.Physics.Matter.Sprite#_crop
* @type {object}
* @private
* @since 3.24.0
*/
this._crop = this.resetCropObject();
this.anims = new AnimationComponent(this); this.anims = new AnimationComponent(this);
this.setTexture(texture, frame); this.setTexture(texture, frame);