langolf / urpflanze

A library for developers who want to approach to creative coding, for artists who want to approach to programming or for anyone else who wants to play with math.

Home Page:https://genbs.github.io/urpflanze/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A library for developers who want to approach to creative coding, for artists who want to approach to programming or for anyone else who wants to play with math.

Full docs and Examples

Installation

The most immediate way to include Urpflanze in your project is to use an online hosted version.

CDN

Full version

<script src="https://cdn.jsdelivr.net/npm/urpflanze"></script>

Customizable version

<script src="https://cdn.jsdelivr.net/npm/urpflanze[@version]/build/urpflanze[-light][.min].js"></script>

NPM

To install it just run the command:

npm i --save urpflanze

At the end you can include Urpflanze in your code

import * as Urpflanze from 'urpflanze'

const scene = new Urpflanze.Scene()

// or

import { Scene } from 'urpflanze'

const scene = new Scene()

use urpflanze/dist/index-light for light version

Example

Hello Rect!

const scene = new Urpflanze.Scene()

const rect = new Urpflanze.Rect({
	repetitions: 8,
	distance: 100,
	sideLength: 20,
})
scene.add(rect) // Add rect to scene

const drawer = new Urpflanze.DrawerCanvas(scene, document.body)
drawer.draw() // Draw scene on canvas

Output

Example output

Full docs and Examples

About

A library for developers who want to approach to creative coding, for artists who want to approach to programming or for anyone else who wants to play with math.

https://genbs.github.io/urpflanze/

License:GNU General Public License v3.0


Languages

Language:JavaScript 83.6%Language:TypeScript 15.6%Language:SCSS 0.5%Language:HTML 0.3%