Skip to main content
Version: Phaser v3.88.2

Image

An Arcade Physics Image is an Image with an Arcade Physics body and related components.

The body can be dynamic or static.

The main difference between an Arcade Image and an Arcade Sprite is that you cannot animate an Arcade Image.

Constructor

new Image(scene, x, y, texture, [frame])

Parameters

nametypeoptionaldescription
scenePhaser.SceneNoThe Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
xnumberNoThe horizontal position of this Game Object in the world.
ynumberNoThe vertical position of this Game Object in the world.
texturestring | Phaser.Textures.TextureNoThe key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
framestring | numberYesAn optional frame from the Texture this Game Object is rendering with.

Scope: static

Extends

Phaser.GameObjects.Image
Phaser.Physics.Arcade.Components.Acceleration
Phaser.Physics.Arcade.Components.Angular
Phaser.Physics.Arcade.Components.Bounce
Phaser.Physics.Arcade.Components.Collision
Phaser.Physics.Arcade.Components.Debug
Phaser.Physics.Arcade.Components.Drag
Phaser.Physics.Arcade.Components.Enable
Phaser.Physics.Arcade.Components.Friction
Phaser.Physics.Arcade.Components.Gravity
Phaser.Physics.Arcade.Components.Immovable
Phaser.Physics.Arcade.Components.Mass
Phaser.Physics.Arcade.Components.Pushable
Phaser.Physics.Arcade.Components.Size
Phaser.Physics.Arcade.Components.Velocity
Phaser.GameObjects.Components.Alpha
Phaser.GameObjects.Components.BlendMode
Phaser.GameObjects.Components.Depth
Phaser.GameObjects.Components.Flip
Phaser.GameObjects.Components.GetBounds
Phaser.GameObjects.Components.Mask
Phaser.GameObjects.Components.Origin
Phaser.GameObjects.Components.Pipeline
Phaser.GameObjects.Components.PostPipeline
Phaser.GameObjects.Components.ScrollFactor
Phaser.GameObjects.Components.Size
Phaser.GameObjects.Components.Texture
Phaser.GameObjects.Components.Tint
Phaser.GameObjects.Components.Transform
Phaser.GameObjects.Components.Visible

Source: src/physics/arcade/ArcadeImage.js#L11
Since: 3.0.0

Inherited Members

From Phaser.GameObjects.Components.Alpha:

From Phaser.GameObjects.Components.BlendMode:

From Phaser.GameObjects.Components.Depth:

From Phaser.GameObjects.Components.Flip:

From Phaser.GameObjects.Components.Mask:

From Phaser.GameObjects.Components.Origin:

From Phaser.GameObjects.Components.Pipeline:

From Phaser.GameObjects.Components.PostPipeline:

From Phaser.GameObjects.Components.ScrollFactor:

From Phaser.GameObjects.Components.Size:

From Phaser.GameObjects.Components.TextureCrop:

From Phaser.GameObjects.Components.Tint:

From Phaser.GameObjects.Components.Transform:

From Phaser.GameObjects.Components.Visible:

From Phaser.GameObjects.GameObject:

From Phaser.Physics.Arcade.Components.Debug:


Public Members

body

body: Phaser.Physics.Arcade.Body, Phaser.Physics.Arcade.StaticBody

Description:

This Game Object's Physics Body.

Overrides: Phaser.GameObjects.Image#body

Source: src/physics/arcade/ArcadeImage.js#L87
Since: 3.0.0


Inherited Methods

From Phaser.Events.EventEmitter:

From Phaser.GameObjects.Components.Alpha:

From Phaser.GameObjects.Components.BlendMode:

From Phaser.GameObjects.Components.Depth:

From Phaser.GameObjects.Components.Flip:

From Phaser.GameObjects.Components.GetBounds:

From Phaser.GameObjects.Components.Mask:

From Phaser.GameObjects.Components.Origin:

From Phaser.GameObjects.Components.Pipeline:

From Phaser.GameObjects.Components.PostPipeline:

From Phaser.GameObjects.Components.ScrollFactor:

From Phaser.GameObjects.Components.Size:

From Phaser.GameObjects.Components.TextureCrop:

From Phaser.GameObjects.Components.Tint:

From Phaser.GameObjects.Components.Transform:

From Phaser.GameObjects.Components.Visible:

From Phaser.GameObjects.GameObject:

From Phaser.Physics.Arcade.Components.Acceleration:

From Phaser.Physics.Arcade.Components.Angular:

From Phaser.Physics.Arcade.Components.Bounce:

From Phaser.Physics.Arcade.Components.Collision:

From Phaser.Physics.Arcade.Components.Debug:

From Phaser.Physics.Arcade.Components.Drag:

From Phaser.Physics.Arcade.Components.Enable:

From Phaser.Physics.Arcade.Components.Friction:

From Phaser.Physics.Arcade.Components.Gravity:

From Phaser.Physics.Arcade.Components.Immovable:

From Phaser.Physics.Arcade.Components.Mass:

From Phaser.Physics.Arcade.Components.Pushable:

From Phaser.Physics.Arcade.Components.Size:

From Phaser.Physics.Arcade.Components.Velocity: