Add documentation about fixed frame size on plane animation

This commit is contained in:
Robert Kowalski 2024-02-21 16:07:24 -05:00
parent 198598882e
commit 7e848e66fa

View file

@ -34,7 +34,8 @@ var UUID = require('../../utils/string/UUID');
* atlas or sprite sheet.
*
* The Plane Game Object also has the Animation component, allowing you to play animations
* across the Plane just as you would with a Sprite.
* across the Plane just as you would with a Sprite. The frame size must be fixed as the
* first frame will be the size of the animation, for example use a `SpriteSheet`.
*
* Note that the Plane object is WebGL only and does not have a Canvas counterpart.
*
@ -241,7 +242,7 @@ var Plane = new Class({
if (resetUV === undefined) { resetUV = true; }
var frame = this.frame;
this.setGridSize(frame.realWidth, frame.realHeight);
this.setPerspective(this.width / frame.width, this.height / frame.height);
if (this._checkerboard && this._checkerboard !== this.texture)