Giter Club home page Giter Club logo

angular-particle's People

Contributors

benoitbzl avatar edwardwilson avatar nemolovich avatar ryukku- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular-particle's Issues

Cannot find module 'angular-particle-updated'

After npm install angular-particle-updated --save, in app.module it says after importing like this: import { ParticlesModule } from 'angular-particle-updated'; Cannot find module angular-particle-updated.
Is there anything else I should do?
Thank You

Default params always applied

I'm trying to overwrite the default params object but nothing I try seems to be working. Even when I change the code sample you have in your example, nothing changes.

        this.myParams = {

                    particles: {
                        number: {
                            value: 2,    //changed to 2 instead of 200
                        },

                        color: {
                            value: '#fff000'  //changed color
                        },
                        shape: {
                            type: 'triangle',
                        },
        	    }
        	};

div appears but no animation

Hi I went thru the steps on the angular 4.4 set up that I got on the local machine.

I see the div ( coming from the particles ) pushing down my content.
But it's got nothing in it. No errors on the console.

Chrome's Inspecter gives me this on that div.
What could be wrong do you guys think?

<particles _ngcontent-c7="" ng-reflect-width="100" ng-reflect-height="100">
        <div class="particles-container">
            <canvas d-particles="" style="width: 100%; height: 100%;" width="1378" height="690"></canvas>
        </div>
    </particles>

Onhover animations are not working

The onhover interactions are not working. Any Idea how to debug ?
This is the params values
{
particles: {
number: {
value: 80,
density: {
enable: !0,
value_area: 800
}
},
color: {
value: "#ffffff"
},
shape: {
type: "circle",
stroke: {
width: 0,
color: "#000000"
},
polygon: {
nb_sides: 5
},
image: {
src: "img/github.svg",
width: 100,
height: 100
}
},
opacity: {
value: .3,
random: !1,
anim: {
enable: !1,
speed: 10,
opacity_min: .1,
sync: !1
}
},
size: {
value: 3,
random: !0,
anim: {
enable: !1,
speed: 10,
size_min: .1,
sync: !1
}
},
line_linked: {
enable: !0,
distance: 150,
color: "#ffffff",
opacity: .4,
width: 1
},
move: {
enable: !0,
speed: 3,
direction: "none",
random: !1,
straight: !1,
out_mode: "out",
bounce: !1,
attract: {
enable: !1,
rotateX: 600,
rotateY: 1200
}
}
},
interactivity: {
detect_on: "canvas",
events: {
onhover: {
enable: true,
mode: "grab"
},
onclick: {
enable: false,
mode: "push"
},
resize: !0
},
modes: {
grab: {
distance: 400,
line_linked: {
opacity: 1
}
},
bubble: {
distance: 400,
size: 40,
duration: 2,
opacity: 8,
speed: 3
},
repulse: {
distance: 200,
duration: .4
},
push: {
particles_nb: 4
},
remove: {
particles_nb: 2
}
}
},
retina_detect: !0
};

Typ image doesn't work

Thanks for the typeScript implementation but when I try to set an image for the type, I get an error:
ERROR TypeError: Cannot read property 'params' of undefined at loadImg (index.js:216) at ParticlesDirective.webpackJsonp.../../../../angular-particle/index.js.ParticlesDirective.ngAfterViewInit (index.js:1231) at callProviderLifecycles (core.es5.js:11182) at callElementProvidersLifecycles (core.es5.js:11157) at callLifecycleHooksChildrenFirst (core.es5.js:11141) at checkAndUpdateView (core.es5.js:12246) at callViewAction (core.es5.js:12603) at execComponentViewsAction (core.es5.js:12535) at checkAndUpdateView (core.es5.js:12244) at callViewAction (core.es5.js:12603)

myParams:
shape: { type: 'image', stroke: { width: 2, color: '#f0f8f5' }, image: { src: 'IMAGE PATH HERE' } },

Params isn't updating inside an Http Get subscription

Hello,

Thank you for sharing this solution.

I am facing an issue with getting parameters from a JSON file, instead of passing the parameters as an object in the typescript code.
This is the content of my JSON file:

{
  "particles": {
    "number": {
      "value": 200
    },
    "color": {
      "value": "#ff0000"
    },
    "shape": {
      "type": "triangle"
    }
  }
}

and this is how I assign my params variable:

 //...
ngOnInit() {
    //...
    this.http.get("assets/particlesjs-config.json").subscribe(
        data => {
          this.params = data;
          console.log(this.params)
     });
  }

The console.log line prints the content of the json file in the console, but I can't in any way have the animation when I assign the params inside the Http Get subscription.

Thank you for your support

Update to Angular 9

Will there be a compatibility update for the latest stable release of angular?

Window events are not handled

The components does not listen for global events when it is in the background of another component.

Settings:
"interactivity": {
"detect_on": "window"
}
does not work.

Update to Angular 6

Since angular 6 was released, I was wondering if this amazing library would update to use it. I am willing to work on this issue if needed! Here is what needs to be updated according to ng update:

package "angular-particle" has an incompatible peer dependency to "rxjs" (requires "^5.1.0", would install "6.1.0").
Package "angular-particle" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0-rc.0 <6.0.0||>=4.0.0 <5.0.0", would install "6.0.0").

High CPU & GPU usage

CPU & GPU usage increases too much on chrome.

A fix has been suggested on particles.js can you please implement that here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.