angular-particle
angular-particle copied to clipboard
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',
},
}
};
@Swailem95 try this
<particles [params]="myParams" [style]="myStyle" [width]="width" [height]="height"></particles>
I was able to change it to only particles
param, if I try to change the interactivity
params doesn't works.
this.particleParams = {
'particles': {
'number': {
'value': 100,
},
'color': {
'value': '#FFF'
},
'shape': {
'type': 'circle',
},
},
'interactivity': {
'onhover': {
'enable': true,
'mode': 'bubble'
}
}
};
in order to fix this you need to overwrite the position css . try something like this : /deep/.particles-container { position: inherit!important; }
@dawn88set , sorry still the same :-(
You need to wrap onhover
in events
. e.g.
interactivity: {
events: {
onhover: {
enable: false
}
}
}