Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Guest

Help me just get the Confetti from this Pen

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi there,

 

I have found a Confetti Cannon here

 

I want to just take the confetti out and remove the cannon etc :) So that the confetti only will be falling... and constantly!

 

Or if you have another way in which I could use different code for the confetti that would be great too.

 

Thanks!

See the Pen VjPaLO by jscottsmith (@jscottsmith) on CodePen

Link to comment
Share on other sites

Did somebody say confetti cannon?

 

See the Pen RyaJmj by PointC (@PointC) on CodePen

 

I'd recommend going with something like what @OSUblake posted above. Simple and easy. Happy tweening. :)

 

  • Like 3
Link to comment
Share on other sites

Hey guys,

 

Thanks very much for all the prompt replies and information!!

I reeeeealllllyyyy want something that looks a lot like confetti!! 

 

In the code that I linked, the squares are all really nice sizes and they feel so random! Any chance someone has something more like this?

The ones you guys have linked are great! but their animations feel more like snow falling rather than confetti.

 

Cheers

Link to comment
Share on other sites

Use the same technique as above but use a different shape. It's easy to change ? let us know if you run into issues.

Link to comment
Share on other sites

5 hours ago, OSUblake said:

And this one.

 

 

 

 

 

Thank you very much for this! :)

Link to comment
Share on other sites

Hey @OSUblake I was wondering if you knew of anyway to adding a front and back to those leaves! like one side could be darker color or something :)

I tried adding

Div.innerHTML = '<div class="flip-card-inner"><div class="flip-card-front"></div><div class="flip-card-back"></div></div>';

to the loop, and this

dot{width:10px;height:10px;position:absolute;z-index: 300;background-color: transparent;}
.flip-card-inner {position: relative;width: 100%;height: 100%;text-align: center;transition: transform 0.8s;transform-style: preserve-3d;}
.dot .flip-card-front{position: absolute;width: 100%;height: 100%;backface-visibility: hidden;background: url(confetti.png);background-size: 100% 100%;background-color: red;}
.dot .flip-card-back{position: absolute;width: 100%;height: 100%;backface-visibility: hidden;background: url(confetti-3.png);background-size: 100% 100%;background-color: black;transform: rotateY(180deg);}
#confetti {width:300px; height:250px;z-index: 300;position: absolute; opacity: 0;}

to the css to make a front and back but no luck :(

 

something like this re: flip card

See the Pen cdFKH by anon (@anon) on CodePen

https://www.w3schools.com/howto/howto_css_flip_card.asp

 

cheers

Link to comment
Share on other sites

Hey I just figured out how to do it, sorry :)

 

Thanks again guys!

Link to comment
Share on other sites

  • 1 year later...

Hi guys,

 

Following up on this thread, I'd like to know how we can make all the confetti to pause? It's created dynamically with a class of dot, I don't know if there's a method to stop or pause a tween on a particular class.

 

Thanks!
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×