daniel-lundin / dom-confetti Goto Github PK
View Code? Open in Web Editor NEWCelebrate success with dom confetti!
Celebrate success with dom confetti!
A parameter that controls how fast the particles will fade out once launched.
Currently, you can only control the decay of the explosion movement, not the visibility.
Great project btw!
When using the demo for this library, activating the confetti effect with default settings causes the window size to change due to confetti elements only being de-rendered when the time of the animation is complete, which in turn causes a new scrollbar to be added for the width of the window, and changes the height scrollbar as well (as the height increases).
As a developer I want the ability to prevent this from happening so that users of the application I am working on are not negatively impacted.
interface ConfettiConfig {
angle?: number;
spread?: number;
width?: number; *** string
height?: number; *** string
duration?: number; *** Currently missing completely
startVelocity?: number;
elementCount?: number;
decay?: number;
colors?: string[];
random?: () => number;
}
For example with rounded corners
Thank you very much for the quality of the project! It helped me a lot
Hi Daniel,
Just to let you know that I wrapped your project inside a Blazor component. The repo is here:
https://github.com/ctrl-alt-d/blazor-dom-confetti
At first, I tried to rewrite it as c# without javascript, but I guess is a better idea to wrap the javascript code into a Bazor component. The repo contains both projects, the wrapper and the native Blazor.
I will try to keep it up to date. Thanks and congrats about the quality code. dom-confetti
is a great project.
Regards,
dani herrera.
Updating the CSS values using JS can lead to decreased performance and performance issues with many elements.
I noticed that this library is set up to support a commonJS interface (like Node and Webpack). It would be great if it also supported being direct embedded into HTML. Currently, attempting that results in errors like: Uncaught ReferenceError: exports is not defined
We could use something like returnExports
from UMD which lets a module work with Node (CommonJS), AMD (e.g. RequireJS) and browser globals. Or we could simplify it by not supporting AMD.
Love this library and how simple it is!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.