cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

  <meta charset="utf-8">
  <title>Empty project</title>
  <script type="text/javascript" src="https://assets.runemadsen.com/rune.browser.js"></script>
  <script type="text/javascript" src="https://assets.runemadsen.com/rune.noise.js"></script>

  <div id="canvas"></div>

               body {
      background-color: #fff;
    #canvas svg {
      background-color: #fff;
      /*box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06),inset -1px -1px 1px 0 rgba(0, 0, 0, 0.02);
      border: 1px solid #E2E2E2;
      border-bottom-color: #CECECE;*/
canvasheight = window.innerHeight;
canvaswidth = window.innerHeight;

var r = new Rune({
  frameRate: 10,
  container: "#canvas",
  width: canvaswidth,
  height: canvasheight,
  //debug: true

// draw background
r.on('mousemove', function(mouse) {
  console.log("the mouse moved to", mouse.x, mouse.y);
  let ctrl1 = Rune.random(0, canvaswidth);
  let ctrl2 = Rune.random(0, canvasheight);
 /* The following will draw a quad bezier curve from the current path position to 200,0, with the curve going through a single control point at 100,100.

curveTo(100, 100, 200, 0);

The following will draw a cubic bezier curve from the current path position to 200,0, with the curve going through two control points at 100,100 and 200,200.

curveTo(100, 100, 200, 200, 200, 0);

  r.path(0, 0)
  .moveTo(mouse.x, mouse.y)
     .lineTo(mouse.x, mouse.y)
   .curveTo(ctrl2, ctrl2, ctrl1, ctrl1, mouse.y + 10, mouse.x + 10)

Loading ..................