You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/gameobjects/Image.js
+87-18Lines changed: 87 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,15 @@
7
7
/**
8
8
* @class Phaser.Image
9
9
*
10
-
* @classdesc Create a new `Image` object.
11
-
*
12
-
* At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.
10
+
* @classdesc Create a new `Image` object. An Image is a light-weight object you can use to display anything that doesn't need physics, animation or input events.
11
+
* It can still rotate, scale and crop. This makes it perfect for logos, backgrounds and other non-Sprite graphics.
13
12
*
14
13
* @constructor
15
14
* @param {Phaser.Game} game - A reference to the currently running game.
16
-
* @param {number} x - The x coordinate (in world space) to position the Sprite at.
17
-
* @param {number} y - The y coordinate (in world space) to position the Sprite at.
18
-
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
19
-
* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
15
+
* @param {number} x - The x coordinate of the Imaget. The coordinate is relative to any parent container this Image may be in.
16
+
* @param {number} y - The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.
17
+
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - The texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture.
18
+
* @param {string|number} frame - If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
20
19
*/
21
20
Phaser.Image=function(game,x,y,key,frame){
22
21
@@ -58,7 +57,8 @@ Phaser.Image = function (game, x, y, key, frame) {
0 commit comments