Examples

Some Examples of using Canva-Lang

canvas-lang .

Basic Example

canvas {
  background "navy";
  circle at (10, 10) radius 5 fill "yellow";
  text "Hello World" at (0, 15) size 10 color "white";
}
Basic Example

Animation Example

canvas {
  background "black";
  
  animate {
    frame {
      circle at (5, 5) radius 3 fill "red";
    }
    frame {
      circle at (10, 5) radius 3 fill "blue";
    }
    frame {
      circle at (15, 5) radius 3 fill "green";
    }
  } for 5000;
}
Animation Example

Rainbow Text Example

canvas {
  background "black";
  rainbow "Welcome to canvas-lang!" at (5, 5) duration 200;
}
Rainbow Text Example

Last updated