Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkaso committed Dec 25, 2024
2 parents 1ebd22e + f1af231 commit d112bcf
Show file tree
Hide file tree
Showing 34 changed files with 728 additions and 338 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<h1 align='center'>Flux</h1>
A beautiful dynamic flowfield visualization with particle simulation. It demonstrates the movement of particles within a vector field, offering an engaging visualization of the underlying noisemaps.
<p align='center'>
<img src='assets\flux4-gif.gif'>
<img src='assets\screenshots\Flux_FranksLabText_light.png'>
</p>
<p align='center'>
<img src='assets\flux1.png'>
<img src='assets\screenshots\SeaAnemone_FNS.png'>
</p>
<p align='center'>
<img src='assets\flux2.png'>
<img src='assets\screenshots\Greens_Swirly.png'>
</p>
<p align='center'>
<img src='assets\flux3.png'>
</p>
<p align='center'>
<img src='assets\flux5.png'>
<img src='assets\screenshots\Bubbles_Quattro.png'>
</p>

#### For additional screenshots, visit the full folder: [Screenshots Folder](assets/screenshots)

## System Support
| OS | Supported |
| :---: | :---: |
Expand Down
Binary file removed assets/flux1.png
Binary file not shown.
Binary file removed assets/flux2.png
Binary file not shown.
Binary file removed assets/flux3.png
Binary file not shown.
Binary file removed assets/flux4-gif.gif
Binary file not shown.
Binary file removed assets/flux4.png
Binary file not shown.
Binary file removed assets/flux5.png
Binary file not shown.
Binary file added assets/fonts/Inter-BlackItalic.otf
Binary file not shown.
Binary file added assets/fonts/impact.ttf
Binary file not shown.
Binary file added assets/screenshots/Blues_Swirly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/Bubbles_FNS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/Bubbles_Quattro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/Flux_FranksLabText.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/Flux_FranksLabText_Light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/Greens_Swirly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/SeaAnemone_FNS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 0 additions & 35 deletions color_functions.py

This file was deleted.

296 changes: 0 additions & 296 deletions flux.py

This file was deleted.

Empty file added flux/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions flux/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from flux import start_flux

start_flux()
16 changes: 16 additions & 0 deletions flux/color_functions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os
import importlib

__globals = globals()
__clr_funcs = {}
for file in os.listdir(os.path.dirname(__file__)):
mod_name = file[:-3] # strip .py at the end
if not mod_name.startswith('__'): # Avoid importing __init__.py
__globals[mod_name] = importlib.import_module('.' + mod_name, package=__name__)
__clr_funcs[__globals[mod_name].get_color_function_name()] = __globals[mod_name].color

def get_color_function(func):
return __clr_funcs.get(func)

def get_color_function_names():
return list(__clr_funcs.keys())
13 changes: 13 additions & 0 deletions flux/color_functions/age.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import numpy as np

def get_color_function_name():
return 'Age'

def color(min_rgb, max_rgb, base_alpha, args):
age_range = args['max_age'] - args['min_age']
age_norm = np.divide(np.subtract(args['particles'][2], args['min_age']), age_range)
r = np.add(min_rgb[0], np.multiply(age_norm, (max_rgb[0] - min_rgb[0])))
g = np.add(min_rgb[1], np.multiply(age_norm, (max_rgb[1] - min_rgb[1])))
b = np.add(min_rgb[2], np.multiply(age_norm, (max_rgb[2] - min_rgb[2])))
a = np.repeat(base_alpha, r.size)
return r, g, b, a
Loading

0 comments on commit d112bcf

Please sign in to comment.