For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pinata

Configuration

JSON
{
  "options": {
    "hits": 3,
    "rope_color": "black",
    "rope_width": 8,
    "pinata_size": 70,
    "pinata_top": 0,
    "swing": true,
    "hit_swing": true,
    "hit_explosion": true,
    "particules_count" : 40,
    "particules_min_speed": 25,
    "particules_max_speed": 40,
    "particules_min_size": 5,
    "particules_max_size": 10,
    "use_reward_image": false,
    "steering_offset": 75
  },
  "texts": {
    "en": {
      "start": "Play now"
    },
    "fr": {
      "start": "Je joue"
    },
    "nl": {
      "start": "Speel nu"
    }
  },
  "images": {
    "win": GAME_URL + "/pinata/win.png",
    "lose": GAME_URL + "/pinata/lose.png",
    "pinata": [
      GAME_URL + "/pinata/state1.png",
      GAME_URL + "/pinata/state2.png",
      GAME_URL + "/pinata/state3.png"
    ],
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default

Int

Number of "steps" to the game.

3

String

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

"black"

Float

Width of the rope.

8 (px = .5em)

Float

Percentage of the container for the pinata visuals.

70 (%)

Float

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

0 (%)

Boolean

Slight swinging of the pinata pre-interaction.

true

Boolean

Swinging on interaction.

true

Boolean

Generate particles on interaction (other parameters shouldn't be changed).

true

Boolean

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

false

Int

Default angle of the swing (in degrees).

75

Assets

Key
Size
Explanation
Default

300 x 300px

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

300 x 300px

Visual displayed in case of lose.

300 x 300px

Visual(s) displayed before clicking.

Last updated