Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

firework animation javascript

# with npm:
npm install fireworks-js

# or yarn:
yarn add fireworks-js

import { Fireworks } from 'fireworks-js'

const container = document.querySelector('.fireworks-container')
const fireworks = new Fireworks(container, { /* options */ })

fireworks.start()
fireworks.pause()
fireworks.clear()

// stop and clear fireworks
fireworks.stop()

// after initialization you can change the fireworks parameters
fireworks.setOptions({ delay: { min: 10, max: 15 }})
 
PREVIOUS NEXT
Tagged: #firework #animation #javascript
ADD COMMENT
Topic
Name
4+1 =