Giter Site home page Giter Site logo

renatoexpert / alexlune Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 84 KB

Static web app that simulates moon movements and phases.

Home Page: http://www.alexlune.com/

HTML 59.76% JavaScript 29.04% CSS 11.20%
astronomy astrophysics moon astrodynamics astronomical-algorithms astronomy-astrophysics childrens-web cientific educational moon-phase

alexlune's Introduction

Alexlune

Its Astronomic Simulator that

  • Teaches astronomy with animations!
  • Shows earth movements on itself and around the sun!
  • No need to install, just click here and you're on!

Screenshot

image

alexlune's People

Contributors

renatoexpert avatar

Stargazers

 avatar

Watchers

 avatar

alexlune's Issues

Social preview

Social preview
Upload an image to customize this repository’s social media preview.

Images should be at least 640×320px (1280×640px for best display).
Download template

That would make the project to reach more people.

Buttons do not increase its proper value

Buttons may increase or decrease its exact value

Cause

I changed the simulation timer to work with miliseconds instead of minutes.

Take a look on its current code

HTML

alexlune/index.html

Lines 86 to 99 in fb2c825

<div id='changeButtons'>
<p>
<button onclick='Wheel.changeTime(1440)'>+</button>
<button onclick='Wheel.changeTime(-1440)'>-</button>
</p>
<p>
<button onclick='Wheel.changeTime(+60)'>+</button>
<button onclick='Wheel.changeTime(-60)'>-</button>
</p>
<p>
<button onclick='Wheel.changeTime(+1)'>+</button>
<button onclick='Wheel.changeTime(-1)'>-</button>
</p>
</div>

Javascript

alexlune/script/main.js

Lines 70 to 78 in fb2c825

class Wheel {
stop = true;
speed = document.getElementById('speed');
static runcheck () {
utime = stop ? utime : utime+(1000*60*speed.value);
requestAnimationFrame (Wheel.runcheck);
}
static changeTime (fac) { utime += fac }; // acessed by 'Increment' menu (min,hours,days controls)
}

How it can be solved

On main.js, line 77, replace += fac by += fac * 60 * 1000

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.