MCPcopy Create free account
hub / github.com/codrops/CircularTextEffect / constructor

Method constructor

src/js/demo1/intro.js:12–21  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

10
11export class Intro {
12 constructor(el) {
13 // the SVG element
14 this.DOM = {el: el};
15 // SVG texts
16 this.DOM.circleText = [...this.DOM.el.querySelectorAll('text.circles__text')];
17 // total of texts
18 this.circleTextTotal = this.DOM.circleText.length;
19 // initial setudp
20 this.setup();
21 }
22 setup() {
23 // need to set the transform origin in the center
24 gsap.set(this.DOM.circleText, { transformOrigin: '50% 50%' });

Callers

nothing calls this directly

Calls 1

setupMethod · 0.95

Tested by

no test coverage detected