Examples
Form
- Spacing: Even - Draws evenly spaced circles on the screen.
- Random polygon - Generates a completely random polygon.
- Polygon - Draws a very simple polygon using the lineTo() function
- Scaling - Shows how to scale shapes and groups
- Path to polygons - Converts a path to an array of polygons, then uses the polygon vectors to slightly manipulate the outline of the polygon.
- Path fill rules - Shows the two fillrules you can use to subtract paths from each other
- Path quad beziers - A very simple path object drawn using quad curves with a single control point.
- Path cubic beziers - A very simple path object drawn using bezier curves with two control points.
- Polygon sin and cos - Draws all basic shapes via sin and cos
- Spacing: Random - Shows how to randomly place circles on the screen.
- Spacing: Even and random - Draws evenly spaced circles on the screen.
- Polygon to polygon - Converts a polygon with few points to a polygon with evenly spaced vectors.
- Polygon vectors - Manipulates the outline of a polygon by changing the position of its vectors.
- Positioning - Basic caluclations to place objects relative to the screen or an object.
- Sin and cos - Basic example of how to use sin and cos to place an object on the edge of a circle
- Sin and cos rotation - Uses sin and cos to place and rotate rectangles on the edge of a circle
Color
- Random color from array - Returning a random color from an array of color objects.
- Color circle - How to draw a color circle using HSV, sin and cos.
- HSV primary colors - How to draw primary colors using the HSV color mode.
- Lying with color - Are the two small rectangles the same color?
- Lying with contrast - Are contrasts the same?
- Random color - Creating completely random colors.
- Color functions - Shows some of the functions you can use to manipulate color objects.
- Luminosity - Using the light() function to check whether to place a dark or light object on top of the color.
- Color modes - Simple example of how to use RGB and HSV color modes
- Color scheme: Analogous - Creating an analogous color scheme with HSV
- Color scheme: Brightness - Creating a color scheme using only brightness with HSV
- Color scheme: Complementary - Creating a complementart color scheme with HSV
- Color scheme: Saturation and brightness - Creating a color scheme using saturation and brightness with HSV
- Color contrast: saturation - Example from the interaction of color.
- Color scheme: Tetradic - Creating a tetradic color scheme HSV
- Color contrast: hot and cold - Example from the interaction of color.
- Color contrast: extension - Example from the interaction of color.
- Color scheme: Triadic - Creating a triadic color scheme HSV
- Color contrast: light and dark - Example from the interaction of color.
Grid
- Only once - Only use each grid module once
- Rotating a grid - Yup, they can rotate
- Multiple grids - Overlaying two grid systems to create a more sophisticated grid.
- Column grid - How to create a column-based grid system without rows.
- Modular grid - How to create a modular grid system.
- Manuscript grid - The simplest possible grid system.
Typography
- Rune.Font - Loading a font file and manipulating the vectors. This example uses the Rune.Font plugin.
- Text - Using the text object to draw text on the screen.
Randomization
- Noise detail - Changing the curves of perlin noise by using noiseDetail
- Random vs. Perlin noise - Showing the difference between random and perlin noise
- Pintori 2 - A simple implementation of Giovanni Pintori's design using randomization and colors
- Pintori 1 - A simple implementation of Giovanni Pintori's design using randomization
- Noise seed - Using noiseseed to control the starting position of the noise
- Pintori 3 - A full implementation of Giovanni Pintori's design using randomization and colors
- Noise iceberg - Creating a iceberg-like shape with perlin noise
- Noise circle - Manipulating the outline of a circle with perlin noise
- Chance - Give a rectangle an n-chance of showing
- Weighted randomness - Shows how to calculate weighted randomness.
Repetition
- Recursion 2 - More advanced code example to illustrate recursion.
- Recursion 1 - Simple code example to illustrate recursion.
- Cube pattern - A simple cube pattern
- Aperiodic pattern 2 - Using division rules to create an aperiodic pattern.
- Tile pattern - A simple pattern
- Simple pattern - A very simple pattern
- Cube patterns overlay - Using the cube pattern function twice to create a more interesting pattern.
- Cube pattern with function - A simple cube pattern with a reusable function
- Aperiodic pattern 1 - Using division rules to create an aperiodic pattern.
Transformation
- Pixel pattern - Drawing a pattern using the color values from an image
- Pixel iteration - How to iterate pixels values of an image. Warning slow!
Motion
- Draw loop (RIGHT!) - This is the way to animate with a draw loop in Rune.js
- Reuse shapes - Reusing shapes when they go across the screen
- TweenLite simple - Animating properties of shape objects using TweenLite.js
- Draw loop (WRONG!) - Do not do this in a scene graph library
- TweenLite advanced - Animating more properties of shape objects using TweenLite.js
- TimelineLite - Creating a sequence of tweens using TimelineLite
- Delete shapes - Delete shapes when they are not needed anymore
Other
- Modulo Star - Using modulo to draw a star
- Modulo - Using modulo to color every other square
- Modulo array - Using modulo to rotate through array values