const canvas = document.querySelector("#canvas"),
ctx = canvas.getContext("2d");
// Set canvas width & height;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
// show ground
const ground = new Image();
ground.src = "assets/img/ground.jpg";
ground.onload = function(){
ctx.drawImage(this, 0, 0, 660, 440, 0, 0, 400, 200);
}
this.a = [posx,posy,prx,pry] = [].concat(x,y,x,y);
class Particle {
constructor(x, y) {
return Object.assign(this, {
posx: x,
posy: y,
prx: x,
pry: y
});
}
}
data-src="#[[+idx]]" у вас что одинаковый у обоих ссылок?
@keyframes если будете менять заливку fill. Если только увеличение, то один.
Слешь забыли перед именем файла.<?php echo file_get_contents(dirname(__FILE__) . "functions.js"); ?>
dirname(__FILE__) возвращает путь до файла php скрипта, в котором вызывается функция, без последнего слеша.<?php echo file_get_contents(dirname(__FILE__) . "/functions.js"); ?>functions.js находится рядом (в той же директории) с файлом design.inc.php