Code Monkey home page Code Monkey logo

starfield's Introduction

Starfield Generator

Procedural generated 2D starfield using WebGL.

Overview

Starfield overview

Online Demonstration

Main features

  • Three-layer star field.
  • Star positions follow a uniform distribution.
  • Star colorization based on HSL and Gaussian distribution around the given star field's tone.
  • Anti-aliasing.
  • Blur effect.
  • Bloom effect.
  • Comet generated with a particle system.
  • Nebulae background generated with simplex noise.
  • GUI to change parameters.

Your browser and GPU have to support WebGL to make this star field generator works. Old Intel HD Graphics may not render all effects.

Installation

The TypeScript compiler and TSLint should be installed globally.

$> git clone https://github.com/yahiko00/Starfield.git
$> cd Starfield
$> npm install

Build

Project settings are defined in package.json, settings section. Inside this section, set debug to true to debug the project with source maps, or set debug to false to build the project in the release mode.

Tasks are defined in the gulpfile.js script.

Commands should be run under a bash shell.

The following command builds the project, run unit tests, and opens the browser. If any change happens, it builds the project again and refreshes the browser.

$> npm run watchRefresh

For more predefined commands, see package.json, item scripts.

Unit tests are logged in the tests/ folder, file tape.log.

Contributors

yahiko

Licence

MIT

starfield's People

Contributors

yahiko00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.