Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Bielefeld-CeBiTec
Commits
b90a034b
Commit
b90a034b
authored
7 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
new import way
parent
b69b3b0c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#401517
failed
7 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/testsvganimation.tsx
+10
-7
10 additions, 7 deletions
src/components/testsvganimation.tsx
with
10 additions
and
7 deletions
src/components/testsvganimation.tsx
+
10
−
7
View file @
b90a034b
import
gsap
from
"
gsap
"
;
import
'
/home/lili/Dokumente/iGem/Wiki/bielefeld-cebitec/pubpub/extra_modules/gsap/ScrollTrigger.js
'
;
import
gsap
from
"
gsap
"
;
import
{
ScrollTrigger
}
from
"
gsap/ScrollTrigger
"
;
import
{
useGSAP
}
from
'
@gsap/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
()
{
gsap
.
registerPlugin
(
MotionPathPlugin
);
gsap
.
registerPlugin
(
ScrollTrigger
);
console
.
log
(
"
Started TestSVG
"
)
const
vectorRef
=
useRef
(
null
);
const
payloadRef
=
useRef
(
null
);
...
...
@@ -62,19 +65,19 @@ console.log("Started TestSVG")
<
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
"
/* file="none" */
stroke
=
"white"
stroke
-w
idth
=
"10px"
></
path
>
/* file="none" */
stroke
=
"white"
stroke
W
idth
=
"10px"
></
path
>
<
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
"
/* file="none" */
stroke
=
"white"
stroke
-w
idth
=
"10px"
></
path
>
/* file="none" */
stroke
=
"white"
stroke
W
idth
=
"10px"
></
path
>
<
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
"
/* file="none" */
stroke
=
"white"
stroke
-w
idth
=
"10px"
></
path
>
/* file="none" */
stroke
=
"white"
stroke
W
idth
=
"10px"
></
path
>
</
svg
>
<
img
ref
=
{
vectorRef
}
src
=
"https://static.igem.wiki/teams/5247/scientific-figures/antibiotics-capsule.svg"
alt
=
"vectorImg"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment