metamaps--metamaps/frontend/src/homepage.js

16 lines
542 B
JavaScript
Raw Normal View History

2016-11-06 01:12:00 +00:00
require('particles.js')
import config from './home/particles.json'
import metacodes from './home/metacodes.json'
const max = metacodes.length - 1
let rand = Math.floor(Math.random()*max)
config.particles.shape.image.src = metacodes[rand]
window.particlesJS('particles-1', config)
rand = Math.floor(Math.random()*max)
config.particles.shape.image.src = metacodes[rand]
window.particlesJS('particles-2', config)
rand = Math.floor(Math.random()*max)
config.particles.shape.image.src = metacodes[rand]
window.particlesJS('particles-3', config)