Skip to content

Commit 5243450

Browse files
authored
Merge pull request #10 from zarocknz/tweak-icons-explosions
MAJOR added more rockets, removed non open source icons
2 parents 3ffd591 + 34659ef commit 5243450

2 files changed

Lines changed: 81 additions & 27 deletions

File tree

rocket_definitions.js

Lines changed: 80 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
// Define setting for different skyrockets.
22
var skyrockets = [
33
{
4-
'name' : 'rocket0',
4+
'name' : 'redGreenMeetupRing',
55
'outerRadius' : 100,
66
'innerRadius' : 70,
77
'numParticles' : 80,
8-
'color1' : '0,255,0',
9-
'color2' : '255,0,0',
10-
'particleRadius' : 5,
8+
'color1' : '255,0,0',
9+
'color2' : '0,255,0',
10+
'particleRadius' : 4,
1111
'xFunction' : 'cos',
1212
'yFunction' : 'sin',
13-
'rocketIcon' : '\uf2cd',
13+
'rocketIcon' : '\uf2e0',
1414
'rocketIconSize' : 25
1515
},
1616
{
17-
'name' : 'rocket1',
17+
'name' : 'blueRedRocketSmall',
1818
'outerRadius' : 50,
1919
'innerRadius' : 10,
2020
'numParticles' : 20,
21-
'color1' : '0,100,255',
21+
'color1' : '50,200,255',
2222
'color2' : '255,0,0',
2323
'particleRadius' : 5,
2424
'xFunction' : 'cos',
2525
'yFunction' : 'sin',
2626
'rocketIcon' : '\uf135',
27-
'rocketIconSize' : 14
27+
'rocketIconSize' : 20
2828
},
2929
{
30-
'name' : 'rocket2',
30+
'name' : 'bluePinkSmallParticle',
3131
'outerRadius' : 80,
3232
'innerRadius' : 20,
33-
'numParticles' : 20,
33+
'numParticles' : 70,
3434
'color1' : '0,150,200',
3535
'color2' : '255,0,100',
36-
'particleRadius' : 5,
36+
'particleRadius' : 2,
3737
'xFunction' : 'cos',
3838
'yFunction' : 'sin',
3939
'rocketIcon' : '\uf077',
4040
'rocketIconSize' : 16
4141
},
4242
{
43-
'name' : 'rocket3',
43+
'name' : 'BlueOrangeGitCatVertialExplode',
4444
'outerRadius' : 30,
4545
'innerRadius' : 20,
46-
'numParticles' : 20,
46+
'numParticles' : 25,
4747
'color1' : '0,150,200',
4848
'color2' : '255,102,0',
4949
'particleRadius' : 5,
5050
'xFunction' : 'sin',
5151
'yFunction' : 'tan',
52-
'rocketIcon' : '\uf179',
53-
'rocketIconSize' : 18
52+
'rocketIcon' : '\uf113',
53+
'rocketIconSize' : 25
5454
},
5555
{
56-
'name' : 'rocket4',
56+
'name' : 'CodePenRedYellowNotDense',
5757
'outerRadius' : 200,
5858
'innerRadius' : 100,
5959
'numParticles' : 20,
@@ -62,11 +62,11 @@ var skyrockets = [
6262
'particleRadius' : 5,
6363
'xFunction' : 'cos',
6464
'yFunction' : 'sin',
65-
'rocketIcon' : '\uf17a',
66-
'rocketIconSize' : 14
65+
'rocketIcon' : '\uf1cb',
66+
'rocketIconSize' : 12
6767
},
6868
{
69-
'name' : 'rocket5',
69+
'name' : 'YellowPinkHeartCircular',
7070
'outerRadius' : 120,
7171
'innerRadius' : 20,
7272
'numParticles' : 200,
@@ -79,7 +79,7 @@ var skyrockets = [
7979
'rocketIconSize' : 16
8080
},
8181
{
82-
'name' : 'bigBadaBoooom',
82+
'name' : 'bigBadaBoooomPinkGreen',
8383
'outerRadius' : 220,
8484
'innerRadius' : 40,
8585
'numParticles' : 320,
@@ -91,16 +91,70 @@ var skyrockets = [
9191
'rocketIcon' : '\uf1e2',
9292
'rocketIconSize' : 40
9393
}, {
94-
'name' : 'rocket7',
94+
'name' : 'GreenRingAndroid',
9595
'outerRadius' : 120,
9696
'innerRadius' : 100,
9797
'numParticles' : 320,
98-
'color1' : '207,3,227',
99-
'color2' : '0,255,43',
100-
'particleRadius' : 5,
98+
'color1' : '0,255,43',
99+
'particleRadius' : 2.5,
101100
'xFunction' : 'cos',
102101
'yFunction' : 'sin',
103-
'rocketIcon' : '\uf0b1',
104-
'rocketIconSize' : 14
102+
'rocketIcon' : '\uf17b',
103+
'rocketIconSize' : 30
104+
},
105+
// Catalyst brand colours.
106+
{
107+
'name' : 'redSilverRoundPlus',
108+
'outerRadius' : 100,
109+
'innerRadius' : 10,
110+
'numParticles' : 80,
111+
'color1' : '187,50,50', // Red
112+
'color2' : '195,195,195', // Gray
113+
'particleRadius' : 5,
114+
'xFunction' : 'cos',
115+
'yFunction' : 'sin',
116+
'rocketIcon' : '\uf0fe',
117+
'rocketIconSize' : 15
118+
},
119+
{
120+
'name' : 'blueSilverRingBigParticleLowAlphaSlideShare',
121+
'outerRadius' : 100,
122+
'innerRadius' : 10,
123+
'numParticles' : 80,
124+
'color1' : '91,154,169', // Blue
125+
'color2' : '195,195,195', // Gray
126+
'particleRadius' : 15,
127+
'particleAlpha' : 0.5,
128+
'xFunction' : 'cos',
129+
'yFunction' : 'sin',
130+
'rocketIcon' : '\uf1e7',
131+
'rocketIconSize' : 20
132+
},
133+
134+
{
135+
'name' : 'greenSilverCrazyHTML5',
136+
'outerRadius' : 100,
137+
'innerRadius' : 10,
138+
'numParticles' : 300,
139+
'color1' : '136,154,58', // Green
140+
'color2' : '195,195,195', // Gray
141+
'particleRadius' : 2.5,
142+
'xFunction' : 'tan',
143+
'yFunction' : 'cos',
144+
'rocketIcon' : '\uf13b',
145+
'rocketIconSize' : 25
146+
},
147+
148+
{
149+
'name' : 'plainYellowSmall',
150+
'outerRadius' : 40,
151+
'innerRadius' : 0,
152+
'numParticles' : 100,
153+
'color1' : '230,173,48', // yellow
154+
'particleRadius' : 3,
155+
'xFunction' : 'sin',
156+
'yFunction' : 'cos',
157+
'rocketIcon' : '\uf052',
158+
'rocketIconSize' : 20
105159
},
106160
];

skyrocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Firework.prototype.draw = function()
151151
//++ @TODO ideally the icon can be rotated, which is important for directional ones like the rocket.
152152
fctx.save();
153153
fctx.font = this.rocketIconSize + 'px FontAwesome';
154-
fctx.fillStyle = 'Goldenrod';
154+
fctx.fillStyle = 'rgba(' + this.color1 + ', ' + 1 + ')';
155155
fctx.textAlign="center"; // Centers the icon on the point (means no out of alignment with the trail).
156156
fctx.fillText(this.rocketIcon, this.x, this.y);
157157
fctx.restore();

0 commit comments

Comments
 (0)