MCPcopy Create free account
hub / github.com/codrops/3DGridContentPreview / constructor

Method constructor

src/js/grid.js:22–34  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

20
21export class Grid extends EventEmitter {
22 constructor(el) {
23 super();
24 this.DOM = {el: el};
25
26 this.gridItems = [];
27 this.DOM.items = [...this.DOM.el.querySelectorAll('.grid__item')];
28 this.DOM.items.forEach(item => {
29 this.gridItems.push(new GridItem(item));
30 });
31
32 this.showItems();
33 this.initEvents();
34 }
35 // Initial animation to scale up and fade in the items
36 showItems() {
37 gsap

Callers

nothing calls this directly

Calls 2

showItemsMethod · 0.95
initEventsMethod · 0.95

Tested by

no test coverage detected