Scratch Nine

Configuration

JSON
{
  "options": {
    "scratch_percentage": 50,
    "cursor_size": 1.5,
    "slot_number": 9,
    "use_reward_image": false,
    "default_lang": "fr"
  },
  "texts": {
    "en": {},
    "fr": {},
    "nl": {}
  },
  "sounds": {},
  "images": {
    "background": [
      GAME_URL + "/assets/scratch-nine/item-1.png",
      GAME_URL + "/assets/scratch-nine/item-2.png",
      GAME_URL + "/assets/scratch-nine/item-3.png",
      GAME_URL + "/assets/scratch-nine/item-4.png",
      GAME_URL + "/assets/scratch-nine/item-5.png"
    ],
    "overlay": GAME_URL + "/assets/scratch-nine/overlay.png",
    "cursor": GAME_URL + "/assets/scratch-nine/cursor.svg",
    "brush": GAME_URL + "/assets/scratch-nine/brush.png",
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default
scratch_percentage

Integer

Part of the image to be scratched before reveal.

50

cursor_size

Integer

Size of the cursor.

1.5

slot_number

Integer

Number of slots (between 3 and 9).

9

use_reward_image

Boolean

Use static or dynamic visuals (based on the reward).

false

default_lang

String

[PTF] Default language if unmatched language.

"fr"

Assets

Key
Size
Explanation
Default
background

150 x 150px

Items of the grid (array has to contain 5 items!).

overlay

150 x 150px

Visual of the overlay (will be displayed 9 times).

cursor

64 x 64px

Replace the default cursor while scratching.

brush

64 x 64px

Shape of the scratching. Use the same image as cursor if none provided.

Last updated