Nebula

Nebula

Return

Intro

Nebula is a free streaming ser... no not that nebula (though you should check it out if you haven't).

ThisNebula is a simple, yet elegant and relatively performant animated and interactive display. Really it's purpose is as a background, with some limited interactivity with a 'mouse' ball.

Demo

Description

For a rather pleasing animation, that contrasts simplicity in design with complexity of motion, the logic powering it is fairly straightforward.

The balls are simply a large array of 'nebulaBall' objects, which have some standardised properties (color, size, etc) and some dynamic ones (direction, velocity). Each ball is given a random position on the edge of the canvas on load, as well as a random direction and velocity.

The links are even more simple — if a ball is within the given cutoff distance of another ball, a link is drawn with an opacity proportional to their proximity.

The mouse is an abstraction on the normal balls — it uses all the same standard properties and lives in the same array (meaning it inherits appearance and the link drawing behaviour), but it has no velocity.

Customisation

The plugin has a number of customisable options, including:

  • Canvas Size**
  • Nebula Size (number of balls)**
  • Nebula Buffer*
  • Ball Color / Size / Alpha
  • Ball Min/Max Velocity*
  • Link Color / Width
  • Link Cutoff Distance**
* performance impact. ** significant performance impact.

You can find the code here on GitHub.

Return