Skip to content

Commit 8cb466b

Browse files
committed
Clarified the important of the __BASE frame in a Texture phaserjs#4285
1 parent 340df7a commit 8cb466b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/textures/Texture.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ var TEXTURE_MISSING_ERROR = 'Texture.frame missing: ';
1616
* The Frames represent the different areas of the Texture. For example a texture atlas
1717
* may have many Frames, one for each element within the atlas. Where-as a single image would have
1818
* just one frame, that encompasses the whole image.
19+
*
20+
* Every Texture, no matter where it comes from, always has at least 1 frame called the `__BASE` frame.
21+
* This frame represents the entirety of the source image.
1922
*
2023
* Textures are managed by the global TextureManager. This is a singleton class that is
2124
* responsible for creating and delivering Textures and their corresponding Frames to Game Objects.
@@ -111,7 +114,10 @@ var Texture = new Class({
111114
this.firstFrame = '__BASE';
112115

113116
/**
114-
* The total number of Frames in this Texture.
117+
* The total number of Frames in this Texture, including the `__BASE` frame.
118+
*
119+
* A Texture will always contain at least 1 frame because every Texture contains a `__BASE` frame by default,
120+
* in addition to any extra frames that have been added to it, such as when parsing a Sprite Sheet or Texture Atlas.
115121
*
116122
* @name Phaser.Textures.Texture#frameTotal
117123
* @type {integer}

0 commit comments

Comments
 (0)