Hi All,
Looking for way to run particle.js json file that I just generated and saved from particle.js website
Thx
Hi All,
Looking for way to run particle.js json file that I just generated and saved from particle.js website
Thx
… and then look for usage
if you do not want the provided load-method just pasting your jsons contents should be ok too:
particlesJS('particles-js',//element that should contain the particles ...
{
//paste the json here
}
Basic steps:
particlesjs-config.json
file into your Hype document’s resources libraryparticles.min.js
file into your Hype document’s resources libraryparticles-js
particlesJS.load('particles-js', '${resourcesFolderName}/particlesjs-config.json', function() {
console.log('callback - particles.js config loaded');
});
Particles.hype.zip (21.6 KB)
This Is Great! Thank you both.
I've got this set up correctly and working, but I'm trying to change the "image" in the particlesjs-config file and I'm not pulling the image correctly.
I'm using this syntax below. Shouldn't this work?
"src": "${resourcesFolderName}/snow-shape-1.png",
It looks correct, though your snippet is too small to really tell.
There's a good chance the problem may be that that image has the default "Automatically optimize when exporting" setting checked in the Resources Library. If so, it might be getting converted to a different filetype/name, in which case a code reference won't work.
If it is already unchecked or unchecking doesn't work, feel free to attach a zip of your .hype document.