Skip to content

Image#

Image type frames are frames used from an image file. This is the most commonly used method of defining a frame.

Example#

The following example defines a frame that is an image file:

"frames": [{
    "bmp": "my cool image.png"
}]

Attributes#

bmp#

Type: string

The relative path to the texture file of your draft.

copies#

Type: integer

Used to copy the same frame without repeating the same JSON object just to define the same frames.

By default, the value will be 0.

count#

Type: integer

This will repeat the frame for the specified amount of times to the right.

By default, the value will be 1.

h#

Type: integer

Sets the height of the frame to be selected.

By default, the value will be the height of the frame.

handle x#

Type: integer

Aligns the frame that's displayed in the game by shifting it horizontally.

If the value is negative, then the frame will be shifted to the left.

By default, the value will be determined automatically based on draft type and w, h attributes.

handle y#

Type: integer

Aligns the frame that's displayed in the game by shifting it vertically.

If the value is negative, then the frame will be shifted to the down.

By default, the value will be determined automatically based on draft type and w, h attributes.

n#

Type: integer

By default, the value will be copies + 1.

place x#

Type: integer

X coordinate to place the frame in the texture space.

Only available for privileged drafts.

place y#

Type: integer

Y coordinate to place the frame in the texture space.

Only available for privileged drafts.

skip height factor#

Type: integer

By default, the value will be 0.

skip width factor#

Type: integer

By default, the value will be 1.

target h#

Type: integer

Scales the frame to the specified height.

By default, the value will be same as h.

target w#

Type: integer

Scales the frame to the specified width.

By default, the value will be same as w.

w#

Type: integer

Sets the width of the frame to be selected.

For example:

{"bmp": "frame.png", "w": 32}
Will define the frame to be 32 pixels wide.

By default, the value will be the width of the frame.

x#

Type: integer

The horizontal coordinate of the frame in the graphic.

For example:

{"bmp": "frame.png", "x": 32}
Will display only the left 32 pixels of the image.

By default, the value will be 0.

y#

Type: integer

The vertical coordinate of the frame in the graphic.

By default, the value will be 0.