You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// basic code loop : for items that need ui elements, have them create their own element,
// add a class to them, css modify that class, appendChild anything that you need
// appendChild to a container - a parameter that is passed in with our game
// make it into a this.element variable so that each individual canvas element is divded nicely
}
fadeOut() {
this.element.classList.add("fade-out"); // triggers animation to go backwards (by manipulating classes with js, you can add cool custom transitions + make the website responsive)
init(container, callback) { // when this element hits the DOM, it's going to start animating immediately, so we need a callback to see when that animation is done