Skip to content
Snippets Groups Projects
Commit b90a034b authored by Liliana Sanfilippo's avatar Liliana Sanfilippo
Browse files

new import way

parent b69b3b0c
No related branches found
No related tags found
No related merge requests found
Pipeline #401517 failed
import gsap from "gsap"; import gsap from "gsap";
import '/home/lili/Dokumente/iGem/Wiki/bielefeld-cebitec/pubpub/extra_modules/gsap/ScrollTrigger.js'; import { ScrollTrigger } from "gsap/ScrollTrigger";
import { useGSAP } from '@gsap/react'; import { useGSAP } from '@gsap/react';
import { useRef } from 'react'; import { useRef } from 'react';
import "/home/lili/Dokumente/iGem/Wiki/bielefeld-cebitec/pubpub/extra_modules/gsap/dist/MotionPathPlugin.js"; import { MotionPathPlugin } from "gsap/MotionPathPlugin";
function TestSVG() { function TestSVG() {
gsap.registerPlugin(MotionPathPlugin);
gsap.registerPlugin(ScrollTrigger);
console.log("Started TestSVG") console.log("Started TestSVG")
const vectorRef = useRef(null); const vectorRef = useRef(null);
const payloadRef = useRef(null); const payloadRef = useRef(null);
...@@ -62,19 +65,19 @@ console.log("Started TestSVG") ...@@ -62,19 +65,19 @@ console.log("Started TestSVG")
<path className="theLine" d=" <path className="theLine" d="
M 50 50 S 540 200 540 1000 S -300 1200 540 2000 S -600 2200 540 3000 S 0 4000 540 4000 L 540 4500" M 50 50 S 540 200 540 1000 S -300 1200 540 2000 S -600 2200 540 3000 S 0 4000 540 4000 L 540 4500"
/* file="none" */ stroke="white" stroke-width="10px"></path> /* file="none" */ stroke="white" strokeWidth="10px"></path>
<path className="theLine2" d=" <path className="theLine2" d="
M 1030 50 S 540 200 540 1000 S -300 1200 540 2000 S -600 2200 540 3000 S 540 4000 540 4000 L 540 3500" M 1030 50 S 540 200 540 1000 S -300 1200 540 2000 S -600 2200 540 3000 S 540 4000 540 4000 L 540 3500"
/* file="none" */ stroke="white" stroke-width="10px"></path> /* file="none" */ stroke="white" strokeWidth="10px"></path>
<path className="theLine3" d=" <path className="theLine3" d="
M 2000 600 S -300 1200 540 2000 S -600 2200 540 3000 S 540 4000 -100 4000 L -100 4200" M 2000 600 S -300 1200 540 2000 S -600 2200 540 3000 S 540 4000 -100 4000 L -100 4200"
/* file="none" */ stroke="white" stroke-width="10px"></path> /* file="none" */ stroke="white" strokeWidth="10px"></path>
</svg> </svg>
<img ref={vectorRef} src="https://static.igem.wiki/teams/5247/scientific-figures/antibiotics-capsule.svg" alt="vectorImg"/> <img ref={vectorRef} src="https://static.igem.wiki/teams/5247/scientific-figures/antibiotics-capsule.svg" alt="vectorImg"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment