ユーザーの操作を必要とせずに、ハンドラー OnClick をランダムなインスタンスにすることを検討しています。
// add the canvas in
document.body.appendChild(mainCanvas);
document.addEventListener('mouseup', createFirework, true);
document.addEventListener('touchend', createFirework, true);
// and now we set off
update();
}
/**
* Pass through function to create a
* new firework on touch / click
*/
function createFirework() {
createParticle();
}
ありがとう!:)