diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index 0184cae22..5c226f3d4 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -86,6 +86,16 @@ var MatterImage = new Class({ { 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.setSizeToFrame(); this.setOrigin(); diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index e04ed61fa..3b0e53a2b 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -90,6 +90,16 @@ var MatterSprite = new Class({ { 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.setTexture(texture, frame);