|
|
@ -1,6 +1,7 @@ |
|
|
|
function addBee() { |
|
|
|
const width = window.innerWidth; |
|
|
|
const height = window.innerHeight; |
|
|
|
const rect = document.body.getBoundingClientRect(); |
|
|
|
const width = rect.width; |
|
|
|
const height = rect.height; |
|
|
|
const body = document.body; |
|
|
|
const bee = document.createElement("img"); |
|
|
|
bee.src = "bee.png"; |
|
|
@ -18,8 +19,9 @@ function addBee() { |
|
|
|
} |
|
|
|
|
|
|
|
window.onload = function() { |
|
|
|
const width = window.innerWidth; |
|
|
|
const height = window.innerHeight; |
|
|
|
const rect = document.body.getBoundingClientRect(); |
|
|
|
const width = rect.width; |
|
|
|
const height = rect.height; |
|
|
|
|
|
|
|
const bees = document.getElementsByClassName("bee"); |
|
|
|
for(let i = 0; i < bees.length; i++) { |
|
|
@ -32,8 +34,10 @@ window.onload = function() { |
|
|
|
let i = 0; |
|
|
|
setInterval(() => { |
|
|
|
const beesNew = document.getElementsByClassName("bee"); |
|
|
|
const width = window.innerWidth; |
|
|
|
const height = window.innerHeight; |
|
|
|
const rect = document.body.getBoundingClientRect(); |
|
|
|
const width = rect.width; |
|
|
|
const height = rect.height; |
|
|
|
|
|
|
|
for(let j = 0; j < beesNew.length; j++) { |
|
|
|
const bee = beesNew[j]; |
|
|
|
if(i % 250 == 0) { |
|
|
|