VincentGarreau / particles.js

A lightweight JavaScript library for creating particles
https://vincentgarreau.com/particles.js/
MIT License
28.66k stars 4.81k forks source link

Images are not working? #180

Open blaasvaer opened 7 years ago

blaasvaer commented 7 years ago

Could you be more specifik in what parameters I have to tweak? Setting type to image and passing an url to a svg is not cutting it ...

DarkIBL commented 7 years ago

Make sure you change the shape type to image, in index.js

"shape": {
      "type": "image",
},

And specify the source under "image"

"image": {
        "src": "http://darkibl.stream/images/Float.png",
        "width": 100,
        "height": 100
      }
eric-burel commented 6 years ago

This does not seem to work with correctly with some .svg files

lasernite commented 6 years ago

Not sure if recent development or coincidence, same problem as Eric. PNGs work fine, but not SVGs.

BrunoSoclick commented 6 years ago

Its possible to increase the image size?

James-Burgess commented 6 years ago

@BrunoSoclick you can edit the size on line 39 of package.json

kyriediculous commented 6 years ago

Changing width and heigth will only adjust the aspect ratio, not the size.

To increase size check particles.size.value

artfauxlive commented 4 years ago

I have tried png, svg, even jpeg but nothing is working for me

matteobruni commented 4 years ago

@artfauxlive This repository is abandoned, try here https://github.com/matteobruni/tsparticles