Coder Social home page Coder Social logo

rami-sabbagh / satellite-simulator Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 14.42 MB

A 3rd year University physics project for simulating satellites motion in orbit.

Home Page: https://rami-sabbagh.github.io/satellite-simulator/

License: MIT License

Shell 0.13% TypeScript 87.46% HTML 7.37% CSS 2.15% JavaScript 2.89%
physics three-js typescript lil-gui webpack

satellite-simulator's Introduction

Satellite Simulator VI - Deluxe Edition

Satellite Simulator's Logo

CodeFactor

A university physics project for simulating satellites in orbit.

Installation instructions

  1. Clone the git repository locally or download the source-code and extract it.
  2. Install Node.js 16.x on your system.
  3. Enable Yarn through corepack, which ships with Node 16.x.
# Use an elevated shell (Administrator shell on Windows, sudo on Unix).
corepack enable
  1. Open a terminal in the root of the repository and install the project's dependencies.
yarn
  1. Start the development server.
yarn start
  1. A browser page should automatically open with the project running in it.

Tech stack

  • Three.js
  • TypeScript
  • Husky and ESLint
  • Webpack

Development Server

It's a webserver provided by webpack that serves the project while being built in realtime and stored in memory.

You can read more about it here, here and here.

Runs by default on port 9000 and so can be accessed at http://localhost:9000/ (should automatically open when starting the dev server).

Live Reload

When using the development server you'll have the benefit of automatic live reload whenever changes are made.

Hot Module Reload

The HMR support is enabled in the project, but the code has to support it.

Which means writing code that accepts the module replacements and does any adjustments needed.

That is implemented for src/app.ts in src/index.ts.

So when app.ts is modified it's hot reloaded without reloading the whole page, by replacing the old scene instance by a new one.

But when files such as src/physics/kepler-math.ts are modified with no HMR support, a whole page reload is automatically performed.

During the project development you might wish to implement HMR support for other sub-modules, for example to avoid losing the state of created scene objects.

You can read more at webpack's documentation page.

Build Instructions

After following the installation instructions run:

yarn build

The build can be then accessed at /dist and could be served as static page content.

Credits

Icons are from: https://www.svgrepo.com/

Satellite 3D model, under Creative Commons Attribution, was modified by RedDeadAlice.

Developed by

satellite-simulator's People

Contributors

edwardkarra avatar hasanmothaffar avatar rami-sabbagh avatar red1c3 avatar yamanqd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

satellite-simulator's Issues

Mobile support

Suggestions

  • Disable some graphics effects on low-tier mobile application.
  • Spawn some satellites by default.
  • Collapse the GUI by default.
  • Lower the time resolution.

Hide FPS indicator when assets are being loaded

Current behavior

The FPS indicator is present in the loading screen.

Expected behavior

The FPS indicator should not be displayed until all assets are loaded and the loading screen is removed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.