Skip to content

Instantly share code, notes, and snippets.

View nodsaibot's full-sized avatar
🎨
Commissions Open

nodsaibot

🎨
Commissions Open
View GitHub Profile
@olygood
olygood / gameLoop.js
Last active July 28, 2022 05:04
game loop html5 javascript
const canva = document.getElementById('canva');
let ctx = canva.getContext('2d');
load();
let interval = setInterval(run,1000/60);
function run()
{
update();
@olygood
olygood / randomColor.js
Created April 6, 2022 10:40
js random color
const setBg = () => {
const square = document.querySelector('.items');
const randomColor = Math.floor(Math.random()*16777215).toString(16);
console.log(square);
square.style.background = "#" + randomColor;
// console.log(square);
}
setInterval(setBg,1000);