Pinata

Configuration

JSON
{
  "options": {
    "rope_color": "black",
    "rope_width": 8,
    "pinata_size": 70,
    "pinata_top": 0,
    "use_reward_image": false,
    "default_lang": "fr"
  },
  "texts": {
    "en": {},
    "fr": {},
    "nl": {}
  },
  "sounds": {},
  "images": {
    "win": GAME_URL + "/assets/pinata/win.png",
    "lose": GAME_URL + "/assets/pinata/lose.png",
    "pinata": [
      GAME_URL + "/assets/pinata/state1.png",
      GAME_URL + "/assets/pinata/state2.png",
      GAME_URL + "/assets/pinata/state3.png"
    ],
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default
rope_color

String

Colour of the rope (can also be partially or fully transparent).

"black"

rope_width

Float

Width of the rope.

8 (px = .5em)

pinata_size

Float

Percentage of the container for the pinata visuals.

70 (%)

pinata_top

Float

Pinata is vertically centered by default (50%), add value to lower it, or decrease to bring it closer to the top.

0 (%)

use_reward_image

Boolean

Use one image per reward, or default one (win).

false

default_lang

String

[PTF] Default language if unmatched language.

"fr"

Assets

Key
Size
Explanation
Default
win

300 x 300px

Visual if won (use_reward_image has to be set to false).

lose

300 x 300px

Visual displayed in case of lose.

pinata

300 x 300px

Visual(s) displayed before clicking.

Last updated