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

main as console log

parent 183b8389
No related branches found
No related tags found
No related merge requests found
Pipeline #401503 failed
import gsap from "gsap";
import { createRequire } from 'module';
const ScrollTrigger = createRequire('gsap/dist/ScrollTrigger');
const ScrollTrigger = createRequire('/home/lili/Dokumente/iGem/Wiki/bielefeld-cebitec/pubpub/extra_modules/gsap/ScrollTrigger.js');
import { useGSAP } from '@gsap/react';
import { useRef } from 'react';
const MotionPathPlugin = createRequire("gsap/dist/MotionPathPlugin");
const MotionPathPlugin = createRequire("/home/lili/Dokumente/iGem/Wiki/bielefeld-cebitec/pubpub/extra_modules/gsap/dist/MotionPathPlugin.js");
function TestSVG() {
console.log("Started TestSVG")
const vectorRef = useRef(null);
const payloadRef = useRef(null);
const inhalatorRef = useRef(null);
......@@ -21,8 +21,7 @@ function TestSVG() {
gsap.defaults({ease: "none"});
var _main;
_main = gsap.timeline({
const main = gsap.timeline({
scrollTrigger: {
trigger: "svg",
scrub: true,
......@@ -30,6 +29,7 @@ function TestSVG() {
end: "bottom center"
}
})
.from(".theLine", {drawSVG: 0}, 0)
.to(payloadRef.current, {motionPath:{
path:".theLine",
......@@ -47,10 +47,11 @@ function TestSVG() {
align:".theLine3",
alignOrigin:[0.5, 0.5],
}}, 0)
console.log(main)
},
);
return (
<div className="App">
<div className="firstSpacingBlock">
......
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