Getting Started with Peruna

Introduction

Peruna is a creative coding library for Swift that makes it easy to create graphics and animations using Metal. It provides a simple and intuitive API for drawing shapes, handling user input, and creating interactive experiences.

Installation

To get started with Peruna:

  1. Download the PerunaSample app from GitHub
  2. Open the project in Xcode
  3. Build and run the sample app

Basic Usage

Peruna provides a set of simple functions for drawing shapes on the canvas. Here's a basic example:

// Draw a rectangle
rect(100, 100, 200, 150)

// Draw a circle
ellipse(300, 300, 100, 100)

// Draw a line
line(100, 100, 200, 200)

Next Steps

Check out the documentation for each shape in the sidebar to learn more about their specific parameters and usage. Each shape function supports both positional and named parameters for flexibility.