// This file is part of Cosmos Journeyer // // Copyright (C) 2024 Barthélemy Paléologue // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . import i18n from "@/i18n"; export class CreditsPanel { readonly htmlRoot: HTMLElement; constructor() { this.htmlRoot = this.createPanelHTML(); } private createPanelHTML(): HTMLElement { const panel = document.createElement("div"); panel.className = "sidePanel"; // Create title const title = document.createElement("h2"); title.textContent = i18n.t("sidePanel:credits"); panel.appendChild(title); // Contributors section const contributorsHeader = document.createElement("h3"); contributorsHeader.textContent = i18n.t("sidePanel:contributors"); panel.appendChild(contributorsHeader); const contributorsDiv = document.createElement("div"); contributorsDiv.className = "contributors-section"; const contributorsImg = document.createElement("img"); contributorsImg.src = "https://contrib.rocks/image?repo=BarthPaleologue/CosmosJourneyer"; contributorsImg.alt = "Contributors"; contributorsImg.className = "contributors-image"; contributorsDiv.appendChild(contributorsImg); panel.appendChild(contributorsDiv); // Programming section const programmingHeader = document.createElement("h3"); programmingHeader.textContent = i18n.t("sidePanel:programming"); panel.appendChild(programmingHeader); const programmingCredits = [ 'Created by Barthélemy Paléologue', 'Webpack configuration & Refactorings by Martin Molli', 'Built with BabylonJS and its awesome forum', 'Planet surface rendering based on SimonDev\'s 3D World Generation video series', 'Star colors made using John Walker\'s "Colour Rendering of Spectra"', 'Black hole shader based on set111 implementation on shadertoy', 'Lens flare shader based on TheNosiriN implementation on shadertoy', 'Fractal raymarching based on Nazlbit\'s implementation and Myro\'s implementation on shadertoy', 'Mandelbox raymarching based on geoff\'s implementation on shadertoy', 'Sierpinski raymarching based on Inigo Quilez\'s implementation on shadertoy', 'Menger Sponge raymarching based on reinder\'s implementation on shadertoy', 'Volumetric thruster exhaust based on wedesoft\'s implementation on shadertoy', ]; programmingCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); const charactersAndAnimationsHeader = document.createElement("h3"); charactersAndAnimationsHeader.textContent = i18n.t("sidePanel:charactersAndAnimations"); panel.appendChild(charactersAndAnimationsHeader); const charactersAndAnimationsCredits = [ 'Astronaut character model from Sketchfab, licensed under Creative Commons Attribution 4.0', 'Character animations from Mixamo, licensed under Adobe Terms of Use', ]; charactersAndAnimationsCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); // Materials & Textures section const materialsHeader = document.createElement("h3"); materialsHeader.textContent = i18n.t("sidePanel:materials"); panel.appendChild(materialsHeader); const materialsCredits = [ 'Awesome PBR materials from freepbr.com', 'Solar panel material from texturecan.com, licensed under the Creative Commons CC0 1.0 Universal License.', 'Metallic Tire material from texturecan.com, licensed under the Creative Commons CC0 1.0 Universal License.', 'Rubber Tire material from texturecan.com, licensed under the Creative Commons CC0 1.0 Universal License.', 'Jupiter texture from Solar System Scope, licensed under Attribution 4.0 International license', 'Saturn texture from Solar System Scope, licensed under Attribution 4.0 International license', 'Uranus texture from Solar System Scope, licensed under Attribution 4.0 International license', 'Neptune texture from Solar System Scope, licensed under Attribution 4.0 International license', 'Saturn rings from Solar System Scope, licensed under Attribution 4.0 International license', 'Uranus rings from Planet Pixel Emporium, licensed under the terms specified here', ]; materialsCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); // Icons section const iconsHeader = document.createElement("h3"); iconsHeader.textContent = i18n.t("sidePanel:icons"); panel.appendChild(iconsHeader); const iconCredits = [ 'Gasoline icon created by Freepik - Flaticon', 'Astronomy icons created by 3ab2ou - Flaticon', 'Space-station icons created by Freepik - Flaticon', 'Space-exploration icons created by Dewi Sari - Flaticon', 'Expand icons created by Google - Flaticon', 'Play icons created by Freepik - Flaticon', 'Download icons created by Debi Alpa Nugraha - Flaticon', 'Delete icons created by bqlqn - Flaticon', 'Edit icons created by Kiranshastry - Flaticon', 'Information icons created by Freepik - Flaticon', 'Link icons created by Creaticca Creative Agency - Flaticon', 'Exploration icons created by SprSprK - Flaticon', 'Launch icons created by Freepik - Flaticon', 'Barter icons created by Ahmad Roaayala - Flaticon', ]; iconCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); // Font section const fontHeader = document.createElement("h3"); fontHeader.textContent = i18n.t("sidePanel:font"); panel.appendChild(fontHeader); const fontCredit = document.createElement("p"); fontCredit.innerHTML = 'Nasalization font by Typodermic Fonts'; panel.appendChild(fontCredit); // Music section const musicHeader = document.createElement("h3"); musicHeader.textContent = i18n.t("sidePanel:music"); panel.appendChild(musicHeader); const musicCredits = [ 'Wandering by Andrewkn', '"Deep Relaxation" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Atlantean Twilight" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"That Zen Moment" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Echoes of Time v2" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Infinite Perspective" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Peace of Mind" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Spacial Winds" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Mesmerize" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Reawakening" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Equatorial Complex" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', '"Soaring" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License', ]; musicCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); // Sound effects section const soundEffectsHeader = document.createElement("h3"); soundEffectsHeader.textContent = i18n.t("sidePanel:soundEffects"); panel.appendChild(soundEffectsHeader); const soundEffectsCredits = [ 'Menu screen mouse over by DrMinky | License: Attribution 4.0', '17 DISTORZIONE.WAV by lollosound | License: Creative Commons 0', 'Large Engine.wav by NHumphrey | License: Creative Commons 0', 'Futuristic Inspect Sound, UI, or In-Game Notification.wav by MATRIXXX_ | License: Creative Commons 0', 'endless acceleration.flac by Timbre | License: Attribution NonCommercial 4.0', 'Rocket Thrust effect.wav by LimitSnap_Creations | License: Creative Commons 0', 'Error Bleep 4 by original_sound | License: Attribution 3.0', 'Echoed Blip by copyc4t | License: Attribution 4.0', 'The Blue Danube Waltz from Johann Strauss', 'Spaceship voice generated using ElevenLabs', ]; soundEffectsCredits.forEach((credit) => { const p = document.createElement("p"); p.innerHTML = credit; panel.appendChild(p); }); return panel; } }