mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-10 12:01:32 +00:00
Added clearParticles function
This commit is contained in:
parent
136a120998
commit
01f33b0ebe
2 changed files with 14 additions and 3 deletions
js/technical
|
@ -67,7 +67,7 @@ function updateParticles(diff) {
|
|||
function getNewParticle() {
|
||||
particleID++
|
||||
return {
|
||||
time: 3,
|
||||
time: 3333,
|
||||
id: particleID,
|
||||
x: mouseX,
|
||||
y: mouseY,
|
||||
|
@ -102,4 +102,15 @@ function constructParticleStyle(particle){
|
|||
"pointer-events": (particle.onClick || particle.onHover) ? 'auto' : 'none',
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function clearParticles(check) {
|
||||
if (!check) check = true
|
||||
|
||||
for (p in particles) {
|
||||
console.log(run(check, particles[p], particles[p]))
|
||||
if (run(check, particles[p], particles[p])){
|
||||
Vue.delete(particles, p)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue