{"repo":"jshor/tycho","free":true,"listed":false,"github":"https://github.com/jshor/tycho","clone":"git clone https://github.com/jshor/tycho.git","description":"🪐 A real-time interactive simulation of the solar system.","language":"TypeScript","stars":113,"topics":["react","solar-system","orrery","nasa","threejs","webgl","react-three-fiber","zustand"],"license":"MIT","category":"game-templates","readme_excerpt":"Tycho.io A real-time interactive simulation of the solar system. Development Quick start 1. Clone this repo: 2. Use the right node version: 3. Install dependencies (via Yarn): 4. Start: Framework and libraries This app is written in TypeScript and built using React.js, THREE.js, and zustand for state. It uses react-three-fiber for THREE-based React components, along with its drei helpers. It's bundled using Vite. Styling Each DOM component contains a corresponding Sass stylesheet and employs the BEM CSS design pattern. Vite compiles the Sass as part of the build. Application Architecture The overall architecture follows a container pattern, split between src/modules and src/components . In a nutshell, modules in this app leverage tasks such as handling state and minor front-end logic, while components simply handle the presentation. Physics calculations and business logic is delegated to services, and some critical components, such as the Camera, have dedicated services. State management All shared-state data is stored in the zustand store, which lives in src/store . This includes the 2D and 3D positions of objects and the current time. Modules subscribe to the slices they need and the store is written to through its actions, which keeps the data flowing in one direction. In rare cases, some components will use the local state for things internal to that component, when appropriate. File structure This project utilizes a typical React app flat directory structure. Tests for e","default_branch":null,"files":null,"tree":[],"storefront":"/r/jshor","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jshor/tycho/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}