Giter Site home page Giter Site logo

werelax / flurry-webgl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roycurtis/flurry-webgl

0.0 2.0 0.0 1019 KB

WebGL port of Flurry screensaver

Home Page: http://roycurtis.github.io/Flurry-WebGL/

License: Other

CSS 0.34% HTML 2.85% JavaScript 30.12% Objective-C 17.72% C 48.96%

flurry-webgl's Introduction

This is a WebGL/Javascript port of Flurry from the original code by Calum Robinson ( website ).

This was my first excercise in OpenGL, WebGL, Three.JS, reading Obj-/C/++ code, reading AltiVec code and porting a legacy app, all at once. As such, this port is unoptimal, buggy and may not be a 1:1 perfect implementation of flurry. But it works!

Demo

Demo can be found on this page. Press H to hide the settings GUI and press F11 for full-screen.

License

Flurry-WebGL is licensed under the MIT license. See LICENSE.md for full notice.

Structure

This is run through a single HTML page that links to many javascript files, using some external libs from a CDN. The file structure matches similarly to the original C code:

  • Flurry.js - Entry point and holds the main namespace (Flurry) and objects (renderer, gui, etc)
  • GLSaver.js - Holds Flurry state, config, 3D setup and render loop
  • Renderer.js - WebGL rendering code and helper functions for loading shaders, setting up buffers, etc
  • Star.js - Represents the physical core of a "flurry", where all "streams" attach to
  • Spark.js - Represents a single physical "stream" attached to a flurry's star.
  • Smoke.js - Represents the particle emitter that gives physics to and draws the particle meshes, making use of the flurry's star and sparks
  • SmokeParticle.js - Represents a group of four particle quads (unsure why particles are grouped in fours)
  • Texture.js - Generates and holds the texture that the smoke particles use (actually an 8x8 grid of spots, each one with added speckle)
  • data/ - Holds pre-defined data, such as presets
  • enums/ - Holds enums, such as those for colors and blend modes
  • util/ArrayOf.js - Helper methods for creating an Array of something (with each element already initialized)
  • util/Colors.js - Helper method for parsing dat-gui's color controller values
  • util/Math.js - Extension to Javascript standard Math to provide some Clib-like functions
  • util/Vectors.js - Helper methods for creating "vectors" using typed arrays

Dev notes

See docs/DevNotes.md for rough notes jotted down during the porting process.

TODO

  • Restructure and clean up the code
  • Multiple/per-monitor flurry? (perhaps package Flurry as a web component?)
  • Better support for mobile (alternative GUI to dat.gui?)

flurry-webgl's People

Watchers

 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.