This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Landing page examples - Would be greatly appreciated. #32
Answered
by
mattgperry
martinAlt335
asked this question in
Support
-
Hello Matt, Just wanted to ask if the landing page source code could be shared? I'm interested in replicating the ball animation on the landing page 1:1 and then working from there but looking through compiled code for the options used is a bit of a pain. Would greatly appreciate it, thanks a million! |
Beta Was this translation helpful? Give feedback.
Answered by
mattgperry
Nov 2, 2021
Replies: 1 comment 1 reply
-
Sure, although its quite a lot more involved because of the const shadow = (size) =>
`circle(${size}px at calc(50% + 5px) calc(50% + 5px))`
const options = {
offset: [0, 0.3, 0.5, 0.8, 1],
repeat: Infinity,
duration: 3,
easing: [[0.17, 0.02, 0.22, 1], "linear", [0.17, 0.02, 0.22, 1], "linear"],
}
return (
<SimpleContainer style="static" inViewport="animate">
<CircleShadow
poses={{
static: {
clipPath: shadow(65),
},
animate: {
clipPath: [
shadow(65),
shadow(105),
shadow(105),
shadow(65),
shadow(65),
],
options: options as any,
},
}}
/>
<Circle
poses={{
static: {
scale: 1,
},
animate: {
scale: [1, 1.4, 1.4, 1, 1],
options: options as any,
},
}}
style={{ transformOrigin: "90% 90%" }}
/>
</SimpleContainer>
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
martinAlt335
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, although its quite a lot more involved because of the
clip-path
and also uses a private React api. But hope this helps: