You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-17Lines changed: 35 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,41 @@
2
2
Create fireworks on HTML canvas with Skyrocket.js
3
3
4
4
## Description
5
-
Skyrocket.js is a JavaScript library which displays skyrocket fireworks on HTML canvas.
5
+
Skyrocket.js is a JavaScript library which displays skyrocket fireworks on HTML canvas. Skyrockets launch from the bottom center of the screen, fly up, explode, then fade. There is a code generated background of a city skyline which is different each time the page is loaded. The message at the bottom center of the screen can easily be changed to fit the occasion.
6
6
7
-
Skyrockets launch from the bottom center of the screen, fly up, explode, then fade.
7
+

8
8
9
-
Rocket properties are defined in rocket_definitions.js with rockets being picked at random.
9
+
GreenSock's Animation Platform (GSAP) is used to power the rocket and explosion animations, the rest is plain JavaScript
10
+
so you should be able to include this library in any web project you like.
10
11
11
-
Also there is a code generated background of a city skyline which is different each time the page is loaded.
12
+
## Design your own Skyrockets!
13
+
One of the big features of this library is that you can create your own skyrockets using the visual designer
12
14
13
-
GreenSock's Animation Platform (GSAP) is used to power the rocket and explosion animations.
15
+

14
16
15
-
## Example
16
-
For an example, load the included index.html file in your browser.
17
+
This allows you to visually design the explosion shapes and set the animation properties, then click a button to generate the JSON config needed by the skyrocket.js to use these in the fireworks show.
18
+
19
+
Note: place the generated config in skyrockets/explosions.js
20
+
21
+
Open tools/designer.html to get creating your own skyrocket explosions or edit existing ones.
22
+
23
+
Another important file is skyrockets/colors.js which defines sets of colours used by the rockets. Add your own or adjust the existing colours by specifying the RGB values for the colours.
24
+
25
+
## How to use
26
+
For an example of how to use this library, load the included index.html file in your browser.
27
+
28
+
A canvas must be included, along with the js files needed for the backdrop, skyrockets and their definition.
17
29
18
30
As you will see there is a function called addFirework() which is called repeatedly to spawn new fireworks at a random interval.
19
31
32
+
An explosion and colour are selected at random from those defined in skyrockets/colors.js and skyrockets/explosions.js
33
+
34
+
You could choose specific colours and explosions if desired to suit a particular occasion. You will likely need to create your own as well because there are only a small number of included types.
35
+
20
36
## Tutorials and other documentation
21
-
Sorry, there are none at this time. Currently this library is in a alpha state with the inital 0.0.1 created during a hackday. Please look at the included index.html and other source code for what is required.
37
+
Sorry, there are none at this time. Currently this library is in a alpha state with the initial 0.0.1 created during a hackday. Please look at the included index.html and other source code for what is required and to read the comments.
38
+
39
+
The visual designer in tools/designer.html should be pretty straightforward to use, just follow the on-screen instructions.
22
40
23
41
## Maintainer
24
42
Douglas McKechie https://github.com/zarocknz
@@ -35,13 +53,13 @@ Special thanks to these people who collaborated with me on this during the hackd
35
53
Also a big thank you to Catalyst http://www.catalyst.net.nz/ for having a hackday to celebrate 20 years and allowing us to get this open source library off off the ground.
36
54
37
55
## TODO
38
-
Heaps, which may include the following (not in any particular order)...
39
-
40
-
*Define more and better firework explosion shapes and colours
41
-
*Perhaps de-couple firework explosion shapes from the colours so users can pick a shape and specify any colour
42
-
*Allow images to be used for the rockets
43
-
*Add launch and explosion sounds, either pre-recorded or perhaps audio API generated
44
-
*Allow explosion particles to have tails (will aid in creating different looking explosions)
45
-
*Allow the user to specify where along the screen (x axis) the rocket launches from rather than always in the center, perhaps there is an option for this to be random
46
-
*Ensure that backdrop is optional and there are some config parameters for it
56
+
May include the following...
57
+
58
+
*Allow an image to be placed in the background of the designer (as a guide) which will make it easier to create complex shapes by "tracing" particles over the top.
59
+
*Allow explosion particles to have tails which are lines (will allow for more interesting shapes).
60
+
*Even more firework shapes and colour combinations.
61
+
*Allow images to be used for the rocket bodies?
62
+
*Add launch and explosion sounds, either pre-recorded or perhaps audio API generated?
63
+
*Simplify the use of the library even more, ensuring things are nice an configurable.
64
+
*Add the ability to queue up skyrockets in a particular order so can chain them to say particular messages such as "happy, 2018, everyone"
0 commit comments