Last active
November 5, 2021 22:10
-
-
Save polluterofminds/4e1e8eeb6f5af5a00c124f4846872ee0 to your computer and use it in GitHub Desktop.
PFP Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const editly = require('editly'); | |
const randomHex = require('random-hex'); | |
const short = require('short-uuid'); | |
const pathToFile = 'PATH TO FILE IN YOUR WORKING DIRECTORY'; | |
const totalSupply = 5000; | |
const run = async () => { | |
for(i = 0; i < totalSupply; i++) { | |
console.log("generating image: ", i); | |
const options = { | |
outPath: `${short.generate()}.gif`, | |
path: pathToFile, | |
defaults: { | |
transition: { name: 'linearblur', duration: 0.1 }, | |
}, | |
clips: [ | |
{ duration: 0.25, layers: [{ type: 'image', path: pathToFile }] }, | |
{ duration: 0.25, layers: [{ type: 'linear-gradient', colors: [randomHex.generate(), randomHex.generate()] }] }, | |
{ duration: 0.25, layers: [{ type: 'radial-gradient', colors: [randomHex.generate(), randomHex.generate()] }] }, | |
{ duration: 0.25, layers: [{ type: 'linear-gradient' }] }, | |
{ duration: 0.25, layers: [{ type: 'radial-gradient' }] }, | |
], | |
} | |
await editly(options) | |
} | |
} | |
run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment