/* eslint-disable */
const dancers = [];
function handleClickDancerButton () {
/* makeBlinkyDancer is the dancer maker functions available in global scope.
* A new object of the given type will be created and added
* to the stage.
*/
// make a dancer with a random position
let dancer = makeBlinkyDancer(
document.body.clientHeight * Math.random(),
document.body.clientWidth * Math.random(),
Math.random() * 1000
);
document.body.appendChild(dancer.$node);
}
window.addEventListener('DOMContentLoaded', () => {
const elAddDancerButton = document.querySelector('.addDancerButton');
elAddDancerButton.addEventListener('click', handleClickDancerButton);
});
Element.clientHeight
https://developer.mozilla.org/ko/docs/Web/API/Element/clientHeight
Math.random()
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/random