diff --git a/data/web/corefork.telegram.org/api/dice.html b/data/web/corefork.telegram.org/api/dice.html index f0da84d500..5f93a08b3f 100644 --- a/data/web/corefork.telegram.org/api/dice.html +++ b/data/web/corefork.telegram.org/api/dice.html @@ -76,7 +76,48 @@ Clients should display the correct dice animated sticker for the specified value } }
For each of the dice emojis, a maximum "winning" value is specified, along with the frame number at which to show the fireworks .
-Please note that dice animated stickers should loop only once, right after being sent/received for the first time; clicking on the dice sticker should bring up a popup, inviting the user to send a new dice of the same type.
Slot machine dice stickers are implemented a bit differently: the value
isn't used to directly index the stickers array, but is instead used as follows.
The value
is composed of three 2-bit values, each indicating the animated sticker to show in the three slots (left, center, right), incremented by one.
The stickers
array is composed as follows:
How to play the animation (all involved stickers are to be directly overlaid on top of each other, no special placing is required):
+0
)2
) once8
, 14
, 20
) oncevalue == 64
:3
9
15
map := [1, 2, 3, 0]
:4 + map[(value-1) & 3]
10 + map[((value-1) >> 2) & 3]
16 + map[((value-1) >> 4) & 3]
value=64
, replace the background (0
) with 1
.Example implementation: tdesktop.