Skip to content

A mesmerizing 60fps plasma effect demo on HTML5 Canvas, featuring palette rotation and dynamic visual patterns. Customizable with built-in presets and real-time parameter adjustments.

License

Notifications You must be signed in to change notification settings

heldercorreia/iris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Iris

A simple demo of a palette rotation plasma effect implemented using HTML5 Canvas and JavaScript. This project showcases smooth, vibrant color transitions and a mesmerizing visual effect.

History

This demo was first written in 2012, during the early stages of HTML5 Canvas. See this old blog post I wrote then for context.

Demo

Check out the live demo.

Iris Screenshot

Customization

The plasma effect demo comes with several pre-defined presets and customization options, allowing you to tweak and experiment with the visuals easily. Here's how you can customize the effect:

Pattern Presets

The effect includes 10 pre-defined presets, each with unique parameters that control the visual appearance of the plasma. You can switch between these presets using the following keyboard keys:

  • 0 to 9: Select a specific preset (e.g., press 0 for the first preset, 1 for the second, etc.).

Dynamic Adjustments

Use these keyboard controls to modify the effect in real time:

Plasma Parameters

  • Amplitude / Frequency: W X A D

Resize Modes

  • N: Shrink the canvas size.
  • M: Grow the canvas size.
  • F: Resize to fit the full viewport.

Animation Control

  • H: Toggle animation on or off.

Angle Functions

Change the mathematical function used for the plasma's angle calculations:

  • S: Use Math.sin.
  • T: Use Math.tan.
  • U: Use Math.atan.

Base Color Channel

Switch the primary color channel used in the effect:

  • R: Red channel.
  • G: Green channel.
  • B: Blue channel.

Randomization

Every 3 seconds, the effect will automatically randomize the color channel and pattern preset, keeping the visuals fresh and dynamic. You can manually trigger these randomizations via the JavaScript function randomizeEffects().

Experiment with these options to create unique and mesmerizing plasma effects!

FPS Display

The current frames-per-second (FPS) is displayed in the top-left corner of the viewport. This helps you monitor the performance of the plasma effect in real time as you experiment with different presets and customizations.

License

This project is open-source and available under the MIT License.

About

A mesmerizing 60fps plasma effect demo on HTML5 Canvas, featuring palette rotation and dynamic visual patterns. Customizable with built-in presets and real-time parameter adjustments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published