M
M
megamutex2015-07-28 17:58:10
PHP
megamutex, 2015-07-28 17:58:10

How to replace shapes with images in Canvas?

Hello. There is an example of creating a game like match3 rembound.com/articles/how-to-make-a-match3-game-wi... In the example, the elements in the form of shapes are filled with color. How to replace shapes with pictures. Not strong in javascipt and canvas.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2018-12-20
@jasper-blondin

I don't like regular expressions, so I would do this:

$path = "http://localhost:8181/?q=https://yandex.ru/search/?lr=43&text=машина";
$parts = explode("?q=", $path);
$result = $parts[1];

M
Maxim Timofeev, 2018-12-20
@webinar

but I get

well, you get everything right, it remains only to cut the first character
mb_internal_encoding("UTF-8");
$result = mb_substr( $vashText, 1);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question