Skip to content

Commit

Permalink
Now adding particle add its index
Browse files Browse the repository at this point in the history
  • Loading branch information
Nrosa01 committed May 2, 2024
1 parent 720c25e commit 0992eb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/assets/models/particle.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ class ParticleModel {
}

static create() {
let name = ParticleModel.createName();
var data = {
"name": ParticleModel.createName(),
"name": name,
"version": "1.0.0",
"color": Array(3).fill().map(() => Math.floor(Math.random() * 256)),
"alpha": [0.95, 1],
"update": []
}
return new ParticleModel("New Particle", data);
return new ParticleModel("New " + name, data);
}

update_data(data) {
Expand Down

0 comments on commit 0992eb0

Please sign in to comment.