{"id":19396079,"url":"https://github.com/msalman81/animated-firework-simulator","last_synced_at":"2026-06-17T11:32:10.138Z","repository":{"id":99641448,"uuid":"198175773","full_name":"msalman81/Animated-Firework-Simulator","owner":"msalman81","description":"An exercise in Java and Java Graphics - this is a simple version of a firework simulator.","archived":false,"fork":false,"pushed_at":"2019-07-22T08:05:54.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T22:23:44.895Z","etag":null,"topics":["java","javagraphics","jframe"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msalman81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-22T08:00:37.000Z","updated_at":"2019-07-22T08:12:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ce0fcd7-5c62-429c-91de-be1f7e665685","html_url":"https://github.com/msalman81/Animated-Firework-Simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msalman81/Animated-Firework-Simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msalman81%2FAnimated-Firework-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msalman81%2FAnimated-Firework-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msalman81%2FAnimated-Firework-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msalman81%2FAnimated-Firework-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msalman81","download_url":"https://codeload.github.com/msalman81/Animated-Firework-Simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msalman81%2FAnimated-Firework-Simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34447264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","javagraphics","jframe"],"created_at":"2024-11-10T10:33:29.057Z","updated_at":"2026-06-17T11:32:10.121Z","avatar_url":"https://github.com/msalman81.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animated-Firework-Simulator\nI have a main method which creates a new GameMain causing the constructor of GameMain to be called and this causes\nthe JFrame game to be created and the layout is set to flowlayout and the setGui method is called where all the GUI components are created\nand then added to the game frame. the velocitySlider has values from 75 to 125 and the timeSlider has values from 1-5 and the angleSlider has values from 25-75.\nThese values were set to get optimum projectile performance. The comboboxes are created and the colors are added in the colorDropdown and the gameTypes in the fireworkTypes.\nIn case when the slider values are changed the source is found and if velocity slider then the velocity label is changed and the value is stored in velocity variable.\nthe same is done with angleSlider and timeSlider but in case of angleSlider angleRad is converted into radians. if the dropdowns or the gametype dropdown are selected then the\nactionPerformed is called and it stores of the value of the dropdown into strings and does action accordingly. The launchBtn when clicked creates a new fireworkGUI frame and automatically\nthe Frame constructor is called which causes frame to be made and adds the canvas and the paintComponent of canvas causes the background to get black and and then the endingPoint method is called\nwhich calculates the final point of trajectory and then drawTrajectory is called which draws the Trajectory. I then put a switch statement which compares all the gameTypes and calls the methods accordingly.\nthe Circles method is called if the user has set the gametype to circles and this first from the initial ending trajectory point makes 5 explosive trajectories and then uses that specific trajectories ending point\nto draw the circles. the angle increments by 1 radians at the end. the Funnel method called  and this first from the initial ending trajectory point makes 5 explosive trajectories and then uses that specific trajectories ending point\nto draw the small funnels the angle at the end is incremented by 1 radians. The standard method draws lines in direction from the ending point of the initial trajectory. the Bomb method\ndraws 5 trajectories after the first initial trajectory and at the end of each new trajectory it draws an oval and two lines to make a bomb like shape.\nMy velocity starts from 75, my angle from 25 and my time from 1s to optimise the projectile launch.\nRun Instructions: javac GameMain.java, java GameMain\n\nPREVIEW:\n![image](https://user-images.githubusercontent.com/46281169/61616256-66fb1380-ac81-11e9-9b70-63db950a52d5.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsalman81%2Fanimated-firework-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsalman81%2Fanimated-firework-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsalman81%2Fanimated-firework-simulator/lists"}